Skip to content

OSS-413: synchronized Stable/Nightly docs and OCI channel promotion - #613

Merged
athNdev merged 39 commits into
mainfrom
codex/oss413-integration
Nov 20, 2026
Merged

athNdev merged 39 commits into
mainfrom
codex/oss413-integration

Conversation

@athNdev

@athNdev athNdev commented Nov 19, 2026

Copy link
Copy Markdown
Owner

One exact reviewed integration of PR #608 (docs sources) and PR #607 (promotion gates), with semantically resolved docs/website-publishing.md and knowledge ADR index conflicts, repaired UTF-8 mojibake from PR #607, and LF normalization.

Implements schema 3 Stable/Nightly docs contract, accessible real dropdown, canonical full-SHA pinned links, staging-only candidate probes at /docs/candidate//, two-phase qualified channel transactions (stage zero-write, commit only after candidate + canonical marker verification), one shared non-cancelling pages-deploy lock, dual-registry digest parity, prior-receipt rollback, and no registry promotion outrunning docs. ADR 0048 added; ADR 0047 retained.

Verified at exact head 374972c: 178 Python tests OK, version_bump prepare --check OK, website build + 77-route check OK, real Chromium browser check OK (375/1440), knowledge-lint 40/40 + 87 concepts, go vet/test OK, YAML parse OK, git diff --check clean. No dispatch, deploy, registry write, tag change or release from this lane.

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.
…to merged docs (PR608)

Rebased integration on main with PR608 already merged. Integrates fixed promotion gates: prior-receipt preserved before writes, executable always() rollback restoring prior registry digests and exact docs bytes, observed dual-registry digest evidence fed into Stable gate, no legacy alias-write path, older-target/prerelease/bootstrap refusals. Resolved website-publishing conflict semantically; repaired gates-branch UTF-8 mojibake; LF normalized; ADR 0049 retained.

No dispatch, deploy, registry write, tag change or release.
@athNdev
athNdev force-pushed the codex/oss413-integration branch from 374972c to 0e586d2 Compare November 19, 2026 16:14
Release publication dispatches must not be treated as site-only workflow_dispatch transactions. Pass release event and prior/live state/seq to the stable commit decision so exact tag/release targets can publish instead of being refused as manual/site-only republish.
…ession

- scripts/release.py: dispatch channel-bootstrap-plan, fetch-prior-pages
  and verify-channel-docs (registered as parsers but never dispatched).
- scripts/test_website.py: Nightly candidate sources the first-party
  Proxmox page from the qualified revision at the non-active route
  /docs/candidate/<sha>/.
- .github/workflows/ci.yml: 20m go test -timeout margin for the race
  job with the job bound at 30m; all tests preserved.

Verification: tests green (website 15, version_contract 21, release 149,
landing_page 6, design_system_page 9); pr checks 613 all pass on head
15eeaa8.
… pair

The CD docs step now observes the immutable sha reference in both registries
before the build (read-only, opt-off when absent) and passes the promoted
--nightly-revision/--nightly-digest when the pair is observed. On the candidate
path it asserts the real compiled Nightly Proxmox page on the non-active
/docs/candidate/<sha>/ route; the ordinary path keeps check_website.
# Conflicts:
#	knowledge/decisions/adrs-decision-records.md
Add verify-staged-page-site: the staged artifact must keep the full canonical
Stable/Nightly site bound to the active receipt with both canonical routes,
and carry the qualified pair only in the off-path candidate probe. A stamped
canonical marker, a missing Stable channel or a missing probe refuses the
stage. Tests cover the accepted full site, each incomplete stage case and
rollback to the prior receipt with the exact prior bytes.
The CD stage artifact is now the full canonical Stable/Nightly site at the
live active receipt plus an off-path candidate probe; verify-staged-page-site
fails closed on a stamped canonical marker, missing Stable or missing probe.
The canonical site is rebuilt from the exact qualified pair with
promotion-state final only after both registry aliases move, with exact HTML
checks for the updated Nightly guide and preserved Stable routes. Rollback
restores the byte-verified prior DEPLOYED artifact (fetch-prior-pages now
follows the artifact redirect without leaking the bearer token). Site-only
dispatches rebuild from the active receipt so a promoted Nightly cannot be
reset to baseline. Tests: stage boundary, incomplete stage, rollback.
An equal version-index hash is not proof of the deployed artifact: a #633
docs-only rebuild (artifact 14570669551, run 44610571376) shared the live
index with the real deployment but was never deployed. Resolve the prior
from the successful github-pages deployment status -> run -> named artifact
chain, require the artifact head SHA to match the deployment SHA, and compare
every published page byte-for-byte with the live site before accepting the
rollback source. Verified against deployment 7924139974 / run 44602759613 /
artifact 14568077771. Fixture covers two equal-index receipts with different
guide contents.
…lane

