Guide Email Routing lane retries#27
Merged
Merged
Conversation
Maildesk provisioning exposed a cfctl UX gap: dev-lane Email Routing plans could fail with zone_resolution_failed even though the global lane could plan the same routing-rule preview cleanly. The failure envelope reported execution_failed with no recommended command, leaving the operator to infer the lane switch manually. Teach cfctl_failure_guidance_json to treat zone_resolution_failed as a selector/lane remediation class, producing a rerunnable plan command with the recommended lane when lane comparison finds one. Wire apply backend failures through that guidance builder so mutation-script failures preserve the same actionable error contract. The change does not weaken preview or ack gates and does not perform Cloudflare mutation. Static coverage adds a synthetic lane-comparison assertion for email.routing_rule upsert so future regressions keep recommended_lane, next_step, and --plan command shape intact.
Owner
Author
|
@codex Please review the lane-guidance semantics in this PR, especially whether |
Owner
Author
|
Local proof for this PR is green; GitHub static contract did not execute code. The check run has no runner/steps and its only annotation is: "The job was not started because your account is locked due to a billing issue." Proof run locally on 2026-06-30:
No Cloudflare mutation was performed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behavioral changes
zone_resolution_failed.recommended_lane,next_step, and rerunnable--plancommand when another lane can resolve the zone.execution_failedenvelopes.email.routing_rule upsertguidance using a synthetic dev/global lane comparison.Why
Maildesk provisioning preview showed dev-lane Email Routing plans failing because the dev token could not resolve the zone, while the same plan-only operation succeeded with
CF_TOKEN_LANE=global. cfctl had enough lane context to guide the operator but returned null guidance in the apply failure envelope.Proof
./scripts/verify_static_contract.shpassed./scripts/verify_maildesk_cf_contract.shpassedpython3 scripts/verify_permission_catalog.py --cfctl ./cfctlpassedgit diff --checkpassedemail.routing_rule upsert --plannow returnsbasis=zone_resolution_failed,recommended_lane=global, and a global-lane--planretry commandImplications and risk
Confidence
Next steps