Skip to content

chore(ci): retire browser proof retention and its audited source pins (#4107) - #4126

Closed
schlessera wants to merge 10 commits into
mainfrom
chore/4107-retire-browser-retention
Closed

schlessera wants to merge 10 commits into
mainfrom
chore/4107-retire-browser-retention

Conversation

@schlessera

Copy link
Copy Markdown
Owner

Closes #4107

Lands only after #4106 (the native diagram pin, #4105), and by itself, separately from the other open CI changes. This branch already contains #4106's head 32cbe543. Once #4106 is on main the diff against main is this change alone: 70 files, +486 −3,383.

What changed

Browser and layout proof now run fresh whenever the planner selects them, and no script or test pins the SHA-256 of a first-party source file. Editing a product file such as packages/ui-react/src/ws-client/inbound.ts no longer fails any tooling test.

  • Retention is removed. The retained-proof lookup, its ledger, the aggregate's revalidation, the inclusion fingerprint and the per-shard fresh-execution receipt are gone. ci.yml has no retention step and no run_browser, run_layout or reuse output. heavy-feedback.yml is regenerated to match.
  • The audited bindings are removed, with their frozen fixtures and self-tests: command activation, document and replay producers, runtime readers, dispatch registries, literal payloads, locked installed assets, generated CSS and the dictation theme, screenshot baselines, and the Worker capability audit manifest.
  • Selection is unchanged in outcome. The closure walker keeps static imports, CSS inputs and the declared inputs. An edge a binding used to resolve is now unresolved, and closureSelects keeps the planner's broad rule for it.
  • Kept and moved. The read-only GitHub client moves from scripts/proof-reuse.ts to scripts/proof-api.ts; candidate admission, the merge path, heavy feedback and both cost refreshes import it from there. scripts/proof-inputs.ts keeps checkout identities and browser spec discovery. The zero-Worker boundary (scripts/browser-worker-boundary.ts and the ui-kit setup that installs it) is untouched.
  • Docs. "Retaining complete browser domains" in docs/decisions/ci-utility.md shrinks from 354 lines to a record of what was retired and why. The testing guide, contributor guide and the work-issue and github skills no longer describe retention or re-audits.

Why this shape

The issue states the approach. Four choices were mine:

  • retained: [] stays in the selected-proof receipt. A branch that predates this change runs integrate.ts merge from its own checkout, and that older code refuses a receipt without the field. Dropping it would force every in-flight PR to merge main and confirm again. The new merge path refuses any receipt whose list is not empty.
  • checks: read is dropped from the workflow token. The retention lookup was the only reader of the check-runs API. actions: read stays: the red-main gate and heavy feedback admission still read runs and jobs.
  • The generated-CSS binding is deleted, not kept without its pins. Keeping the mapping would mark an edge resolved that nothing now verifies. Deleting it removed ten build and CI scripts from the closures; each of them already makes a plan global, which selects every category.
  • No edits under packages/. Two leftovers sit in files this PR leaves alone and are filed as ci: remove the code left dead by the retired browser source pins #4119: three exports in websocket-handlers/chat.ts that were kept for a pin, and the BRAIN_PROOF_NATIVE_DIAGRAM_INPUTS readers in scripts/visual.mjs and a ui-react browser command, which nothing sets any more.

Proof

bun run check:pr --base origin/main

Tested head d259705d9e9c39b128673e18f6c49e530c3dbcd1, base origin/main at 40779d498. Also on that head: bun run typecheck (exit 0), bun run lint (all gates clean), and 13 affected test files outside the fast group (214 pass, 0 fail).

{"version":1,"kind":"brain-check-pr-receipt","head":"d259705d9e9c39b128673e18f6c49e530c3dbcd1","base":"origin/main","mode":"focused","startedAt":"2026-11-17T00:38:58.511Z","finishedAt":"2026-11-17T00:41:12.796Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":19736.091771},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":168.06866499999887},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":90.28604300000006},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":27.17955300000176},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":114245.497487}]}

Acceptance criteria

1. A product edit to a formerly pinned file fails no test. tests/first-party-source-pins.test.ts copies the tree, appends a comment to ws-client/inbound.ts and websocket-handlers/chat.ts, plans the change in the copy and runs the root tests the planner's file-input table (FILE_INPUT_TESTS) selects for those files. Failing first, on the tree before this change (36ac36f13):

error: TOOLING_TESTS_PASS_ON_CHANGED_PRODUCT_BYTES
(fail) private finite registries bind their existing predicate and copied handler source
(fail) audited imports of a different chat helper cannot gain the handler map through drift
      at tests/source-browser-dispatch.test.ts:13:94   Expected: true  Received: undefined
 211 pass  2 fail   Ran 213 tests across 7 files.
(fail) a byte change to product source a binding used to pin fails neither planning nor the tests that read it