- Merge current main (#634 c14e60b) with both CI lanes preserved.
- Replace the duplicated deployment-identity and byte-qualification logic in
  release.py with a thin delegation to scripts/docs_publication_gate.py; the CD
  rollback now calls pages-baseline + fetch-prior-pages from the shared gate.
- Keep the equal-index/different-guide fixture against the shared gate.
- Update the website runbook for the automatic exact-green-main docs-only lane:
  stale-vs-blocked visibility and real artifact vs SHA-anchored reconstruction
  proof, and correct the claim that only landing.yml publishes Pages.
@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

OSS-413 consolidation: PR #607 (draft, head 6976ca0) is an ancestor of this PR's exact head eb2d5da (git merge-base --is-ancestor exit 0). The divergent local gates worktree (codex/oss413-promotion-gates @ c734f43a) was audited: its only unique behavioral commit is the trusted stable-publish event; its other local commits are rebased copies of the six commits already in #607/#613. That intent is represented here by the distinct audited '--event release' path with prior/live sequence state (commit 15eeaa8) and the wired-call regression test scripts/test_release.py::test_release_stable_gate_uses_observed_digests_and_compensates. Site-only/manual and nightly guards are unchanged. Both worktrees and branches are preserved; no branch removal. #607 is being closed as superseded by this canonical draft; this PR stays draft pending the dual-registry immutable-pair qualification.

The no-write CD path produces a Buildx record and revision label but no
pushed digest or exported OCI bytes, so add local-oci-candidate: derive the
image digest from a locally exported OCI layout and fail closed unless its
org.opencontainers.image.revision label equals the exact trusted main commit.
No registry, tag, alias, Pages or tracked-file write. Fixture tests cover the
exact candidate, a wrong revision and a missing index.
The release image job already exports a LOCAL OCI layout with push:false and
an exact revision label. Wire local-oci-candidate directly to that artifact:
the exported digest is build evidence only, never a promotion input. Immutable
publication still verifies an independently observed public digest. A workflow
shape test pins the seam to push:false/no-login and forbids promotion coupling.
Fix the no-credential release image gate failure: Buildx OCI tars can wrap
members with ./ (the index was found via ./index.json while blob lookups
omitted the prefix), nest a multi-platform index and carry attestation /
unknown-platform descriptors. Walk descriptors bounded, skip attestations,
require qualified platform manifests with full-SHA revision labels, fail on
malformed/ambiguous descriptors and missing blobs, and keep the canonical
digest as sha256 of the OUTER index bytes. Fixtures cover the real prefixed
nested two-platform layout plus wrong revision/digest, malformed and
ambiguous cases.
Current main publishes version_index.json at both the site root and /docs/.
The pre-alias staged-site gate now fails closed when the docs copy is missing
or byte-different, so a staged artifact cannot silently drop the documented
public metadata route. Fixture covers the drift case.
…ytes

Stable channel transaction no longer copies the freshly rebuilt site into the
rollback artifact. It resolves the actual successful Pages deployment via the
shared docs gate (pages-baseline -> fetch-prior-pages), decides first
publication from OBSERVED stable/latest alias states (mixed/unknown refuses),
and qualifies the rendered Stable site before deploy: both published index
routes byte-equal, exact stable commit/digest, canonical HTML with full-SHA
pinned links, source.json revision and version stamp. Alias move stays after
the verified deploy.
@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Coordination for B2 explicit OIDC admin linking: I am implementing the smallest safe local-admin linking RPC/flow in a separate focused PR based on e8245fa. I will NOT edit docs/releases.md concurrently with #613. Please keep your release-note edits scoped to your PR; after my PR is reviewed/merged, the release qualification owner can reconcile the B2 wording there with the actual implemented operator steps. No docs/releases.md edits, tag, release, deploy or merge from this lane.

…ped marker validation

After deploying the stable marker, compensate inside the stable transaction
if marker verification or the qualified commit decision fails/refuses/rolls
back so the public docs marker cannot stay ahead of unchanged aliases.
Restore the exact prior Pages artifact, verify it against the live hash and
prior marker, then fail the run.

Validate the stamped canonical stable marker against the exact release
commit/digest instead of the frozen baseline, and add fixtures covering
stamped validation and docs compensation/gating.
…oundary

First Nightly activation now classifies ACTUAL immutable observations: a mixed
Hub-present/GHCR-absent pair, unknown state or a missing pair is BLOCKED with a
visible reason and job summary - never a silent opt-off skip. Only one verified
digest/revision in both registries activates the candidate. Tests cover mixed,
missing, unknown, conflicting and verified pairs.

Document that current release validation/reporting assumes the provisional
carbonpanel-v2.0.0 boundary, and that a 2.0.1 stable is catalog-driven via a
new reviewed catalog entry, contract/index bump and matching constants, without
rewriting the immutable upstream v2.0.0/v2.0.1 historical records.
- B1: candidate registries and IMMUTABLE now use the REAL channel-observe map
  from both registries (no fabricated identical pair); observed digests are
  carried into both receipts.
- B2: ci_verified derives from the exact-CI step output; verify-main-ci CLI now
  exits non-zero when unverified.
- B3: the product publish workflow shares the pages-deploy lock with the CD
  channel transaction and docs-only publisher; no separate alias-writer lock.
- B4: real Chromium browser_version_check.py gates the final Stable/Nightly
  artifact before deploy, with exact expected pins/state.
- Refusal AND rollback now exit non-zero from the transaction CLI; receipts
  record a real UTC timestamp. Workflow-shape and CLI tests added.
@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

Reviewer HIGH follow-up at exact head 8b75d5b (draft, no publication): B1 candidate registries and IMMUTABLE now carry the real channel-observe map from BOTH registries, not a fabricated identical pair. B2 ci_verified derives from the exact-CI step output and verify-main-ci CLI exits non-zero when unverified; remaining qualification literals (immutable_ok/contract_valid/site_validated) still need output-derived wiring. B3 the product publish workflow-level lock is now the shared pages-deploy group used by CD and the docs-only lane. B4 real Chromium browser_version_check.py gates the final Stable/Nightly artifact before deploy with exact expected pins/state; deployed-site browser QA is still static-only. Transaction CLI now fails on rollback as well as refuse; receipts carry a real UTC timestamp. 262 tests green, knowledge-lint clean. Requesting exact-head re-review of the transaction and rollback boundaries.

- GitHub release now depends on promote-aliases and its LIVE observation gate:
  a compensated alias failure can no longer leave a published release that
  contradicts restored aliases/docs. The release-record step moved out of the
  alias path so first publication does not depend on an uncreated release.
- browser_version_check.py supports --base-url for DEPLOYED HTTPS; CD and the
  stable transaction provision Chromium and gate on live switcher/pin/route QA
  at 375/1440px after deploy, with exact expected pins.
- Tests cover the dependency graph, observation gate and live-browser wiring.

Local artifact QA and read-only live HTTPS QA both passed with real Chromium.
@athNdev
athNdev marked this pull request as ready for review November 20, 2026 08:33
@athNdev
athNdev merged commit f90efb7 into main Nov 20, 2026
37 checks passed
@athNdev
athNdev deleted the codex/oss413-integration branch November 20, 2026 08:33
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