Skip to content

Preview maildesk storage setup commands#28

Merged
rogu3bear merged 1 commit into
mainfrom
build/maildesk-storage-preview-commands
Jun 30, 2026
Merged

Preview maildesk storage setup commands#28
rogu3bear merged 1 commit into
mainfrom
build/maildesk-storage-preview-commands

Conversation

@rogu3bear

Copy link
Copy Markdown
Owner

Behavioral changes

  • Adds plan-only component commands for missing maildesk storage resources in cfctl maildesk-cf provision --plan.
  • Missing D1 databases now point to cfctl wrangler d1 create <name> --plan.
  • Missing R2 buckets now point to cfctl wrangler r2 bucket create <name> --plan.
  • Missing Queues now point to cfctl wrangler queues create <name> --plan.
  • The composite maildesk-cf provision --ack-plan path remains blocked; this does not create resources or weaken apply gates.

Why

The maildesk lifecycle already identifies missing D1/R2/Queue resources, and cfctl already has a preview-gated Wrangler wrapper for the underlying create commands. Emitting generic blocked rows made the plan less actionable than necessary while still stopping before mutation.

Proof

  • ./scripts/verify_maildesk_cf_contract.sh passed
  • ./scripts/verify_static_contract.sh passed
  • python3 scripts/verify_permission_catalog.py --cfctl ./cfctl passed
  • git diff --check passed
  • Private desired-state plan-only readback now emits unblocked preview commands for two D1 databases, two R2 buckets, and one Queue
  • Ran each generated storage command with cfctl wrangler ... --plan; all five emitted plan-only wrapper receipts with requires_ack=true

Implications and risk

  • Runtime safety: high confidence. No apply or ack path is enabled by this change.
  • Operator UX: high confidence. Existing missing-resource rows now carry the same preview-command field used by Worker and Email Routing drifts.
  • Remaining risk: sender-domain authentication/provider readback remains blocked because it is not yet a cfctl mutation/readback surface.

Next steps

  • After merge, rerun cfctl maildesk-cf provision --plan against the private desired state and keep the resulting Worker, Email Routing, and storage previews together for operator approval.
  • A separate lane is still needed for sender-domain provider readback before mail-ready can be claimed.

The maildesk-cf lifecycle could identify missing D1, R2, and Queue resources, but it emitted generic blocked rows even though cfctl already has a preview-gated Wrangler wrapper for those create operations. That made the live maildesk plan less actionable than it needed to be without crossing the protected apply boundary.

Map missing maildesk storage resources to cfctl wrangler create commands with --plan: D1 databases, R2 buckets, and Queues. The composite maildesk apply path remains blocked; this only teaches the plan to expose component preview commands that still require their own ack-plan before mutation.

Contract coverage now asserts the missing-resource fixture produces unblocked preview commands for both D1 databases, both R2 buckets, and the Queue. Verified with the focused maildesk contract, static contract, permission catalog check, git diff --check, and a private desired-state plan-only readback.
@rogu3bear

Copy link
Copy Markdown
Owner Author

@codex Please review the lifecycle bridge in this PR, especially whether using cfctl wrangler ... --plan as the D1/R2/Queue component primitive is the right interim contract until dedicated d1.database, r2.bucket, and queue apply surfaces exist. Also check that the composite maildesk-cf ack path remains blocked and no storage mutation path is accidentally enabled.

@rogu3bear

Copy link
Copy Markdown
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:

  • ./scripts/verify_maildesk_cf_contract.sh passed
  • ./scripts/verify_static_contract.sh passed
  • python3 scripts/verify_permission_catalog.py --cfctl ./cfctl passed
  • git diff --check passed
  • Private desired-state maildesk-cf provision --plan emitted unblocked preview commands for D1, R2, and Queue resources
  • Each generated storage command was run as cfctl wrangler ... --plan and emitted a plan-only receipt with requires_ack=true

No Cloudflare mutation was performed.

@rogu3bear rogu3bear merged commit 14be6da into main Jun 30, 2026
1 of 2 checks passed
@rogu3bear rogu3bear deleted the build/maildesk-storage-preview-commands branch June 30, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant