Skip to content

Add preview provisioning control plane - #279

Merged
aRustyDev merged 5 commits into
mainfrom
codex/preview-control-plane
Nov 17, 2026
Merged

aRustyDev merged 5 commits into
mainfrom
codex/preview-control-plane

Conversation

@aRustyDev

Copy link
Copy Markdown
Owner

Summary

Move preview database provisioning behind a dedicated Access-protected Worker and Hyperdrive binding. Reconcile per-PR roles, schemas, and Hyperdrive configurations without a Kubernetes credential in GitHub Actions. Persist an acknowledgement marker so interrupted password updates are retried, and reject incomplete Cloudflare inventories before cleanup.

The provisioner database role and dedicated Hyperdrive configuration have been created on thrust-pg-dev. The Worker remains closed until its Access policy and service token are configured.

Validation

  • Provisioner property tests, fuzz seed replay, and wasm target check.
  • 60-second parser fuzz campaign: 4,404,478 inputs without a crash.
  • Disposable Postgres tests, including role privileges, collisions, password rotation, and active-session termination.
  • Reconciler, Access setup, Hyperdrive pagination, workflow lint, layout, and CI planner tests.
  • Live read-only Hyperdrive inventory and authenticated provisioner database inventory.

Before enabling

Configure the protected GitHub environment's Cloudflare API token, deploy the Worker with its route closed, set up Worker-level Access, then run the enablement workflow. The live Worker/Hyperdrive/Access path and end-to-end preview lifecycle still require verification.

@aRustyDev
aRustyDev had a problem deploying to preview-control-plane November 17, 2026 07:32 — with GitHub Actions Failure
@aRustyDev
aRustyDev marked this pull request as ready for review November 17, 2026 15:29
@aRustyDev
aRustyDev enabled auto-merge (squash) November 17, 2026 19:58
@aRustyDev
aRustyDev merged commit 3fa331a into main Nov 17, 2026
46 checks passed
@aRustyDev
aRustyDev deleted the codex/preview-control-plane branch November 17, 2026 20:16
aRustyDev added a commit that referenced this pull request Nov 17, 2026
… sorts it (#284)

#279 added the `thrust-preview-provisioner` entry after `thrust-profiling`; cargo sorts it before. `cargo metadata --locked`, which
is what CI runs, accepts the file as committed, so nothing failed. But any cargo command without `--locked` rewrites it, so a clean
checkout is dirty after its first plain cargo run (measured on main at 15bcfb0: 14 lines moved, nothing else). This commits what
cargo writes.

Shown: in the committed file exactly 2 of 491 packages are not where sorting puts them (the pair), and in this one none (a script
that compares in cargo's order, versions as versions, so that 0.9.1 comes before 0.10.1). The two files have the same 5225 lines
(a sorted comparison is identical): a move, with no dependency or version changed. A second plain cargo run leaves the new file
byte-identical, and `cargo metadata --locked` accepts it.

Not established: why the entry was put there. #279 is a single-parent squash commit, so it was not the resolution of a merge
conflict; a hand-written entry is the likely cause, and `--locked` does not catch one.

Refs: #279

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
aRustyDev added a commit that referenced this pull request Nov 17, 2026
…fails CI and not the next checkout (#288)

`cargo metadata --locked`, which every other step runs, accepts a lockfile whose packages are in the wrong order, and a cargo command
without `--locked` then rewrites the file. #279 added `thrust-preview-provisioner` one place late and #284 moved it; nothing had failed
in between, and a clean checkout of `main` was dirty after its first cargo run. Nothing in CI could have said so.

`scripts/check-cargo-lock.sh` runs `cargo metadata` without `--locked` and fails (exit 1, with the diff) when the lockfile is not what
cargo wrote back, which also catches a lockfile that has not heard of a change to a manifest. It exits 2 when it cannot vouch (no
Cargo.toml, no lockfile, cargo failing). It puts the lockfile back as it found it whatever the result, so it never leaves a checkout
dirty. `--self-test` builds small workspaces with no dependencies and checks the accept and refuse cases against cargo's own output (no
network).

- `.github/workflows/lint.yml`: two steps of the `deps` job, the self-test and the check.
- `.github/scripts/plan-ci.py`: the script is a guard of the `deps` job (`deps` and `ci-scripts`), and not "a script this planner does
  not know", which runs everything. `Cargo.lock` itself already runs everything.
- `docs/src/testing/running.md`: the two commands and the `deps` row.

Controls (AGENTS.md rule 8): the guard on the lockfile as it was before #284 (`git show 15bcfb0:Cargo.lock`) exits 1 and prints the
14-line move, and leaves that file as it found it; on the real lockfile it exits 0 (491 packages) and the tree stays clean. Four
broken copies of the script each fail the self-test on the cases that guard the broken line: cargo run with `--locked` (the disorder
is accepted, 2 cases fail), no restore after a rewrite (2), a cargo failure counted as success (1), a check that accepts any change
(4). The self-test is 10 of 10 on macOS and under dash on Linux.

Refs: #284

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
aRustyDev added a commit that referenced this pull request Nov 18, 2026
Since M5b (#281) assert-gate.sh's default cell job is none, so a
verdict job that forgot its cell job judged no cells and passed; the
wiring test was the only thing that held test.yml to name it. The
verdict action passes `cells` through whatever `cell-job` says, so a
forgotten `cell-job` arrives here as a level with no cell job and a
non-empty PLANNED. That is now refused ("cells are planned but no cell
job is named"): only an unset PLANNED or an empty array is no cells.
The four workflows without cells are given the action's default `[]`
and ci.yml's gate none, so neither changes.

- test-ci-scripts.sh: the gate case that ignored a PLANNED it was given
  is replaced by five (two cells, an object, not JSON: refused; `[]`
  and `[ ]`: passed), and a verdict job that forgot CELL_JOB and is
  given cells is refused (201 cases, were 196).
- mutate_gate.py: three mutants of the rule (removed, compared by text,
  reading no PLANNED), each killed.
- PLAN.md: the Test phase's row records what #279 left for it: an
  ungated workflow that repeats test.yml's preview commands and is the
  only check of the provisioner's wasm32 build, and planner paths
  handled before RULES.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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