Skip to content

Allow migration files to be borrowed from trusted inputs - #308

Merged
aRustyDev merged 1 commit into
mainfrom
codex/preview-migration-contract
Nov 18, 2026
Merged

aRustyDev merged 1 commit into
mainfrom
codex/preview-migration-contract

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

The migration runner currently requires embedded static SQL, preventing a trusted runner from accepting migration files supplied as data. Allow Migration to borrow its file name and SQL, keeping the embedded list static and the migration behavior unchanged. A generated test proves caller-owned input can be dropped after the ledger entries are built.

Validation: 165 Postgres crate tests passed; formatting, native clippy and the provisioner wasm build passed. The generated test fails to compile with the former static-only type. The Postgres integration binary compiled locally but the run could not find /var/run/docker.sock; automatic command review rejected specifying the existing OrbStack socket, so the Docker-backed CI job is required.

@aRustyDev
aRustyDev temporarily deployed to preview-control-plane November 18, 2026 18:03 — with GitHub Actions Inactive
@aRustyDev
aRustyDev merged commit a5b94f8 into main Nov 18, 2026
42 checks passed
@aRustyDev
aRustyDev deleted the codex/preview-migration-contract branch November 18, 2026 18:27
aRustyDev added a commit that referenced this pull request Nov 18, 2026
Main moved four commits while #310 was open (#307, #308, #309 and the lettre fix #312), and two files conflicted:

- crates/adapters/postgres/src/lib.rs: #308 made `Migration` borrow its strings (`Migration<'a>`), and this branch added migration 0020 to
  the list. The list is `[Migration<'static>; 20]`: #308's type, this branch's twentieth entry.
- docs/src/testing/status.md: #309 rewrote the G-46 row and this branch added G-47 after it. G-46 is main's row, byte for byte
  (compared with `diff`), and G-47 follows it.

Merged, not rebased, because a force-push is blocked on this repository and #310 is already published.

The lettre bump of #312 comes in with the merge, which is what turns the `security / deny` job green on this branch (it failed on lettre
0.11.23 alone).

Checked on the merged tree before this commit: no conflict markers left, `scripts/check-contract-counts.sh` (74, 6; stage 2: 68, 4),
`cargo fmt --all --check`, `cargo clippy --workspace --all-targets -- -D warnings` and the wasm32 clippy of the Worker crates. The
test batteries are re-run on the merge commit and listed in the pull request.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
preview-control-plane — 1ca6136e Deployed Nov 18, 2026 by aRustyDev via reconcile #147
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