Skip to content

Pin the applied D1 deployment baseline - #13

Merged
FlyOverCoderKY merged 1 commit into
mainfrom
claude/d1-deploy-baseline
Jul 28, 2026
Merged

FlyOverCoderKY merged 1 commit into
mainfrom
claude/d1-deploy-baseline

Conversation

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor

Summary

  • replace the unauthorized repeated D1 API call with a fail-closed, byte-exact assertion for the only production migration, which was already applied before Worker activation
  • keep the GitHub production credential scoped to Pages and Workers; do not substitute the much broader local OAuth credential
  • document that any future schema change must first add a separately least-privileged D1 credential and reviewed migration step

This follows deployment run 30373049414, where Pages deployed successfully and Cloudflare correctly rejected the GitHub token's D1 request with code 7403. Worker activation did not run. The production database already records migration 0001, and the workflow pins SHA-256 3f820cb7c1f8e76196e83f8bc8448dd9e72e840884fc39641c84e6b9d60ff27f plus an exact one-file migration count.

Verification

  • local migration count/hash assertion passes
  • Prettier and git diff --check pass
  • no application code or schema changed

Copilot AI review requested due to automatic review settings July 28, 2026 15:25
@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@FlyOverCoderKY
FlyOverCoderKY merged commit 0e26dc1 into main Jul 28, 2026
2 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the claude/d1-deploy-baseline branch July 28, 2026 15:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins the production D1 schema deployment baseline to avoid unauthorized/over-scoped D1 operations during CI deploys, while keeping the production Cloudflare token limited to Pages and Workers permissions.

Changes:

  • Updates the deploy workflow to assert a single migration file exists and matches a pinned SHA-256, and removes the previous wrangler d1 migrations apply --remote step.
  • Updates Worker documentation to reflect that the CI token intentionally has no D1 authority and that production schema changes are fail-closed pending a separately scoped credential.
  • Updates the project plan to document the same operational constraint and baseline pinning approach.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
worker/README.md Clarifies token scope (no D1) and documents the pinned “migration 0001” production baseline and fail-closed behavior for future schema changes.
docs/PROJECT_PLAN.md Updates Phase 2 deployment notes to remove D1 scope and document the operator-applied initial migration plus pinned hash gate.
.github/workflows/deploy.yml Replaces remote D1 migration application with a local, byte-exact baseline assertion (file count + SHA-256) before deploying Pages/Worker.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants