Skip to content

chore(deps): drop the unused claude-agent-sdk-research-292 alias - #3320

Merged
schlessera merged 5 commits into
epic/2542-dead-codefrom
chore/2509-drop-research-sdk-alias
Nov 2, 2026
Merged

schlessera merged 5 commits into
epic/2542-dead-codefrom
chore/2509-drop-research-sdk-alias

Conversation

@schlessera

@schlessera schlessera commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Refs #2509

#2509 closes when the #2542 epic batch lands on main; this PR targets the epic integration branch epic/2542-dead-code.

What changed

The root no longer installs claude-agent-sdk-research-292, the npm alias for Agent SDK 0.3.292 that the removed mechanical-hygiene research harness (#838, removed in #1542) used. Every checkout and CI job stops downloading that second SDK copy. Its eight platform packages also go. The shipped SDK stays at 0.3.293, and its platform packages are now hoisted, no longer nested under it. Their integrity hashes are byte-identical.

Why this shape

The lockfile was refreshed with a plain bun install after removing the devDependency. It was not rebuilt with rm bun.lock, so no external resolution moved. The release skill sends any move of the Claude SDK to the keyless runtime probe, and this change avoids triggering it. The diff in bun.lock contains only these changes:

  • removal of the alias's workspace and package entries;
  • the 8 nested @anthropic-ai/claude-agent-sdk/<platform>@0.3.293 entries becoming top-level <platform>@0.3.293 entries with unchanged sha512.

That move shifted the bun.lock lines cited by docs/decisions/claude-code-runtime.md, so this PR moves those citations. It also replaces the sentence explaining why the platform package used to be nested. The comment in tests/shipped-claude-runtime-pin.test.ts:1-5 now says the pair is no longer installed. It keeps the same line count, so no citation moves.

Left as is, by design:

  • docs/process/evidence/test-wait-replay-card-readiness.json is a historical receipt, as the issue says.
  • docs/decisions/claude-code-runtime.md near line 1189 is a dated measurement description of the install as it was then.

Proof

Base origin/epic/2542-dead-code @ a62db8f27a22fd2df744308e9b1ee12bc50f3da2, head d3c1d874cfc2416547d20eb273664eb33c6a2d48.

Native diagram requalification (maintainer ruling 2026-11-02). Removing the alias changes the hashed installation from 0c2758c0… to 47e78ac9977d948dd35bfcb1d916aa3e2f6ddab976bb047eebc2a531cdf8403d (842 packages / 59,489 files / 1,331,664,273 bytes). The frozen #2293 source e8502b6f… was requalified on it by actually running the native SVG/PNG/PDF producer in its pinned Docker boundary, at runtime bf65590d…. d3c1d874c then moves qualified.installation and the self-test constants together. The self-test passes 10/0 on the new pin and fails 6/4 on the old one. Procedure, environment deviations, outputs and digests: #3320 (comment)

The receipts below were recorded at ddff51c2a. At d3c1d874c, check:pr exits 0 (1141 pass / 0 fail), bun install --frozen-lockfile reports no changes, and bun run typecheck exits 0.

bun run check:pr --base origin/epic/2542-dead-code   # exit 0: lint/leakage, env docs, changeset gates, strict typecheck, affected fast invariants (1142 pass, 0 fail)
bun install --frozen-lockfile                         # "Checked 947 installs across 1114 packages (no changes)"
bun run test tests/shipped-claude-runtime-pin.test.ts tests/release-manifest.test.ts   # 40 pass, 0 fail
git grep -n "research-292" -- ':!docs/process/evidence'   # no match (exit 1)
  • Failing-first receipt (citations). At commit 8fc0e6c (the lock change only), check:pr failed in tests/decision-citations.test.ts on "every citation names its anchor". It reported three stale citations: claude-code-runtime.md:76 and :90 (bun.lock:504 → now 503), and :94 (nested linux-x64 anchor "not in the file"). After the docs commit, that test passes 44/0 and the full check:pr exits 0.
  • SDK resolution. The ui-backend-claude identity tests resolve the platform binary relative to the SDK entry (sdkRequire.resolve(...)), so hoisting changes nothing for them. Locally, host-oauth, host-relay-native and ordinary-host-relay show the same 5 failures (20 pass) on this branch as on an unmodified worktree of the epic base. Those failures are native-runtime/sandbox failures in this local environment, not caused by this change. Hosted proof is authoritative for those tests.

Checklist

  • Focused local preflight/behavioral receipts and complete selected hosted proof passed; actual head/base/job checkout evidence is in Proof. (local done; hosted ready-candidate proof requested)
  • 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. (0.45.0)
  • A changeset is included, or this changes nothing a consumer can see. (root devDependency only; no published package changes)
  • 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.
  • Provider history stays append-only (docs/decisions/provider-history.md): the provider-history guard passes, or nothing on a turn's path changed.

Anything left open

Collisions at d3c1d874c: a textual overlap with #3343 on docs/decisions/claude-code-runtime.md, plus closure-only overlaps (listed in the requalification comment). Earlier notes: #3304 also changed bun.lock, so whichever lands on main second regenerates the lock with bun install. #3288 had a closure overlap on tests/shipped-claude-runtime-pin.test.ts.

Otherwise nothing.

🤖 Generated with Claude Code

schlessera and others added 2 commits November 2, 2026 17:36
The root devDependency installed a second, older Agent SDK and its eight
native platform packages for the mechanical-hygiene research harness,
which #1542 removed. Nothing imports it any more.

The lockfile refresh is a plain `bun install`, not a rebuild: the shipped
SDK stays at 0.3.293 and its platform packages move from nested to hoisted
entries with unchanged integrity hashes.

Refs #2509

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

Dropping the research alias shifts the shipped SDK entry to bun.lock:503
and hoists its platform packages, so the nested-entry anchor no longer
exists. Cite the hoisted entry and drop the sentence explaining the old
nesting.

Refs #2509

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera schlessera added this to the 0.45.0 milestone Nov 2, 2026
@schlessera schlessera added type: chore Tooling, CI, release plumbing, dependencies. area: ci CI workflows, the gates they run, release scripts, packaging. labels Nov 2, 2026
@schlessera

Copy link
Copy Markdown
Owner Author

Collision report at head ddff51c2ac0073017452cec4a2dca548eca5cf9a (bun scripts/collisions.ts --json --pr 3320): textual collision with #3304 (bun.lock, other epic base). The other collisions are closure-only and none of them changes these files directly: #3054, #3056, #3059, #3069, #3116, #3292, #3293, #3295, #3298, #3301, #3305, #3309, #3310, #3311, #3312, #3316, #3317 and #3319.

@schlessera

Copy link
Copy Markdown
Owner Author

Ready-candidate run 41494121721 failed on unit (3), and the failure is real and caused by this PR. tests/native-diagram-inputs.test.ts:50 ("fixed native qualification binds the independently frozen complete source") reports FROZEN_NATIVE_INSTALLATION_MUST_MATCH_QUALIFIED_BYTES. The installation digest is 47e78ac9…, but 0c2758c0… is qualified. The source digest is unchanged. The lock refresh hoisted the SDK's platform packages, which changed the installed tree. The test forbids refreshing qualification pins, so the fix is either a requalification under the native-qualification procedure or a lockfile change that keeps the qualified layout. Not merging. A follow-up worker will take this on.

@schlessera

schlessera commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner Author

Follow-up diagnosis of run 41494121721 unit (3) at head ddff51c2ac0073017452cec4a2dca548eca5cf9a (base epic/2542-dead-code @ a62db8f27a22fd2df744308e9b1ee12bc50f3da2). No push and no new confirmation request: the fix needs a maintainer ruling.

Local reproduction. Each run used a fresh private cache with bun install --force --frozen-lockfile --backend=copyfile, then bun run test ./tests/native-diagram-inputs.test.ts with Bun 1.4.4.

  • Epic base control: 10 pass / 0 fail. The installation is the qualified 0c2758c0… (843 packages / 59,516 files / 1,833,832,361 bytes).
  • PR head: 6 pass / 4 fail, the same four failures as the hosted run. The positive control fails with installation-mismatch and actual 47e78ac9977d948dd35bfcb1d916aa3e2f6ddab976bb047eebc2a531cdf8403d, matching the hosted digest exactly: 842 packages / 59,489 files / 1,331,664,273 bytes. The frozen source e8502b6f… and all pins still match. The source-addition, content and mode controls fail their unchanged-installation assertion (tests/native-diagram-inputs.test.ts:47).
  • Environment note: under umask 0077, even the unchanged base gives b846ed2b…. The counts are identical, so only the modes differ. The base qualifies only under umask 022. The owned-install recovery in CONTRIBUTING.md does not mention this.

Why no lockfile keeps the qualified layout. diagramInstallationIdentity (scripts/diagram-export-installation.mjs:24-38) hashes the name and version of every top-level node_modules package except @schlessera/*, plus each package's complete tree. In the qualified install, the alias directory claude-agent-sdk-research-292 is itself a top-level package. The top-level @anthropic-ai/claude-agent-sdk-linux-x64{,-musl} are its 0.3.292 binaries, and the shipped 0.3.293 platform packages sit nested under the SDK. Removing the alias removes that package and its roughly 500 MB of binaries from the hashed tree, whether or not the 0.3.293 platform packages are hoisted. Keeping the old digest would mean keeping 0.3.292 installed, which defeats #2509. The hoisting is a side effect, not the cause.

Why this is not a local fix. The frozen positive control requires the current external install to equal the single installation pinned at scripts/native-diagram-inputs.ts:20. bun.lock has not changed any external resolution since that qualification (#2877's diagnosis), so this PR is the first legitimate external dependency change to reach it. The SDK move in #1596, and any other dependency change, will hit the same wall. The test forbids refreshing the pin. Requalification means actually running the native SVG/PNG/PDF producer in its Docker boundary against the new installation, as #2293 did, and recording receipts. No document covers the installation-only case or who may perform it.

Options, handed back to the orchestrator for a maintainer ruling:

  1. Requalify. Run the actual native qualification of the frozen e850 source on the new installation 47e78ac9…. Then update qualified.installation and the test's installation constants together in this PR, with receipts. This is heavy, needs Docker, and needs a ruling on what counts as qualification evidence for installation-only drift.
  2. Fixture correction first (recommended). File a scoped CI issue, as ci: native diagram qualification self-test rejects legitimate source drift #2365 did for source drift: a legitimate lockfile change should require fresh native proof without failing the generic self-test. The fixture should keep a genuine positive control and an independent installation-drift refusal. ci: the root still installs the unused claude-agent-sdk-research-292 Agent SDK alias #2509 is then blocked by it, and the same fix unblocks backends: re-measure the Claude runtime on Agent SDK 0.3.296 / Claude Code 2.1.296 #1596.
  3. Defer ci: the root still installs the unused claude-agent-sdk-research-292 Agent SDK alias #2509. Park this PR and batch the alias removal with the next requalification, such as backends: re-measure the Claude runtime on Agent SDK 0.3.296 / Claude Code 2.1.296 #1596's SDK move.

@schlessera

Copy link
Copy Markdown
Owner Author

Decision (maintainer, 2026-11-02): requalify now (option 2 in #3320 (comment)). In #3320, run the same real native qualification #2293 ran: the frozen diagram source, with its SVG/PNG/PDF producer inside its Docker boundary, against the new installation (47e78ac9…), installed from a fresh private cache under umask 022. Then update qualified.installation and the test's constants together. Evidence: the new installation's package, file and byte counts; the producer's outputs and their digests next to #2293's; and the self-test passing on the new pin and failing on the old one. Hand-editing the pin without that run is still not allowed.

…arch SDK alias

Removing the claude-agent-sdk-research-292 alias changes the hashed
top-level installation from 0c2758c0... (843 packages / 59,516 files /
1,833,832,361 bytes) to 47e78ac9... (842 / 59,489 / 1,331,664,273).
Per the maintainer ruling on #2509, the frozen #2293 source e8502b6f...
was requalified on the new installation by actually running the native
SVG/PNG/PDF producer inside its pinned Docker boundary (runtime
bf65590d...), and the qualified pin and the self-test constants move
together. Receipts are on the PR.

Refs #2509

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

Copy link
Copy Markdown
Owner Author

Native diagram requalification for the alias removal (maintainer ruling 2026-11-02)

Head d3c1d874cfc2416547d20eb273664eb33c6a2d48 adds one commit on top of ddff51c2a. It 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. Base epic/2542-dead-code @ a62db8f27a22fd2df744308e9b1ee12bc50f3da2.

What ran

  1. Fresh installs. Each was a fresh private Bun cache, under umask 022, with bun install --force --frozen-lockfile --backend=copyfile:
    • PR head ddff51c2a.
    • Epic base a62db8f27, as a control.
  2. Frozen source. In each throwaway checkout, every path the native source owns was replaced with its bytes from delivered test(ci): qualify browser retention and snapshot fault ownership #2293 (0d780605f). That covers the diagramSourceSetup files, the six source domains, and the three pinned files (packages/ui-kit/vitest.config.ts, packages/ui-react/tests/browser/diagram-export-command.ts, scripts/ci-proof.ts). The result was committed locally and never pushed. This is the pairing the self-test's positive control binds: frozen source plus the current installation. The frozen diagram-export-producer.mjs therefore ran, not the current one.
  3. Runtime. The pinned image mcr.microsoft.com/playwright@sha256:eff16c30… with Bun 1.4.2, the version hosted CI pins. That is runtime bf65590d9d594d238c2c7b6e01e038a26402a676ccf16a1caf596f1179bdc9fb, identical to test(ci): qualify browser retention and snapshot fault ownership #2293's.
  4. Producer. It ran exactly as scripts/visual.mjs invokes it for --project=diagrams-chromium --project=diagrams-webkit: prepareDiagramExportSource(repo, true, expected), then prepareDiagramNativeArtifacts(repo, projects, expected). expected was {source, installation, runtime}, so the producer's own NATIVE_EXPORT_FRESH_RECEIPT_INPUT_MISMATCH, NATIVE_EXPORT_RUNTIME_CHANGED, NATIVE_EXPORT_PRIVATE_INSTALL_CHANGED and unmounted-repo/host-state assertions were all live. Each engine ran in its own read-only, network-disabled container with a private copied installation.

Environment deviations (disclosed)

  • Rootless Docker. This host runs rootless Docker, which does not map the host uid onto the container's --user uid for bind mounts. The frozen producer's -v ${output}:/proof is therefore unwritable at the default mode. The first attempt failed with EACCES … copyfile '/tmp/work/…/release.print.svg' -> '/proof/release.svg'. The producer stage was rerun under umask 000, so its private output directory (inside the 0700 mkdtemp state directory) is writable by the container user. No source, installation, image, runtime or guard byte changed. The installed tree was installed under umask 022, and the producer re-verified its private copy's full installation identity before running. Hosted runners use rootful Docker and do not need this.
  • Consumer not run locally. The browser consumer container (node scripts/visual.mjs --inside) was not run locally, for the same rootless reason: it writes into a bind-mounted repo. The pixel-equivalence consumer remains hosted browser proof.
  • Control TMPDIR. The base control first hit the /tmp tmpfs quota (EDQUOT) while copying its 1.8 GB installation. It was rerun with TMPDIR set to a private 0700 directory on disk.

Installation identities

packages files bytes sha256
#2293 qualified (epic base, reproduced) 843 59,516 1,833,832,361 0c2758c046f2b69d5f33b66521baf3098db5f44256b73ec96961c98d381e6245
New (this PR) 842 59,489 1,331,664,273 47e78ac9977d948dd35bfcb1d916aa3e2f6ddab976bb047eebc2a531cdf8403d

Frozen source in both runs: 859 inputs, e8502b6ffb3c575f2e9a1c93dea8dbf5ceda93ece367da9d542cb10b1c9ac32b.

Producer outputs

Both installations, both engines: the producer exited 0, with the fixed png,pdf results.

Output #2293 recorded Base 0c2758c0… (this rerun) New 47e78ac9…
release.svg — (no digest recorded) 481,420 B, 7e246ed992ea11f0209dec99afae60b9a6fa59225b6d3787e3b7dea5f4c08376 481,420 B, 7e246ed992ea11f0209dec99afae60b9a6fa59225b6d3787e3b7dea5f4c08376
release.png 1440×1176 40,977 B, 1440×1176, 7fe4980ae9cedb2657b1933351251cb3c55c5b8d07cb3d2ce4a87c50f3cbbc3e 40,977 B, 1440×1176, 7fe4980ae9cedb2657b1933351251cb3c55c5b8d07cb3d2ce4a87c50f3cbbc3e
release.pdf one page, both expected fonts 20,198 B, 1 page, fonts JetBrainsMono, PlusJakartaSans; chromium 4db02029…, webkit 1adff617… 20,198 B, 1 page, fonts JetBrainsMono, PlusJakartaSans; chromium 71e09618…, webkit 0a2fdf10…

Self-test receipts (tests/native-diagram-inputs.test.ts, new installation)

  • Old pin (ddff51c2a constants): 6 pass / 4 fail.
    • The positive control fails with installation-mismatch at actual 47e78ac9….
    • The source-addition, content and mode controls fail their unchanged-installation assertion: expected 0c2758c0…, received 47e78ac9….
  • New pin (d3c1d874c): 10 pass / 0 fail.

Preflight at d3c1d874c

  • bun install --frozen-lockfile: "Checked 947 installs across 1114 packages (no changes)".
  • NODE_OPTIONS=--max-old-space-size=8192 bun run typecheck: exit 0.
  • bun run check:pr --base origin/epic/2542-dead-code: exit 0. Lint/leakage, env docs, changeset gates and affected fast invariants: 1141 pass / 0 fail.

Collisions

bun scripts/collisions.ts --json --pr 3320 at d3c1d874c:

Left unchanged

scripts/browser-worker-audit.json still records sourceAudit.native.installation = 0c2758c0…. That block is the dated reviewed Worker audit at base b03e6550. It is diagnostic only: it is not part of qualified and is not compared at admission (inspectWorkerAudit, scripts/browser-worker-audit.ts:58). Re-auditing it is outside this ruling.

New ready-candidate confirmation requested after this push.

@schlessera

Copy link
Copy Markdown
Owner Author

Decision (maintainer, 2026-11-02): the requalification run in #3320 (comment) counts as the native qualification of installation 47e78ac9…. It used the frozen source e8502b6f…, the CI-pinned image and Bun runtime bf65590d…, and a fresh private cache under umask 022. Only the producer's private output folder ran under umask 000, as a rootless-Docker workaround. SVG and PNG are byte-identical to the base installation, and the PDF differs only in its dates. This merges into epic/2542-dead-code once hosted proof, including the browser parity check, passes on the current head.

…he SDK entry

Dropping the claude-agent-sdk-research-292 alias hoists the shipped SDK's
platform packages to the top level, so the probe's hardcoded nested path
no longer exists. Resolve the binary the way the SDK does, from its own
entry, and require its digest to match the SDK manifest's checksum, so a
hoisted binary of another version cannot stand in for the shipped one.

Refs #2509

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

Copy link
Copy Markdown
Owner Author

Ready-candidate run 41506807539: diagnosis and fix

The head is now 926fcd5b0b87270103b03c416d34f35c14d48339: one commit on top of d3c1d874c. The base is epic/2542-dead-code @ a62db8f27a22fd2df744308e9b1ee12bc50f3da2. The qualification pin and its self-test are untouched.

runtime: the probe assumed the nested platform-package layout (test-only, fixed)

Cause. The failing step was experiments/turn-surface-runtime-placement.test.ts, which spawns experiments/fixtures/runtime-placement-probe.ts.

  • The probe built its binary path as <sdk dir>/node_modules/@anthropic-ai/claude-agent-sdk-linux-<arch>/claude. That holds only while the platform packages sit nested under the SDK.
  • With the alias gone, Bun hoists the shipped SDK's 0.3.293 platform packages to the top level. The nested directory no longer exists, so the copy fails with ENOENT.

Product code is not affected.

  • Nothing under packages/*/src resolves the platform binary. The SDK resolves it itself, through createRequire from its own entry, which works with either layout.
  • The other repo callers either use the SDK-relative createRequire resolution (the ui-backend-claude relay tests and fixtures) or resolve from the workspace (packages/core/tests/claude-runner-subscription.test.ts:28-40).
  • Two places read the top-level path directly: packages/ui-sdk/tests/worker-launcher.test.ts:172 and scripts/measure-real-provider-dispatch.ts:366. Before this PR, that path held the alias's 0.3.292 binary. It now holds the shipped 0.3.293.

Fix. The probe now resolves the binary the way the SDK does: createRequire(<SDK entry>).resolve("@anthropic-ai/claude-agent-sdk-linux-<arch>/claude"). It also adds one assertion: the binary's sha256 must equal the SDK manifest's platforms["linux-<arch>"].checksum (OWNED_CLAUDE_NATIVE_MATCHES_SDK_MANIFEST). Every existing assertion stays. The probe still copies the same bytes to both placements and captures the request from each.

Receipts. All runs used a fresh private Bun cache, umask 022, bun install --force --frozen-lockfile and Bun 1.4.4.

  • Failing first, at d3c1d874c: bun run test experiments/turn-surface-runtime-placement.test.ts gives 0 pass / 1 fail. The error is ENOENT … copyfile '<repo>/node_modules/@anthropic-ai/claude-agent-sdk/node_modules/@anthropic-ai/claude-agent-sdk-linux-x64/claude', the hosted error exactly.
  • With the fix: resolution, the copies and the new manifest-checksum assertion all pass. The probe then reaches captureSurface. On this host it stops there with WorkerHostError: … bwrap: No permissions to create a new namespace. That is the worker's own bubblewrap nested inside the test's outer bwrap, which this host's kernel refuses. It is an environment limit, not a regression. The hosted runtime job is the end-to-end proof.
  • Mutation: comparing against the linux-<arch>-musl checksum fails on AssertionError: OWNED_CLAUDE_NATIVE_MATCHES_SDK_MANIFEST, line 27. The mutation was reverted.

unit (2): unrelated flake, filed as #3377

The failure was packages/ui-react/tests/parallel-sessions-runtime.test.ts, case "390 phone … A and B stream side by side …". Session C never read as cleared after "Scroll to latest" (until at line 721; a 15 s timeout). The probe's last state was done, settled, cleared: false.

Preflight at 926fcd5b0

  • NODE_OPTIONS=--max-old-space-size=8192 bun run typecheck: exit 0.
  • bun run check:pr --base origin/epic/2542-dead-code: exit 0, 1141 pass / 0 fail. Lint/leakage, env docs and changeset gates all passed.
  • An earlier attempt under host load average ~17 (16 cores) timed out two CI-planner self-tests at 30 s: tests/ci-plan.test.ts "global dependency/tooling edits…" and tests/hosted-proof.test.ts "affected complete discovery…". A control with the old probe bytes timed out the same way under the same load. Both files pass 96/96 at a 120 s diagnostic timeout. The rerun above, under lower load, is the receipt.
  • No changeset: the change is an experiment fixture and ships nothing.

Collisions at 926fcd5b0

bun scripts/collisions.ts --json --pr 3320:

New ready-candidate confirmation requested after this push (draft → ready).

@schlessera
schlessera marked this pull request as draft November 2, 2026 22:08
@schlessera
schlessera marked this pull request as ready for review November 2, 2026 22:08
@schlessera

Copy link
Copy Markdown
Owner Author

Ready-candidate run 41534661678: runtime is now green, so the probe fix holds. unit (3) failed on packages/ui-sdk/tests/governed-worker.test.ts: "launch refuses a folder identity swapped after planning before payload start" took 5016 ms, and UNQUALIFIED_FOLDER_PAYLOAD_NEVER_STARTS expected false but got true. The odysseus.test.ts failures are its planned-failure fixture. It's not yet known whether this PR causes it, for example through the native install or the SDK binary path the worker launches, or whether it's a timing flake. A follow-up worker will diagnose it and either fix it or file it with evidence before this confirms again.

@schlessera

Copy link
Copy Markdown
Owner Author

Ready-candidate run 41534661678 unit (3): not caused by this PR, filed as #3387 (a launcher fail-open)

The head is unchanged: 926fcd5b0b87270103b03c416d34f35c14d48339 on epic/2542-dead-code @ a62db8f27a22fd2df744308e9b1ee12bc50f3da2. Nothing was pushed.

Diagnosis

The failing case was packages/ui-sdk/tests/governed-worker.test.ts:244 with host restored: true, in 5016 ms. The launch was refused: the assertions at lines 274-275 passed with "retained folder mount points are unavailable" after the 5 s deadline. The payload still ran, which is the failed check, UNQUALIFIED_FOLDER_PAYLOAD_NEVER_STARTS at line 276.

  • Cause. On a refusal, the status-gated launch's catch first sends SIGKILL to the outer bwrap only. It then immediately closes the start-gate FIFO's only writer (packages/ui-sdk/src/server/worker-launcher.ts:1556-1557, then packages/ui-sdk/src/server/worker-status.ts:65). bubblewrap's --block-fd treats EOF as "go". When the outer bwrap has not died yet, the still-live sandbox child passes the gate and execs the payload before --die-with-parent kills it.
  • Not this PR. None of the three routes I was asked to check apply:
    • Install layout: the diff touches nothing under packages/ui-sdk.
    • SDK binary path: the test's payload is /bin/sh, not the SDK binary.
    • Sealed or qualified input hashing node_modules: nothing in this launch path does that.

Evidence

  1. bubblewrap EOF semantics, measured here. A gate whose writer closes without writing still runs the payload.
  2. Ordering probe with the same shell → bwrap shape: kill the outer process, then close the gate, and the payload runs 196/200 times. Kill the status-reported gated PID before closing, and it runs 0/200 times.
  3. Real launcher, deterministic. A copy of the restore-host case that only defers the outer child.kill by 200 ms fails on exactly UNQUALIFIED_FOLDER_PAYLOAD_NEVER_STARTS (Received: true). A local experiment that kills the gated namespace PID before status?.close() makes it pass, with the refusal unchanged. The experiment was reverted and nothing is committed; the harness is in ui-sdk: a refused status-gated launch closes the start gate before its sandbox dies, so the payload can still run #3387.
  4. Run history.
    • Both variants passed on this PR's own earlier head ddff51c2a (run 41494121721, unit (3)), which already carries the alias removal and the new bun.lock.
    • Both passed in the four latest green main CI runs checked: 41532349775, 41519548963, 41515009247 and 41504814872. The restore variant took about 5010 ms in each.
    • Of the 18 failed unit jobs in the latest 200 CI runs, this is the only occurrence.
    • epic/2542-dead-code has no CI runs of its own to compare.
  5. Not a known issue. The issue search found nothing for this signature. ui-sdk: attribute intermittent invalid worker mount-record refusals #2701 (invalid worker mount record) is a different guard.

Tracker

Receipts at 926fcd5b0

All runs used Bun 1.4.4 on 16 CPUs.

  • Install: fresh private Bun cache, umask 022, bun install --force --frozen-lockfile. 921 packages installed.
  • Typecheck: NODE_OPTIONS=--max-old-space-size=8192 bun run typecheck exit 0.
  • Focused test: bun run test packages/ui-sdk/tests/governed-worker.test.ts -t "folder identity swapped" passed 2/2 in 5.13 s.
    • 12 more repetitions alongside 12 CPU-burning processes all passed, so the race was not hit naturally here.
  • Whole file: governed-worker.test.ts gave 19 pass / 1 fail. The failure is "the governed /run mask refuses a host Unix socket", a host limit and not this PR.
    • That test nests bwrap inside bwrap, and this host refuses it with bwrap: No permissions to create a new namespace. I reproduced that directly.
    • It passed in the hosted unit (3) job.
  • Preflight: bun run check:pr --base origin/epic/2542-dead-code exit 0, 1141 pass / 0 fail, with lint/leakage, env docs and changeset gates passing.

Collisions

bun scripts/collisions.ts --json --pr 3320 at 926fcd5b0:

A new ready-candidate confirmation is requested after this comment (draft → ready).

@schlessera
schlessera marked this pull request as draft November 2, 2026 22:56
@schlessera
schlessera marked this pull request as ready for review November 2, 2026 22:57
@schlessera
schlessera marked this pull request as draft November 2, 2026 23:01
@schlessera
schlessera marked this pull request as ready for review November 2, 2026 23:01
@schlessera
schlessera merged commit ac3cab7 into epic/2542-dead-code Nov 2, 2026
42 checks passed
schlessera added a commit that referenced this pull request Nov 11, 2026
…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 added a commit that referenced this pull request Nov 11, 2026
…or on the pinned extension (#3968)

* CONTRACT: feat(backends): run the pinned web extension in a trusted host 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>

* CONTRACT: feat(ui-sdk,ui-server,ui-react): report what the host web tools 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>

* fix(ui-server): load the pi web executor through the backend loader

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>

* test(ci): requalify the frozen native diagram source on the web extension'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>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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

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.

1 participant