On this head it passes: the plan is not global, selects browser, layout, endurance and captures, and the six selected root tests pass in the copy.

2. No tracked file pins first-party source. The same file's static test hashes every tracked code and configuration file and refuses any script or test that holds one of those digests. Failing first on 36ac36f13: FIRST_PARTY_SOURCE_STAYS_UNPINNED listed 94 pins, among them scripts/source-browser-dispatch.ts pins packages/ui-react/src/ws-client/inbound.ts. Mutation on this head: a planted scripts/planted-pin.ts holding that file's digest failed the test with scripts/planted-pin.ts pins packages/ui-react/src/ws-client/inbound.ts; removed, it passes.

git grep -nE '"[0-9a-f]{64}"' -- scripts tests now lists only:

File What the literals identify
scripts/captures/font-lock.json Third-party capture fonts and their downloaded stylesheet
scripts/ci-pack-probe.mjs The four bundled diagram font files, checked in the packed consumer
scripts/measurements/suggestions-2026-10-07/* Archived measurement inputs and receipts
scripts/pi-schema-runner.py Measurement replay digests
scripts/unit-shard-observation.json CI timing artifact digests
tests/fixtures/bridge-tools.after.json Measured tool definition and result digests
tests/browser-inventory-process.test.ts SHA-256 of the two-byte fixture inventory []
tests/capture-hash.test.ts SHA-256 test vectors for the empty string and abc
tests/native-diagram-retired.test.ts #4105's deny-list of retired identities

3. No retention step or output; lint passes. grep -c "reuse\|run_browser\|run_layout" .github/workflows/ci.yml .github/workflows/heavy-feedback.yml is 0 for both. Mutation: adding && needs.changeset.outputs.run_browser == 'true' to the browser job failed tests/ci-workflows.test.ts on SELECTION_ALONE:browser (13 failures in that file); restored, it passes.

4. The replay shows no narrowing. scripts/replay-browser-selection.ts now takes a baseline report and prints omittedSinceBaseline. The baseline ran on 36ac36f13, the comparison on this branch.

Replay set PRs Selected before → after (browser / layout / endurance / captures) omittedSinceBaseline
Archived 100-PR set, #1741–#2071 100 84 → 84 in each []
100 most recent merges, #3837–#4101 100 88 → 88 in each []

The archived set was rebuilt from the archived replay report (SHA-256 6cf33fd3…, measurement archive commit c24a8482): same PRs and squash commits, with every changed-path list recomputed from Git and matching its recorded hash. Closure sizes moved from 1,865 / 1,694 / 1,565 / 1,469 files to 1,855 / 1,684 / 1,555 / 1,469, and unresolved inputs from 1,098 / 1,099 / 1,097 / 1,078 to 1,112 / 1,108 / 1,106 / 1,078. All four closures were already unresolved before this change, so selection already used the broad rule. The ten files that left the closures are .github/workflows/ci.yml and nine build and CI scripts; planUnitChecks reports global: true for each on its own. Mutation: removing the broad fallback from closureSelects failed 11 tests in tests/browser-input-closure.test.ts; restored.

5. The aggregate and the merge path still validate.

  • A dropped selected browser job, through the real executable: bun scripts/ci-proof.ts aggregate exits 1 with browser: selected proof did not pass (missing).
  • Mutation: letting proofProblems accept a skipped or missing selected job failed five tests in tests/hosted-proof.test.ts, including the emitted-executable test; restored.
  • New case retained-receipt in tests/integration-command.test.ts: a receipt that excuses a skipped selected browser job is refused with Retained proof is retired and no merge is dispatched. Failing first on 36ac36f13: NO_MERGE_ON_RETAINED_BROWSER_PROOF expected false, received true; the old merge path dispatched the merge. Mutation: deleting the refusal failed shared merge executable requires all three delivered browser shards; restored.
  • The existing checkout, shard and missing-third-shard cases pass unchanged.

6. Docs and skills. No doc or skill tells a contributor to re-audit a pin or expect a retained category; the remaining mentions are the retirement record and a note about archived timing runs.

Checklist

  • Focused local preflight/behavioral receipts and complete selected hosted proof passed; actual head/base/job checkout evidence is in Proof. (Local receipts are above. Hosted proof of the browser categories is still to be requested; see below.)
  • Acceptance criteria from the issue are all met, or the gap is named below.
  • The PR and completed/advanced issues have verified release milestones under docs/process/github.md.
  • A changeset is included, or this changes nothing a consumer can see.
  • No personal data anywhere in the diff — the leakage gate covers the whole tree.
  • The integration contract index or relevant component is updated in this same commit, or nothing in the machine surface moved.
  • Docs under docs/ reflect the change, or nothing documented moved.
  • A fail-closed guard added or changed answers the proportionate-containment checklist in this body, or no guard changed. (One refusal is added to the merge path: a receipt naming a retained category. It restricts one candidate's merge, needs no recovery beyond a fresh confirmation, and its message says why.)
  • Provider history stays append-only: nothing on a turn's path changed.

Anything left open

  • Hosted proof of the browser categories is not run yet. The issue asks for browser, layout, captures and endurance fresh and green on this head. Draft heavy feedback cannot serve it: that workflow runs main's copy, whose admission job runs bun scripts/proof-reuse.ts in the PR checkout, and this branch deletes that file. A workflow_dispatch of CI on this branch ref uses the branch's own workflow and runs every category fresh.
  • The squash's main run must be green in every selected category, as the issue's verification says.
  • The issue was not claimed. bun scripts/issue-queue.ts claim 4107 refused because the issue lacks agent-ready. I did not add the label or assign it by hand.
  • Unit shard weight. tests/first-party-source-pins.test.ts takes about 36 seconds locally and has no measured entry in scripts/test-shard-costs.json until the next refresh. The 11 deleted tests' entries (about 35 seconds together) are removed.
  • Follow-up ci: remove the code left dead by the retired browser source pins #4119 removes the two leftovers named above.
  • Pre-existing citation drift elsewhere in docs/ is untouched (391 drifted before and after; a release check). The citations this change moved are repaired.

🤖 Generated with Claude Code

schlessera and others added 10 commits November 16, 2026 23:25
The pin let a ready PR retain browser proof from an earlier run, but the
hybrid ruling moved browser proof to the squash's main run, where it is
always fresh. All three pinned source files had also drifted, so the binding
could no longer qualify. Its only effect left was to fail unit on every
dependency change until a manual Docker requalification moved it; three
requalifications produced byte-identical output.

Remove the binding and its self-test, and stop the browser input closure,
worker audit and inclusion inputs from carrying its identity. The container
boundary and the producer's run-time checks are unchanged. A guard test
keeps the retired identities from being pinned again. ci-proof.ts and
visual.mjs still read the now-absent field; they are audited sources, so
that dead branch goes at their next re-audit. The maintainer ruling of
2026-11-16 is recorded in ci-utility.md, superseding the 2026-11-02 and
2026-11-11 requalification rulings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retention could no longer run: ready confirmation selects neither browser
nor layout under the hybrid ruling, and main and exhaustive runs are always
fresh. Remove the retained-proof lookup, its ledger, the aggregate's
revalidation, the inclusion fingerprint and the fresh-execution receipt.

- ci.yml has no retention step and no run_browser, run_layout or reuse
  output; browser and layout run on the planner's selection alone. The
  checks: read permission, which only the lookup used, is dropped.
- The aggregate excuses no skipped selected job. integrate.ts merge refuses
  a selected-proof receipt that names a retained category. The receipt keeps
  an always-empty retained list so older checkouts and the timing collector
  still parse it.
- The read-only GitHub client moves from proof-reuse.ts to proof-api.ts.
- The two live discovery tests from the retention suite move to
  browser-inventory-process.test.ts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The audited bindings resolved runtime edges so that a browser closure could
be called complete for retention. Each pinned the SHA-256 of first-party
source, and its self-test read the live file, so a product change to a
pinned file turned unit red until the hash was recomputed.

Remove the command-activation, document, runtime-reader, dispatch, payload,
locked-asset, generated-CSS and theme bindings with their frozen fixtures
and self-tests. The closure walker keeps static imports, CSS inputs and the
declared inputs; an edge a binding resolved is now unresolved, and
closureSelects keeps the planner's broad rule for it.

replay-browser-selection.ts takes a baseline report and lists every
category the earlier rule selected and the later one omits.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…y green (#4107)

One test refuses a script or test that holds the SHA-256 of a first-party
source file. The other copies the tree, changes the bytes of two formerly
pinned product files, and requires planning and the root tests the
planner's file-input table selects for them to pass.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Replace the retention section of the CI decision record with a short record
of what was retired and why (maintainer decision 2026-11-16, superseding
#1333, #2126 and the #2408 re-audit rulings), keeping the parts that
describe live behaviour: selection, the zero-Worker boundary, the native
producer's container boundary and the discovery deadline. Remove retention
and re-audit guidance from the testing guide, the contributor guide and the
work-issue and github skills, and document the replay comparison.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…to chore/4107-retire-browser-retention

# Conflicts:
#	scripts/source-browser-dispatch.ts
@schlessera

Copy link
Copy Markdown
Owner Author

Superseded by #4134, which merged this branch together with its sibling proof-system change as one squash (be0bb0708). The issue is closed by that PR.

@schlessera schlessera closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, the gates they run, release scripts, packaging. type: chore Tooling, CI, release plumbing, dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: retire browser proof retention and its audited source pins

1 participant