Repository navigation
fix(infra): stop post-test ENOENT in session-cost checks - #102704
Merged
Merged
Conversation
Co-authored-by: Agent Jack <[email protected]>
Contributor
Author
|
Land-ready on exact head Proof completed:
No proof gaps. Test-only change; no production or user-visible runtime behavior changed. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 10, 2026
Co-authored-by: Agent Jack <[email protected]>
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.
Related: #101062
Related: #102082
What Problem This Solves
Fixes an issue where unrelated pull requests could fail the
checks-node-compact-small-5shard after all tests passed because the session-cost stream-error regression test left a real file stream opening while its temporary directory was removed.Why This Change Was Made
Replace both mocked real file streams with in-memory
PassThroughstreams that provide partial input and then fail throughdestroy(error). This follows the Node stream lifecycle contract, removes the pending file-open race, and leaves production session-cost behavior unchanged.The first stabilization pattern was contributed by Agent Jack in
#102082commit926a6eb205; this focused change preserves that credit and applies the same correction to the adjacent durable-cache regression test.User Impact
No runtime behavior changes. CI no longer intermittently reports a post-test
ENOENTfrom this regression test, and both best-effort and strict cache stream-error paths retain deterministic coverage.Evidence
ENOENT.checks-node-compact-small-5.tbx_01kx381mq54s3atqr7pm7ayv6m: focused test repeated 25 times successfully.pnpm test src/infra/session-cost-usage.stream-errors.test.ts src/infra/session-cost-usage.test.ts-> 2 files, 70 tests passed.pnpm check:changed-> core-test typecheck, lint, and repository guards passed.oxfmt --check src/infra/session-cost-usage.stream-errors.test.tsandgit diff --checkpassed.AI-assisted with Codex; implementation, failure provenance, upstream stream contract, and validation reviewed by the maintainer.