Skip to content

fix(json): preserve cancellation through input finalization - #10022

Merged
morluto merged 5 commits into
mainfrom
codex/fix-json-pipeline-cancellation
Nov 11, 2026
Merged

morluto merged 5 commits into
mainfrom
codex/fix-json-pipeline-cancellation

Conversation

@morluto

@morluto morluto commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

JSON-backed CLI workflows could misclassify streamed cancellation as I/O failure, or return success after cancellation during final input-resource cleanup.

Normalize streamed cancellation once in JsonInputFile, requiring the exact private cancellation fact and only current-operation cancellation leaves. Keep mixed or unprovable error graphs unchanged and preserve physical-read precedence. Keep command callbacks as Evidence or typed failures through resource cleanup, then project CLI JSON once. Complete successful Evidence after input-resource close through the existing completeProviderEvidence owner, retaining completed facts on late cancellation.

Evidence and validation

  • Stream matrix on exact base 0e88049d: 2 failed, 8 passed. Real Node pipeline controls cancel a pending member consumer before and after observed descriptor EOF and check exact opaque caller-reason identity.
  • Final input-close matrix before its fix: 2 failed, 25 passed in the process-file suite. Dry-run plan and offline comparison lost late cancellation; successful-close and prior-error controls passed. No process scenario was executed.
  • Controlled mixed-input tests retain the actual Node rejection and append an independent leaf at the external pipeline boundary. Original aggregates survive foreign cancellation, cycles, unreadable contents, and undefined rejection values. This does not claim to recover failures Node itself omits.
  • Typed-failure/final-close regression on 1ba1f3d7: 2 failed, 1 healthy-close control passed. A real plan-admission error disappeared when a retained descriptor failed final close; both cancellation variants now preserve that exact error and the descriptor retry lease.
  • Four filesystem suites after all repairs: 50 passed. Includes physical-read precedence and descriptor cleanup/retry controls.
  • Pinned Node 24 node scripts/run-typescript.mjs --noEmit — passed.
  • Scoped formatting, lint, and diff checks — passed; nonblocking size/complexity/depth warnings remain.

Existing process tests passed before the stream repair; they are working controls, not its fail-before proof. Current-main producer identity and live thematic PR file lists were checked for omitted/duplicate repairs. No linked issue: this completes two related audit omissions.

No new public API, provider, target execution, installation, or scope authority. No runtime build, compiled CLI/MCP gate, or global gate ran; checks import owning source. No production test seam was added.

  • Follow-up 4367c6e5c1: two real-descriptor mixed final-cleanup regressions failed before the fix and pass afterward; the two changed boundary suites passed 42 tests, and npm run check:ci:fast passed. The completed plan Evidence, exact late cancellation reason, prior typed failure, and cleanup retry lease remain available when input close fails.

Author readiness

Human owner:

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@morluto
morluto marked this pull request as ready for review November 11, 2026 08:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T10:22:41.971742Z 4367c6e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 98f796c into main Nov 11, 2026
7 of 9 checks passed
@morluto
morluto deleted the codex/fix-json-pipeline-cancellation branch November 11, 2026 10:22
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant