feat(sessions): add exact native continuation - #176
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Adds one exact, retry-safe continuation endpoint for retained native sessions.
The endpoint binds caller, operation, request, session, run, and provider boundary before Pi receives another prompt. It stores source-boundary proof before admission and reconstructs a durable terminal result after a settle-window crash.
Proof
Done in 271ms using pnpm v11.21.0
�[33m�[39m
�[33m ╭───────────────────────────────────────────────╮�[39m
�[33m│�[39m �[33m│�[39m
�[33m│�[39m Update available! �[31m11.21.0�[39m → �[32m11.22.0�[39m. �[33m│�[39m
�[33m│�[39m �[35mChangelog:�[39m https://pnpm.io/v/11.22.0 �[33m│�[39m
�[33m│�[39m To update, run: �[35mcorepack use pnpm@11.22.0�[39m �[33m│�[39m
�[33m│�[39m �[33m│�[39m
�[33m ╰───────────────────────────────────────────────╯�[39m
�[33m�[39m
RUN v2.1.9 /home/drew/code/.worktrees/cli-bridge-native-continuation-20260819
✓ tests/docker-preflight.test.ts (18 tests) 16ms
✓ tests/sse-keepalive.test.ts (15 tests) 9ms
✓ tests/sandbox.test.ts (13 tests) 37ms
✓ tests/scoped-host.test.ts (10 tests | 4 skipped) 24ms
✓ tests/profile-mcp.test.ts (37 tests) 79ms
✓ tests/single-instance.test.ts (11 tests) 633ms
✓ single-instance ownership > rejects a second live bridge process even when it chooses another port 336ms
✓ tests/jail.test.ts (56 tests) 177ms
✓ tests/docker-exec-diagnosis.test.ts (13 tests) 16ms
stdout | tests/codex-backend.test.ts > CodexBackend model translation > accepts an honest unqualified default route
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:804b30d90166d6687d38de5b48ba902a98ed6dfc423225793b163b7315eca73b","harness":"codex","provider":null,"model":"codex/default","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:4d77c3c772a6e4e51147810e5ddf060b6f676dfd8025697db53fd10ce00a7657","files":[],"unsupported":[]}
✓ tests/codex-backend.test.ts (9 tests) 38ms
stdout | tests/materialize-profile.test.ts > materializeProfile — verified per-harness routing > returns and retains a safe receipt for the exact applied workspace plan
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:6c158c618bcb6368b3c71212392b38754d8bb1ebe21884a6c1d721072ceaf86d","harness":"claude-code","provider":null,"model":"claude-code/opus","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:9c1e655e9da34810c098a02c71ed4b71f783a47a37072570dc99e46f72cacfda","files":[{"path":".claude/skills/receipt-skill/SKILL.md","mode":420}],"unsupported":[]}
stdout | tests/materialize-profile.test.ts > materializeProfile — verified per-harness routing > applies Gemini profile systemPrompt exactly once through its native system file
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:e725e571c668f0a29677e1e10918d117a2131d82ca9a86c1f019d4cc0e904afe","harness":"gemini","provider":null,"model":"gemini/gemini-2.5-pro","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:61efc62289abf0f5b12956d127becec0bbe32a77910363813c81a53dfb6f87f9","files":[{"path":".gemini/system.md","mode":420},{"path":"GEMINI.md","mode":420}],"unsupported":[]}
✓ tests/materialize-profile.test.ts (15 tests) 103ms
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > claude-code > sends a replacement on --system-prompt and never on the additive flag
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:5fcb549c9ef42ca3af1f23086bc6e48b9fac0ac1570b189616b8629824aa2434","harness":"claude-code","provider":null,"model":"claude-code/opus","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:51b9f540e493851f96c55545d567e650abccb8a529ca8627fd3b052aeb48fc80","files":[],"unsupported":[]}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > claude-code > sends an addition on --append-system-prompt and never on the replacement flag
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:a5614ce03930d2508262047da24cddb229eba23398dba0456d121b45cc15360c","harness":"claude-code","provider":null,"model":"claude-code/opus","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:947afbd106167b98fe6fb04bd661714df96f11ec5c77384fc600ebac664b4381","files":[],"unsupported":[]}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > claude-code > keeps the two intents separate when both are set
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:720005eebb0a1899156f0423f456bba799f4d07e8b585024ae3199925e05d8e2","harness":"claude-code","provider":null,"model":"claude-code/opus","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:cb4f0de6ff04d0387e35d399cdd3c79648c3bbb94bd52445b867def7bcce1a32","files":[],"unsupported":[]}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > claude-code > emits --append-system-prompt exactly once when several additive sources apply
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:d12540a06a02cbe564fec9b44a58a280ec97da1b737f401eb2087fe69e1af86c","harness":"claude-code","provider":null,"model":"claude-code/opus","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:713e60a94eaaeae9117cc4eaa88067585b0c401a200e2ecfe271c49e7d0a6580","files":[{"path":".tangle/claude-settings.json","mode":420}],"unsupported":[]}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > pi > writes the replacement to a file on --system-prompt
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:5fcb549c9ef42ca3af1f23086bc6e48b9fac0ac1570b189616b8629824aa2434","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:93ec4bc78a8f31074ffff4a92a9d5206c384546806486bd77e045dbe493c0cd9","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > pi > writes the addition to its own file on --append-system-prompt
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:a5614ce03930d2508262047da24cddb229eba23398dba0456d121b45cc15360c","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:bb1e25e80b8ba5b459953822663bd4397dec86c175b0f9c9fedae7a5d67100d7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > pi > orders the profile addition ahead of the project-instruction file
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:f185b9b721b55d010eca990252ea74c4a59b77992adcf065dba4c7725bd2b988","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:b0db98576fae3987397834aea160d7f6c81eb9cc88cffdbec221e81e8f452628","files":[{"path":"AGENTS.md","mode":420}],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
✓ tests/prompt-intent.test.ts (36 tests) 124ms
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > codex > points model_instructions_file at the written replacement file
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:5fcb549c9ef42ca3af1f23086bc6e48b9fac0ac1570b189616b8629824aa2434","harness":"codex","provider":null,"model":"codex","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:dd12a5a275010493ff0b2914ab36f09058e5419eec24a645fb1c26c8628b24ad","files":[{"path":".codex/system-prompt.md","mode":420}],"unsupported":[]}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > opencode > registers the addition as its own instructions file, ahead of project instructions
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:f185b9b721b55d010eca990252ea74c4a59b77992adcf065dba4c7725bd2b988","harness":"opencode","provider":null,"model":"opencode","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:6026ffd70b3b1fc75bf50581597a2a0926d012366d3c1c16210f44fe255cad20","files":[{"path":".opencode/agent-system-prompt.md","mode":420},{"path":".opencode/profile-instructions.md","mode":420},{"path":"opencode.json","mode":420}],"unsupported":[]}
stdout | tests/prompt-intent.test.ts > prompt intents reach each harness through its own control > gemini > installs a replacement as its native system file
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:5fcb549c9ef42ca3af1f23086bc6e48b9fac0ac1570b189616b8629824aa2434","harness":"gemini","provider":null,"model":"gemini","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:151e58cff982a13a852c88b1cfc8182810e2fc1ddc2ba1533a4875b86113c6ce","files":[{"path":".gemini/system.md","mode":420}],"unsupported":[]}
✓ tests/protected-model-credential.test.ts (3 tests) 35ms
✓ tests/execution-timeout.test.ts (14 tests) 58ms
✓ tests/admission-lanes.test.ts (8 tests) 420ms
stdout | tests/pi-backend.test.ts > PiBackend turn retry (#125) > exposes only the protected gateway origin in the materialization receipt
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:4e528aea2c4fde95244a09d21bcfd5e595fe025dd206ffa996cb5227149f3fd6","harness":"pi","provider":"tangle-router","model":"pi/tangle-router/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"https://router.tangle.tools","apiMode":"openai-completions","transport":"scoped-loopback"}}
✓ tests/acp.test.ts (4 tests) 14ms
✓ tests/claude-cost-receipt.test.ts (5 tests) 27ms
✓ tests/termination-attribution.test.ts (6 tests) 136ms
stdout | tests/pi-backend.test.ts > PiBackend > preserves the provider response model and fingerprint in every emitted delta
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:2d87f61cf56a8d8e41ebb0b34bdb1126e93dce6aa9b19ef1d8d5ad9fd0d86a58","harness":"pi","provider":"tangle-router","model":"pi/tangle-router/deepseek-v4-flash","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-backend.test.ts > PiBackend > applies one exact profile while leaving the task unchanged
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:26ef77a855f4d5fe85ef50b5b7e8718161f5299acb28fce65a7645be1176d5d4","harness":"pi","provider":"tangle-router","model":"pi/tangle-router/glm-5.2","reasoningEffort":{"requested":"ultracode","applied":"xhigh"},"workspacePlanDigest":"sha256:a632e2f06b0e273b7cc8d0c16b102ff35731dc07b09691d3e0277411525d9db6","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
✓ tests/prime-backend.test.ts (47 tests | 1 skipped) 460ms
✓ tests/net-jail.test.ts (50 tests) 924ms
stdout | tests/pi-backend.test.ts > PiBackend > accepts a 'matching max_tokens' and records the profile cap once
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:cf6f41cb466c0dee1b476fc6db62f1467dbfc5b97b90cedbb2240db6c0d0a13c","harness":"pi","provider":"tangle-router","model":"pi/tangle-router/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback","appliedMaxTokens":16384}}
stdout | tests/pi-backend.test.ts > PiBackend > accepts a 'older caller omission' and records the profile cap once
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:cf6f41cb466c0dee1b476fc6db62f1467dbfc5b97b90cedbb2240db6c0d0a13c","harness":"pi","provider":"tangle-router","model":"pi/tangle-router/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback","appliedMaxTokens":16384}}
✓ tests/opencode-worker-timeout.test.ts (7 tests) 19ms
stdout | tests/pi-backend.test.ts > PiBackend > isolates concurrent same-name profile resources and keeps their authority channels distinct
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:24b8e0771eea20ef028b8d5ec7196d377d5a84a398630b707354566f05263eaa","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:91422e5d5fea58b1e083673abbb14282dea4c4eb51a1c4ba8bc775c3e68a02da","files":[{"path":".pi/prompts/review.md","mode":420},{"path":".pi/skills/method/SKILL.md","mode":420},{"path":"AGENTS.md","mode":420}],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:c5e8f58aafd7653bf8f9fbd24c8e4726c9afc95faa56af1369890fb13dc4b9bb","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:bb96350e6e0c41d3c0768def54c71217c5b2bc2bf0c01daa30c2ee2ece6443a6","files":[{"path":".pi/prompts/review.md","mode":420},{"path":".pi/skills/method/SKILL.md","mode":420},{"path":"AGENTS.md","mode":420}],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-backend.test.ts > PiBackend > passes 140k instructions by file path instead of overflowing argv
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:58a8170f767bfabbab822a73b1540943cb3c1c90dff9dd4ad44e34a5a5db5cad","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:780d7b9cc8d8e832ca83cbcb16215eee1dc972f4886a71d5eed79c37ef0bdadd","files":[{"path":"AGENTS.md","mode":420}],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
↓ tests/docker-cancellation-real.test.ts (1 test | 1 skipped)
✓ tests/images-generate.test.ts (6 tests | 1 skipped) 39ms
✓ tests/trace-child-env.test.ts (10 tests) 367ms
↓ tests/pi-native-real.test.ts (4 tests | 4 skipped)
stdout | tests/pi-backend.test.ts > PiBackend > keeps anonymous calls stateless, creates caller sessions, then resumes the mapped Pi session
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:041f13f1162967bf03c879365d73bee759c0aaf93597d7a6a652db5192f96706","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:83b81fe34e834a41f1dd3b1d589c5d6a4ee0b3149936b9039c47652b20743c1c","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback","appliedMaxTokens":16384}}
✓ tests/credential-host-home.test.ts (3 tests) 9ms
✓ tests/model-discovery.test.ts (6 tests) 25ms
✓ tests/durability.test.ts (7 tests) 1127ms
✓ host executor semaphore > blocks the 3rd concurrent spawn until a slot frees 305ms
stdout | tests/pi-backend.test.ts > PiBackend > keeps anonymous calls stateless, creates caller sessions, then resumes the mapped Pi session
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:041f13f1162967bf03c879365d73bee759c0aaf93597d7a6a652db5192f96706","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:83b81fe34e834a41f1dd3b1d589c5d6a4ee0b3149936b9039c47652b20743c1c","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback","appliedMaxTokens":16384}}
✓ tests/execution-router.test.ts (8 tests) 659ms
✓ tests/probe-request-path.test.ts (17 tests) 532ms
✓ tests/run-memory-bounds.test.ts (6 tests) 690ms
✓ durable run memory bounds > does not accumulate unsettled runs across many dispatches 306ms
stdout | tests/resume-rematerialization.test.ts > resume re-materialization > re-applies an agent-edited workspace as a no-op when the session digest matches
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:4fadfed918b26a140a4f51339fe79b1524c58956d64a3370ca6823f95938a9ca","harness":"claude-code","provider":"anthropic","model":"claude-code/anthropic/haiku","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:563c4e49848303d4bd8978720c24ff2ac2d054cdd8bde233b320fe17fe4701d6","files":[{"path":"CLAUDE.md","mode":420}],"unsupported":[]}
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:4fadfed918b26a140a4f51339fe79b1524c58956d64a3370ca6823f95938a9ca","harness":"claude-code","provider":"anthropic","model":"claude-code/anthropic/haiku","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:563c4e49848303d4bd8978720c24ff2ac2d054cdd8bde233b320fe17fe4701d6","files":[{"path":"CLAUDE.md","mode":420}],"unsupported":[]}
stdout | tests/resume-rematerialization.test.ts > resume re-materialization > materializes fully when the session digest was recorded for a different cwd
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:4fadfed918b26a140a4f51339fe79b1524c58956d64a3370ca6823f95938a9ca","harness":"claude-code","provider":"anthropic","model":"claude-code/anthropic/haiku","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:563c4e49848303d4bd8978720c24ff2ac2d054cdd8bde233b320fe17fe4701d6","files":[{"path":"CLAUDE.md","mode":420}],"unsupported":[]}
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:4fadfed918b26a140a4f51339fe79b1524c58956d64a3370ca6823f95938a9ca","harness":"claude-code","provider":"anthropic","model":"claude-code/anthropic/haiku","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:563c4e49848303d4bd8978720c24ff2ac2d054cdd8bde233b320fe17fe4701d6","files":[{"path":"CLAUDE.md","mode":420}],"unsupported":[]}
stdout | tests/resume-rematerialization.test.ts > resume re-materialization > still refuses a mid-session profile swap, naming both content digests
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:4fadfed918b26a140a4f51339fe79b1524c58956d64a3370ca6823f95938a9ca","harness":"claude-code","provider":"anthropic","model":"claude-code/anthropic/haiku","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:563c4e49848303d4bd8978720c24ff2ac2d054cdd8bde233b320fe17fe4701d6","files":[{"path":"CLAUDE.md","mode":420}],"unsupported":[]}
✓ tests/resume-rematerialization.test.ts (3 tests) 50ms
stdout | tests/pi-backend.test.ts > PiBackend > accounts for Google countTokens separately from generation usage receipts
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:5e3f0694d8f4d4a1b238e73fdd89a67634d7ecd61cf871d779bf43b3346f578d","harness":"pi","provider":"google-test","model":"pi/google-test/credential-check","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:41461/v1beta","apiMode":"google-generative-ai","transport":"scoped-loopback"}}
✓ tests/diagnostic-buffer.test.ts (3 tests) 27ms
✓ tests/process-lines.test.ts (3 tests) 105ms
stdout | tests/pi-native.test.ts > Pi native RPC adapter > uses a real JSONL child for two HTTP turns, state proof, and canonical replay
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:e95f60a3471b435e158bf64d0d1389133ff67230b8141571a93ad926f14a2471","harness":"pi","provider":"test","model":"pi/test/model","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:64bf49b9df8d7c95aa717098967353349073bc03d869f6fbe8310ade38aa43aa","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
✓ tests/admission-reviewer-lane.test.ts (4 tests) 812ms
✓ reviewer admission under fleet saturation > BEFORE (reservedActive=0): the fleet fills every slot and the reviewer is rejected 311ms
✓ tests/host-env.test.ts (5 tests) 3ms
✓ tests/opencode-jail-binary.test.ts (3 tests) 13ms
✓ tests/pi-provider-dispatch.test.ts (2 tests) 3ms
✓ tests/nanoclaw.test.ts (5 tests) 169ms
✓ tests/failure-attribution.test.ts (24 tests) 1070ms
✓ tests/docker-failure-honesty.test.ts (33 tests) 1137ms
✓ tests/docker-executor.test.ts (77 tests) 1396ms
stdout | tests/docker-network-wiring.test.ts > Docker server wiring > carries OPENCODE_DOCKER_NETWORK from startup config into the container pool
[opencode-pool] caps memory=4g cpus=2 queue=16 acquire-deadline=60000ms slot-hold=disabled
[opencode-pool] preflight ok on 1 slot(s) — image, credential mounts, HOME, workspace /tmp/cli-bridge-network-wiring-A0A6AU/workspace/opencode, and
opencode --versionall verified in-slotstdout | tests/docker-network-wiring.test.ts > Docker server wiring > probes EVERY live slot, each against its own per-slot credential volume
[opencode-pool] caps memory=4g cpus=2 queue=16 acquire-deadline=60000ms slot-hold=disabled
[opencode-pool] preflight ok on 4 slot(s) — image, credential mounts, HOME, workspace /tmp/cli-bridge-perslot-wiring-v9bo2T/workspace/opencode, and
opencode --versionall verified in-slot✓ tests/docker-network-wiring.test.ts (2 tests) 148ms
✓ tests/admission-slot-lifetime.test.ts (12 tests) 1198ms
✓ tests/trace-emitter.test.ts (44 tests) 1378ms
✓ tests/server-capabilities.test.ts (1 test) 86ms
✓ tests/mcp-passthrough.test.ts (11 tests) 1597ms
✓ per-backend materializer produces a launchable stdio MCP server > codex config.toml — round-trips through the real codex parser when available 797ms
✓ tests/durable-runs.test.ts (18 tests) 1673ms
stdout | tests/pi-native.test.ts > Pi native RPC adapter > closes the real retained child and removes private files at identity eviction
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:6b57af985dea1687c7f2183aff60b4233780c6c489990e45c9eb738fa98cf17e","harness":"pi","provider":"test","model":"pi/test/model","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e9142f805b08917f4df5cc4598e3bd82ae9492036489bea1ad5eec7a573730b","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
✓ tests/cad-render.test.ts (7 tests) 2505ms
✓ POST /cad/render — real openscad happy path > renders a trivial cube to PNG bytes 1254ms
✓ POST /cad/render — real openscad happy path > soft-fails png while preserving the stl when host has no GL 1193ms
✓ tests/smoke.test.ts (79 tests) 2837ms
stdout | tests/pi-backend.test.ts > PiBackend > an EMPTY extension list means load nothing — the complete-isolation request
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:0a0e702ac3b772150458aec66492c2cb11df9768546f91aa0471a17270ad1b42","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-backend.test.ts > PiBackend > loads an explicit Pi extension set without ambient extension discovery
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:e38f02ceb8bc268638bf1d66455f6ca8c3af6d0805acbb711ca78c800fb0b696","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-backend.test.ts > PiBackend > exposes an exact extension to a read-confined run without copying ambient Pi credentials
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:e38f02ceb8bc268638bf1d66455f6ca8c3af6d0805acbb711ca78c800fb0b696","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-backend.test.ts > PiBackend > removes request-scoped profile files when Pi fails to spawn
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:bab43967bd61b9b06a87eae2240cf66b5c7a90bbdb398085022a4c25775edf90","harness":"pi","provider":"zai-coding-paas","model":"pi/zai-coding-paas/glm-5.2","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:b8b7d2685c88d925190f1ef3d43a2ba154ec8492b219771481d6f0a591cd5131","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:9/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
✓ tests/pi-backend.test.ts (58 tests) 3271ms
✓ PiBackend > rejects invalid Pi token counts instead of recording them as zero 2273ms
✓ tests/pi-native.test.ts (10 tests) 3353ms
✓ Pi native RPC adapter > uses a real JSONL child for two HTTP turns, state proof, and canonical replay 675ms
✓ Pi native RPC adapter > keeps a retained child alive when the Pi RPC timeout is explicitly disabled 422ms
✓ Pi native RPC adapter > closes the real retained child and removes private files at identity eviction 740ms
✓ Pi native RPC adapter > bounds an unacknowledged initial prompt RPC and then closes the real child 312ms
✓ Pi native RPC adapter > acknowledges a Pi interaction only after the native turn visibly resumes 318ms
✓ Pi native RPC adapter > returns transport failure when Pi consumes a response but exposes no resumed native effect 339ms
stdout | tests/pi-inference-isolation.test.ts > Pi inference credential isolation > lowers a profile model cap in real Pi traffic without mutating the operator catalog
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:ab75643757448ff09e59af33677f2dec7163ba18e3455cd4e2e1f16319f5b6bf","harness":"pi","provider":"isolated-test","model":"pi/isolated-test/credential-check","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:2e0962913b2ebd66008754f9574c59b0ff54539a9e92dc161c2c67b5e5d99bf7","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:35923/v1","apiMode":"openai-completions","transport":"scoped-loopback","appliedMaxTokens":64000}}
stdout | tests/pi-inference-isolation.test.ts > Pi inference credential isolation > confines a real Pi Bash turn to its workspace and exact persistent session
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:49a02ddc07933d0b2886f761723cf554614afaf803c166e639442c3918f33f31","harness":"pi","provider":"isolated-test","model":"pi/isolated-test/credential-check","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:62c469faf5b625ff667019b9e6f3a17115f3bbf65e77803c9b523cf9813f670f","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:41741/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-inference-isolation.test.ts > Pi inference credential isolation > confines a real Pi Bash turn to its workspace and exact persistent session
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:49a02ddc07933d0b2886f761723cf554614afaf803c166e639442c3918f33f31","harness":"pi","provider":"isolated-test","model":"pi/isolated-test/credential-check","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:62c469faf5b625ff667019b9e6f3a17115f3bbf65e77803c9b523cf9813f670f","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:41741/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-inference-isolation.test.ts > Pi inference credential isolation > records and refuses an extra model request made directly by a real Pi Bash tool
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:49a02ddc07933d0b2886f761723cf554614afaf803c166e639442c3918f33f31","harness":"pi","provider":"isolated-test","model":"pi/isolated-test/credential-check","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:62c469faf5b625ff667019b9e6f3a17115f3bbf65e77803c9b523cf9813f670f","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:37873/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
stdout | tests/pi-inference-isolation.test.ts > Pi inference credential isolation > rejects a wrong-model request from a real Pi Bash tool and preserves failure evidence
[cli-bridge] profile materialization receipt {"schema":"cli-bridge.profile-materialization.v2","effectiveProfileDigest":"sha256:49a02ddc07933d0b2886f761723cf554614afaf803c166e639442c3918f33f31","harness":"pi","provider":"isolated-test","model":"pi/isolated-test/credential-check","reasoningEffort":{"requested":null,"applied":null},"workspacePlanDigest":"sha256:62c469faf5b625ff667019b9e6f3a17115f3bbf65e77803c9b523cf9813f670f","files":[],"unsupported":[],"inference":{"effectiveEndpoint":"http://127.0.0.1:39583/v1","apiMode":"openai-completions","transport":"scoped-loopback"}}
✓ tests/pi-inference-isolation.test.ts (33 tests | 1 skipped) 8993ms
✓ Pi inference credential isolation > keeps Codex bearer identity outside Pi while accepting its compressed request 414ms
✓ Pi inference credential isolation > atomically reserves one deterministic native file when concurrent first turns race 807ms
✓ Pi inference credential isolation > loads request MCP from the installed adapter in a real read-confined Pi run 2632ms
✓ Pi inference credential isolation > lowers a profile model cap in real Pi traffic without mutating the operator catalog 610ms
✓ Pi inference credential isolation > confines a real Pi Bash turn to its workspace and exact persistent session 1116ms
✓ Pi inference credential isolation > persists an interrupted native first turn before resuming the exact Pi session 1075ms
✓ Pi inference credential isolation > records and refuses an extra model request made directly by a real Pi Bash tool 656ms
✓ Pi inference credential isolation > rejects a wrong-model request from a real Pi Bash tool and preserves failure evidence 668ms
✓ tests/retained-sessions.test.ts (108 tests) 21072ms
✓ retained Agent Interface sessions > binds public provider and environment coordinates into retained turn identity 318ms
✓ retained Agent Interface sessions > keeps retained metadata, context, and provider options separate with deterministic precedence and digesting 319ms
✓ retained Agent Interface sessions > surfaces finalization persistence failure as unknown and refuses continuation 6126ms
✓ retained Agent Interface sessions > survives a real SIGKILL after native effect start without repeating the effect 414ms
✓ retained Agent Interface sessions > accepts native continuation with the exact boundary and supports sequential native continuation turns 312ms
✓ retained Agent Interface sessions > prunes acknowledged interaction records but preserves unknown-effect tombstones 867ms
Test Files 51 passed | 2 skipped (53)
Tests 978 passed | 12 skipped (990)
Start at 08:21:08
Duration 23.97s (transform 13.19s, setup 0ms, collect 58.82s, tests 59.69s, environment 10ms, prepare 5.77s): 978 passed, 12 skipped