Skip to content

CONTRACT: feat(backends): run Pi's web tools in a trusted host executor on the pinned extension - #3968

Merged
schlessera merged 5 commits into
mainfrom
feat/3686-trusted-web-executor
Nov 11, 2026
Merged

schlessera merged 5 commits into
mainfrom
feat/3686-trusted-web-executor

Conversation

@schlessera

@schlessera schlessera commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Closes #3686

What changed

Pi's four web tools (web_search, fetch_content, get_search_content, source_check) now execute on the host instead of being refused. Wherever the pi backend is configured, the server's web broker starts one trusted executor per principal's session: a real Pi SDK session that loads only the pinned pi-web-access 0.41.0, now an exact dependency of the pi backend. Each call runs straight through that session's tool pipeline, with no model turn. The executor runs in a fresh 0700 directory beside the UI database (its HOME, agent dir, cwd, cache and temp). It reads a sanitized copy of the host's web-search.json and gets the catalog providers' keys from the host environment. Nothing reaches the worker. The copy forces workflow: none and turns off curator, summary, media, GitHub-cloning, command and browser-cookie paths. It also removes every !command credential. The directory is removed once the process group is gone, and boot removes what a crash left. Settings (unavailable, keyIsCommand), the Settings card and the Pi system-prompt brief report the unavailable features from one list. The decision record is amended with the executor, workflow and credential rulings.

Why this shape

Executor A (full extension in a real Pi session) is the 2026-10-15 ruling on #1863. The prototype drove each tool through fictional inference. Production calls runToolCall on the session's tools instead, with the session's real extension context. That costs no model turn, and it leaves commands, shortcuts and nested workflows unreachable. ui-server loads the executor pieces from the pi backend's lockstep internal entry, as the web-search route already does for invalidateExtensionCache. That adds no new seam and no public API. The workflow and credential exclusions are enforced in the executor's config as well as in the worker-facing schema.

Choice for review: GitHub repository cloning (a fetch_content extraction path that spawns git) is also off, until #3687 qualifies the executor's subprocess egress. No ruling names this; it is listed as github-clone (deferred) and is easy to turn back on.

Proof

  • packages/ui-server/tests/web-pi-executor.test.ts (local, 4 tests) uses the real Pi backend, a protocol-faithful worker process (env: PATH only), the ws web slice, the production broker (createHostWebTools) and the real executor, with loopback Exa and page servers. All four tools execute. The host-only sentinel key reaches the provider and never a result. No upstream id crosses. The host config bytes are unchanged. The !command key never ran. A foreign extension placed in the executor's agent dir and cwd never loads. Cancel aborts the provider request and keeps the session. SIGKILL mid-call settles executor_died, with receipts {reason: died, signal: SIGKILL, exited: true, cleaned: true}; a fresh executor (generation 2) serves the next call. State is removed and no process leaks.
  • tests/pi-worker-runtime.test.ts gains a host-web scenario: the actual bubblewrap Pi worker calls the four tools, then bash tries to read the host config and the executor's private state. It passed hosted (runtime job, heavy run 42946894671), and the probe also ran end to end locally outside the sandbox. Its parent-state assertion was corrected in 7d44d24b3 (receipts: CONTRACT: feat(backends): run Pi's web tools in a trusted host executor on the pinned extension #3968 (comment)).
  • Native diagram requalification (maintainer ruling 2026-11-11). The new dependency moves the hashed native installation from 47e78ac9… to ea866695f2a83f9da2fcf18e75e95e936668ecb28e1449845a2584aa1025b728 (930 packages / 66,881 files / 1,374,331,961 bytes). The frozen e8502b6f… source was requalified on it by running its producer in the pinned Docker boundary. SVG and PNG are byte-identical to chore(deps): drop the unused claude-agent-sdk-research-292 alias #3320's. f9a978c65 moves the pin and the self-test constants together; the self-test passes 11/0 on the new pin and fails 6/5 on the old one. Procedure, deviations and digests: CONTRACT: feat(backends): run Pi's web tools in a trusted host executor on the pinned extension #3968 (comment)
  • packages/ui-server/tests/declaration-surface.test.ts: the pi web executor now loads through loadBackendInternal. 2/0; hosted unit (3) was the failing-first receipt.
  • Unit tests: packages/ui-backend-pi/tests/web-executor.test.ts (sanitizer, private state, pin), plus catalog, brief and settings-route tests.
  • Mutations, each restored, each failing its named assertion:
    Mutation Failing assertion
    drop noExtensions: true WEB_EXECUTOR_RUNS_WITH_FOREIGN_FILES_PRESENT (the one-extension check refuses start)
    drop noExtensions and the one-extension check WEB_EXECUTOR_LOADS_ONLY_THE_PINNED_EXTENSION
    keep credential commands in the sanitizer WEB_EXECUTOR_NO_CREDENTIAL_COMMAND
    drop forced workflow: none WEB_EXECUTOR_SANITIZED_COPY
    no-op cleanup WEB_EXECUTOR_STATE_REMOVED, WEB_EXECUTOR_DEAD_STATE_REMOVED
    executor returns "forwarding removed" WEB_EXECUTOR_PROVIDER_RESULT
  • Suites packages/ui-backend-pi packages/ui-sdk: 1894 pass / 73 fail on the branch versus 1879 pass / 77 fail on origin/main 067d1904b in the same sandbox, with no failure unique to the branch (all are namespace/mask/native-auth environment failures). Affected ui-server web tests: 49/49. ui-react web render: 5/5.
