Repository navigation
🔍 Report what an abandoned xmd run wrote before its deadline - #509
Merged
Merged
Conversation
PR #509: 🔍 Report what an abandoned xmd run wrote before its deadline2 files, +125 / -12 Scope✅ PR scope looks good. Structural✅ No structural bloat detected. Slop✅ Slop indicators look low. Static AnalysisOxlint: 2 diagnostics across 1 file (1 rule) no-floating-promises (2): packages/test-support/launch.ts Correctnesslaunch.ts, no-floating-promises, Signal clusters, Are multiple Oxlint violations in the same file indicative of unreviewed code or mechanical changes? |
taras
enabled auto-merge (squash)
August 20, 2026 02:11
taras
force-pushed
the
agent/issue-508-deadline-account
branch
from
August 20, 2026 02:18
e796c1e to
9af5f7e
Compare
A runCli deadline used to discard the child's output, so a suite-level timeout — the load-dependent flake shape the CLI suites see — left no record of where the run hung. The failure now carries both channels as received before the run was abandoned, and the host's load average, which is the condition such deadlines expire under. Claude-Session: https://claude.ai/code/session_01MNztk1fikXUnD2FW4yS6Kr
taras
force-pushed
the
agent/issue-508-deadline-account
branch
from
August 20, 2026 14:04
9af5f7e to
0d6e3f7
Compare
taras
disabled auto-merge
August 20, 2026 14:32
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#508: WFC17 failed once inside a four-suite aggregate run and passed alone, and all the report could quote was the test title. The suite harness is why:
runClibounds everyxmdsubprocess with a 60s timebox, and when that deadline expires it throwsxmd … timed out after 60000msand discards everything the child wrote. Any load-dependent CLI flake that lands on this path is anonymous — there is nothing to say whether the child hung before its first line or after its last, and nothing about the contention that made the deadline expire.Reproduction attempts on current main did not make WFC17 fail again: the exact aggregate command is green (
ok | 325 passed (2637 steps), WFC17 at 4s), and the workflow suite beside two concurrently running package suites plus fork/exec churn (load average 20) is green too (WFC17 at 5s against a 60s box). The evidence for that is on the issue; this PR makes the next occurrence carry its own diagnosis instead of requiring another chase.What changes
Before:
A
runClideadline threwxmd <args> timed out after <limit>ms— the child's output up to that moment was discarded with the halted exec.After:
The same deadline throws a report carrying the host's load average and everything the child wrote on each channel before the run was abandoned. Completed runs are unchanged:
join()/expect()return the sameProcessResultshape with the same capture semantics.How it works
boundednow mirrors upstream@effectionx/processExec.join()— spawn, subscribe to both channels, settle on join/expect — with the accumulators hoisted outside the timebox scope so a halted run still has an account. Chunks decode per-arrival exactly as upstream capture concatenates them.How to verify it
packages/cli/tests/launch-timeout.test.tsruns a document that prints on both channels and then outlives the deadline; it proves the failure names the deadline and carries both markers, and fails if the timeout path discards output again. Verified under Deno (10s), Node (20s), and Bun (10s).packages/cli/tests/workflow-cli.test.ts,cli-help.test.ts,process-retention.test.tsgreen under Deno — the join/expect result shape and capture are unchanged for completed runs.Scope
Included
packages/test-support/launch.ts, and its regression test.Intentionally unchanged
@effectionx/processclose-settledjoin()semantics — a completed run's result is byte-identical to before.Scope confirmation
https://claude.ai/code/session_01MNztk1fikXUnD2FW4yS6Kr