Skip to content

OSS-413: qualified docs/OCI channel promotion transactions - #607

Closed
athNdev wants to merge 6 commits into
mainfrom
codex/oss413-promotion-gates
Closed

athNdev wants to merge 6 commits into
mainfrom
codex/oss413-promotion-gates

Conversation

@athNdev

@athNdev athNdev commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

OSS-413 promotion gates — second checkpoint fixes

Exact head: 6976ca0fe95d4d3e20026eacaae8f58f9ceff715 (rebased onto current origin/main). ADR 0049 (0048 was taken by PR #610). PR #607 remains DRAFT; worktree clean. No dispatch, deploy, registry write, tag change or release from this lane.

Fixes

  1. Prior receipt corruption — cd.yml phase 1 emits prior_receipt from channel-active-receipt BEFORE any write; rollback consumes that receipt, never commit_decision.outputs.receipt (the candidate). Fixture asserts the source is the stage-phase prior receipt.
  2. Rollback reachable — rollback runs under always() with explicit outcome checks and no commit_decision success guard; deploy/probe/marker/commit/alias/final outcomes all trigger it. Downstream steps are gated on preceding outcomes so failures reach the rollback branch.
  3. Real docs restore — the exact currently published site bytes are copied to .website-build/prior-site with a recorded SHA-256; rollback uploads them as a distinct github-pages-prior artifact, deploys that artifact, and re-checks the public byte hash and marker.
  4. Stable gate evidence — verify-channel-parity validates the OBSERVED digests/revisions in both registries and the observed map is fed into the gate (no hardcoded digest). A failed stable alias write is compensated from the prior receipt plus the exact prior docs artifact. Both release jobs refuse an older release target lacking verify-gate-script commands.
  5. Knowledge — migrated to upstream's split ADR index and release-rules structure; ADR row added to adrs-decision-records.md; channel concept split into two bounded linked concepts within the 60-line cap; indexes regenerated by knowledge-lint -fix.

Executable failure-injection evidence

python <temp>/sim_run2.py (calls channel-simulate, channel-rollback, verify-gate-script, verify-channel-parity, channel-transaction):

Scenario Result
second-registry (ghcr) write failure rolled_back; moved: []; prior digest restored; resume = prior digest
final probe failure rolled_back; prior digest restored
docs marker publish failure rolled_back; zero registry writes at candidate digest
healthy published
prior receipt rollback targets prior sha256:eeee…, verified receipt
older release target REFUSED: missing trusted gate commands
digest parity mismatch REFUSED: ghcr digest differs
prerelease stable candidate REFUSED: not a canonical stable release tag
bootstrap without recorded flag REFUSED: Hub-only baseline needs bounded bootstrap

Full verification at exact head

python -m unittest scripts.test_release 149 OK; YAML parse all workflows OK; go vet ./... 0; go test ./... 0; knowledge-lint -fix then lint OK (queries 40/40, indexes current, no errors); git diff --check 0.

OSS-413 remains In Review pending live exact-head review and parity verification.

Add one qualified transaction per channel: exact trusted-main revision and exact-commit CI, reject older candidates against an active receipt, stage both immutable registries and the exact docs artifact, confirm a public candidate marker before alias moves, then confirm final alias/docs agreement and record a receipt. Nightly moves on both registries with no release or tracked main state; stable only from the verified digest; no redundant rolling channel. One shared non-cancelling pages-deploy lock, site-only dispatch limited to already-active sources, digest-anchored retry and rollback. Repair the verify-publication-ref GH_TOKEN defect (enables the fail-closed check). Offline fixtures cover first publish, retry, stale/out-of-order, rollback, dual-registry parity and arbitrary tags. No workflow dispatch, registry write, release, tag change or Pages deploy performed.
Fix the dead transaction wiring: phase=stage is a zero-write decision, phase=commit requires both candidate-probe and canonical marker confirmation before alias moves. Probe uses the non-active /docs/candidate/<sha>/ route; canonical marker is stamped only in the qualified transaction. Registry moves never precede verified docs; rollback restores both. Remove the withdrawn rolling alias. Rename ADR to 0048 to avoid the open 0046/0047 collision.
…nsaction

Remove every legacy nightly/edge/stable/latest alias-write step from cd.yml and release.yml. Add always() rollback restoring both registries and canonical docs from the prior receipt with exact-digest resume. Gate GitHub release creation on a synced stable transaction binding exact version, both digests and deployed docs marker. Add offline simulated second-registry, docs and final-probe failure evidence.
…ate evidence

Capture the verified prior receipt in stage phase and use it (never the candidate receipt) for always() rollback; restore exact prior docs bytes via distinct Pages artifact. Wire observed dual-registry digests into the stable gate, compensate failed stable alias writes, and refuse older targets lacking trusted gate commands. Add executable failure-injection evidence.
Upstream split the ADR index and release rules concepts. Restore the generated index from main, add the 0049 row to adrs-decision-records.md, and split the channel promotion concept into two bounded linked concepts within the 60-line cap.
@athNdev
athNdev force-pushed the codex/oss413-promotion-gates branch from af32484 to 6976ca0 Compare November 19, 2026 16:08
@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

OSS-413: superseded by the canonical draft PR #613 (#613). Proof: this PR's exact head 6976ca0 is an ancestor of #613's exact head eb2d5da (git merge-base --is-ancestor exit 0). The divergent local gates checkout at c734f43a was audited: its unique stable-publish-event intent is carried in #613 by the distinct trusted '--event release' path with prior/live sequence state (15eeaa8) plus the wired-call test in scripts/test_release.py; all other local commits are rebased copies of this PR's six commits. Both worktrees and branches are preserved - no branch deletion. Closing this draft as superseded; publication gates continue in #613.

@athNdev athNdev closed this Nov 20, 2026
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