Skip to content

fix(test): the EXEC_TIMEOUT-over-stalled-delivery test waits for the child's chunk - #2002

Merged
V3RON merged 2 commits into
mainfrom
bug/2000
Nov 30, 2026
Merged

V3RON merged 2 commits into
mainfrom
bug/2000

Conversation

@V3RON

@V3RON V3RON commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2000

Status

Implement: audit done Review: round 1 at 2cff040, passed Hardware: n/a Gate: not run
Next: finish the PR body, then the gate
Ledger:

  • no findings raised. The code lens ran these probes, and the tree was restored after each:
  • Head unmodified: the test file passes, 34 tests.
  • src/daemon/dispatcher-exec.ts:239 changed to await waited: the test fails at :763.
  • Child's first write delayed 3000 ms, good code: passes.
  • Child delayed 3000 ms and await waited: fails at :763.
  • Runner settles with a delivery pending: only the new child.wait() assertion fails.
  • pgrep found no child left running.
    State: {"issue":2000,"branch":"bug/2000","pr":2002,"last":"35ffd12355c9","done":"review","mode":"audit","built":1,"audited":true,"assessment":"complete","rounds":["1:2cff0409952bf2f29396581cba5513f3956700ce"],"round":"1","commit":"2cff0409952bf2f29396581cba5513f3956700ce","checkedBase":"c02e8b2ad5006117962a71870e8b34e6420a8d00","reviewBase":"c02e8b2ad5006117962a71870e8b34e6420a8d00","lenses":3,"findings":"/private/tmp/claude-501/-Users-szymon-chmal--t3-worktrees-pitlane-t3-8ecb78f2-c8c4fbaca6800ca9/4e3ab625-6467-42af-a5ac-3a650a71f200/scratchpad/findings-2002.json"}

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 0.7M.
Runs: 6. Cost USD: 0.7718. Agent seconds: 404.

Assessment: complete

Done when

The bug has no Done when section; these lines come from its report and triage. Windows ran only in CI, without the delayed-child probes. The audit did not run the stale-reference sweep; the orchestrator ran it on 2cff040 and it listed nothing.

  • The test fails against the broken dispatcher (await waited) when its child starts late — review probe: child delayed 3000 ms, fails at src/daemon/dispatcher-exec.test.ts:763; with the good dispatcher it passes.
  • The triage's wait() assertion is in the PR and drops its 700 ms delay — review probe: a runner that settles with a delivery pending fails only that assertion; 34 tests pass unmodified.

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The timeout test now waits until a child’s output reaches a never-resolving callback before advancing the 50 ms timeout. It checks that device.exec rejects with EXEC_TIMEOUT and that the spawned handle’s wait() rejects with ExecOutputDeliveryStalledError.

Severity of issue fixed: Low

Merge Risk: Minimal · up to 2cff0

This change makes a timeout test more reliable by waiting for the child's output before advancing the clock. It does not change production behavior, and no merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the test change: the EXEC_TIMEOUT-over-stalled-delivery test now waits for the child's chunk. The raw summary and objectives confirm this is the main change, replacing the fixed 200 ms…
Description check Passed The description states the closed issue (#2000) and reports the review probes. These probes cover a broken dispatcher (await waited), a late-starting child, and the new child.wait() assertion. All of …
Linked Issues check Passed Issue #2000 requires the EXEC_TIMEOUT-over-stalled-delivery test in src/daemon/dispatcher-exec.test.ts to exercise a real stalled delivery even when the child starts late. The raw summary of the PR di…
Out of Scope Changes check Passed The PR changes only src/daemon/dispatcher-exec.test.ts according to the raw summary (+20/-6, no declaration changes). The new StreamingProcessHandle import and the wait() assertion support the require…
Full details: Title check

Explanation

The title names the test change: the EXEC_TIMEOUT-over-stalled-delivery test now waits for the child's chunk. The raw summary and objectives confirm this is the main change, replacing the fixed 200 ms wait. The title is specific and on topic.

Full details: Description check

Explanation

The description states the closed issue (#2000) and reports the review probes. These probes cover a broken dispatcher (await waited), a late-starting child, and the new child.wait() assertion. All of these match the test change in dispatcher-exec.test.ts. The description is on topic, though it contains status and ledger material that is not needed for a reviewer.

Full details: Linked Issues check

Explanation

Issue #2000 requires the EXEC_TIMEOUT-over-stalled-delivery test in src/daemon/dispatcher-exec.test.ts to exercise a real stalled delivery even when the child starts late. The raw summary of the PR diff (+20/-6, test file only) states that the test now uses a real child that writes one chunk, waits for that chunk before advancing the 50 ms timeout, and asserts both that device.exec rejects with EXEC_TIMEOUT and that the handle's wait() rejects with ExecOutputDeliveryStalledError. This removes the fixed 200 ms wait that the issue identifies as the defect. The author's probes (not independently re-run) report that the test fails at line 763 when dispatcher-exec.ts:239 is changed to await waited, and passes with the intended dispatcher when the child's first write is delayed 3000 ms. Limit: the file diff could not be read (changed blobs missing from checkout), and the file read was truncated before the test body at about line 729. The verdict rests on the summary and the author's reported probes.

Full details: Out of Scope Changes check

Explanation

The PR changes only src/daemon/dispatcher-exec.test.ts according to the raw summary (+20/-6, no declaration changes). The new StreamingProcessHandle import and the wait() assertion support the required stalled-delivery check described in #2000. No product code or unrelated file changes are reported. Limit: the diff could not be read directly, so this verdict relies on the summary.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 6e84cb39-34eb-4bf1-b32d-53ba4f618c7c
Commits

Reviewing files that changed from the base of the PR and between c02e8b2 and 2cff040.

Files selected for processing: 1

  • src/daemon/dispatcher-exec.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@V3RON

V3RON commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 2cff040

Runs: 6. Cost USD: 0.7718. Agent seconds: 404.
Tokens input 67, output 16826, cache read 716567, cache write 140472.
- build implementer: claude-sonnet-5-5 75 s $0.1222
- audit implementer: claude-sonnet-5-5 51 s $0.1089
- review 1 reviewer: claude-sonnet-5-5 159 s $0.0772
- review 1 spec: claude-sonnet-5-5 15 s $0.0562
- review 1 code tests: claude-opus-5-5 91 s $0.3613
- review 1 claims: claude-sonnet-5-5 13 s $0.046
Finding outcomes: {}. Classes: {}.
{"findings":[]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 30, 2026 17:30
@V3RON
V3RON merged commit a03340b into main Nov 30, 2026
91 checks passed
@V3RON
V3RON deleted the bug/2000 branch November 30, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The EXEC_TIMEOUT-over-stalled-delivery test in dispatcher-exec.test.ts passes against a broken dispatcher when its child starts more than 200 ms late

1 participant