Repository navigation
test(anthropic): cover repeated stdin failure notifications - #190335
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR permits repeated raw EPIPE notifications in Anthropic cancellation tests and adds native Writable coverage for their separate delivery paths. Example: Closed stdin produces two EPIPE notifications during diagnostic drainage.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it corrects a source-supported test assumption without changing production behavior, and no actionable defect was found at the pinned head. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe managed stdin adapter reports write and stream failures to the Claude CLI transport, which shares terminal failure settlement and preserves cancellation through diagnostic drainage. flowchart LR
A[Claude CLI child] --> B[Managed stdin adapter]
B --> C[Raw error notifications]
C --> D[CLI transport settlement]
E[Caller cancellation] --> D
D --> F[Terminal result and cleanup]
Technical reviewBest possible solution: Keep the existing production owners and correct the cancellation predicate while retaining distinct native notification coverage. Do we have a high-confidence way to reproduce the issue? Source shows two permitted adapter notification paths that violate the old exactly-one assertion; the reported CI failure was verified as failed, but its log was inaccessible and no target code was run. Is this the best way to solve the issue? The patch is the smallest complete correction: require nonempty EPIPE observations, preserve cancellation identity, and cover the separate native notification paths without altering production settlement. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6842ccd4bddf. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +31, Other +2. Total +33 across 3 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 1, 2026, 2:00 PM ET / 19:00 UTC (Revision 3). |
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix(anthropic): validate cancellation across stdin notifications * test(process): avoid returning from close promise executor * test(process): preserve typed stdin error identity (cherry picked from commit 50efbfd)
* fix(packaging): omit source-build ledgers from published packages Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories. Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged. * test(packaging): type fixture package names * test(packaging): complete declared publication fixture inputs * test(anthropic): cover repeated stdin failure notifications (#190335) * fix(anthropic): validate cancellation across stdin notifications * test(process): avoid returning from close promise executor * test(process): preserve typed stdin error identity (cherry picked from commit 50efbfd)
* fix(packaging): omit source-build ledgers from published packages Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories. Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged. * test(packaging): type fixture package names * test(packaging): complete declared publication fixture inputs * test(anthropic): cover repeated stdin failure notifications (#190335) * fix(anthropic): validate cancellation across stdin notifications * test(process): avoid returning from close promise executor * test(process): preserve typed stdin error identity (cherry picked from commit 50efbfd) (cherry picked from commit 5f229e0)
…#190335) * fix(anthropic): validate cancellation across stdin notifications * test(process): avoid returning from close promise executor * test(process): preserve typed stdin error identity
…law#190030) * fix(packaging): omit source-build ledgers from published packages Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories. Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged. * test(packaging): type fixture package names * test(packaging): complete declared publication fixture inputs * test(anthropic): cover repeated stdin failure notifications (openclaw#190335) * fix(anthropic): validate cancellation across stdin notifications * test(process): avoid returning from close promise executor * test(process): preserve typed stdin error identity (cherry picked from commit 0285717)
* test(e2e): align legacy operator requested exec policy * fix(doctor): preserve legacy upgrade backups and native assignments * fix(doctor): retain opt-in backup discovery typing * test(doctor): compare captured file bytes directly * fix(doctor): inspect admitted state schema content * fix: refresh the reviewed correction baseline Baseline-Refresh: e20ab99aad2669c5ee844498d5e939d0a1031cd8 * test(doctor): avoid shadowing state descriptor * fix(package): restore installed entry budget (#188097) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit d6d76cd) * fix(packaging): exclude source-build ledgers from npm packages (#190030) * fix(packaging): omit source-build ledgers from published packages Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories. Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged. * test(packaging): type fixture package names * test(packaging): complete declared publication fixture inputs * test(anthropic): cover repeated stdin failure notifications (#190335) * fix(anthropic): validate cancellation across stdin notifications * test(process): avoid returning from close promise executor * test(process): preserve typed stdin error identity (cherry picked from commit 50efbfd) (cherry picked from commit 5f229e0) * fix: refresh the reviewed correction baseline Baseline-Refresh: 131d3c9a10faf98d2bdb4e2b79051307c1e88f4f Co-authored-by: RomneyDa <[email protected]> Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
…186506) * test(e2e): align legacy operator requested exec policy * fix(doctor): preserve legacy upgrade backups and native assignments * fix(doctor): retain opt-in backup discovery typing * test(doctor): compare captured file bytes directly * fix(doctor): inspect admitted state schema content * fix: refresh the reviewed correction baseline Baseline-Refresh: e20ab99aad2669c5ee844498d5e939d0a1031cd8 * test(doctor): avoid shadowing state descriptor * fix(package): restore installed entry budget (openclaw#188097) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 1864046) * fix(packaging): exclude source-build ledgers from npm packages (openclaw#190030) * fix(packaging): omit source-build ledgers from published packages Keep source-module URL metadata in build trees for source AOT compilation, while excluding it from root and separately packed AI publication. Preserve runtime resources and canonical distribution inventories. Allocate exactly 143 net regression-test lines for real npm/pnpm root and bundled-AI pack coverage, runtime exports, and inventory agreement; leave the shared baseline unchanged. * test(packaging): type fixture package names * test(packaging): complete declared publication fixture inputs * test(anthropic): cover repeated stdin failure notifications (openclaw#190335) * fix(anthropic): validate cancellation across stdin notifications * test(process): avoid returning from close promise executor * test(process): preserve typed stdin error identity (cherry picked from commit 0285717) (cherry picked from commit dcfd10f) * fix: refresh the reviewed correction baseline Baseline-Refresh: 131d3c9a10faf98d2bdb4e2b79051307c1e88f4f Co-authored-by: RomneyDa <[email protected]> Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
What Problem This Solves
The Anthropic diagnostic-drain cancellation test assumes exactly one raw stdin error. A closed write and the native stream's queued error can both notify the managed-stdin adapter. The original assertion fails before cancellation is requested, so it does not establish a cancellation failure.
This blocks the separate packaging work in #190030. The observed failure is CI job 124813866831.
User Impact
No production behavior changes. The tests distinguish repeated raw pipe notifications from the transport's single terminal failure, while retaining cancellation and cleanup checks.
Why This Change Was Made
Both cancellation checkpoints require at least one error and require every observed error to be
EPIPE. Diagnostic barriers, exact abort-reason identity, final join, late-send identity and terminal-error singleton assertions remain intact.A real
Writableregression destroys stdin, attempts a late write and awaits native close. It checks the single write callback, both permitted adapter notifications and strict first-error reference identity. Existing EOF andECANCELED/ERR_STREAM_DESTROYED/EIOcases remain intact. Optional indexing after the count/error assertions satisfies the services test compiler without weakening those checks.Against frozen baseline
89ed7833, signed candidateb3b64d31changes two tests and one LF allocation: production 0, tests +33/−2 (net +31), metadata +2/−0. No retry, timeout increase or production event suppression is introduced.Evidence
b3b64d31acc0969f748c4b44bf9d1044a288d047passed independent source review and one complete structured review: zero findings, all ten preservation/settlement guards passed, all 135 observed owned processes settled.191755ec11: 28 tests passed per runtime, plus two source-derived assertion controls per runtime. Controls show the old exactly-one assertion rejects the repeated-notification trace and the revised predicate rejects empty and wrong-code observations. This is assertion-control proof, not an old-baseline checkout run.b3b64d31: zero findings, no Before merge requests and no remaining rank-up moves. Native correction review and publication validated the same signed head.Current-head proof, CI/security and review are qualified. Landing remains subject to native final admission; no inherited-CI exception or merge waiver is requested.