Reopening the app types terminal query answers into the shell (2RR1;10;0c) #160
Open
opened 2026-10-11 06:58:36 +00:00 by kayg
·
148 comments
No Branch/Tag specified
main
j470b-server-mesh-rejoin
mesh-compat-382
j444b-d381-key-wins-flood
j461b-macos-utun-reader-thread
j475b-remove-host-motion
fix-reconnect-new-link
j481-d380
dev
j479-mesh-soak
fix/j476-host-facts
j475-motion-pill-split
j470-mac-node-join
root-upgrade-d376
j474-review-merge
latency-targets-120hz
nightly-suite-shards
gotatun-pin-j469
macos-utun-reader-thread
fix-flood-echo-stall
wip/j416
motion-fast-ease-out
mesh-addhost-j259
takeover-close-terminals-d368
kbd-instant-followups
fix-trust-key-double-click
nightly-suite-partial-report
appwin-icons-j207
rusqlite-slice1
swipe-content-first-d374
mesh-mtu-381
addhost-instant-open
glass-contrast-d365-mock
glass-contrast-d365
signout-followups-442
fix-startup-toast-red
research-gotatun-matrix-j317
themes-sync-j304
fix-load-flakes
fix-nix-zig-patch
fix-compute01-browser-baseline
ratchet-size-baseline-419
predict-auto-d130
revoke-coverage-d367
nightly-suite-queue-timeout
nightly-browser-suite
fix-rustsec-2026-0459
fonts-ioskeley-obel
log-retention-d375
fix-kbd-no-anim-427
fix-dev-red-specs-2
takeover-proof-305-j205
wip/j410-server-pump
ui-consistency-d372
fix-osc52-clipboard
libghostty-vt-1.0
forget-retired-host-d369
j404-merge-426
fix-setup-lock-race
fix-touch-select-426
revoke-access-report-ui
fix-predictive-echo-specs
fix-selinux-agent-exec
wip/j395-checkpoint2
wip/j395
j391-review-scratch
ui-consistency-j195-deferred-rebased
fix-rustc-paths-421
decisions-wording-341
fix-install-suite-red
fix-dev-rtt-specs
fix-pending-removal-align
fix-privileged-skip
fix-install-suite-404
review-j368
mesh-dns-j254
revoke-access-report-d356b
revoke-privilege-round5
fix-removal-confirm
review-j360
gotatun-rotation-367
deps-refresh-340
review-j354
review-J351
review-j350
addhost-takeover-d359
revoke-report-items-347
revoke-end-sessions-d362
review-j348
size-mesh-ssh-346
size-trim-337
revoke-access-diff-d356
j259-pre-rebase-b06c5a6
j305-ended-at-start-spec
addhost-sudo-consent
fix-layout-real-specs-411
fix-shell-open-411
fix-console-hosts-373
fix-shell-exit
fuzz-host-name-353
fix-host-details-410
macos-filter-j197
research-gotatun-tricks
revoke-p3-j216l
stale-state-pill
revoke-followups-j216k
revoke-progress-j216e
backup/macos01-20261106/lume/j197
backup/macos01-20261106/lume/appwin-icons-j207-stash0
backup/macos01-20261106/claude/stash-0
backup/macos01-20261106/claude/stash-1
backup/macos01-20261106/claude/J80-macos-s1
backup/macos01-20261106/claude/J80
backup/macos01-20261106/claude/J80-slice1-20261102
backup/macos01-20261106/claude/J16b-appwin-on-dev
backup/macos01-20261106/claude/appwin-launch-idle-146
backup/macos01-20261106/claude/J80-s1-run
wip/j259
trust-285-p3c
runtime-lock-j216f
mesh-ssh-p3-j175
tun-proof-p3b
trust-285-p3
terminal-polish-j271
tun-proof-p3
ssh-install-flakes-j216i
fuzz-fixes-j264
trust-285-a
trust-285-b
restart-oversized-fixture-j198
backup/macos01-20261106/lume/appwin-icons-j207
restart-bound-j216h
up-preflight-p3-j198
backup/macos01-20261106/lume/j251
up-preflight-j198
wip/up-preflight-j198-j245-p2
wip/up-preflight-j198-j245-p1
agent-fsync-offloop-j196
wip/up-preflight-j198-j245
settings-offscreen-j231
wip/up-preflight-j198-j226-inspection
wip/j103f
themes-j206
wip/up-preflight-j198-j226
flakes-j216c
backup/macos01-20261106/claude/j197
flakes-j216b
backup/macos01-20261106/claude/j197-red
wip/up-preflight-j198-review
flakes-j216
backup/macos01-20261106/claude/appwin-icons-j207
engineering-j208b
appwin-mock-j209
toast-stack-j165
engineering-j208
decisions-d351
decisions-d350
decisions-d349
appearance-presets-mock-j129
decisions-d348
docs-audit-spec
doc-coverage-baseline-raise
decisions-d347
decisions-d346b
decisions-d346
j88h-profile
ui-consistency-j195-deferred
ui-consistency-j195
engineering-practices-j194
preferred-login-ui-j166
signin-pools-263-j174
macos-node-265-s1
decisions-d345
decisions-d344
proxy-cgroup-j164
verify-quick-fuzz-329
proxy-start-io-j168
timing-flakes-j163
up-263-s1
mcp-events-j147
verify-quick-fuzz-j158
proxy-p3-j159
agent-resource-j157-detect
wip/j103d-final
remote-cancel-hang-j155
proxy-traefik-281-j62d
j149-verify-quick
proxy-traefik-281-j62b
j150-drop-unnamed
wip/j79d-red-r4
wip/j103d-d332
rootless-toast-j142
wip/j103d-head
wip/j103d
j125c-mcp
macos-build-j136
backup/macos01-20261106/claude/j136
wip/j79d-red-cli
wip/j79d-red-server
j121-link-liveness
j118c-tracer-failures
wip/j79c-head
release-desktop-j131
j124c-signed-macos
wip/j79c-red-p3
wip/j79c-red-p23
wip/j79c-red-p22
merge-j128-check
perf-deferred-j128
sidebar-toggle-260
j127-shortcut-changed-dot
j125-mcp
j118-tracer-failures
j126-account-summary
settings-sections-mock-j92
j120-pinch-lock
sidebar-292
backup/macos01-20261106/claude/j120
taste-2026-11-03
row-actions-242-215
backup/macos01-20261106/claude/stash-0-untracked
backup/macos01-20261106/claude/J80-265-s1-run
backup/macos01-20261106/claude/J80-macos-s1-20261102
j112-canvas-commands
ui-no-overshoot-scroll
fix-recovery-restart
backup/macos01-20261106/claude/stash-1-untracked
taste-2026-11-02
size-baseline-ratchet
machine-cards-structure-j108
j109-boot-copy-mockups
fix-dev-red
wip/up-263-s1
j95b-settings-rows
proxy-traefik-281
j95-option-rows
docs-human-j91
docs-keys-palette
fix-flood-1013-270-j38d
mesh-ssh-s1
mesh-ssh-s0
addhost-d291-tunnel
test-stability-load
mesh-relay-220
repro-296
shim-thp-off-24
mesh-pins-258-v2
mesh-dns
signin-d311-merged
docs-pages
ui-size-283
fix-ui-batch-specs
wip/j12b-edge-update
gate-on-arm
fix-rename-sync-293
trust-285-j60b
fix-focus-ring-clip
integ-ui-1101
edge-update-v2
signin-d311
taste-2026-11-01
layout-per-tab-250
ui-approved-splitopt-224
ui-approved-splitopt-224-on-dev
icon-text-centre-282
ui-approved-189-212-216
research-reverse-proxy
transfer-budget-320
review-mesh-pins-258-r2
sidebar-pill-259
review-mesh-relay-220
wip/j12-edge-update-v2
nix-package
status-crash-loop-237
fix-dev-test-failures
fix-fixture-socket-path
wip/mesh-relay-220-pre-dev-advance-rebase
fix-canvas-side-clip
research-head-to-head
frosted-real-256
review-mesh-pins-258
wip/mesh-relay-220-pre-final-rebase
review-layout-per-tab-250-r2
broad-suite-triage
nix-devshell
review-status-crash-loop-237-r3
wip/nix-devshell-pre-p3
taste-frosted-real
wip/code-serve-demo-2026-10-30
wip/code-serve-glass-2026-10-30
wip/code-serve-clusters-2026-10-30
wip/code-merge-release94-dev-2026-10-30
wip/rproxy-delta-scratch-2026-10-30
wip/stale-note-257-staged-2026-10-30
wip/d241-size-staged-2026-10-30
review-broad-suite-207
wip/mesh-pins-258-pre-split
wip/mesh-relay-220-pre-rebase
mesh-measure-220
plan-211-update
review-edge-autoupdate-r3
perf24-reconnect
review-stale-note-r2
release-prod-live
d241-shell-marker
review-mesh-pins-server-258
review-revocation-r3
review-setup-token-r2
review-sync-journal-r3
wip/review-mesh-pins-258-prune-review-1995fee46
frosted-scroll-256
sync-journal-r3
revocation-per-account-wip
review-tokio-asyncfd-0386
review-sync-p3s
wip/stash-8by64-stash0-2026-10-30
mesh-drag-r2
setup-token-data-wip
release-9-4
auth-busy-1013
mesh-view-overlap
sync-p3s
review-auth-busy-wake
review-readd-r8-wip
mesh-drag-bounds
audit-auth-93
app-windows-stream-start
review-authority-cap-r3
app-windows-r7-measure
readd-minimal-r6
readd-minimal-r5
app-windows-r7-soak
readd-minimal-r4
app-windows-r7
app-windows-r6
readd-minimal-r3
readd-minimal-r2
readd-minimal
merge-release8-dev
review-busy-page-liveness-r2
review-busy-page-liveness
mesh-view-trim
review-authority-read-retry-r2
review-remove-uninstall-r2
release-retry-reattach
release-retry
review-remove-uninstall
review-authority-read-retry
app-windows-ship
mesh-autoswitch-p2
mesh-ssh
mesh-relay
mesh-macos-node
screen-and-control
session-labels
review-real-logins-r5
review-real-logins-r4
review-real-logins-r3
shim-memory-r2
review-real-logins-r2
shim-memory
shadow-addhost-instant
shadow-real-logins
shadow-same-session-flood
shadow-prod-perf-fix
hosts-from-server
app-windows-real
app-windows-transport
release-prod-6w
mesh-policy-verify
quiet-close-toast
dev-merge-r4
review-mesh-agent-transport
review-app-windows-transport
settings-roundtrip
review-release-pipeline-r4
mesh-agent-transport
ended-strip-fix
review-audit-ca-update-d244
settings-rows
phone-width
signout-clear
fix-restart-tests
dev-merge-rp
signer-hardening
review-audit-ca-update
terminal-fidelity
review-audit-ca-update-wip
mesh-integrate
review-mesh-agent-transport-515d3712
review-mesh-dataplane-feec1988
mesh-dataplane
signout
research-canvas-node
wip/review-renderer-cost
wip/review-terminal-fidelity
padlock-glyph
review-release-pipeline-2e95b689
phone-polish
sidebar-polish
inbox-generic
review-mesh-dataplane-378d4055
prod-batch
ui-inbox
ui-ca-unlock
ui-machine-sections
review-mesh-dataplane-a5f744fb
tls-session-prod
session-bounds-prod
fix-dead-session
session-bounds
tls-session
palette-polish
shortcuts-d222
research-appmeta
phone-gutter
ui-centre-button
wip/ui-centre-button
wip/tls-session
review-addhost-breakit
ui-platform
renderer-cost
remote-agents
mesh-api
ssh-bootstrap
prod-hotfix2
prod-fixes
review-remote-agents
review-mesh-dataplane
session-life
research-browser
review-mesh-api
research-capture
review-mesh-api-round3
review-mesh-api-round1
gate-stability
review-gate-stability
review-relay-direct
review-mesh-api-findings
proto-sessions
font-picker
proto-addhost
proto-windows
mesh-core
latency-gate
research-bsd
research-discovery
keytray-mods
mock-core
ui-tweaks
fix-motion-sel
fix-motion
integrate2
fix-robust
t-web
t-server
vt-ghostty
fix-snap-echo
t-web-auth
review-vt2
t-agent
lane-protocol
lane-shim
lane-auth
s1-base
s1-contracts
s1-workspace
No results found.
No labels
launch-qa
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
kayg/infraternal#160
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Owner report (2026-10-11, iPhone PWA, production
1c08c4b7): every time the app is closed and reopened, more text like2RR1;10;0cappears at the shell prompt of a monitor01 terminal (screenshots in the session: one repeat after the first reopen, three after more reopens).These look like terminal answers to device queries (cursor position report
ESC[…R, secondary device attributesESC[>1;10;0c) being typed into the shell as input. Likely cause: on reattach the client replays the saved screen/scrollback, which still contains the original queries, and the client's terminal answers them again, sending the answers to the PTY. Each reopen adds one more.Expected: replaying or restoring a screen never produces input. Only live output from the program may cause query answers, once.
Starting #160 on branch terminal-fidelity, based on prod-batch at
ebcc73a0ec.Finding: a reload restores the saved session with
lastOutSeq=0(apps/tracer/src/terminal.ts), the agent asks the shim forReadFrom(0)(crates/infraternal-agent/src/daemon.rs), and retained PTY bytes are replayed as rawOutputwhile the ring still covers them (crates/infraternal-shim/src/session.rs,contracts/shim.md§4). Ghostty'sTerminal.writeInternalparses each write and synchronously emits every pending VT reply throughonData; the tracer sends that event as PTY input (apps/tracer/vendor/ghostty-web/dist/ghostty-web.js,apps/tracer/src/terminal.ts). Thus a reload replays old queries as indistinguishable Output and answers them again.Proposed additive contract: the shim emits an ordered ReplayComplete cursor after the bytes retained when ReadFrom is requested; the agent forwards it as a
terminal.replay_completeevent. The browser suppresses VT replies while writing replayed Output and while applying any Snapshot, then enables replies for live Output after the fence. This covers all renderer response types without query-specific filtering and keeps raw replay for fidelity.Design refinement before code: the existing shim Hello already gives the agent
head_seqfor each attachment. I will use that captured cursor as the replay fence, split any Output frame that crosses it, and emit an orderedterminal.replay_completeevent on the existing wire Event frame. This avoids changing the frozen shim v1 protocol or requiring a new shim capability; Snapshot writes remain independently response-suppressed. The browser will enable replies after that fence only when restoring an existing session, while a freshly opened shell still answers its initial live output.Production-build browser regression is red on the current path. The query fixture covers DA1/DA2, DSR/CPR, DECRQM, XTVERSION, OSC 10/11/12/4, DECRQSS and window-size query. One live pass delivered 59 input bytes; after a transport detach/reattach the shell accepted 89 (+30 replayed reply bytes). Raw fixture and echoed-input evidence are in
$HOME/.cache/codex-scratch/terminal-fidelity/query-fixture.binandquery-live-input-echo.bin; the test output is captured inred-160-backend5911.log.Production-build browser reproduction (TRACER_TEST_PORT=5802): temporarily disabling replay response suppression made
terminal-query-replay.spec.tsfail after reload 2, with accepted input increasing 29 -> 87 bytes (29 extra bytes per replay). The test asserts each reload attaches at out_seq 0 and replays the 69-byte query fixture. Raw fixture and live reply stream are in$HOME/.cache/codex-scratch/terminal-fidelity/query-fixture.binandquery-live-input.bin. Path: saved tab session id ->initialSessionId->AttachTerm(last_out_seq=0)-> agentReadFromreplay -> GhosttyTerminal.write-> parser replies forwarded by the sharedonDatainput handler.Client slice committed and pushed:
bdd60b50. It gates Ghostty write-time replies during replay/Snapshot restoration and tests repeated reloads against the production build. Checks:bun run checkpassed;bun test srcpassed (142 pass, 0 fail, 10,901 assertions); browser spec passed (2/2). Transfer budget passed unchanged: critical JS gzip 290,590/307,200 B and brotli 241,555/256,000 B; deferred gzip 50,729/51,200 B and brotli 44,763/45,056 B; largest on-demand chunk gzip 14,999/20,480 B and brotli 13,330/18,432 B. Nerd symbols remain 223,748/235,520 B.Agent fence slice committed and pushed:
c4d42d6e. Each shim link captures Hello.head; Output frames crossing it are split and the orderedterminal.replay_completeEvent precedes newer bytes. Snapshot repaint completion advances to its sequence. Rust checks passed:replay_prefix_stops_at_the_shim_hello_headandreplay_complete_preserves_the_full_output_cursor_as_decimal(1/1 each, scratch target). No shim v1 frame or capability changed.Expanded VT replay query coverage committed and pushed:
696074d1. The production-build spec passed 2/2 with DA1/DA2/DA3, DSR/CPR, DECRQM, XTVERSION, OSC 10/11/12/4 (two palette indexes), DECRQSS, XTGETTCAP, and CSI window/cell dimension requests. Three full page reloads replay the 69-byte fixture from out_seq 0 without increasing accepted PTY input; Snapshot repaint also adds zero input.Wire contract update committed and pushed:
bebc280a.contracts/wire.mdnow records the additive replay_complete Event and the exact Snapshot fence rule; the frozen shim v1 wire format remains unchanged.#160 browser checks completed at
bebc280a:terminal-query-replay.spec.tspassed 2/2 with the expanded query fixture and three reloads;dead-session.spec.tspassed 4/4 against the production build. Earlier client gates remain green: tracer check, 142bun test srctests/0 failures, and D188 transfer budget within existing limits.Agent-daemon oracle now waits for
terminal.exitedafter the attach replay marker; clearing earlier events would hide the protocol ordering. Commita79ff148pushed. Targeted real-binary gate: 1 passed, 0 failed; 24 abrupt-stop/restart iterations completed in 41.86 s.The final fast run exposed a second fixture assumption from the replay fence:
agent_queuesexpected only stream-close frames while a reattached stream delivered the expected Event frame (kind=0x33,terminal.replay_complete, stream 10). I’m updating the oracle to validate and skip only that replay marker; all other queue/output assertions remain active. Evidence is in the final gate log under the terminal-fidelity scratch directory.Queue saturation oracle now validates and skips only session-matched
terminal.replay_completeframes while preserving Ack, Output, close and Ping assertions. Commit31241462pushed. Targeted real-binary gate: 1 passed, 0 failed; 12 streams, 65 replay batches, exact payload preservation, dead-shim isolation and Ping all passed in 38.26 s.Real-binary lifecycle fixtures now wait specifically for
terminal.exitedafter the attach replay marker; queue, status and output assertions remain active. Commit53151cecpushed. Targeted results: agent-daemon 1/1 (24 restart iterations, 41.30 s), session-retention 1/1 (1.86 s), detached final-exit recovery 1/1 (1.23 s), and session-count lifecycle 1/1 (6.56 s).The final full gate exposed three more raw-frame oracles that reject the new ordered attach marker:
verify-agent-writer-size.pyandverify-agent-multi.pyrejected Event kind 0x33;verify-agent-isolation.pyreceivedterminal.replay_completeon stream 3 while waiting for InputAck. I’m adding one shared validator that skips only session-matched replay markers and applying it to these readers. The attach-credit fixture also used a worktreetarget/path that is absent when CARGO_TARGET_DIR is in the required scratch location; I’m moving that fixture state to the shared scratch helper.Committed and pushed
b896bc29: raw protocol readers now validate and skip only session-matched terminal.replay_complete markers; attach-credit fixture state follows the configured scratch root. Evidence: agent_review 8/8 passed in 41.55 s; agent_queues 1/1 passed in 37.08 s.Finding: the required fast gate stores Cargo artifacts outside the worktree, but
crates/infraternal/tests/agent_sessions.rs:68hard-codes../../target. Reproduced withCARGO_TARGET_DIR=$HOME/.cache/codex-scratch/terminal-fidelity/target:cargo test -p infraternal --test agent_sessionsfailed immediately at line 69 with ENOENT. The test fixture path must follow Cargo’s configured target root.Committed and pushed
15da0c0d: the detached-session fixture now uses INFRATERNAL_TEST_STATE_ROOT, preserving the AF_UNIX path bound when Cargo targets live in scratch. Red: targeted agent_sessions failed with ENOENT at line 69 under the relocated target. Green: targeted agent_sessions 1/1 passed in 0.25 s with the short fixture root; cargo fmt --all --check and git diff --check passed.Follow-up gate finding: commit
15da0c0dpassed agent_sessions but full fast Clippy rejected map_unwrap_or in its fallback; replaced with map_or_else in67642792. fmt --check and workspace Clippy now pass. The same fast run also had vt_credit fail withcredit probe failed: t1-gate-approximate-1at load start 38.28/40.03/32.74, end 21.12/32.77/31.01. I will compare the detached dev baseline if that test fails again after the lint fix.Fast gate at HEAD
67642792passed fmt, VT native fmt, Clippy, cargo-deny, and all tests except vt_credit; that test failed twice in full-suite runs atcredit probe failed: t1-gate-approximate-1(4.74 s) with load start 30.83/29.80/29.77 and end 24.55/28.28/29.25. Following the #118 gate rule, I am comparing the detached dev baseline under the same weighted test scope. Static size remains the known D188 overrun.Root cause of the vt_credit failure: its real-binary fixture treated every 0x33 Event as an application notice. The first approximate-credit case receives terminal.replay_complete on reattach, then fails
no approximation is announced before forwarding; the saved stderr confirms this assertion. A detached dev run passed 1/1 in 22.66 s. A shared Cargo target mixed checkout artifacts, so I am rerunning the comparison with separate targets in one weighted scope before the fix.Committed and pushed
30011d95. The shared real-binary fixture now validates replay-complete session/cursor metadata and omits that metadata from user-event observations; vt_credit evidence follows CARGO_TARGET_DIR. Red: before the fix, the first approximate-credit case failedno approximation is announced before forwardingbecause the marker was counted as an event. In one CPU-weighted scope, fixed branch passed vt_credit 1/1 in 22.51 s and detached devded3abd6passed 1/1 in 23.69 s. All four branch probe modes passed; their 2 MiB producers completed in 340–386 ms.The final fast rerun after the replay-marker fix passed fmt, VT native fmt, Clippy and cargo-deny, but agent_review failed 5/8: five concurrent terminal.open calls received resource_unavailable; the other three passed. Load was 15.40/30.70/28.90 at start and 18.42/26.32/27.68 at end. This is outside the permitted host-load baseline exceptions, so I am rerunning the agent_review suite and investigating the concurrent launch refusals. Static binary size remains the known D188 overrun.
Update: the isolated agent_review suite passed 8/8 in 23.29 s after the full run. The host showed 95.88% CPU pressure over 10 s when five concurrent opens were refused. I am rerunning the full gate with RUST_TEST_THREADS=4 to reduce test contention; no tests are skipped.
Fast-gate step at
30011d951a: fmt, VT native fmt, Clippy, workspace tests, and cargo-deny pass with RUST_TEST_THREADS=4. Static build remains above the unchanged D188 cap at 20,084,464 / 16,404,816 bytes. Full summary will be included in the finish comment after tracer/browser gates.Finished at HEAD
30011d951aon branch terminal-fidelity; all commits are pushed. Issue remains open.dead-session.spec.tspassed 4/4 on port 5802.vt_creditoracle now treatsterminal.replay_completeas validated metadata. Fixed branch and detached dev baseline passed 1/1 in the same weighted scope; all four credit modes completed their 2 MiB producer in 340–386 ms.apps/tracer/captures/terminal-locale/tmux-before-1440x900.pngandapps/tracer/captures/terminal-locale/tmux-after-1440x900.png.The fast gate ran with
RUST_TEST_THREADS=4under host contention. Its Rust test row passed; the only failing row is the known static size overrun, with the D188 budget unchanged. Fast-gate summary, verbatim:Independent verification started on branch
review-terminal-fidelity, based on merge baseebcc73a0ec22f8498a0466b2d8641ac569f87e77(dev); reviewing target head30011d951a1fca5da4aa708d14b0e27bb7daf8b8.Independent review step: production tracer query replay regression reran on review head
30011d951a1fca5da4aa708d14b0e27bb7daf8b8(port 4360): 2/2 passed in 37.6 s, covering repeated reload replay and Snapshot suppression. No confirmed findings yet.P1 finding TF-001 confirmed on review head
30011d951a. The agent emitsterminal.replay_completeon attach (crates/infraternal-agent/src/daemon.rs:672), but the server's strictTerminalNoticeincrates/infraternal-server/src/embedded.rs:1097rejects the unknown variant.process_incomingreturns false, and the actor callsconnection_lostat lines 656–660, dropping the embedded agent link.Failing test:
embedded::regressions::replay_complete_notice_is_accepted_by_embedded_server; it reportsunknown variant terminal.replay_complete, expected one of terminal.snapshot, terminal.snapshot_unavailable, terminal.exited. Test committed on localreview-terminal-fidelityasae7b4314d6437e7cdfe05e2f84be53f885b03965.P2 finding TF-002 confirmed. In
scripts/agent_fixture.py:372-382,Binary.fence()reads frames until Pong but placesself.process(...)after an unconditional return, so every preceding non-Pong frame is discarded. The Rust regressiondaemon::readiness_tests::fixture_fence_processes_messages_before_the_control_pongfailed: its Output frame was not processed. Test committed on localreview-terminal-fidelityas1a1aa27feb02370b7e10dccebe8dbeeef2c4963b.Independent verification complete.
Verdict: HOLD — do not merge (P0/P1 present). Counts: P0=0, P1=1, P2=1, P3=0.
Target:
30011d951a; merge base:ebcc73a0ec. Local review branch head:1a1aa27feb.TF-001 P1:
terminal.replay_completeis emitted on attach but rejected by the embedded server’s strict notice decoder; committed failing testembedded::regressions::replay_complete_notice_is_accepted_by_embedded_server.TF-002 P2:
Binary.fencedrops non-Pong frames before its control Pong; committed failing testdaemon::readiness_tests::fixture_fence_processes_messages_before_the_control_pong.scripts/verify fastoutput on target head (verbatim):The latency gate exited 1 (413 passed, 73 failed, 38 skipped). Native latency budgets also failed on merge base and head under variable host load; the 50 MB throughput delta was not reproducible (full head run -5.25%, merge base +1.29%, head rerun +5.21%). The 2 MiB VT credit probe passed all four modes at 358.2–465.5 ms.
Static binary size was 20,064,880 bytes on merge base and 20,084,432 bytes on head (+19,552 bytes, no dependency additions); the gate’s fixed older baseline is already below the current merge-base binary.
Evidence logs and detailed finding entries are in
/home/kayg/.cache/codex-scratch/terminal-fidelity-review/and/home/kayg/.local/state/codex-jobs/infraternal/review-terminal-fidelity/findings.md.Starting terminal-fidelity review repairs on branch terminal-fidelity, based on
30011d951a. I read the #160/#161 histories; proceeding with TF-001 notice handling and TF-002 fence frame retention from the review commits.TF-001 reproduced at base
30011d951awith the unchanged review regression:replay_complete_notice_is_accepted_by_embedded_serverfailed because TerminalNotice reported unknown variantterminal.replay_complete. Embedded and remote links converge on the sameprocess_incomingdecoder; tracer already handles the notice and contracts/wire.md already specifies it.TF-001 committed and pushed as
5c6a6b66. The shared server decoder now acceptsterminal.replay_completeand validates its canonical u64 decimal cursor; the wire contract was already current. Red: reviewer regression failed at30011d95with unknown variant. Green: default server test 1/1, remote-feature server test 1/1, fmt check, and server Clippy (--all-targets --features remote).TF-002 reproduced on the branch with the unchanged review regression:
fixture_fence_processes_messages_before_the_control_pongfailed becauseBinary.fence()returned at the Pong withseen == []; the preceding Output frame was discarded. The Python fixture already validates replay-complete events inprocess(), so the repair can preserve all earlier frame handling through that existing path.TF-002 committed and pushed as
27db08cf.Binary.fence()now processes each pre-Pong writer frame in socket order with credit refunds disabled. Red: reviewer test observed no processed Output frame. Green:fixture_fence_processes_messages_before_the_control_pong1/1; agent Clippy (--all-targets), fmt check, and diff check passed. The tracer notice consumer already handles replay completion; no web/client code changed.Supplemental
cargo test -p infraternal-server --lib -- --test-threads=1at27db08cffinished 182 passed, 3 failed, 13 ignored in 572.40 s;embedded::regressions::replay_complete_notice_is_accepted_by_embedded_serverpassed. Unrelated auth socket failures:claude_review_watch_expires_host_made_visible_by_membership_edit(websocket closed unexpectedly),mesh_calls_and_subscriptions_deliver_scoped_live_inventory(mesh.listwas not successful), andmesh_lifecycle_withdrawals_survive_calls_but_never_end_a_replacement(elapsed timeout). I am comparing these exact cases on detachedorigin/devto separate host-load failures from branch behavior.Finished and pushed branch
terminal-fidelityat27db08cf8717596dee20d7de8e109ce69f03beb7.TerminalNoticenow acceptsterminal.replay_complete, validates its canonical decimal u64 cursor, checks the attached session as before, and retainsdeny_unknown_fields. Embedded and remote peers use the sameprocess_incomingpath. The notice and fence are already documented incontracts/wire.md; tracer code already handles the marker, so no contract or client change was needed. Default and remote server regressions passed 1/1 each; server Clippy and fmt passed.Binary.fence()now delivers all pre-Pong frames through the existing processor in wire order with credit refunds disabled. The reviewer regression passed 1/1; agent Clippy/fmt passed. Full agent library suite: 33 passed, 0 failed, 6 ignored.process(); fence preserves received order and credit accounting.scripts/verify fastran on infraternal-dev undersystemd-run --user --scope -p CPUWeight=10000. RTT self-test passed (p50 294.41 ms, p99 348.79 ms). Its serial rerun stalled atrestart::tests::closed_reply_and_missing_reload_target_do_not_end_restart_controlfor 10m10s and was interrupted so later gates could finish. The earlier four-thread run also reported failures incold_exec_with_closed_stdin_keeps_the_image_pinned_and_maps_null,real_fd_exec_pins_replacement_and_cold_rollback_uses_null_stdin,early_hangup_is_queued_until_control_installs_its_handler,rootless_even_marked_replacement_is_cold_and_open_fd_pins_the_inode, andrestart_requests_use_the_servers_binary_and_reject_untrusted_paths;closed_reply_and_missing_reload_target_do_not_end_restart_controlanddefault_restart_opens_the_receiver_target_exactly_onceexceeded 60 seconds. These are in the pre-existing restart area. The final test row is marked failed by the explicit interrupt; no unrelated test binary was skipped silently.claude_review_watch_expires_host_made_visible_by_membership_edit,mesh_calls_and_subscriptions_deliver_scoped_live_inventory, andmesh_lifecycle_withdrawals_survive_calls_but_never_end_a_replacement; each passed individually on the branch after host load dropped (1/1 in 8.70 s, 0.70 s and 0.51 s).30011d95measurement. PT_INTERP is absent. The existing 16,404,816-byte cap remains unchanged.Final
scripts/verify fastoutput, verbatim:Gate clarification: both fast runs stopped in the first
infraternalCLI test binary at the known restart stall; later workspace test binaries therefore did not run in those fast invocations. The server and agent library suites ran separately. I am now runningcargo test --workspaceserially with only the seven restart tests observed failing/stalling in the fast run excluded; all other tests remain enabled.Supplemental workspace coverage complete at
27db08cf87.cargo test --workspace --locked -- --test-threads=1with the seven previously listed restart cases explicitly skipped completed all test binaries and doc tests: PASS, zero failures. The auth socket cases,vt_credit, terminal fidelity suite (74 passed, 13 ignored), and shim mouse probe passed. The first supplemental attempt stopped at the shim mouse test becausezigwas absent from PATH (FileNotFoundError); the repo-pinned Zig 0.15.2 was installed under this job's scratch target, and the full workspace command was rerun successfully. Clarification:scripts/verify faststops in the CLI test binary on its known restart failures/stalls; this separate workspace run covers the remaining binaries. Branch head remains pushed at the SHA above.Independent delta review started on local branch
review-terminal-fidelity, based at target27db08cf8717596dee20d7de8e109ce69f03beb7. Scope:30011d95..27db08cf; merge base withdev:ebcc73a0ec22f8498a0466b2d8641ac569f87e77. The earlier TF-001 and TF-002 regression tests are present in the target delta and will be rerun.Delta retest at
27db08cf8717596dee20d7de8e109ce69f03beb7: TF-001 passed (replay_complete_notice_is_accepted_by_embedded_server, 1/1); TF-002 passed (fixture_fence_processes_messages_before_the_control_pong, 1/1). Both prior regression tests are present in the target delta. Logs are in/home/kayg/.cache/codex-scratch/terminal-fidelity-review/.Additional TF-001 check at
27db08cf8717596dee20d7de8e109ce69f03beb7:replay_complete_notice_is_accepted_by_embedded_serveralso passes with theremotefeature enabled (1/1). The embedded and remote paths compile against the same notice decoder.Delta review complete at
27db08cf8717596dee20d7de8e109ce69f03beb7on local branchreview-terminal-fidelity, reviewing only30011d95..27db08cf. TF-001 (prior P1) passes in default andremotebuilds (1/1 each); TF-002 (prior P2) passes (1/1). Both regression tests are already present in the target delta. No new findings: P0=0, P1=0, P2=0, P3=0.Verdict: MERGE (no P0/P1).
scripts/verify fastran on the reviewed head underCPUWeight=10000withRUST_TEST_THREADS=4. Two existing restart tests exceeded 60 seconds; I interrupted the CLI test binary after about two minutes so remaining checks could finish. The x86_64 static binary measured 20,092,880 bytes against the 16,404,816-byte cap, matching the job report. Gate summary, verbatim:Starting the #160/#161 production-batch port on branch
release-prod-3c, based onorigin/release-prod-3bat8cff05cdeee4b43c5b7234e09fb12296fb602ad8. The worktree is clean.origin/terminal-fidelityis27db08cf8717596dee20d7de8e109ce69f03beb7; its review history records TF-001 and TF-002 repaired and a MERGE verdict. I will preserve the production lifecycle changes already in the base while resolving the three reported conflicts.Finding from the branch comparison:
origin/release-prod-3bcheckslifecycle.rswithsymlink_metadata(...).file_type().is_symlink()and addsnondumpable_process_keeps_its_authenticated_lifetime;origin/terminal-fidelityremoves the followed/proc/<pid>/execheck because hardened shims deny following it. The production check inspects link metadata without following it, so I will retain that check and its regression test while preserving the terminal-fidelity locale and replay changes. The two script conflicts also differ: production counts the private rendezvous in/proc/<pid>/net/unix, while terminal-fidelity validates detach through a wire-level resize/ack and waits specifically forterminal.exitedafter the replay marker.Tracer gate finding: the first
bun test srcrun overlapped the Zig toolchain install andbun run check. It reported 148 passed / 2 failed / 10,921 assertions: the unrelated 1,000-node layout timing assertion measured 48.56 ms against <25 ms, and the random-grid test exceeded its 5 s timeout (8.30 s observed). No tests were skipped. I will rerun the same suite alone in asystemd-run --user --scope -p CPUWeight=10000scope and record host load.Production browser gate finding on the staged merge tree (
TRACER_TEST_PORT=4263, weighted scope): 24 passed / 5 failed in 8.3 min; no tests were skipped. Both newterminal-query-replay.spec.tscases passed (live replay/reload and Snapshot suppression). Failures:dead-session.spec.tsexit-7 expected attach_count +1 but saw +2; reconnect between saved status and Close expected +2 but saw +4;sessions-canvas.spec.tsempty/loading/error exceeded 30 s;terminal.spec.tssign-in connection exceeded 5 s; access-screen first-paint measured p50 1,770.50 ms / p99 2,922.30 ms against 1,000 ms and its screenshot exceeded 120 s. Load immediately before the run was 48.23/54.73/48.02. I am tracing the extra attaches and will rerun the timing-sensitive checks after isolating them. No failure is waived.Finding:
openProduct()waited for the client-sidedata-connectedflag, which is set beforeAttachTermreaches the test double over the 300 ms latency proxy. Repro: isolateddead-session.spec.tsreported retired status 0before=1 after=3(expected +1); status 7 reportedbefore=2 after=3. Add a wait for server-observed initial attach before taking retirement baselines.Resolved the attach-count race in
apps/tracer/test/dead-session.spec.ts:openProduct()now waits for the test double to observe its initial AttachTerm before tests capture baselines. Isolated file rerun: 4/4 passed (1.2m); includes exit 7, exit 0 and interrupted final Close.Gate step:
cargo clippy --locked --all-targets --all-features -p infraternal-agent -p infraternal-shim -p infraternal-server -p infraternal -- -D warningsPASS; finished in 7m 02s.cargo fmt --all -- --checkalso PASS.Test setup finding: the isolated CARGO_TARGET_DIR was correctly placed under scratch, but existing agent tests create fixture parents at
../../targetrelative to the crate. The first test command therefore had 8 ENOENT fixture setup failures (8 of 40 agent tests); no assertions ran in those cases. Added a temporary worktreetargetsymlink to the scratch target so those existing relative fixture paths remain inside scratch; rerunning the unchanged code tests.Rust tests (default features) PASS after pointing existing
../../targetfixture paths through a temporary symlink into scratch: agent 34 passed/6 ignored + 2 transport; server 187 passed/14 ignored plus its integration targets; shim 73 passed/13 ignored, detach 2/2, mouse 1/1. The TF-001replay_complete_notice_is_accepted_by_embedded_serverpassed in the server suite. Initial ENOENT setup attempt is recorded above; no test was waived.Real-shim session scripts PASS against the scratch-built CLI (
INFRATERAL_TEST_STATE_ROOTunder scratch):verify-session-exit-credit.py --exit-after-detachreported “Reaped shim final output and ordered exit survive delayed credit: PASS”;verify-session-retention.pyreported “Bounded owned exit, unfunded notification, restarted reconnect status, retirement handshake race, unknown session: PASS”.Production Playwright rerun (TRACER_TEST_PORT=4280, CPUWeight=10000): 26/29 passed, including dead-session 4/4 and terminal-query-replay 2/2. Remaining failures: sessions-canvas empty/loading/error flow hit its 30s test timeout; terminal first passkey connection poll timed out at 5s; access first-paint expected card did not appear before its test timed out. Access metrics: render p50 1984.50ms/p99 2986.80ms vs 1000ms budget; FCP p50 1655.60ms/p99 2760.30ms. Load average was 31.88/26.80/32.51 at start and 45.43/47.33/40.28 at end. No screenshots/error-contexts inspected. Investigating functional failures; none waived.
Finding: the sessions-canvas empty/loading/error test passed all stages when run with a 60s diagnostic ceiling, but needed 36.4s because it opens three canvases and holds the loading scene for 8s; the default 30s whole-test watchdog preempted it during the same shared load. Raised only this test's outer timeout to 60s; all existing per-stage limits/assertions remain unchanged. Rechecking the focused case.
Baseline check: the same
test/terminal.spec.tsfirst-run/passkey flow fails on detachedorigin/release-prod-3bat the same line 84, default 5sisConnected()poll (1/1 failed; 1.1m total). On this branch the catch-only diagnostic sawconnected=true,attach_count=2,active_socket_count=1,socket_open_count=2,pageErrors=0immediately after that poll failed. This gate remains recorded as failing; no waiver.Baseline comparison on detached
origin/release-prod-3b,TRACER_TEST_PORT=4292, CPUWeight=10000, configured RTT 300ms: access first-paint test exits 1. Setup render p50/p99 1597.00/2025.60ms and sign-in 2029.60/2638.30ms, each vs the unchanged 1000ms budget. FCP reports setup 1423.30/1880.90ms, sign-in 1866.50/2415.70ms. This remains a failing performance gate on both base and integrated branch; not waived.Production batch 4 started on release-prod-4, base
1f77a449ed(live release-prod-3). Read issue/review histories and repository contracts. Merge terminal-fidelity27db08cfthen ended-sessions14d01feb; preserve replay fencing, production lifetime authentication and event-driven census. Exclude audit-ca-update/release-prod-3b and64d4e213. Required native/browser/static gates and three interleaved base/head perf-VM keystroke runs; push only release-prod-4, no deployment.First merge conflict resolution: lifecycle.rs retains live-base symlink_metadata(/proc/PID/exe) and nondumpable lifetime regression; terminal-fidelity's followed-link removal is unnecessary on this production line. Session scripts use replay-aware terminal.exited waits and wire Resize/Ack detachment proof. Tracer check/src/build/transfer PASS: 150 tests, zero failures; critical gzip293658/Brotli244026B, deferred gzip48905/Brotli43227B. Replay browser initial run1/2 failed at HTTP fixture injection before server-observed Attach (text-output refused); unchanged rerun2/2 PASS (51.0s, port5254). Preserve initial output; add initial-attach barrier as separate fixture adaptation after merges. Rust cold compilation pending. No excluded branch merged.
Fresh live-base control at
1f77a449: default stripped static x86 image20093776B, no PT_INTERP, SHA256 f5fcda1a36f2270e458a1598a35d444f542a826b6d49fc88f0f876497b25fed1. Production-build browser gate (port5264, CPUWeight10000, default300ms RTT)50PASS/5FAIL in14.2min. Failures: retired exit7 attach count, sessions-canvas30s watchdog, theme long-task assertion, first-run5s connection poll, access-screen120s watchdog (setup render p992651.40ms vs1000ms). Raw evidence/prod4/browser-base-1.log. First merge fmt/all-feature touched-crate clippy PASS; agent34PASS+2transport, server186PASS/13ignored, raw queue1PASS/review8PASS, VT credit1PASS, session discovery1PASS and all three session-script runs PASS; shim suite finishing. No waiver or budget change; head A/B follows second merge.Completed first merge:69babc9237457a8dd30a20ba596c730b44414e79, terminal-fidelity27db08cf onto live1f77a449. fmt and touched-crate all-target/all-feature clippy PASS (20m02s cold); default agent34+2transport PASS, server186PASS/13ignored plus integration/doc targets, shim73PASS/13ignored plus detach2/mouse1 PASS. CLI discovery/VT credit1 each PASS; queue1PASS(36.68s)/review8PASS(23.36s); three session-script modes PASS; tracer150PASS/check/build/transfer PASS; replay browser2/2PASS after retained initial fixture-attach race. Second merge14d01feb now staged: resolve mock cursor+inventory, combine census/replay-aware readers and retention, retain production process identity and zero-timer event backend. Incoming raw evidence has whitespace; source-only diff check passes, raw logs preserved verbatim. Separate browser fixture adaptations follow, no deployment.
Production-batch restart fallback started on release-prod-4 at69babc9237457a8dd30a20ba596c730b44414e79, with ended-sessions14d01feb staged. Read all #174 comments; no parent linked. Unmodified restart::tests probe reproduces cold_exec_with_closed_stdin_keeps_the_image_pinned_and_maps_null FAILED and two>60s stalls (closed_reply/default_restart); owned120s guard returns124. Harness mode0775 under inherited umask0002, matching #174's strict validator fixture defect. evidence/prod4/restart-before.log preserves output. After the second merge, port only4fcba8a6 and
e1749321as separate logical test commits; existing #174 attach-credit/discovery state fixes are already present through terminal-fidelity. No unrelated dev history or production restart change.Second-merge checks:fmt/all-target/all-feature touched-crate clippy PASS; tracer159PASS/0FAIL,check/build/transfer PASS(critical gzip293781/Brotli244262B,deferred49714/43933B). Default agent42+2transport PASS; shim73+detach2/mouse1/pidfd2 PASS; queue1/review8 PASS. Two broad server runs each191PASS/1auth-socket-close FAIL; fresh_delete passes unchanged isolated1.44s and server_setup_echo passes unchanged isolated1.73s. Full unchanged server replay underway; failures retained, no waiver.
Imported restart-discovery fixture fails at agent_sessions.rs:197 with ENOENT because its hard-coded ended-sessions scratch parent is absent (same prerequisite recorded by author). With prerequisite present, agent_sessions3/3 and zero-idle/unsolicited-exit1/1 PASS(9.00s). Separate fixture adaptation will create the parent and honor the existing state root; no production change.
Fresh staged-head stripped x86 image20205936B (+112160B vs independently built live20093776B), no interpreter; ARM building. Full head browser55PASS/6FAIL: all7 ended-session cases, census-ordering and both query replay cases PASS. Four timing failures reproduce on live; addhost watchdog and manager extra-JS first-run failures are under interleaved controls. Invalid duplicate-port baseline attempt retained as browser-base-2-invalid.log; valid fresh-port baseline2 has2PASS/4knownFAIL. Query fixture setup barrier and in-worktree evidence path pass2/2(45.5s), queued as separate test commit. No deployment.
Confirmed additional #160 fidelity finding on merged production code: ByteQueue.peek() coalesces queued replay and later live Output. If the first replay write awaits paint, the next contiguous write can cross terminal.replay_complete's cursor; suppressReplayResponses stays true for that entire write, dropping fresh live query answers. Production-renderer failing-first test (port5344, default300ms RTT): two raw Unicode replay frames and a fresh query suffix arrive while real paint callbacks are held; received and painted cursors reach the full live suffix, but accepted_input_bytes remains0 for15s (expected>0). evidence/prod4/replay-live-fence-red-runtime.log. Existing two query scenarios remain unchanged.
Fix choice within existing contract: cap a replay write at the canonical received replay cursor. After that exact prefix paints, existing fence release enables replies for the remaining live suffix. Reuse ByteQueue; no protocol, renderer engine, runtime task, periodic wakeup or user interface primitive change. Separate client-fix and fixture/regression commits; measure the boundary and rerun tracer gates.
Completed second merge494388821526f8be674eb24a43dab5f955cf28f9. Full default server replay192PASS/0FAIL/15ignored(490.99s), including both previously intermittent auth cases; raw failures retained, no waiver. Agent42+transport2, shim73+detach2/mouse1/pidfd2, queue1/review8, real-session3 and idle-exit1 pass.
Separate follow-ups:4a4ead30 ports reviewed private restart fixtures;
e0fb30a9ports bounded9s exec deadline; each fmt/CLI all-target/all-feature clippy PASS and16/16 restart tests PASS(7.36s/7.34s).c5dc93b0reuses parent-creating state root: red ENOENT preserved, green3/3/16survivors discovered6ms.Additional #160 queued-live-query finding repaired in8ab20914, regression/setup coverage38a09ea8. Before: full live suffix received/painted,0 reply bytes for15s. After: all3 production-renderer regressions PASS(56.8s), including exact fence; tracer159PASS/0FAIL/10958 assertions/check/build/transfer PASS. Critical gzip293817/Brotli244107B; deferred49717/43905B. No engine/wire/timer change. First attempted green run hit another job's backend port5355; fresh16404/16405 run is valid.
Code head38a09ea879d64145e8f4ed69213b0c6af7013df0. Rebuilding final x86/ARM images, remote-feature tests and full final browser replay underway; native interleaved perf-VM comparison and final fast gate remain. No deployment.
Native data-path comparison on infraternal-perf-test, Debian6.12.69, x86_64,4CPUs, CPUWeight10000, shared flock, identical real-PTY fixture, RTT0,1000samples/condition. Interleaved B1/H1/B2/H2/B3/H3. Base1f77a449 imageSHA256 f5fcda1a36f2270e458a1598a35d444f542a826b6d49fc88f0f876497b25fed1; code-head38a09ea8 image b8450a258fa701a2149a73747c8f0de4db787cf047611387fcc4fae23e3b02df.
PTY-echo p50/p99ms: B1 .31/.62, H1 .80/2.70; B2 .77/3.31,H2 .56/3.34; B3 .57/2.25,H3 .39/1.63. Median run p50 .57->.56; median run p99 2.25->2.70, within overlapping run variation (base .62..3.31/head1.63..3.34); all typing references below D41's5ms. No reproducible head slowdown beyond observed noise; no significance claim. All head runs pass native fixture budgets. Base3 fails same-session flood growth23.12ms>16.67ms; retained, not discarded. Median same-flood echo p99 base18.31/head16.12ms. VM load rose .33/.12/.03->1.02/.35/.11 during finite fixture flood bursts; all cleaned by existing fixture. Complete evidence: evidence/prod4/perf-interleaved.log; reproducible runner perf-interleaved.sh. No VM builds/account/host-key changes.
Production batch 4 finished and pushed only release-prod-4 at
74305cc690; no deployment. Ordered merge commits69babc92(27db08cf) and49438882(14d01feb); excluded CA branches and64d4e213. Follow-up commits retain production lifetime checks, repair replay/live query suppression with failing-first production-renderer coverage, port reviewed #174 restart fixture fixes, and fence census/Attach fixture setup races.Final exact-head scripts/verify fast (exit 1, only unchanged historical static cap):
Full exact-head raw output: /home/kayg/.cache/codex-scratch/prod4/fast-final-corrected-head.log. Committed complete milestone output: evidence/prod4/fast-milestone-retry.log. fmt/clippy and touched default/remote tests pass: agent 42/66, server 192/301, shim 73; 16 restart tests pass. Session scripts and zero-idle canary pass. Tracer check, 159 source tests/10958 assertions, build and transfer budget pass; separate TS fast 36 tests/34462 assertions pass. Raw gate outputs, screenshots and controls: evidence/prod4/; narrative: docs/verification/production-batch-4.md.
Browser final broad run 57/62: four persistent failures reproduce on live
1f77a449; fifth was saved-Close fixture Attach race, repaired and verified 7/7. Replay/query regression suite 3/3. No browser or product budget relaxed.Perf VM interleaved B1/H1/B2/H2/B3/H3, 1000 samples/condition, flock + CPUWeight10000: PTY p50/p99 ms base .31/.62, .77/3.31, .57/2.25; head .80/2.70, .56/3.34, .39/1.63. Median run percentiles .57/2.25 -> .56/2.70; overlapping ranges and mixed paired deltas, no reproducible slowdown beyond observed noise. All head latency budgets pass. Zero daemon activations at 200 real sessions over 2.203s; RSS5452KiB; 200 exits p50/p99 8979/31935us, max42160us at load57.08/52.71/52.83.
Stripped static x86 base20093776 -> head20205936 bytes (+112160, +.558%); arm18010544 bytes, no PT_INTERP. Historical caps16404816/13817816 already exceeded on live base (x86); not changed. Review checklist recorded in report. Temporary baseline/build targets removed after preserving images/logs. Issues left open.
Starting Settings-return terminal replay verification on branch
settings-roundtrip, based onorigin/release-prod-4at74305cc690140d315772779076408e1371eaeb67. I read #160/#161 histories and the repo contracts. I will compare production base1f77a449with this branch across Settings/back, window switching, visibility changes and network reconnect, then run the requested client and browser gates.Finding: the desktop Settings → Shortcuts → About → Console path increased mock PTY accepted_input_bytes from 59 to 299 (+240) on commit
74305cc690. The new spec failed at test/settings-query-roundtrip.spec.ts:134 after one navigation cycle. I am capturing the new bytes to distinguish replayed VT replies from UI input before changing behavior.Correction to the earlier input finding: the +240/+310 bytes came from the mock echoing DA2 replies back as terminal output, which created a test-only query loop. The fixture now disables echo, matching the requested
stty -echocapture. With echo disabled, HEAD passed all five Settings/section/Console cycles and a reload produced a new cursor-zero attach while accepted_input_bytes and screen text stayed unchanged. The run then exposed a harness issue: Chromium's offline toggle alone did not close an already-open WebSocket. I added a deterministic socket drop while offline; reconnect verification is pending.Matched Settings-return regression comparison completed on production builds.
Base
1f77a449fails both viewports at the first Settings → Shortcuts → About → Go to Console return, with shell echo disabled: mobile accepted PTY bytes 39 → 229 (+190); desktop 39 → 199 (+160).Head
74305cc690passes both viewports through five cycles, reload, visibility change and network reconnect: mobile and desktop each 29 → 29 accepted bytes, output sequence 160, cursor-zero replay observed on reload, reconnect attach delta 1, and unchanged screen text.The first head failure was a test-fixture echo loop; the mock now models stty -echo. The test double also answers the product canvas's host.facts.read request so its socket stays attached. No product code fix was needed; the merged replay fence passed this path.
Step complete: commit 66f83411 adds preview-only product-canvas probes and deterministic host facts in the test double. The full Settings roundtrip spec passed on HEAD on both viewports (29 → 29 accepted bytes; cursor-zero replay observed; reconnect attach delta 1). The matched base remains red on both at the first Settings return (+190 mobile, +160 desktop bytes).
bun run checkpassed before commit.Shared the terminal query output fixture between the live and replay specs, retaining DA3 and adding the extended keyboard query. Commit 9cf15781. The replay spec passed all 3 cases (live query, snapshot repaint, queued query); bun run check passed.
Step 3 committed as f9f4b045. Added the product-canvas Settings roundtrip spec (five returns, window changes, cursor-zero reload, visibilitychange and reconnect). Matched run: base
1f77a449accepts +200 bytes mobile/+180 desktop on the first return; head f9f4b045 remains 29→29 bytes in both. Head output sequence 164; reload cursor-zero and reconnect each add one attach; screen text stays unchanged.bun run checkpassed.Perf gate setup: NetBird SSH reaches infraternal-perf-test.
/var/lock/perf-bench.lockis held by active processes (flock -nreturns 1); no holder file is present, so the current holder is unknown. Waiting for that slot to release before transferring the build or running timing tests. No perf measurements have been taken on another host.Orchestrator: DEPLOYED to production at 09:13 UTC (14:43 IST): release-prod-4 @
3aec316e= live1f77a449+ terminal fidelity (#160/#161) + ended sessions (#168) + live web fixes (3w) + settings rows (text never collides). Binaries built from61bdbd9f(later merges are web-only); sha256 prefixes x86 2af382ef / arm 8fd4d67f match on host. healthz 200, public 200, 0 errors in journal, 23 shims survived the restart. Settings round-trip evidence (#161): base1f77a449accepted 190-200 stray PTY bytes after Settings return; head 0 across five cycles, background/foreground and reconnect. Restart re-locked the CA: owner unlock needed. Perf VM latency A/B (prod-batch-4 report): p50/p99 0.57/2.25 → 0.56/2.70 ms, overlapping.Perf-VM finding (infraternal-perf-test, Intel i9-9900K KVM, 4 vCPUs; load 0.38/0.23/0.39): combined Playwright run on port 4817 passed all 7 dead-session cases, including the one-second inventory gate. Terminal sign-in p50/p99 was 3929.70/4012.00 ms (≤5000); reconnect p50/p99 was 695.90/963.40 ms (900 ms budget, FAIL). The final access-screen case hit a test-double socket hang-up. Isolating
terminal.spec.tson a fresh port to distinguish suite interaction; no product fix made.Isolated
terminal.spec.tson infraternal-perf-test (Intel i9-9900K KVM, 4 vCPUs; load 0.25/0.39/0.42, port 4819, configured RTT 300 ms): 1/3 tests passed. Sign-in p50/p99 3975.70/5039.90 ms (5,000 ms limit); reconnect p50/p99 698.70/997.50 ms (900 ms limit); access-screen render upper-bound p99 setup/sign-in 2305.60/2194.90 ms (1,000 ms limit). Their first-contentful-paint p99s were 2242.90/2120.80 ms. Running the same suite with RTT 0 as a local-rendering diagnostic; the 300 ms profile failures remain recorded.verify fastcannot complete on infraternal-perf-test: after the initial make/perl prerequisite was satisfied from the job cache, the Rust gates reportedcargo: command not found, the Zig native formatter was absent, and the static-build gate requires cargo. The VM has no Nix fallback. No Rust files changed. I’m running the required branch-head full gate on the worktree; the requested timing suites andbun test srcwere run on the perf VM.Full
scripts/verify fastfinding atf9f4b045: fmt, VT native fmt, clippy and cargo-deny pass;agent_queuesfails withterminal unavailable/resource_unavailableinsaturated_terminal_queues_preserve_every_byte_and_daemon_liveness. The static build is 20,205,936 bytes against a 16,404,816-byte cap (baseline 16,142,672 + 262,144). This lane changes only tracer test harness/spec files; Rust files are unchanged from74305cc6. I am checking reproducibility and the base build before handoff.Follow-up to the full-gate finding: reran
cargo test --locked -p infraternal --test agent_queues -- --nocaptureon the branch in isolation; it passed (1 passed, 35.14s). The original full-gate failure is not yet attributed. Rust and build configuration files are unchanged from74305cc6; I will rerun the full gate after correcting commit-message formatting. Static size remains 20,205,936 bytes vs 16,404,816 cap.Final-head gate rerun after commit-message cleanup at
051d0a40:agent_queuespasses; one unrelatedinfraternal-agentunit test,daemon::readiness_tests::uninstall_handoff_runs_only_after_a_successful_real_socket_write, fails in the parallel suite atdaemon_readiness_tests.rs:273(left: true,right: false). Rerunning that test alone passes (1 passed). The static release binary remains 20,205,936 bytes vs the 16,404,816-byte cap. This lane changes onlyapps/tracer/*; Rust/build configuration is unchanged. Exact final gate output is being retained for handoff.Finished and pushed
settings-roundtripat051d0a40c158270fdffb86bb4b87cd6d08419ac0.The Settings roundtrip spec passes on mobile and desktop: 5 cycles each, input log 29 to 29, output sequence 164, cursor-zero reload and reconnect each attach once, and the screen remains unchanged. On base
1f77a449, the first return accepted +200 mobile and +180 desktop PTY bytes.bun run check,bun test src(159 passed), the query replay specs (3 passed), the new Settings spec (2 passed), anddead-session.spec.ts(7 passed) passed. The production build transfer budget passed.The final full gate's Rust test row failed only in the parallel run at
daemon::readiness_tests::uninstall_handoff_runs_only_after_a_successful_real_socket_write; rerunning that test alone passed 1/1.agent_queuespassed in the final full-gate run (its first run failed; isolated rerun also passed). Static binary size is 20,205,936 bytes against a 16,404,816-byte cap. This lane changes onlyapps/tracer/*; Rust and build configuration are unchanged.Final
scripts/verify fastoutput:Additional measured evidence from
infraternal-perf-test(Intel i9-9900K KVM, 4 vCPU; Bun 1.4.2, Node 22.23.3, Chromium 149.0.7827.55):bun test src: 159 passed, 0 failed, 10,958 assertions; starting load average 0.01/0.32/0.50. The 1,000-node layout case measured 13.08 ms against 25 ms.apps/tracer/test/dead-session.spec.ts: 7 passed at 300 ms mock RTT; starting load 0.50/0.61/0.57.apps/tracer/test/terminal.spec.tsat 300 ms mock RTT, starting load 0.25/0.39/0.42: sign-in p99 5,039.9 ms vs 5,000 ms budget; reconnect p99 997.5 ms vs 900 ms; access-screen render p99 2,305.6 ms vs 1,000 ms. At RTT 0 the isolated access-screen case passes (render p99 439.7 ms setup, 199.3 ms sign-in; FCP p99 333.2/125.8 ms). The full RTT-0 terminal suite is not a valid timing pass because its predictive-echo test requires RTT above 60 ms.bun run transfer-budget.ts: critical gzip 293,910/307,200 bytes and Brotli 244,178/256,000; deferred gzip 49,717/51,200 and Brotli 43,876/45,056; largest on-demand chunk gzip 15,093/20,480 and Brotli 13,402/18,432. Font bundles are under budget.The Settings replay browser spec passes 2/2 on this VM; its assertions are functional, not timing budgets. See
apps/tracer/test/settings-query-roundtrip.spec.ts,apps/tracer/test/dead-session.spec.ts,apps/tracer/test/terminal.spec.ts, andtransfer-budget.ts.Started query-replies (#206 item 1, #160) on branch
query-replies, based onorigin/devat6f7cde60a430590a20f0b9384fc423df465bde7f. The publishedorigin/devmatches this base; noorigin/query-repliesbranch exists. I’m tracing the current terminal input and query-answer paths before adding the multi-viewer, reconnect and late-reply regressions.Started query-replies (#206 item 1, #160) on branch
query-replies, based onorigin/devat6f7cde60a430590a20f0b9384fc423df465bde7f. The publishedorigin/devmatches this base; noorigin/query-repliesbranch exists. I’m tracing the current terminal input and query-answer paths before adding the multi-viewer, reconnect and late-reply regressions.Reproduced the duplicate path from #160 with a tracer browser build and test-double server: one viewer sends 15 query-reply bytes; with three attached viewers and the third typing last, accepted input deltas are
[15, 15, 15](expected[0, 0, 15]). A split CPR completed 1.1 seconds after its response window also sends 6 bytes (expected 0). These are browser-to-test-double measurements, not a real-shim PTY measurement. Evidence: three-viewer run, late-reply run.Source review finds that
terminal.onDatasends both keystrokes and renderer replies as the sameInput; leg AInputcarries onlyin_seqand bytes, and the shimInputcarries only bytes. With those frozen layouts, the shim/server cannot distinguish replies from typing or bind a reply to the output cursor that elicited it. A byte/timing heuristic could discard legitimate keystrokes and cannot safely reject a late reply after reconnect. The #206 brief requires stopping if a wire change is needed; the implementation is paused pending an owner decision on an additive reply marker carrying its originating output cursor and on query-expiry semantics.Follow-up to #160: the browser reproductions and source review are recorded on #206. The three-viewer test sees 15 accepted reply bytes from each viewer instead of only the last typist
[0, 0, 15]; the late CPR test sends 6 bytes after its 1.1-second response window instead of 0.bun run checkpassed ($ bun x tsc --project tsconfig.json, exit 0). A reconnect-mid-query browser case is present in the worktree but remains unrun because all shared build slots were occupied. These measurements end at the test-double server, not a real shim PTY.No product/protocol change or commit was made. Per the #206 brief, work stops at the frozen-wire blocker pending an owner decision on a parser-reply marker with its originating output cursor/query identity and reply-expiry semantics.
scripts/verify fastwas not run because no implementation is available to gate.Started query-replies-d307 from origin/query-replies
372ec87ca; merged origin/dev (D307) as86eca8e1a5. Read #160 and #206 histories. Existing red browser specs cover duplicate replies and late split CPR.Proposed additive contract: a reply-marked Input has its own terminal frame discriminator (legacy 0x10 bytes stay byte-for-byte unchanged), query identity = session output ESC byte offset, bounded reply body, and a separate unsequenced reply lane so refused replies cannot create typing cursor gaps. Capability negotiation gates the extension. Server tracks bounded query state before output delivery and admits one structurally matching response. Expiry starts at the query ESC, including fragmented queries; use 1 second (more than three 300 ms RTTs, matching the existing late-reply regression). Marked non-reply bytes are refused, never reclassified as typing. No reply content is logged. No new dependencies.
Contract
4ac003677and codec5878aaf46completed (D307). Legacy 0x10 unchanged; optional browser Input.replyTo uses bounded 0x17. Rust protocol tests 8/8; browser codec 6/6, 87 assertions; protocol all-target Clippy, fmt and tracer check pass. Red regression failed with missing InputReply variant before implementation. No dependencies added. Query scanner/arbitration and independent PTY reply delivery remain in progress.Review findings addressed in progress: (1) release query state on ordered terminal.exited, with a >4096 completed-session regression; (2) bind window/status/capability response types and validate all dynamic/palette color query fields; (3) older surviving shims cannot admit an independent reply without changing their frozen typing cursor/geometry. The additive shim capability is therefore required. Unsupported old sessions now emit one validated terminal.query_replies_unavailable notice telling the new browser to open a new shell, rather than silently dropping replies. Old browsers still send unchanged plain Input and never receive the new notice. No sessions are ended automatically.
Initial server query unit run passed 5/5 (duplicate fan-out/replay, incomplete-query deadline, invalid bytes, 100000 marked unknown replies allocating no sessions, completed-session slot release). Current working tree adds further grammar regressions and a real-server/PTY three-viewer spec. Full iteration gate is queued through build-slot.
Browser query-identity scanner committed at
17841f9ab: bounded streaming state, stable absolute ESC offsets across every byte split, control-string exclusion and OSC overflow recovery. Tracer check passes; scanner 4/4 tests, 65 assertions. Protocol plus scanner targeted tests pass 10/10, 155 assertions, including a new shared 0x17 golden vector above 2^53 (pending its own test commit). Full iterate now holds a build slot and is running.First iterate found exhaustive-match updates required for the new reply command in agent queue tests and the new compatibility notice in the server secondary-route normalizer; also one literal-format lint. Those are repaired; the rerun is queued through build-slot. No failing gate is waived.
Lifecycle follow-up: an exited shell without viewers emits no browser exit event. Query-state retirement now also uses the existing authoritative embedded and remote session inventory watchers, scoped by host and reading the latest census under the output-admission mutex. This adds no timer and no database work to typing. A host-scope/watermark regression was added. Replies now retain their original expiry through the bounded host command queue; queued/expired replies cannot enter retained typing input.
D307 scanner measurement on perf VM (4 vCPU, i9-9900K, Bun 1.4.2, load 0.09/0.03/0.00, lock + CPUWeight=10000), 31 samples × 1 MiB: plain p50 0.983212→0.016583 ms, p99 1.121142→0.089832 ms; styled p50 25.337297→11.420432 ms, p99 30.057942→14.217195 ms. Initial per-span search regressed styled output; final implementation searches plain whole chunks and avoids query classification for ordinary CSI finals. Typing latency comparison remains pending.
Initial receipt
Final receipt
Touched-crate fmt/clippy and native query tests pass, TS scanner/codec 11 tests / 157 assertions pass. Browser 8/9 passed; reconnect case failed before emitting its query because the fixture attributed new sockets using stale connection IDs. Replacing that inference with a per-page fixture label, then rerunning.
Completed atomic slices:
86cdd8deffreezes the u64 marked-input shared golden vector and stable errors;348d3b681isolates shim replies from writer cursors/geometry;67ad42d65routes both infraternal-agent paths with explicit surviving-shim compatibility notice;f42a47575adds server arbitration, original-deadline queue validation and host-census cleanup. Touched-crate fmt/clippy and tests pass (protocol 8; shim queue and fragmented bounds; terminal notice 3; server parser/state 9 plus deadline and compatibility tests). Independent incremental review found no new material correctness issue.Reconnect browser fixture finding: after the third viewer types, its shared session input cursor was returned to all reconnecting viewers, disconnecting the two idle viewers. Added fixture-local viewer identity and individual cursor retention; production typing cursors already have separate ownership. Retry in progress. Full head gate/perf/size comparisons remain pending.
a0bc91b20adds the real server → infraternal agent → shim → raw PTY regression: browser + two protocol viewers attached; program reports exactly one CPR response, then ordinary input prints TYPING_OK after 10,000 unknown marked responses and known-query invalid marked text. Spec passes. Receipt includes the preceding fixture-only reconnect assertion failure; final full browser suite is running separately.Functional run receipt
Independent screenshot review confirms result and typing; observes an existing clipped Appearance control at the outer viewport and prompt marker blocks. No layout/component changes in this task.
b0ba693b0commits renderer marking outside the typing/replay queues. Reconnect fixture now retains individual viewer cursors; expiry is explicit and duplicate count is asserted independently of variable-length CPR coordinates. Native/JS sizes and end-to-end typing measurements remain pending.46900e0b9completes the browser/test-double slice. All 9 affected specs pass: three viewers admit one response per query, reconnect preserves expiry and admits one fresh answer, late CPR is dropped, concurrent typing works, replay/reload/Snapshot stay suppressed, and mobile/desktop each preserve 29→29 input bytes over five Settings/background/reconnect cycles. Full log/size-comparison run is ongoing outside the checkout.The reconnect fixture needed two fixes: independent retained cursors (the open-session fixture replaces the initially seeded session, so absent cursors must start at zero) and a typing-ack barrier before taking the query baseline. Duplicate count is asserted separately from CPR byte length, which changes with column digits. No expiry-window change was needed. The window remains one second from opening ESC: it covers the standard 300 ms RTT plus renderer scheduling margin while rejecting stale cursor replies; later fragments do not renew it.
b61e49907adds the development-only terminal-query robustness target. Server parser-checks clippy passes; 10,000 generated samples and seeded deterministic unit cases pass. The smoke executable was not coverage-instrumented (the new target is available to the existing nightly workflow); an explicit query-family corpus will also be exercised before the final gate. No new shipping dependencies/features; shipping feature tree saved outside checkout.Production JS compared with merge base
f29713863using the same default build recipe: critical identity 969,830→972,702 B (+2,872), gzip 300,185→301,188 B (+1,003), Brotli 250,153→250,919 B (+766); existing transfer budgets pass. Deferred identity unchanged at 141,031 B; on-demand identity unchanged at 219,874 B (compressed hash-import variation is in receipts).Baseline transfer receipt
Head transfer receipt
Static x86_64 comparison is building; browser typing comparison is queued for the perf lock. No cap changes or deploy.
Perf VM browser baseline (merge-base
f29713863production terminal artifact, current shared fixture, 300 ms RTT, Node 22.23.3, CPUWeight=10000; load 0.27/1.48/1.64→0.06/0.90/1.39): predicted glyph p50/p99 14.30/15.00 ms (17 ms budget passes), confirmed echo p50/p99 298.50/314.30 ms, prediction CPU p99 0.300 ms, browser CPU/key p99 0.200 ms. Non-predicted glyph p99 315.40 ms.The complete probe exits nonzero on an unrelated baseline reconnect budget: p99 1479.90 ms vs 900 ms (typing assertions pass). Head comparison is running under the same fixture; no test budget is relaxed. Initial Bun-runner attempt ended with SIGTERM before metrics; matching host's Node 22.23.3 (official archive checksum verified) completes the measurements. Runtime stays inside the job's VM directory.
Static baseline exactly matches existing D243 x86_64 cap: 21,225,872 B. Head link is pending; cap unchanged.
D307 owner test:
Static first candidate: baseline
f29713863= 21,225,872 B; D307 candidate = 21,254,032 B (+28,160 B, exceeds unchanged cap). Do not ship or raise the cap to fit it. Measuring the existing infraternal-agent orchestration package at opt-level z (previously s); transport, protocol, VT and cryptographic dependency profiles stay unchanged. Retain only if measured size fits and paired 50-session real-PTY typing tests preserve latency. This is a compiler-profile experiment, no library/engine choice or wire change. Candidate artifact retained outside checkout for comparison.Browser perf VM comparison (300 ms RTT, same fixture/Node22.23.3/scheduling, 20 keys each): predicted glyph p50/p99 14.30/15.00→14.50/14.80 ms; confirmed echo p50/p99 298.50/314.30→298.30/309.90 ms; browser CPU/key p99 unchanged 0.200 ms; prediction CPU p99 0.300→0.200 ms. Non-predicted echo p99 315.40→316.10 ms. Typing remains within the same budgets; do not interpret sub-ms variation as a speedup.
The full probe exits nonzero on separate budgets: baseline reconnect p99 1479.90 ms, head1513.30 ms (900 ms); sign-in baseline4999.10 ms, head5003.50 ms (5000 ms). No budgets/assertions relaxed. Load start/end is in each raw receipt.
Browser baseline
Browser head
Perf VM native baseline, real infraternal agent + 50 real shim PTYs, 200 sequential keys on one PTY, CPUWeight=10000, no synthetic CPU producers:
Native baseline receipt
The profile experiment's first package test run failed in fixture setup: omitted short runtime env and missing legacy relative target fixture directory (NotFound/SUN_LEN). Corrected the runner and created the empty ignored fixture parent; Cargo outputs remain exclusively under the external job target. No production change for those failures. Retry and final size measurement pending.
Resume state: branch head
b61e49907; only uncommitted source change is Cargo.toml's infraternal-agent s→z size experiment. Rejected untrimmed D307 artifact is 21,254,032 B; unchanged cap21,225,872 B. No push/deploy. All nine affected browser specs and real PTY test pass; paired browser typing and 50-session native baseline receipts are on this issue.Corrected runner is queued through build-slot since 07:36:46 CEST (PID3277770; script $HOME/.cache/codex-scratch/query-replies-d307/run-trim.sh, output evidence/trim-retry.log). All four host slots occupied by active jobs; no stale lock identified. The corrected 200-socket discovery unit test passes. Runner will check agent fmt/clippy/tests, measure x86_64 z artifact and build ARM only if x86 fits. Then measure native head0/300 RTT on perf VM, ratchet both exact size caps if smaller, commit the measured choice, and run final scripts/verify fast via run-final.sh. No capacity bypass or cap increase.
D307 measured validation at
b61e49907with the proposed package-only host-orchestration s→z profile (ARM build and final gate pending). Perf VM: infraternal-perf-test, 4 vCPU, Intel i9-9900K, 8,069,112 KiB RAM. Each run held the shared measurement lock and CPUWeight=10000 scope; no synthetic CPU load. Raw receipts include load averages and all fixture PIDs returning gone.50 real PTYs, 200 keys: baseline/head local echo p99 0.61/1.13 ms (budget 34 ms); 300 ms RTT echo p99 323.47/326.03 ms (budget 334 ms). Two 1,000-key local paired runs, reversing order, show baseline 0.39–0.41 ms vs head 0.47–0.52 ms. This is a small measured native increase, not identical latency. The untrimmed D307 s-profile control is 0.57 ms; z does not cause that increase. Head 50-session shim RSS 299,577,344 bytes locally (5,991,546.88/session), baseline 300,609,536 bytes; daemon 6,127,616 vs 8,699,904 bytes.
The earlier browser 300 ms RTT typing probes meet the 17 ms prediction budget: glyph p99 15.00→14.80 ms, CPU/key p99 0.200 ms both, confirmed echo p99 314.30→309.90 ms. The complete first-run probe also exercises unrelated sign-in/reconnect budgets and is not green: baseline reconnect 1479.90 ms vs 900 ms; head 1513.30 ms, and head sign-in 5003.50 ms vs 5000 ms. No thresholds were relaxed.
Final static x86 candidate is 21,223,696 bytes, 2,176 bytes below the same-recipe merge-base (21,225,872). The first candidate (21,254,032) was rejected rather than raising D243's ceiling. Package-only z saves 30,336 bytes; transport/protocol/VT/crypto speed profiles remain unchanged. Independent read-only review found no correctness or scope concern with the measured trim; ARM and full head gate remain required.
The shipping static x86 real-shim PTY check passed with 3 viewers and 10,000 invalid marked replies: QUERY_REPLIES:1 and TYPING_OK. Screenshot review confirms these markers; existing clipped Appearance chrome is outside this change. Cleanup receipt finds no remaining own processes.
native-perf-head.log

native-perf-repeat.log
native-perf-reverse.log
native-perf-untrimmed.log
real-perf-vm.log
perf-cleanup-final.log
Completed measured profile/size step at
23723c0c8. Final static x86 21,223,696 bytes (merge-base 21,225,872; −2,176), ARM 19,415,776 bytes (previous ceiling 19,427,688; −11,912). Both exact D243 ceilings are ratcheted down in scripts/verify.d/rust.sh and docs/PROCESS.md. Boundary test passes exact size, rejects +1 byte, requires ratchet for smaller images and rejects unsupported targets. Agent fmt/clippy and 66 active tests pass. The final seeded parser check and scripts/verify fast are now running on this HEAD through the build-slot wrapper.trim-final.log
size-ratchet.log
Author review completed for the protocol/parser/terminal path: legacy Input and typing cursors unchanged; new wire kind capability-gated with 1–1024 reply bytes; 256-byte scanner controls, 64 pending queries/session and 4,096-session registry; unknown marked input allocates no query state; reply syntax and identity checked before atomic claim; expiry retained across fragments, fan-out, replay and the bounded host queue; inventory/final events retire session state; shim reply ownership cannot change geometry or acknowledge typing. Debug rejection records contain counters/reasons, no reply contents. No dependency or core special-case was added. Independent read-only review found no remaining correctness issue. Functional regressions cover the new paths with real PTY proof and nine browser cases; the raw passing browser receipt and performance reproducers are attached below. Final fast gate remains queued at
23723c0c8.measurement-reproduction.txt
milestone.log
Perf VM phase finished: remaining_own_processes=[]; removed only /root/infraternal-bench/query-replies-d307 after preserving receipts. No benchmark process or installed runtime remains from this job. Final head gate is waiting for a shared build slot; no push or deployment yet.
perf-cleanup-removed.log
First full head gate at
23723c0c8did not pass: fmt, VT native fmt, CLI plugin compile-out, workspace clippy, cargo-deny and both static builds/linkage/key-memory/exact-size checks PASS; test row FAIL (101). The sole failure is unchanged crates/plugins/ssh/tests/install.rs:3483, review_inode_reuse_after_diagnostics_preserves_live_replacement: fixture could not reproduce inode reuse in 256 allocations (observed "absent", expected "reused"). Its 93 other active install tests passed. This is not a permitted host-load waiver, and is not being waived.The original inode was 6194366; the fixture printed first allocations [6194717, 6193604, 6194237, 6194840, 6194858, 6194903, 6195004, 6195024]. All fixture files are on this job's disk-backed scratch, not tmpfs. Retrying the exact fixture alone and then the complete gate with RUST_TEST_THREADS=1 to reduce concurrent inode allocation. No product source, assertion or limit changed; no push yet. First complete receipt retained:
final-fast-first.log
The exact SSH inode-reuse fixture passes alone, unchanged: 1 passed; 0 failed; 94 filtered out. The complete scripts/verify fast rerun is active at the same HEAD
23723c0c8with RUST_TEST_THREADS=1 (no source, assertion or size-budget change). Initial fmt/VT fmt/CLI compile-out/clippy and the 99-test binary group plus 24-restart integration pass. This rerun must finish green before either branch is pushed; the first failed transcript remains attached.The complete serial run passes the earlier inode-reuse fixture (install: 94 passed, 0 failed, 1 ignored). It then exposes an existing Python harness prerequisite at crates/plugins/ssh/tests/previous_attempt_shell.py:25: 32 cases raise KeyError for unset INFRATERNAL_TEST_RUNTIME_HELPER. The Rust wrapper does not set it; tests/common/mod.rs:51 uses target/debug/examples/recovery-helper as its default elsewhere.
Configured that same existing built shipping-runtime example explicitly for the next exact ownership-shell test and complete serial scripts/verify fast. No product source, test assertion, timeout or limit changed. Both prior complete transcripts are preserved; final green run still required, no push yet.
final-fast-second.log
The configured full run passes ownership shell, then reaches three unchanged recovery_support fixtures that bind absolute Unix paths. They fail with AF_UNIX path too long / SUN_LEN, before their behavioral assertions. At this disk-backed scratch prefix the newline variant is 120 bytes (Linux limit 107); even a one-character cache directory remains 117 bytes. Earlier gate failure stopped before this test binary.
Provisioned a private mount namespace only for recovery_support: same uid 1001, bind this job’s cache/q307 to the existing /mnt in that namespace, drop all capabilities before executing the unchanged tests. All fixture files remain under cache; the host /mnt remains uid 0 mode 755 and its mounts are unchanged. The ordinary gate and all other test binaries stay in the original environment. No source, assertion or threshold changed. This is short-path fixture provisioning, not a waiver; the affected tests and complete head gate are queued again. Runtime helper remains the shipping recovery-helper example. Reproducer and final receipts will be attached.
final-fast-third.log
The configured complete head gate is now beyond all prior blockers: install 94 pass/1 ignored including inode reuse; ownership-shell harness PASS; recovery_support 11 pass/1 ignored using the private short-path mount. All other tests remain outside that namespace. It has reached the 626-test server group with no failure or waived row. Source still
23723c0c8. Exact environment/runner and cold-cache preparation:final-gate-reproduction.txt
Completed D307 at
23723c0c83. Pushed atomically to origin/query-replies-d307 and fast-forwarded origin/query-replies from372ec87ca. Working tree clean; no deployment. #206 is the parent tracking request.The additive capability-gated reply-marked Input binds renderer responses to the opening ESC output offset. The server admits one syntactically matching reply per query, retaining the original 1-second deadline through fan-out, replay and the bounded forwarding queue. One second covers the measured 300 ms link and browser/queue allowance while bounding stale answers; fragments and reconnect never renew it. Invalid marked text is refused without consuming the query, rather than risking typing it. Legacy unmarked Input remains ordinary typing. Unsupported surviving shims fail closed with a session notice asking for a new shell. Content-free cumulative drop diagnostics are sampled at powers of two.
Bounds: 256-byte controls, 64 pending queries/session, 4,096 sessions, 1–1,024 reply bytes. Marked unknown input creates no state; terminal exits and authoritative censuses retire state. Replies cannot advance typing acknowledgements or choose viewer geometry.
Validation: nine affected browser specs pass; real shipping static x86 PTY with three viewers, invalid marked bytes and 10,000 unknown replies produces QUERY_REPLIES:1 and TYPING_OK. Strict codec/golden vectors preserve u64 identities above JS's safe integer range; deterministic parser properties and the seeded 10,000-run smoke target pass (the smoke binary was not coverage-instrumented). Independent protocol/parser and screenshot review found no remaining change-specific correctness issue. Author checklist completed.
Perf VM only, 50 PTYs: at 300 ms RTT native echo p99 323.47→326.03 ms (334 ms budget); browser predicted glyph p99 15.00→14.80 ms (17 ms), CPU/key p99 0.200 ms both. Paired 1,000-key native local runs show baseline 0.39–0.41 ms vs head 0.47–0.52 ms, a measured +0.08–0.11 ms rather than identical latency. Untrimmed D307 control was 0.57 ms. Complete first-run browser probes retain separate failures: baseline/head reconnect p99 1479.90/1513.30 ms vs 900 ms; head sign-in 5003.50 ms vs 5000 ms. These were not waived or reported green.
Final static x86 21,223,696 bytes (same-recipe merge base 21,225,872; −2,176); ARM 19,415,776 (previous 19,427,688 ceiling; −11,912). Exact D243 ceilings ratcheted down. Only host orchestration changed s→z; no shipping dependency addition. Final JS critical identity 972,702 vs 969,830 (+2,872); gzip 301,185 vs 300,185 (+1,000); Brotli 250,935 vs 250,153 (+782). Both transfer budgets pass; compressed differences from the earlier candidate receipt are chunk-hash variation.
scripts/verify fast: exit 0 on this HEAD, no failed or waived row. Environment: RUST_TEST_THREADS=1; explicit existing recovery-helper example; short disk-backed scratch/TMPDIR. Only recovery_support uses the documented private mount namespace alias, same uid 1001 with capabilities dropped before executing unchanged assertions. The host mount is unchanged. Earlier failed transcripts remain attached: first inode fixture allocation, then missing helper setting, then overlong absolute socket names. All now pass in the complete run. Exact reproduction and full raw transcript:
final-fast.log
final-gate-reproduction.txt
Perf VM processes were gone and its entire job directory removed; own temporary baseline checkout, Cargo target, fixture roots and generated production bundle removed after verification. Raw evidence retained outside the checkout and attached above. No issues closed.
Final push and cleanup receipts:
push.log
host-cleanup-audit.log
build-cleanup.log
Verbatim scripts/verify fast output (exit 0)
Independent D307 break-it review started on review-query-replies at
23723c0c83(base origin/query-replies; review diff origin/dev...23723c0c8). Reading #160 and parent #206 history, then probing codec, scanner and real-shim multi-viewer behavior. Only test commits will be pushed; no deployment.P1 QR-001 confirmed at
23723c0c8: D307 silently removes replies to supported terminal query forms. The shipping VT WASM answers DECID (ESC Z), zero-padded CPR (ESC [ 06 n) and CPR containing an ignored NUL, but TerminalQueries emits zero identities for each. terminal.ts writes unrecognized spans with responses suppressed; the independent server scanner also omits these forms. Programs waiting on their terminal reply now stall.Real-engine regressions committed/pushed as
47c5ccfc6on review-query-replies: 0 pass, 3 fail (6 assertions; renderer response exists, identity absent). Tracer TypeScript check passes. Production browser and native admission regressions are in progress. Evidence: renderer-review.log. Findings file: $HOME/.cache/codex-scratch/review-query-replies/evidence/findings.md.Started D307 round 2 on query-replies-r2, base
23723c0c83(origin/query-replies). Read #160 and parent #206 histories. Cherry-picked unchanged review tests as3129a8b23and064f82c9e; shipping-WASM review reproduction: 0 pass, 3 fail.Design: remove all query-kind and response-text matching. Every synchronous renderer answer is marked. Keep generic control boundaries solely to give each write a stable absolute output identity: browsers coalesce/split output differently due paint/credit, so raw transport chunk identities would duplicate or lose replies. Both boundary scanners will accept every complete control sequence, with constant storage and no request-kind list; server records expiry from the opening byte and admits the first bounded reply for that identity. No reply syntax allow-list. Replay remains suppressed; unmarked Input remains typing. This follows the requested superset-scanner option while preserving multiple queries in one write and fragmented expiry.
Contract clarification proposed before implementation: query_seq remains opening control offset; acceptance checks identity, size, deadline and first claim, with renderer authoritative for response contents. No layout/capability change. No deployment. Explicit brief authorizes pushing query-replies-r2 and fast-forwarding query-replies when green.
Contract step: 5831e4a4a clarifies D307 renderer-authoritative contents, generic output positions and constant scanner storage without changing the wire layout. Rejected transport-chunk identity because paint/credit splits differ by viewer. Review commits remain unchanged.
Additional engine-backed finding: an ESC inside OSC/DCS cancels the old string, and a nested CPR is answered by the shipping VT. Boundary handling now restarts at that newer ESC instead of hiding the answer. The current source property covers 30 engine-answered corpus forms, every two-part split, three independent renderer instances: 1 passed / 0 failed / 1,546 assertions; each split has exactly 1 admitted response and 2 duplicates. Includes DECID, zero padding, ignored C0/DEL, cancelled strings and a 305-byte request containing 300 ignored NUL bytes. No query-kind/response-text list remains. This is functional evidence, not host timing evidence.
property.log
Touched-crate Rust validation is now compiling in the shared build slot. Next: real-server/shim/PTy corpus, production browser regression suite, same-base native/JS sizes and perf-VM typing comparisons. No push or deployment before final green gates.
Design refinement while validating: recording every complete styling control would fill a per-control table and could displace a real unanswered query. Removed the server terminal scanner entirely. The server now timestamps bounded observed-output ranges and accepts the first bounded marked reply per position; original-byte timestamp supplies expiry across fragments/replay. Bounded claim tombstones are retained until expiry (full table refuses new claims rather than reopening duplicates). Styling consumes no claim slots. No server terminal grammar, request contents or reply-content matcher remains. Browser generic boundaries remain solely for stable per-write positions across independently coalesced viewers; actual answers are always renderer-produced.
This follows the preferred output-position design more directly and supersedes the earlier proposed server superset scanner. Contract clarification updated before committing this implementation. The unchanged reviewer tests remain present. Added a regression for a query followed by 100 styling controls and for claim-table saturation; final checks will cover both.
Additional unchanged review regression reproduced: daemon::session_commands::tests::review_reply_at_full_command_capacity_preserves_accepted_input fails at session_commands_tests.rs:146 on base
23723c0c8plus review commits (0 passed / 1 failed). A full 8-command FIFO returns Full for Command::Reply; daemon.rs:782 treats Full as stream retirement, cancelling previously accepted typing. The same run passed all 12 server arbitration tests.Fix in progress: full best-effort replies follow the existing probe-drop path; Input/Resize capacity errors, closed-channel errors and FIFO order remain unchanged. Separate logical commit after touched-crate checks. No reviewer assertion changed. Contract commit was amended before push to
a92ac87cfafter the output-range design refinement.Red queue regression and green server tests
Renderer properties: 8 passed / 0 failed / 1,617 assertions
Completed logical source steps (all remain on query-replies-r2, not pushed until final green):
19019121d: preserve accepted typing when a full command FIFO meets a best-effort reply. Unchanged reviewer regression now passes; all 7 command-queue tests pass.86a6e1f0a: remove the server terminal grammar entirely; timestamp observed output ranges and retain bounded live claims. All 12 arbitration tests pass, including unchanged QR-001 admission, expiry, replay, gaps/overflow, 100 styling controls, saturated claims and unknown-position floods.fed6a00d7: remove browser request matching; mark every renderer answer at stable generic write boundaries. No request text or local deadline retained; empty reply collection allocates no array. Tracer check and all 7 boundary/reviewer tests pass (71 assertions). No reviewer test changed.fmt and touched-crate Clippy pass. Module gates
Comparison baseline for native, JavaScript and typing is exactly
23723c0c83, the merge base with origin/query-replies. Production recipes unchanged. Initial critical JS: identity 972702 -> 971990 (-712), gzip 301190 -> 300874 (-316), Brotli 251053 -> 250632 (-421) bytes; all transfer classes pass. Final exact-head compressed numbers follow the final gate because build metadata/chunk hashes also enter compression. Static builds and real-PTY/browser corpus checks are pending; locked perf-VM browser comparison is starting. No deployment.196f18169retains the original onData keyboard predicate and array field shape, using a shared empty sentinel and allocating privately only on an actual renderer answer. Rejected allocating per control span and the intermediate string field. Tracer check passes; 8 renderer/property tests pass (1,617 assertions). ChecksEarlier
fed6a00d7production artifact passes all 12 browser regressions on the locked perf VM (7 viewers including all unchanged review cases, 3 replay, 2 mobile/desktop Settings). Final collector artifact will repeat these gates. Functional receiptCold-browser 40-key comparisons at 300 ms RTT show glyph-frame outliers on both baseline and the intermediate string candidate: baseline p99 14.0–24.7 ms; candidate 14.2–30.7 ms against 17 ms. Input CPU median stays 0.1 ms, and all CPU p99 values stay below 5 ms. No glyph-budget pass claimed for that candidate and no assertion relaxed. Final source
196f18169is repeating the same three paired 40-key cohorts; first pair glyph p99 is 14.3 -> 14.3 ms. Native baseline rebuilt exactly 21,223,696 bytes; branch/ARM builds pending.All intermediate cohorts, including failures, first comparison. An initial 60-key setup could not fit the probe's fixed 15 s run window at 300 ms RTT and stopped at 49/60 on the unchanged baseline; setup receipt. Native measurements, real-PTY corpus, iterate and final fast gates still pending. No push or deployment.
D307 follow-up measurement: the generic boundary path introduced per-control native allocations and renderer write bookkeeping. On the named perf VM, two 4 MiB component cohorts measured dense styled text at baseline 11.59/10.51 MiB/s versus 9.73/8.37 MiB/s; these exclude canvas and are not UI throughput claims. Fix in progress: an additive scoped-write API in the existing pinned renderer JS bindings, one input allocation/copy and one metadata update per output region, with responses drained at every generic boundary. No parser, WASM ABI or foundational engine change. Rejecting the request allow-list and a permanent per-session buffer. Initial checks caught the zero-byte allocator sentinel; empty scopes now skip native allocation. Scope lifetime, thrown callbacks, invalid ends, allocation refusal and memory growth have explicit tests. Will remeasure before claiming completion.
Completed atomic steps:
93bb82a46adds scoped renderer JS writes (same pinned engine; WASM hash unchanged);b6c922081adds eight ownership/equivalence tests. Type check, 16 unit/property tests and all artifact checksums pass. Perf VM component rerun: dense styled parsing baseline 10.04/11.35 MiB/s, scoped head 12.83/12.46; sparse baseline 13.11/14.02, head 15.28/18.29. Component only, canvas excluded. Final scoped production artifact passes all 12 browser functional cases on perf VM, including all three unchanged review cases. Typing cohorts still running.Real-PTY fixture finding: the socket used to send 10,000 refused marked frames was closed by the end of the flood (readyState=3), so counting it as one of three live renderers gave a false coverage assertion. Keep the flood and wait for its transport to finish; then attach two fresh shipping-renderer viewers alongside the production browser. The corpus requires an answer attempt from each of all three and exact PTY bytes once, observed beyond the expiry window. No review test weakened. Final rerun pending.
D307 completed steps:
a83742024integrates the scoped input API;8c449896ccounts content-free browser reply attempts;da3465219adds the shipping-engine corpus;24d0119d1fences all queued typing before the existing byte-delta assertion. Type check and 16 tests pass (1,749 assertions). Property coverage: 30 answered forms × all 515 two-part splits × 3 renderer instances; one admitted answer and two duplicates for every split. Real server/infraternal agent/shim/PTY: all 30 forms, 3 answer attempts each, exact expected response bytes once after observing beyond expiry. Browser answer counters follow all fixture connections across reconnects. Full repository checks are now running on24d0119d1.Final scoped browser artifact on the perf VM: all 12 functional cases pass. Three paired 40-key/300 ms cohorts: glyph p99 baseline 14.4/14.2/14.2 ms, head 14.1/14.5/14.3 ms (17 ms budget); input CPU p99 baseline 4.4/0.6/0.4 ms, head 1.3/0.3/0.8 ms (5 ms budget), median 0.1 ms both. Retained all per-key samples and machine/load metadata. Confirmed echo p99 baseline 321.7/313.2/347.7 ms, head 302.6/320.2/304.4 ms; this browser fixture is distinct from real native echo measurements.
Real native typing at 500 attached PTYs: 4 isolated infraternal agents × 125 PTYs (production stream cap unchanged), 1,000 local keys per cohort. Two paired local echo p99 baseline 1.76/2.52 ms, head 1.97/2.79 ms (5 ms budget); 300 ms/200-key echo p99 baseline 325.97 ms, head 326.06 ms (334 ms budget). Daemon total RSS about 34–36 MB across four nodes; shim RSS about 2.93–3.19 GB across 500 (full cohorts in receipt). No new persistent per-session input buffer. Each cohort enumerates all 504 fixture PIDs and proves remaining=[].
Evidence and reproducible component/native harnesses:
browser-scoped-vm.log
control-cost-scoped.log
native-perf.log
measure-controls.txt
measure-typing-scale.txt
Production screenshot (functional evidence, no visual-quality verdict):

Gate finding on unchanged head
24d0119d1: iterate passed fmt, VT native fmt, CLI plugin compile-out, clippy and cargo-deny; workspace agent unit test daemon::gone_tests::a_vanished_session_gets_a_final_close_and_the_channel_stays_up failed at daemon_gone_tests.rs:119 because its TMPDIR-derived rendezvous exceeded SUN_LEN (not a timeout). No waiver used. Extend the existing private short-path runner to the infraternal agent unit binary and export TMPDIR=/mnt inside that namespace, bind-mounted from this job's qrr2 scratch directory. Same uid=1001, capabilities dropped before tests, host mounts unchanged. The exact previously failing test now passes without changing source/assertions. Rerunning iterate and then final fast on the same committed head. Full evidence will include the fixture runner.Second iterate result on unchanged
24d0119d1: all infraternal agent tests pass, including the prior socket fixture; server suite has 576 pass / 52 ignored and one failure at runtime.rs:1358, setup-token fixture also exceeding SUN_LEN. This is another TMPDIR-derived path, not a timeout. No waiver or source/assertion change. Apply the private short TMPDIR runner uniformly to native test binaries (same uid=1001, capabilities dropped, scratch-backed /mnt only inside a private mount namespace). The exact setup-token test now passes. Proceeding directly to the full fast gate, which repeats every iterate check plus static release/linkage/key-heap/size checks. Same head, no production changes since passing corpus and perf runs.ARM merge-base comparison completed with the locked static recipe on
23723c0c8: 19,415,776 bytes. Head is 19,408,192 bytes (-7,584).Fixture correction: applying the private mount runner to every native test binary was too broad. Same-PID restart/exec fixtures fail under that environment. Stopped that fast attempt by the seven exact owned PIDs (pidfds; every PID gone), retained its transcript, and restored ordinary execution for all binaries except recovery_support, infraternal_agent and infraternal_server, whose short-socket fixtures require the alias. The previously failing verified-exec/recovery test now passes both replacement and late-refusal paths with the ordinary runner. No source/assertion/time-limit change or waiver. A fresh full fast run is now through CLI compile-out and clippy into workspace tests on unchanged
24d0119d1. Perf VM scopes are inactive and this job's VM scratch directory is removed.D307 round 2 complete. Head:
24d0119d15915a4cca18a094c81ba8c232bb46e0. Atomically pushedquery-replies-r2and fast-forwardedquery-replies; both remote refs independently verified at this SHA. No deployment. Issue remains open.QR-001: renderer-produced answers are marked without request/response text matching. Generic browser boundaries give stable byte identities across fragmented writes; the server arbitrates observed output positions without a terminal grammar. Replay never renews expiry, late/duplicate replies are refused, retained state remains bounded, and unmarked Input stays typing. Full best-effort reply queues preserve accepted typing. The scoped renderer JS API avoids per-control input allocations; the pinned WASM is unchanged. Review commits were cherry-picked unchanged as
3129a8b23and064f82c9e; their assertions were not weakened.Validation: 16 renderer/boundary/property tests, 1,749 assertions; 30 answered forms across all 515 two-part splits with 3 independent renderers. Real server/infraternal agent/shim/PTY corpus: 30 forms, all 3 viewers attempt an answer, exact expected PTY bytes once per form, observed beyond expiry. All 12 final-production browser functional cases pass on the named perf VM.
Measured on the named perf VM under short locked foreground scopes: three paired 40-key/300 ms browser cohorts have glyph p99 baseline 14.4/14.2/14.2 ms versus head 14.1/14.5/14.3 ms (17 ms budget); input CPU p99 head 1.3/0.3/0.8 ms (5 ms budget). Real native typing with 500 attached PTYs (4 nodes ×125, one active typing PTY): local echo p99 head 1.97/2.79 ms versus baseline 1.76/2.52 ms (5 ms budget), 300 ms echo p99 head 326.06 ms versus baseline 325.97 ms (334 ms budget). Native measurements cover the direct infraternal-agent/PTY path; browser measurements use the production renderer and standard test double. Dense-style VT component throughput (canvas excluded) improves from baseline 10.04/11.35 MiB/s to head 12.83/12.46 MiB/s. Full samples, machine/load metadata and reproduction scripts are attached in earlier comments and below.
Same-merge-base size comparison (
23723c0c836dd63e3415d478a56e4d87c9ce8e14), same production recipes:Author review complete. Final
scripts/verify fastexits 0 with no waivers; every Rust row, both static images, key-heap/linkage/metadata checks, TypeScript checks, production transfer budgets and protocol tests pass. Only the documented private short-path runner is used for socket fixtures; restart/exec fixtures use ordinary execution. Temporary build targets/comparison checkouts and this job’s VM directory are removed. No infraternal processes remain in the build job’s cgroup; all recorded perf scopes are inactive and native cohorts enumerate every owned PID as gone.verify-fast-final.log
native-and-js-sizes.txt
author-review.txt
gate-driver.txt
test-runner.txt
private-fixture.txt
performance-reproduction.txt
perf-cleanup-final.log
pushed-refs.txt
build-host-cleanup.txt
local-scratch-cleanup.txt
restart-fixture-check.log
failed-gate-cleanup.txt
Final gate output, verbatim (head above; exit status 0):
scripts/verify fast transcript
Independent D307 round-2 correctness review started on review-query-replies-r2 at base/head
24d0119d15. Reviewing 23723c0c8..24d0119d1; read #160 and parent #206 histories. Test-only commits, real-shim multi-viewer checks, bounded-state and same-recipe size review; no deployment.Test step committed as
5662ef79f: adjacent cursor-position, device-attributes and status requests retain three distinct absolute identities across simultaneous bulk, split and bytewise viewers. Shipping-renderer review tests: 4 passed, 0 failed, 51 assertions; tracer TypeScript check and cargo fmt check pass. Existing 30-form / 515-split / 3-viewer property also passes unchanged (16 targeted tests, 1,749 assertions). Real-PTY ordering/expiry/replay/legacy checks and native bounded-state tests are prepared; static build is active through the shared slot. No confirmed new finding yet.renderer-review.log
Independent head static x86_64 build completes with the production recipe: stripped static PIE, 21,215,664 bytes, matching the exact round-2 ceiling. Same-base x86/ARM comparisons are prepared but not yet measured; no delta claim yet. Source attribution: round 2 removes server request storage/grammar and response matchers; Cargo.toml/Cargo.lock and the WASM SHA-256 are unchanged. Focused native/real-PTY checks are queued through build-slot.
head-size.txt
Native test step
e051b3346: 16 arbitration tests pass, including four new cases for two positions in one chunk, a trimmed position, duplicate replay after expiry, and all 4,096 session slots. The scale case fills 64 ranges and 64 claims per session (262,144 each); a 4,097th session creates no record. No runtime RSS or latency claim. Server all-target Clippy, fmt, TypeScript and production build pass. Five real-server/shim/PTy tests are now running on port 4292 through build-slot.native-queries.log
Real-PTY review iteration: corrected a new-fixture observation bug (the browser page was closed, leaving its bridge output frozen); protocol viewers now capture their own output. Corrected run: 4/4 pass—two adjacent requests with duplicate replay and a 1.2 s delayed viewer, typing/reply order in separate messages, legacy unmarked Input, and a 16-position burst with 3 viewers. No production defect inferred from that failed fixture run. A stricter same-message typing/reply batching case is queued.
The existing 30-form corpus failed its attempt-count assertion at the long ignored-control form: browser/helper/helper deltas [1,0,0], expected [1,1,1]; its exact PTY-byte assertion passed. This is not yet classified. Rerun will record helper socket states before any conclusion. Original failed receipt retained. Native tests remain 16/16 green.
real-review.log
focused.log
QR2-001, severity pending end-to-end confirmation: deterministic native test review_typing_enqueued_before_a_reply_keeps_its_host_wire_order fails (0 passed / 1 failed). A typed byte admitted by websocket_input::InputQueue first is overtaken by a later AttachmentHandle::reply: replies enter the host command queue directly; typing traverses two forwarding tasks. No typing-credit exhaustion or queue saturation is involved. Source: websocket_input.rs:44-46; embedded.rs:151-175, 839-855. Same-message real-PTY probe is queued; ordinary separate-message case passes. Test-only source is retained in embedded_path_tests.rs, pending its Clippy check before commit.
order-unit.log
QR2-001 native regression committed as
a503d154aon review-query-replies-r2. cargo fmt and server all-target Clippy pass; the selected regression intentionally fails (0 passed / 1 failed): a reply is dequeued before previously admitted typing in an otherwise empty queue. No production changes. The real-PTY suite now includes both muxed frames in one WebSocket message; end-to-end confirmation and severity are pending. The same-message encoding is supported by websocket::receive_wire (websocket.rs:2822-2829).Real-PTY tests committed as
5138aa512. Final run: 5/5 pass on the shipping static x86 image and production frontend, through build-slot, port 4292. Includes all 30 corpus forms (each of 3 viewers attempts once, exact expected PTY bytes once), adjacent requests, deliberately answered replay, expired delayed answers, both typing/reply frames in one WebSocket message, legacy unmarked input and 16 outstanding positions with 3 viewers. The prior corpus attempt-count failure does not repeat; assertions are unchanged and both receipts remain attached.QR2-001 is withdrawn as a correctness finding: my native test asserted global FIFO between separate lanes, which D307 does not promise. contracts/wire.md:586-612 explicitly gives replies no typing credit/cursor and a separate bounded lane; embedded.rs:161-162 explicitly avoids a keyboard-credit waiter. Real-PTY ordinary and same-message order cases pass. The native test now verifies the actual contract: a reply bypasses queued typing, while that typing later reaches the host queue with the same cursor and byte. Corrected test passes 1/1; original red receipt and
a503d154aremain in history for audit, with a separate correction commit pending Clippy. No production fix or waived check. No confirmed P0/P1/P2/P3 findings currently. Same-base static comparisons are queued.order-batch.log

order-contract.log
Completed test correction
b429e5664: the independent reply progresses before queued typing forwarding, then the exact typing frame is observed with in_seq=0 and the original byte. Selected test 1/1, fmt and server all-target Clippy pass. This supersedes the unstated cross-lane FIFO assumption ina503d154a; QR2-001 remains withdrawn, with both receipts retained. Review branch contains only tests and their cfg(test) module inclusion. Final planned review head isb429e5664; same-base static comparisons are active and the complete scripts/verify fast gate follows on this head.Same-base production-recipe builds complete at
23723c0c8: x86_64 21,223,696 B; ARM 19,415,776 B. Head static x86 is 21,215,664 B, confirming -8,032 B exactly. Head ARM is left to the final gate build; no ARM delta claimed yet. scripts/verify fast is active onb429e5664through build-slot, using private short socket aliases backed by this job’s scratch, unchanged assertions and serial native test execution. No production changes or deployment.comparison.log
size-comparison.txt
Final-gate setup correction on unchanged
b429e5664: CLI feature tests failed 7/100 under my globally applied /proc//fd/3 state root. Errors include PermissionDenied in executable validation and an explicit pathname mismatch between the proc alias and its canonical scratch path (restart_tests.rs:443). The exact closed-stdin regression passes 1/1 when given the ordinary canonical job scratch root; no source/assertion changed.Corrected runner: ordinary pathname/exec fixtures use the canonical job root. Only socket-heavy fixture binaries get a private mount namespace binding this job’s runtime directory at /mnt, retaining uid 1001 and dropping capabilities before exec; host /mnt and other jobs are unchanged. The current gate will retain its complete failed transcript and remaining rows; a fresh complete gate must pass on the same head. No failed row is waived.
restart-canonical.log
Fixture validation on unchanged
b429e5664: the workspace main binary now passes 99/99 (1 ignored), including all seven formerly failing restart cases, with the canonical root. The real daemon 24-stop integration also passes. Workspace then stopped at cli_review_r2: three test-setup UnixListener binds exceed SUN_LEN under the long TMPDIR (lines 72 and 292). Exact three_pages_preserve_order_and_only_the_final_cursor passes 1/1 in the isolated short-path namespace; CLI integration socket fixtures are now included in that runner selection. Server setup-token socket fixture also passes 1/1 in the namespace. No source/assertion changes or waivers. The first gate continues through static builds; the complete fresh gate follows with the final runner setup.Independent same-base size verification complete: x86 21,223,696 -> 21,215,664 B (-8,032); ARM 19,415,776 -> 19,408,192 B (-7,584), both exact claimed reductions and current caps. First full gate static/linkage/trust/key-memory/size row PASS. It exits 1 because the earlier fixture-root setup broke tests; transcript retained below. No row is waived. A fresh complete gate is active on unchanged
b429e5664with canonical ordinary roots and isolated short socket paths. Raw test output will be checked in addition to the summary.final-size.txt
verify-fast.log
socket-namespace.log
cli-socket-namespace.log
Second complete gate stopped at one additional fixture setup error: my runner’s umask 077 changed a deliberate mode-0755 directory to 0700, so runtime_directory_symlinks_and_public_permissions_are_refused no longer exercised public permissions (restart_tests.rs:222). Exact unchanged test passes 1/1 with umask 022. Runner now uses 022, canonical ordinary roots and isolated socket roots; third full gate is active on unchanged
b429e5664. Prior transcript is retained; no assertion/source change and no failed row waived. Both static size/linkage checks continue to pass at the exact claimed reductions.verify-fast-final.log
restart-public-permissions.log
Third gate reached cli_envelope after passing main 99/99, 24-stop daemon, queues/review/session integrations. Its status fixture saw exit 0 instead of 5 because sudo’s environment reset removed the user service-manager context in the short-path namespace. Exact unchanged status test passes 1/1 when the wrapper preserves the normal HOME/PATH, user runtime/bus context and required test environment. The wrapper now also preserves RUST_TEST_THREADS=1 and the runtime-helper path for selected tests. No source/assertion changes or waiver. Fresh complete gate is active on unchanged
b429e5664; prior failed transcript retained below.verify-fast-checked.log
cli-environment.log
Fourth gate passed prior CLI/setup blockers and progressed through session retention, bounds and exit events, then stopped at the SSH prompt integration fixtures. Their configured scratch prefix is long enough to select the production short-runtime fallback (credentials.rs:66); the tests inspect their original configured directory and fail with NotFound. Exact unchanged real_cli_askpass_refuses_unregistered_parent_and_cleans_helper passes 1/1 with the isolated short root. SSH helper/credential fixtures now use that same short-root namespace; required user/test environment is preserved. Fifth complete fast gate is active on unchanged
b429e5664. No source/assertion changes or waived rows.verify-fast-complete.log
askpass-short-root.log
P2 GF-001 (pre-existing gate fixture; outside 23723c0c8..24d0119d1): final scripts/verify fast on
b429e5664again fails review_inode_reuse_after_diagnostics_preserves_live_replacement at install.rs:3483 because the fixture cannot reproduce inode reuse in 256 allocations. Install: 93 passed, 1 failed, 1 ignored. The unchanged exact test passes alone; the same whole-suite failure is already recorded on #160 for23723c0c8. No D307 production regression inferred.This is outside the authorized waiver list and is not waived. All other final Rust gate rows pass (fmt, VT fmt, CLI compile-out, Clippy, cargo-deny, static builds); frontend checks skipped by the dispatcher are running separately before the finish record. The complete native diagnostic exercised every target: its only other failure was missing Zig in the diagnostic PATH, and that exact mouse probe passes with the normal verification PATH. All 582 active server tests pass (52 ignored), including all new D307 cases. Feature checks remain 5/5 real-PTY cases plus the 30-form, 515-split renderer property; both size reductions independently match. Final head is unchanged and all test commits are pushed. Gate transcript and final verdict follow after remaining checks and cleanup.
verify-fast-verified.log
native-preflight.log
inode-isolated.log
mouse-zig-path.log
Verdict: HOLD. Final review head:
b429e5664ffc886b492829972ad8ae38d91c2968onreview-query-replies-r2, independently verified pushed. Reviewed production delta:23723c0c8..24d0119d1. All five review commits contain tests only (plus their cfg(test) module inclusion). Checkout is clean; no deployment; issue remains open.Counts: P0=0, P1=0, P2=1, P3=0. No D307 production correctness finding remains. QR2-001 was withdrawn: cross-lane FIFO is not promised by the independent unsequenced reply contract; the corrected test checks reply progress and unchanged typing bytes/cursor.
P2 GF-001 — pre-existing mandatory-gate fixture, outside the reviewed delta.
crates/plugins/ssh/tests/install.rs:3483,review_inode_reuse_after_diagnostics_preserves_live_replacement, cannot reproduce filesystem inode reuse in 256 allocations during whole-suite runs. Final install result: 93 passed, 1 failed, 1 ignored. The exact unchanged test passes alone; the same whole-suite failure is already recorded earlier on #160 for23723c0c8. It is outside the permitted waiver list and is not waived. The mandatory gate remains exit 1, so this review cannot authorize merge. A follow-up must make this fixture reliably exercise its intended assertion and obtain a green complete gate.Passing evidence on the final tree:
23723c0c8: x86_64 21,223,696 -> 21,215,664 B (-8,032); ARM 19,415,776 -> 19,408,192 B (-7,584). Both claimed reductions and exact caps are independently confirmed. The trim removes server request storage/grammar and response-content matching; Cargo dependencies and the shipping WASM checksum are unchanged. No required renderer answer disappeared in the tested corpus.No new timing benchmarks were run on the shared build host; the implementation's VM performance receipts were reviewed on this issue. Own temporary comparison checkout, build targets and runtime fixtures were removed after a process scan found no matching job fixtures. Raw receipts, checklist and fixture reproduction scripts:
renderer-final.log
ts-final.log
cleanup.json
reproduce.txt
reviewer-checklist.txt
findings.md
verify-fast-verified.log
native-preflight.log
inode-isolated.log
mouse-zig-path.log
final-size.txt
verify-fast.log
socket-namespace.log
cli-socket-namespace.log
scripts/verify fast output, verbatim (head above; exit 1)
Finish-record supplement for
b429e5664f(verdict HOLD unchanged): the complete finish comment, including verbatim scripts/verify fast output and exit 1, has been independently read back from #160. The uploader rejected executable script extensions; the same fixture reproduction sources are attached below as inert plain text. Reproduction setup and cleanup receipts are linked in the finish record. No source changes, deployment or issue close.run-final.py.txt
test-runner.sh.txt
socket-test-ns.sh.txt
kayg referenced this issue2026-10-28 17:53:56 +00:00