bun run check:pr --base origin/main
{"version":1,"kind":"brain-check-pr-receipt","head":"1e18d68be5205f8baf4a39a004819db02b0c2c04","base":"origin/main","mode":"focused","startedAt":"2026-11-11T20:59:00.138Z","finishedAt":"2026-11-11T21:00:27.741Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12140.588246000001},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":103.87198699999863},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":77.41692499999954},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":22.683162999999695},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":75242.28051}]}

Proportionate containment

  • Triggers: the executor exits 70 before ready if its loaded extension set is not exactly the pinned entry, or if the pinned extension did not register the four tools. It does not cover egress (backends: route host web execution through mandatory egress and per-call admission #3687). The sanitizer removes credential commands and forces the exclusions on every launch; it is a transformation, not a refusal.
  • Restricts: one principal's session's executor launch. Those calls answer unavailable; every other session and the rest of the host are unaffected. Nothing narrower exists, because an executor that loaded something else is untrusted as a whole.
  • Restricted mode considered: running with the foreign extension unloaded is not possible after load; refusing that one process is the restricted mode.
  • Clears: automatically. The next call starts a fresh launch from fresh state, and boot removes leftover state.
  • Recorded: each ended executor logs web executor session ended: <reason> on the web logger, with exit code (70 = refused extension set), exited and cleaned. A not-exited or not-cleaned exit logs at WARN.
  • Scope test: the death test shows one executor dying while the same session recovers with a new generation; per-session isolation of the broker is web-tools-broker.test.ts from backends: forward the four core Pi web tools over a constrained, recorded host bridge #3685.

Checklist

Anything left open

🤖 Generated with Claude Code

schlessera and others added 2 commits November 11, 2026 02:31
…ost executor

The production executor behind the web-tool broker (#3686, epic #2765),
under the 2026-10-15 rulings on #1863 (executor A, workflow A, credential
exclusion A):

- `pi-web-access` 0.41.0 is an exact dependency of the pi backend; the pin
  test checks the version, registry integrity and published entry.
- One child process per principal's session runs a real Pi SDK session
  that loads only that extension (empty in-memory settings, discovery,
  skills, prompts, themes and context files off) and refuses to start if
  anything else loaded. Calls go straight to the session's tool pipeline;
  no model turn runs, so commands, shortcuts and nested workflows are
  unreachable.
- Each session gets a fresh 0700 directory beside the UI database (HOME,
  agent dir, cwd, cache, temp), a sanitized copy of `web-search.json` and
  the catalog providers' keys from the host environment. The copy forces
  `workflow: none`, turns off curator, summary, media, GitHub cloning,
  commands and browser cookies, and removes every `!command` credential.
  The directory is removed once the process group is gone; boot removes
  what a crash left. The private path is redacted from results.
- The child executor takes a per-session launch with cleanup, reports
  `cleaned` in the exit receipt, and maps a result's extra stored ids
  (a search's fetched pages) to host handles.
- ui-server starts the broker wherever pi is configured and available.

Refs #3686

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ools do not offer

One list, `WEB_TOOL_UNAVAILABLE_FEATURES`, names the deferred workflows and
excluded credential modes (#3686). `GET /api/web-search` returns it as
`unavailable` and marks a provider whose stored key is a `!command` with
`keyIsCommand`; such a key no longer counts as a credential, so it cannot
enable a provider. The Settings card lists the features when the server
sends them. `buildSystemPromptAppend` takes `webTools: true`, and Pi
sessions that list the web tools get a fixed brief line naming them. Pi no
longer reads `web-search.json` inside the worker for the retired extension's
brief.

The README, integration contract and changeset describe the host executor.

Refs #3686

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added type: feat A new capability or a change in user-visible behaviour. contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. security Auth, isolation, egress, secrets, or anything in the threat model. labels Nov 11, 2026
@uploads-sh

uploads-sh Bot commented Nov 11, 2026

Copy link
Copy Markdown

No uploads on this PR yet

This PR changes UI files (packages/ui-react/src/components/settings/web-search-chain.tsx). Screenshots help reviewers see what changed.

  • From the CLI: uploads put before.png after.png --pr 3968
  • From an agent: ask it to attach screenshots with uploads.sh
  • By hand: drag images into the PR description and they're imported automatically
Tips for agents

Label each shot so reviewers know what they're seeing. Labels apply to every file in a call, so run one put per shot:

uploads put after.png --pr 3968 --meta path=/settings --state after --caption "Saved settings toast"
uploads put chat.png --pr 3968 --app ios --screen "Chat" --state after

No CLI? With the Uploads MCP, call sign_upload_url for files on disk (or put) with repo, pr: 3968 and the same screen, state and caption fields.

This comment updates with each upload, so you don't need to post the images yourself. A shot or two in the PR description is still welcome. Check what's attached with uploads list --pr 3968. More in the github-screenshots skill or the agent docs.

Workspace admins can turn this comment off in Settings → GitHub · docs

The host web tools named the optional pi backend's specifier as a literal
dynamic import and in a declaration comment, which the declaration-surface
gate refuses. They now go through `loadBackendInternal`, the same
non-literal import every other first-party backend load uses.

The host-web worker scenario asserted `parentStateUnchanged`, which holds
only for the default-HOME scenarios: everywhere else the probe writes the
parent's auth and models files itself after its snapshot. It now asserts
that the parent agent directory holds only what the fixture wrote.

Refs #3686

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Decision (maintainer, 2026-11-11): requalify in this PR. Adding pi-web-access@0.41.0 moves the hashed native diagram installation (842 → 930 packages), so fixed native qualification fails with installation-mismatch (heavy run 42946894671, unit (3)). Following the #3320 procedure: a fresh private-cache umask 022 install; the frozen e8502b6f… source's SVG/PNG/PDF producer run in its pinned Docker boundary on the new installation; qualified.installation and the self-test constants moved together, with receipts. The pin is not hand-edited without that run.

The other two unit (3) failures are fixed in 7d44d24b3: the declaration-surface specifier leak, and an inapplicable parentStateUnchanged assertion in the host-web scenario.

…sion's installation

Adding pi-web-access@0.41.0 moves the hashed native installation from
47e78ac9… (842 packages) to ea866695… (930 packages / 66,881 files /
1,374,331,961 bytes). Under the maintainer ruling of 2026-11-11 the frozen
#2293 source e8502b6f… was requalified on it by running its SVG/PNG/PDF
producer in the pinned Docker boundary, as #3320 did. This moves
`qualified.installation` and the self-test's constants together.

Refs #3686

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera

Copy link
Copy Markdown
Owner Author

Native diagram requalification for the web extension (maintainer ruling 2026-11-11)

Head f9a978c65 moves qualified.installation (scripts/native-diagram-inputs.ts:20) and the self-test's installation constants (tests/native-diagram-inputs.test.ts:13, :57) together. Procedure as in #3320 (#3320 (comment)).

What ran

  1. Fresh install. Throwaway detached worktree at 7d44d24b3 (this PR's head before the pin move), fresh private Bun cache, umask 022, bun install --force --frozen-lockfile --backend=copyfile. The identity reproduces hosted unit (3) of run 42946894671 exactly.
  2. Frozen source. Every path the native source owns (diagramSourceSetup, the six source domains, and the three pinned files) was removed and replaced with its bytes from delivered test(ci): qualify browser retention and snapshot fault ownership #2293 (0d780605f), then committed locally and never pushed. Inventory: 859 inputs, e8502b6ffb3c575f2e9a1c93dea8dbf5ceda93ece367da9d542cb10b1c9ac32b. The frozen diagram-export-producer.mjs therefore ran.
  3. Runtime. Bun 1.4.2 and the pinned image mcr.microsoft.com/playwright@sha256:eff16c30…: runtime bf65590d9d594d238c2c7b6e01e038a26402a676ccf16a1caf596f1179bdc9fb, identical to test(ci): qualify browser retention and snapshot fault ownership #2293 and chore(deps): drop the unused claude-agent-sdk-research-292 alias #3320.
  4. Producer. As scripts/visual.mjs:168-169 invokes it: prepareDiagramExportSource(repo, true, expected), then prepareDiagramNativeArtifacts(repo, ["diagrams-chromium", "diagrams-webkit"], expected), with expected = {source, installation: ea866695…, runtime}. The producer's own fresh-receipt, runtime, private-install and unmounted-repo/host-state assertions were live. Exit 0 for both engines.

Environment deviations (disclosed, same as #3320)

  • Rootless Docker: the producer driver ran under umask 000 so the container user can write its private /proof output. The installation was made under umask 022, and the producer re-verified its private copy's full installation identity (ea866695…) before running. No source, installation, image, runtime or guard byte changed.
  • Consumer not run locally, for the same rootless reason. Pixel equivalence remains hosted browser proof.
  • TMPDIR was a private 0700 directory on disk, not the quota'd /tmp.
  • No base control rerun. The comparison is against the digests chore(deps): drop the unused claude-agent-sdk-research-292 alias #3320 recorded on 47e78ac9… with the same frozen source and runtime.

Installation identities

packages files bytes sha256
Previous qualified (#3320) 842 59,489 1,331,664,273 47e78ac9977d948dd35bfcb1d916aa3e2f6ddab976bb047eebc2a531cdf8403d
New (this PR, + pi-web-access@0.41.0 and its 88 packages) 930 66,881 1,374,331,961 ea866695f2a83f9da2fcf18e75e95e936668ecb28e1449845a2584aa1025b728

Producer outputs

Output #3320 on 47e78ac9… This run on ea866695…
release.svg 481,420 B, 7e246ed9…08376 481,420 B, 7e246ed992ea11f0209dec99afae60b9a6fa59225b6d3787e3b7dea5f4c08376 (both engines)
release.png 40,977 B, 1440×1176, 7fe4980a…bbc3e 40,977 B, 1440×1176, 7fe4980ae9cedb2657b1933351251cb3c55c5b8d07cb3d2ce4a87c50f3cbbc3e (both engines)
release.pdf 20,198 B, 1 page, JetBrainsMono, PlusJakartaSans 20,198 B, fonts JetBrainsMono, PlusJakartaSans; chromium 871ca0ac…, webkit a1d8d4cc…

SVG and PNG are byte-identical to #3320's across both engines. As before, the PDFs differ only in their per-run dates: 2 bytes between engines in this session, and a new digest on every run.

Self-test receipts (tests/native-diagram-inputs.test.ts, on the fresh install)

Other unit (3) failures (fixed in 7d44d24b3)

  • declaration-surface: the host web tools named the pi backend specifier in a literal dynamic import and in a declaration comment. They now load it through loadBackendInternal. 2/0 locally; the hosted failure is the failing-first receipt.
  • pi-worker-runtime host-web: parentStateUnchanged holds only in the default-HOME scenarios. In this scenario the probe itself writes the parent's auth.json/models.json after its snapshot, which a control run of inactive-extension shows too. It now asserts PI_HOST_WEB_PARENT_AGENT_DIR_UNTOUCHED: the parent agent dir holds exactly auth.json, models.json and settings.json. Mutation: pointing the executor's PI_CODING_AGENT_DIR and config copy at the parent's dir adds web-search.json, and the assertion would fail. Restored. The probe ran end to end locally outside the sandbox: turn success, executor exit closed/cleaned: true.

@schlessera schlessera added this to the 0.45.0 milestone Nov 11, 2026
@schlessera
schlessera marked this pull request as ready for review November 11, 2026 21:05
@schlessera
schlessera marked this pull request as draft November 11, 2026 21:10
@schlessera
schlessera marked this pull request as ready for review November 11, 2026 21:10
@schlessera
schlessera merged commit 95a68ef into main Nov 11, 2026
72 of 78 checks passed
schlessera added a commit that referenced this pull request Nov 17, 2026
Two requalifications ran (#3320, #3968); #4102 was blocked, not requalified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schlessera added a commit that referenced this pull request Nov 17, 2026
…#4106)

* chore(ci): retire the frozen native diagram qualification pin (#4105)

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>

* test(ui-react): give the image markup render test its own DOM registration

It shared ask-user-dom.ts, whose body runs once per process. When ask-user's
test ran first in the same worker, its afterAll unregistered the DOM and the
image markup test failed with "document is not defined". Retiring the native
diagram test reshuffled unit partitions and put the two together. A sibling
module per file is the contract ask-user-dom.ts documents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ci): drop the retired native identity from the worker audit record (#4105)

The record's sourceAudit.native still held the frozen #2293 source,
installation and runtime hashes, though nothing reads them since the binding
was removed; qualification compares the computed identity and counts, never
those bytes. The retirement guard now scans JSON as well, and fails first on
the old record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(ci): drop the last qualification-pin wording for the retired native binding (#4105)

The release skill and diagnostic guide no longer tell a contributor to keep
qualification pins unchanged, ci-utility.md calls the native fixture's
container a boundary rather than a binding, and the worker audit record's
scope gains a dated note that its native qualification statements are
historical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(ci): count the native requalifications correctly (#4105)

Two requalifications ran (#3320, #3968); #4102 was blocked, not requalified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ci): keep every retired native identity out of the tree (#4105)

The guard now also names #2293's installation and the qualified producer
runtime, the two identities removed from the worker audit record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(ci): say which handoff checks still run after the native retirement (#4105)

The browser still checks the handoff session, checkout and artifact hashes;
the comparisons against an expected source, installation or runtime identity
took it from the retired binding and no longer run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
schlessera added a commit that referenced this pull request Nov 17, 2026
…der load (#4107, #4109) (#4134)

* chore(ci): retire the frozen native diagram qualification pin (#4105)

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>

* chore(ci): pin workflow actions by commit SHA (#4111)

Every workflow referenced its actions by a mutable major tag. Each uses:
now names the full commit that tag pointed at on 2026-11-16, with the tag
as a comment. scripts/action-pins.ts owns the table; the workflow lint
refuses a tag, a branch, an unreviewed commit or a missing tag comment in
any workflow file, and the generated heavy-feedback workflow keeps the
comments its YAML rendering drops. No action moves to a newer release.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(ci): run ready confirmation's unit proof in eight partitions (#4108)

Ready confirmation and draft heavy feedback plan up to eight unit
partitions; main pushes and exhaustive runs keep four. UNIT_PARTITIONS in
scripts/proof-shards.ts is the one owner: the planner reads it by cadence,
the hosted aggregate refuses a published partition set that differs from
the plan, the merge path bounds the confirmed set by the confirmation cap,
the weight refresh takes its job count from it, and the workflow guard
refuses a literal unit matrix or divisor.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(ci): record the eight-partition ruling for ready confirmation (#4108)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(ci): add the review record and the core-package path predicate (#4110)

scripts/review-receipt.ts writes, posts and reads the record of an
independent review: one PR comment in a fixed block naming the reviewed
head, the base, the reviewer as agent or human only, and each finding with
exactly one disposition. It decides whether a record covers a candidate head
from real Git ancestry: merges of the base keep it valid; a new commit, a
rebase or an amend does not.

scripts/fast-lane.ts is the single owner of the core-package path rule that
the fast lane and the review requirement share.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(ci): refuse to confirm or merge a core-package PR without a recorded review (#4110)

confirm checks before it takes the reservation or requests candidate CI, and
the merge reads the record again. A PR outside the core packages is never
asked and its comments are never read. An expedited red-main fix is exempt.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(ci): report the newest review record in pr-status (#4110)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(process): record the independent-review ruling and write the review step (#4110)

The 2026-11-16 maintainer decision gets its own section in the CI decision
record, and the fast lane section cites the shared path predicate. The
work-issue skill and its CI reference gain the step: when to request the
review, how to start a reviewer that is given only the PR and its issue, how
to answer findings and when a new review is needed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(ci): keep finding text inside the record's code fence and verify the comment reads back (#4110)

A finding's summary can contain a mention or an issue reference. Outside a
code fence GitHub would notify or link it, so the comment now carries the
findings only inside the block, pretty-printed, under one line of counts.
post refuses a comment its own reader cannot parse back. The decision
record's citations follow the lines this change and the gate's import moved.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(ci): repeat changed Bun test files under CPU load (#4109)

Add bun scripts/test-determinism.ts. It selects the Bun test files a change
adds or modifies against its merge base and runs them through the offline
test wrapper with --rerun-each and --bail=1 while one busy loop per CPU runs.
Five repetitions by default, reduced uniformly to a floor of two when the
reviewed weights exceed the 600-second budget; no selected file is skipped and
the report lists each with its repetitions. Burners are killed by PID on every
exit path and exit by themselves when their parent dies.

The planner records the selection for pull requests and selects determinism at
every pull-request cadence, drafts included, and never on main.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* ci: require the determinism job when a change touches Bun test files (#4109)

Add the hosted determinism job with the unit job's runtime prerequisites, and
the same job in the generated draft heavy feedback workflow. The proof and
draft gates aggregates, the feedback aggregate and the merge path require it
when selected and its intentional skip otherwise. check:pr never runs it and
names the command in --plan.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(ci): record the 2026-11-16 changed-test repetition ruling (#4109)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(ci): prove selection validation and the merge path require determinism (#4109)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(ci): keep fixture job summaries out of the hosted summary (#4109)

The command appends its table to GITHUB_STEP_SUMMARY. The fixture runs now
write to a scratch file, and the receipts assert on it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(ci): a review record does not cover changes made inside a merge commit (#4121)

The independent review gate counted commits, so a conflict resolution or
an edit added while merging the base rode into a core-package PR unread.
A merge commit now keeps a record valid only when it is clean: two
parents, and exactly the tree Git's automatic merge of them writes. A
resolved conflict, an altered merge and an octopus merge need a new
review of the current head; a merge that cannot be recomputed is refused
too.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* docs(ci): rewrap the review rule in the PR proof list (#4121)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(ci): retire browser proof retention (#4107)

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>

* chore(ci): retire the audited browser source pins (#4107)

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>

* test(ci): refuse a first-party source pin and prove product edits stay 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>

* docs(ci): record the retirement of browser proof retention (#4107)

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>

* fix(ci): read Bun's GitHub Actions log-group headers in the repetition gate (#4109)

The first hosted determinism run failed in the gate's own test. Under
GITHUB_ACTIONS Bun 1.4.2 prints each run header as ::group::<file>: (run #k),
which the failure parser did not read, so a failure lost its file and
repetition. The parser reads both forms, and the racy-fixture receipt now runs
under the plain and the log-group reporter.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(ci): build the merge-path confirmation fixture from the hosted job list (#4108, #4109)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(ci): expect the planner-selection-only message for the determinism job (#4107, #4109)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(ci): shim every sibling the planner imports in the red-main fixture (#4108)

The red-main planner fixture copied ci-plan.ts with a hand list of the
modules it imports. #4108 added ./proof-shards, so the copied planner
failed to load and the hosted unit tier refused the candidate
(run 43991610923, unit (3)). The fixture now reads the list from the
planner's own imports.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* test(ui-react): give the image markup render test its own DOM registration

It shared ask-user-dom.ts, whose body runs once per process. When ask-user's
test ran first in the same worker, its afterAll unregistered the DOM and the
image markup test failed with "document is not defined". Retiring the native
diagram test reshuffled unit partitions and put the two together. A sibling
module per file is the contract ask-user-dom.ts documents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ci): drop the retired native identity from the worker audit record (#4105)

The record's sourceAudit.native still held the frozen #2293 source,
installation and runtime hashes, though nothing reads them since the binding
was removed; qualification compares the computed identity and counts, never
those bytes. The retirement guard now scans JSON as well, and fails first on
the old record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(ci): drop the last qualification-pin wording for the retired native binding (#4105)

The release skill and diagnostic guide no longer tell a contributor to keep
qualification pins unchanged, ci-utility.md calls the native fixture's
container a boundary rather than a binding, and the worker audit record's
scope gains a dated note that its native qualification statements are
historical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(ci): count the native requalifications correctly (#4105)

Two requalifications ran (#3320, #3968); #4102 was blocked, not requalified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ci): keep every retired native identity out of the tree (#4105)

The guard now also names #2293's installation and the qualified producer
runtime, the two identities removed from the worker audit record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(ci): say which handoff checks still run after the native retirement (#4105)

The browser still checks the handoff session, checkout and artifact hashes;
the comparisons against an expected source, installation or runtime identity
took it from the retired binding and no longer run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(ci): keep the retired-identity scan's JSON control after the audit manifest is gone (#4105, #4107)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contract Touches the integration contract: CONTRACT: commit, contract doc updated in the same commit. security Auth, isolation, egress, secrets, or anything in the threat model. type: feat A new capability or a change in user-visible behaviour.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backends: run the pinned upstream web extension in a trusted host Pi session behind the bridge

1 participant