Repository navigation
fix(artifacts): preserve iNES shutdown ownership and I/O failures - #11154
ShuaixinHuang wants to merge 22 commits into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The reviewed changes appear safe to merge; no blocking defects were found. SummaryThe PR keeps iNES reads and final source checks owned until shutdown finishes, while preserving physical I/O failures.
DiagramsequenceDiagram
participant Caller
participant Reader as iNES reader
participant Scope as Resource scope
participant Stream as Region stream
participant File as Owned descriptor
Caller->>Reader: close()
Reader->>Stream: Abort region production
Reader->>Scope: Stop admission and wait
Scope->>Stream: Join production and readable retirement
Scope->>Scope: Join admitted final source checks
Scope-->>Reader: Work retired
opt Reader owns descriptor
Reader->>File: close()
end
Reader-->>Caller: Shutdown result
Reviews (5) · Last reviewed commit: "Merge commit 'a8f98b7a951ba0c28cb91f7429..." · Reviewed by Greptile |
|
@morluto @kaoru0822-kitauji @N0zoM1z0 Could you please review this change when available? The PR description records the implementation, validation evidence, and remaining limitations. Thank you. |
…repair-11154-20261116 # Conflicts: # src/artifacts/InesArtifactReader.ts # tests/boundary/filesystem/fileHandleChunks.test.ts # tests/boundary/filesystem/inesCancellation.test.ts
…repair-11154-20261116
…file
The Windows-only case at `clientConfigurationEnvironment.test.ts:226` wrote
`rea_mcp_input_schema_profile: "full"`. That profile was retired: the reader
now refuses it ("REA_MCP_INPUT_SCHEMA_PROFILE accepts only \"compact\" …"),
so `configureClientConfiguration` returned `failed/readback` before writing
and the case failed on every Windows run, including main's own
`Windows capability and package lane`.
The case has no Windows dependency — it passes an explicit `configPath` and
the Kimi write dialect is the same everywhere — so it now runs on every
platform, which is what let the stale value rot unnoticed. The fixture keeps
the lowercase explicit key the case is about, with the supported value.
Verified on `main` `d6bcfc10`: the same fixture driven through
`configureClientConfiguration(..., "win32")` on this host reproduced
`{"status":"failed","reason":"readback"}` with the retired value and now
returns `{"status":"configured"}` with `compact`. The file's 75 cases pass
here (66 run, 9 platform-conditioned skips) and `check:fast` passes.
…alue-11154 # Conflicts: # tests/boundary/mcp/decompileAllCaveats.test.ts # tests/boundary/mcp/environmentServeMcp.test.ts
Disposition
Superseded by 11739 at @ShuaixinHuang's request after CI repair and local qualification. The replacement preserves the original feature commits and links this review history.
Latest-main qualification
Normally merged main
f916b3ecf5455ffc80e300d8cf7eea144d02d61cinto this same PR as3b3aa7ef822ef4ce218a09c99507c2c8e58e7967. Accepted upstream test-only commits94bf2bdec,5579890ddandf916b3ecfrepair shared setup/lifecycle/isolation fixtures. In particular, the five failures recorded earlier on mainbd9f2cca4are now fixed upstream; they are not current blockers from that earlier baseline.hermesClientSetup,ompClientSetup,piClientSetup,ciTestProjects,agentEvaluationCleanup,agentEvaluationCommands) were run withnpm run test:focused: 75 passed, no skips, exit 0, on clean mainf916b3ecf. A local-only Linux subreaper preserved assertions and exit status while reaping 14 adopted children.8eb8678a7da0c9319175649071b2975b7b520cb3and are unchanged by this test-only merge. The feature-suite results below apply to those exact preserved inputs.git diff --checkand normal pre-pushnpm run check:fast(typecheck, lint and architecture guards) passed on the published tree. Linux x64, Node 24.22.1 / npm 11.16.0.Fresh-head hosted CI remains pending. No complete monolithic local check, combined integration of all open PRs, or additional native Windows/macOS qualification is claimed. Earlier results below retain their stated revisions. Existing human-readiness text and checkbox lines are preserved verbatim; this update does not attest to a new human review.
Problem and fix
Closing an iNES reader during a region read or final identity validation could release its extraction-owned descriptor before admitted work retired. Buffered streams and paused inventories could continue after closure; a shared descriptor-read race could replace a physical I/O failure with cancellation.
Use the existing resource scope to stop producers and join producer completion plus readable retirement. Admit final source validation independently, preserve borrowed-descriptor ownership and failed-close retry ownership, and retain a physical failed-read outcome until it is forwarded. The doctor fixture publishes readiness only after installing its SIGTERM handler.
Current validation — 2026-11-16
Resolved the reader conflict by retaining both the lifecycle implementation and main's
layout-consistencyintegrity classification. Linux x64, Node 24.22.1 / npm 11.16.0:npm run test:focused -- tests/boundary/filesystem/inesCancellation.test.ts tests/boundary/filesystem/fileHandleChunks.test.ts tests/boundary/cli/doctorCancellation.test.ts: 3 suites, 65 passed.npm run check:fast, final diff check and normal pre-push hooks passed. Published head:8eb8678a7da0c9319175649071b2975b7b520cb3.The original pre-fix reproduction (17 failed / 78 passed plus an uncaught cancellation error) is historical, not rerun during this conflict repair. The harmless JavaScript duplicate-import consolidation in the final diff is applied by normal repository hooks and changes no behavior. No timeout, failure assertion, ownership rule or provider policy was weakened. Replaces #10554 at the author's request and retains its review history.
Normally merged main
bd9f2cca45cb99c7460ab678f4fe6a3b12d6ba3ainto this same PR. This includes accepted common-suite corrections #11193, #11211 and #11213 without copying their patches. The old failed hosted runs describe their executed heads; fresh-head hosted CI remains required. No full monolithic local check, native Windows/macOS or real-decompiler qualification is claimed.A clean-main qualification of 22 previously failing files found 708 passes, 10 skips and 5 failures: four existing invalid-vs-unknown client registration expectations, and one local read-only account-home limitation. These shared baseline failures are recorded separately from this PR's focused passes.
Author readiness
Human owner: @ShuaixinHuang
The human owner explicitly confirmed review of this replacement’s final diff and current-base evidence on 2026-11-14 for head
4f6d85635b5cc8236fcf2ba54a835d72623f5c98, and declared it ready for initial maintainer review.Resubmission
Re-submitted after closing the previous PR; source branch and validated change are unchanged.
Current author readiness
@ShuaixinHuang confirmed on 2026-11-15 that the current head was reviewed, the evidence and limitations were checked, responsibility for the complete AI-assisted change is accepted, and this PR is ready for initial maintainer review.