Gate timing tests flake under VM load (QUIC/TCP race, status_restart, shim backpressure, source_bridge, saved-shell socket) #334
Open
opened 2026-11-04 03:06:49 +00:00 by kayg
·
11 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#334
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?
Job J163. Related: #324 (J157 covers the separate
agent_daemonresource_unavailablefamily; not duplicated here).Gate runs (
scripts/verify fast) fail on a rotating set of timing tests whenever the build VMs are loaded (load 8–20). Each passes alone. Blocks merges across branches.Seen 2026-11-03/04:
winning_quic_drops_the_unfinished_tls_dial_before_control_dispatch(twice)unavailable_udp_does_not_add_seconds_before_tcp_admissionstatus_restart::service_states_are_truthful_in_text_and_jsonshim::attached_backpressure_and_detached_progresssource_bridge(3 s timeout)saved_shell_automation_uses_an_owner_only_socket_directory(15 s timeout)Logs:
~/j159-fast*.logon compute01 and dev-02,~/.cache/codex-scratch/{j79d,j80d,J94e}gate logs.Task: for each test find what it times/waits on, reproduce under controlled load, classify (a) product timing bug → fix product, (b) test asserts a wall-clock bound the contract does not promise → rewrite to assert ordering/causality with condition waits, (c) real contract bound → keep, move measurement to perf VM if PROCESS.md allows. No bare timeout raises. Each fixed test 20/20 under the load that failed it; before/after numbers here. Branch
timing-flakes-j163from origin/dev, one commit per test/cause,scripts/verify fasttwice on dev-02. No merge, no deploy.Start: branch
timing-flakes-j163, base origin/devf14e4309a.Plan (estimate ~6 h):
stress-ng --cpu Nplus parallel test copies) and record fail rate before. ~1.5 hscripts/verify fasttwice on dev-02. ~1.5 hFirst reading of the failure signatures (from the gate logs):
winning_quic_drops_the_unfinished_tls_dial_before_control_dispatchremote_client_tests.rs:205Elapsed: no TCP accept within 2 s ofspawn(run)unavailable_udp_does_not_add_seconds_before_tcp_admissionfallback_local_admission_us=2001951: TLS admission not done within 2 s of spawnstatus_restart::service_states_are_truthful_in_text_and_jsonsystem/server/activatingreportedservice manager query timed outshim::attached_backpressure_and_detached_progressattached producer never stalled at head 1373 (minimum 1510)after 10 ssaved_shell_automation_uses_an_owner_only_socket_directorysessions new local --name buildhit the python 15 s subprocess timeoutsource_bridge::replay_repairs_coalesce_at_the_source_intervalsource_bridge.rs:15:60unwrap onNone:CARGO_TARGET_DIRwas unset, not a timeoutQuestion: does anyone have the log of the
source_bridge3 s-timeout failure? The only failures on either VM are theCARGO_TARGET_DIRunwrap. My default: I fix that environment dependency (fall back to the target dir that cargo provides), and I try to reproduce a timing failure under load.Progress 1 (dev-02-std, aarch64, test binaries from base
f14e4309a).Before, isolated copies under CPU load (
~/j163-loadrun.sh: 12 nice-0 busy loops, 4 parallel copies of the one test at nice 10, 5 rounds = 20 runs; load 6→20):never stalled at head 1124 (minimum 1443), same signature as the gate)So CPU contention alone reproduces only the shim test. The others fail inside gate-shaped load (whole test binaries running in parallel next to other gates). Next I reproduce with the full workspace test suite as background load.
Findings so far:
j93c/workspace-tests.log,j125c/ws-{base,head}.log) issource_bridge.rs:15:60Option::unwrap()onNone, i.e.CARGO_TARGET_DIRunset when the test was run outsidescripts/verify. That is an environment dependency, not timing. I found no 3 s-timeout instance (question above).Hellowithin the 5 s socket timeout. So the shim is not answering at all. That rules out the margin size. I'm now dumping the process-tree state at the timeout.spawn(run), so they include agent startup (ensure_service, endpoint setup) before any dial. The product contract indial_preferredis "TCP starts 100 ms after QUIC, never after QUIC's 5 s timeout".Progress 2.
shim
attached_backpressure_and_detached_progress: class (b), fixed ina5c95e32a.seqblocked in the tty write (wait_woken) and the shim idle in poll, with only about 600 bytes past the reader. The shim reads the PTY only while some viewer is caught up (session.rs:829), and it sends one Output frame per PTY read.write_size=5 → 278 writes, 1390 B;20 → 278, 5560 B;512 → 167, 85504 B;8192 → 24, 196608 B. So when the shim keeps pace with a line-bufferedseq, the unread socket fills at about 1 KiB of payload, which is below the test'sreader + 1024floor. That is correct backpressure, not a product bug.head > consumed.status_restart: cause found (cold page cache, not CPU). Same fixture as the failing case (
system/server/activating),posix_fadvise(DONTNEED)ontarget/debug/infraternal(478 MB) before each run, ambient load about 13, no added burners:The 500 ms
MANAGER_QUERY_BUDGETstarts inside the worker, so our own binary's major faults in spawn/poll code use up the window. That matches the gate failure on the first matrix case. Next: measure the same thing on a static release binary to decide between (a) and (b).Progress 3. QUIC/TCP race tests: class (b), fixed in
20b1b03de.Load window on dev-02 (
~/j163-window.sh): two fullinfraternal-agentlib suites restarting in a loop plus 6 busy loops, load 22–34. Before and after binaries alternate inside the same window, each invocation running the three supervisor tests.f14e4309a)20b1b03de)unavailable_udp_does_not_add_seconds_before_tcp_admissionremote_client_tests.rs:167)winning_quic_drops_the_unfinished_tls_dial_before_control_dispatch:205 Elapsed)server_path_capability_is_advertised_on_native_and_fallback_transports(same cause, not on the original list):688 Elapsed)What the old 2 s budgets measured (μs, same window):
So the product's race is exact: TCP connects 100–106 ms after QUIC's first Initial, which is the 100 ms grace in
dial_preferred. All the variance comes from agent startup before the first dial (up to 7.9 s here), and no contract bounds that. The new tests prove ordering instead: the same QUIC attempt (same Initial DCID) is still retransmitting after TCP connected, and the proxy is held until TCP has dialled, so QUIC wins by construction. Supervisor latency stays in the ignoredsupervisor_300ms_quic_and_blocked_udp_fallbackdiagnostic, run alone.Red check (TCP dialled only after QUIC fails, never committed): rerunning it now with the gate's feature set. The first attempt filtered 0 tests because
-p infraternal-agentalone builds 145 tests, not 248.source_bridge: correction to my first table. The 20/20 I listed for it was vacuous, because without
--features sourcethe file compiles to 0 tests. With the feature (15 tests) it passed the one mix round it ran. Every logged failure is still theCARGO_TARGET_DIRunwrap.Progress 4.
Red check, QUIC/TCP: with a throwaway product patch that dials TCP only after QUIC fails (never committed), the rewritten test fails as intended:
shim after (
a5c95e32a):RESULT tag=shimafter burners=12 copies=4 rounds=10 pass=40 fail=0(dev-02). Before, the same harness gave 19/20 and 39/40. The failure is rare because it needs the shim to keep pace withseqline by line. The skb measurement explains the mechanism.status_restart: class (b), production budget unchanged. Cold vs warm
infraternal status(binary pages evicted before each cold run;!= query timed out):The shipped static binary starts cold well inside 500 ms. The gate failure comes from a 470 MB debug binary page-faulting inside the window on a contended build disk, which a real install does not hit. The budget-expiry path keeps its unit tests (
an_unanswering_manager_only_makes_its_own_unit_unknown,manager_completion_handles_an_already_exited_child_and_a_deadline). The fix, in progress:INFRATERNAL_TEST_MANAGER_QUERY_BUDGET_MS, the same pattern as the existing debug-onlyINFRATERNAL_TEST_SYSTEMD_SYSTEM_UNIT_DIR; release always uses the constant;running; a per-observation split would cut it. This red-checks at a 2 s budget.cli_sessions: no repro yet. In both gate failures (j79d dev-02, j94e compute01), the first
sessions new localinside the saved shell got no reply in 15 s. The infraternal agent caps its handling at 4 s (automation.rs:198), and the CLI waits for the reply start with no timer (plugin_control.rs:834). Under 6 busy loops, warm and with the binary's pages evicted before each run: 20/20 pass. Every CLI call took 2–171 ms, because the running agent fixture maps the same binary, so eviction does not make the CLI cold. Next: heavier gate-shaped load with per-call durations recorded.Progress 5.
status_restart after
e0809a0d9: not good enough. Same window (2 agent suites + 6 busy loops, binary pages evicted before every run): before 17/20, after 18/20. The after failures show two more wall-clock dependencies:user/server/activeread "Running" instead of "Restarting repeatedly". The product counts a start as recent only within 10 s (Observation::recent), and the fixture stamped its start when it was written. One cold status run took longer than 10 s, so the start aged out.shared_deadlinecase failed its 1.5 s margin (unknown … query timed outat a 4 s budget). A margin is still a stopwatch.Revision (building now, to be a follow-up commit):
ExecMainStartTimestampMonotonicas one second before the moment they are queried, so the age is independent of status startup.infraternal-statusbinary. It uses acfg(test)thread-local manager-program override and callsmanager_activity_beforedirectly. Red check: the second observation on its own 2 s deadline.cli_sessions: class (a), a product timing bug. Fix written, being verified.
createpublishes the session name withsave(): write,sync_all, rename, thensync_allof the directory. That is synchronous code inside thetokio::time::timeout(4 s)inautomation::execute, running on the infraternal agent's current-thread reactor (run_embedded→new_current_thread; the local control listener is a task on it). On ext4 withdirty_ratio=20(about 6 GB of dirty pages on dev-02, 12 GB on compute01), fsync can block for many seconds during parallel builds. During that time:new localis the first call in the oracle that reachessave(), which matches both gate failures. A loaded real host with a busy disk hits the same stall.Fix: a
publish()task runssaveon the blocking pool and owns the existing failure cleanup (close an unnamed session), so a deadline firing mid-publish cannot skip it. The existing timeout reply already says "the operation may have started; list sessions before retrying". Regression test (causal): a test-only gate holdssaveas an fsync that never completes. The test then requires that the same current-thread reactor keeps running other work and releases the gate itself; a 30 s watchdog only bounds the hang. Red check:saveback on the reactor.Before/after evidence (in progress):
cli_sessionsunder sustainedddwriteback on the state disk, plus fsync latency samples of the exact publication pattern.Uncommitted files are staged in
dev-02:~/j163-stage/. Next: commit once the build and red checks pass.Progress 6. Commits:
6984ff653(status follow-up),ad2c6b9eb(product fix: session names published off the shared reactor).fsync stall measured (dev-02, ext4,
dirty_ratio=20). The exactsave()pattern (write, fsync, rename, directory fsync), sampled every 0.5 s while a sustainedddstream writes to the same disk:On the old code, a 32 s stall blocks the infraternal agent's only reactor thread, so every terminal on the host freezes and
sessions newmisses the oracle's 15 s guard.Earlier heavy-mix repro on the unchanged test (2 agent suites + shim suite + 8 busy loops, load 34–35), 15/20 pass. Failure modes:
new local --name build→TimeoutExpired(…, 15)(the call took 15.077 s; the exact gate signature);new→ code 5 "The session did not reply in time; the operation may have started." (the 4 s action deadline);new … -- /bin/sh -c …→ code 1 "The session operation failed." (the 2 s shim readiness handshake), plus one more 15 s timeout;Red checks (throwaway patches, never committed):
Both pass on the fixes (agent
automation::operations::tests4/4,infraternal-status24 passed).Side finding (not fixed; out of scope, for kayg): when the 2 s shim-readiness handshake in
launch_configuredtimes out, the launcher returns an error, but nothing stops the--detachshim it already spawned. On a slow host the caller hears "operation failed", yet an unnamed detached session appears later. This deserves its own issue if you agree.Running now: the status before/after window (20+20), then
cli_sessionsafter the fix under sustained writeback (20 runs), with the oracle's own waits made condition waits.Progress 7.
status_restart, before/after
6984ff653(dev-02, 2 agent suites + 6 busy loops, binary pages evicted before every run, load 22–27): before 14/20 (6×status_restart.rs:170"query timed out" / unknown), after 19/20. The single after failure was the first run of the window:system/agent/activatingtimed out with the 30 s override, so one cold query spent more than 30 s faulting the binary back in. No matrix case waits for the budget to expire, sob9646fd05makes it 120 s. Confirmation run (20 after-runs) is queued.cli_sessions after
ad2c6b9eb: the reactor is free, but the test got worse. Changed the semantics and rerunning.Under sustained writeback (
publish_fsync_s n=35 p50=3.085 p90=9.077 max=12.433), the unchanged oracle went from 10/10 before to 11/20 after. Every failure isnewanswering at exactly 4.0 s with code 5 "may have started", because the 4 s action deadline can now fire while the publication waits on fsync. Before the fix, the frozen reactor finishedsave()and replied success late; that is why the old code passed here while freezing every terminal.Decision (D314 does not specify the 4 s bound, and I'm not changing the contract):
executenow awaits the name publication outside the 4 s deadline, still off the reactor. A successfulsessions newstill means the name is saved. A disk busy with writeback delays only that reply, not other terminals, and AI tools don't get a spurious "may have started" to retry. The deadline keeps bounding discovery and launch, which can stall on unresponsive shims. Implementation:operations::runhands the spawned publication back viapending, andexecuteawaits it after the timeout.cli oracle (
scripts/test-cli-sessions.py), class (b): the oracle's own waits become condition waits under one documentedHANG = 120s: the 15 s per-call guard, the 40 s receipt wait, 10 s output polls, 3 s close → shell exit, and asleep(0.1)before reading the ended session's output. A brokenclosestill fails, because the saved shell outlives its 20 s foreground job.Queued on dev-02: build, red check, 20 status after-runs, 20
cliafter-runs under sustained writeback.Progress 8. All fixes are on the branch, head
e7d902ffa.verify quickplusverify fast×2 are queued on dev-02.unavailable_udp_does_not_add_seconds_before_tcp_admission20b1b03de)winning_quic_drops_the_unfinished_tls_dial_before_control_dispatchserver_path_capability_is_advertised_on_native_and_fallback_transports(same cause)shim::attached_backpressure_and_detached_progressa5c95e32a)status_restart::service_states_are_truthful_in_text_and_jsone0809a0d9,6984ff653,b9646fd05)saved_shell_automation_uses_an_owner_only_socket_directoryddwriteback on the state diskad2c6b9ebad2c6b9eb,c7cde1f0a,e7d902ffa)source_bridge::replay_repairs_coalesce_at_the_source_intervalCARGO_TARGET_DIRunset5e2ead65b)cli after-run, publication fsync in that window:
n=57 p50=1.247 p90=2.436 max=5.264.newcalls took up to 4.3 s and all succeeded. The heavy CPU mix was not rerun after the fix; its failures were the fsync stall and the oracle's own deadlines, both covered above.Red checks (all fail as intended, never committed): sequenced QUIC→TCP fallback;
save()back on the reactor; second status observation on its own 2 s deadline.None of these is class (c), so nothing moves to the perf VM. The only latency measurement involved, supervisor first-Hello time, already lives in the ignored
supervisor_300ms_quic_and_blocked_udp_fallbackdiagnostic.Finish. Branch
timing-flakes-j163, heade7d902ffa93aad5aadd88d87c5ab60331bdc4666, base origin/devf14e4309a. Not merged, not deployed.scripts/verify quick(pre-check, not the gate):QUICK_EXIT=0, "QUICK pre-check passed."scripts/verify fasttwice in a row on dev-02 at that head (run 1 started 08:27 UTC at load 8.97, run 2 at 09:01 UTC at load 3.43). Verbatim:Run 2
testfailure: pre-existing flake, not from this branch.session_exit_events::idle_daemon_discovers_unattached_and_adopted_shim_exit_without_requestsfailed inscripts/verify-session-exit-events.py:51→client.open()→agent_fixture.py:264 read→TimeoutError: timed out. The infraternal agent fixture did not answerterminal.openwithin the fixture's socket timeout. This branch changes nothing on that path; it changes only thesessionsautomation publication. The identical failure, at the same call site, is in older gate logs of three unrelated branches on dev-02:appwin-launch-idle-146/verify-fast-c51226569.log(11-01),j16-appwin/fast-final-home-roots.log(10-31),j62b/verify-fast-c.log(11-03). It belongs with theagent_daemon/fixture readiness family on #324 (J157). Run 1 passed it. I started a 10× isolated rerun but stopped it: each run had to queue for a build slot separately.Static builds: the
static buildsrow passes in both runs (D243 caps removed). I did not separately extract the x86/arm size delta; the only product change is a few lines inautomation/operationsplus one debug-only status env read (compiled out of release).Cleanup: target dir, copied binaries and temp state on dev-02 deleted. Logs kept:
~/j163-*.log,~/j163-runs/.Open questions for kayg (recommendation first):
c7cde1f0a):sessions newnow awaits the fsynced name outside the 4 s action deadline, off the reactor. A slow disk delays only that reply. Alternative: keep it inside the deadline and answer code 5 "may have started". Recommend keeping it as committed.launch_configured): the caller gets "operation failed" while an unnamed session appears later. Recommend a separate issue.source_bridgetimeout in the original report could not be found in any log on either VM.J176 review:
timing-flakes-j163@e7d902ffa9(basef14e4309a): APPROVENo P1 or P2 findings. One P3 (non-blocking).
c7cde1f0a/ad2c6b9eb(session-name save moved off the event loop)sessions newwritessession-names.json.closedoesn't write it, and there is no rename verb. The local automation socket serves one connection at a time (plugin_control.rs:677,serve(...).awaitin the accept loop), andexecuteawaits the save before it replies. So no later request can overtake the save or overwrite it.newrequests waits in the socket backlog and adds no threads or tasks. Trade-off: a slow disk delays othersessions.*calls queued behind the save (it did before too), but it no longer blocks terminals.scripts/test-cli-sessions.pyon dev-02 (excerpt; thread 2432813 is a blocking-pool thread, 2431980 is the event loop): All 6 fsyncs in the run were on the blocking-pool thread. None ran on the event-loop thread.published.is_ok()guard turns the reply into code 1. A JoinError is mapped to an io error and also gives code 1.save()is its only fsync.Tests and the budget override
INFRATERNAL_TEST_MANAGER_QUERY_BUDGET_MSsits behind#[cfg(debug_assertions)], and[profile.release]doesn't enable debug assertions. Proven with a build on dev-02: the releaselibinfraternal_statusrlib has 0 hits for the env var name, and the debug rlib has 1. The production deadline stays 500 ms.manager_completion_handles_an_already_exited_child_and_a_deadline. The shared-deadline rule moved to the new unit testone_deadline_spans_both_observations_of_a_fresh_start. Fresh starts are now stamped when the manager is queried, which fixes a fixture that went stale on slow runs. It does not loosen the 10 s window.seq+1024toseq+1only affects when the wait starts. The proof is stillstalled < 1_000_000, which stays intact.unavailable_udp...now proves TCP connected while the same QUIC attempt (same DCID) was still retransmitting. That is a causal ordering proof, and the biased select stops early Initials from counting as later evidence. Inwinning_quic...the proxy starts only after the TCP ClientHello, so QUIC wins by construction. The 1 s EOF check stays below the 5 s Hello timeout. The other 2-3 s bounds became 30 s hang guards. None of them were production deadlines.Runs (dev-02, worktree ~/worktrees/j176 at
e7d902ffa, through build-slot)P3: shutdown during a save can skip the cleanup (from reading the code, not reproduced)
The infraternal agent shuts down by returning from
runtime.block_on(infraternal-agent/src/lib.rs:74), which drops the runtime. Tokio lets a runningspawn_blockingsave finish but cancels the asyncpublishtask. If that save fails, the unnamed session'sCloseSessioncleanup never runs. The client gets EOF, never "saved", so nobody is told the name was durable when it wasn't, and the file is atomic (old or new, never torn). Before this branch the save ran on the event loop and couldn't be interrupted this way. Suggestion for later: have shutdown await the pending publication, or run the close inside the blocking closure. Not a merge blocker.