Skip to content

fix(filesystem): preserve rejected prefix read failures - #10081

Merged
morluto merged 1 commit into
mainfrom
codex/fix-prefix-read-failure
Nov 11, 2026
Merged

morluto merged 1 commit into
mainfrom
codex/fix-prefix-read-failure

Conversation

@morluto

@morluto morluto commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Summary

A rejected native prefix read rechecked cancellation before rethrowing, so a concurrent abort replaced the original I/O fault with a cancellation error. Preserve the physical rejection directly and keep cancellation checkpoints around successful reads.

Extend the iNES reader boundary to verify exact physical errors, including when the same error object is the caller's abort reason. Use the existing ArtifactFileOperation primary/completion facts to check failed and completed prefixes across late abort, close success/failure, and cleanup retry. Replace the obsolete helper expectation that required masking I/O; retain short-read, EOF, and successful-read cancellation controls. No new wrapper, budget, configuration, or schema is introduced.

This repairs existing filesystem/provenance behavior; no new target authority or scope decision is required. No separate issue is linked; the defect was independently confirmed from a prior audit finding on current main.

Evidence and validation

  • Base reproduction: 4 failures / 6 passing controls in the focused regression set. The header-read and physical-failure/final-close cases lost the exact EIO; region/stat and returned-prefix completion controls passed.
  • Official npm run test:focused -- tests/boundary/filesystem/inesCancellation.test.ts tests/boundary/filesystem/inesArtifact.test.ts: 67 passed. The official planner classified these as built tests; normal compile/skills prerequisites completed successfully (3 tasks, 1 cache hit).
  • Full npm run typecheck, three-file formatting, and diff checks passed. Scoped lint: no errors; four test alias/parameter warnings remain.

The earlier direct Vitest runs were exploratory source checks, not artifact/built verification. The official focused run above supplies the required verification. Fixtures use owned temporary cartridge bytes and real file descriptors with controlled failures; no emulator, analysis engine, foreign target execution, or compiled CLI/MCP workflow was exercised. Other-platform native behavior remains unverified.

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 09:36
@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-11T09:38:18.390454Z af2db51 Draft marked ready
ℹ️ 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 cb048c3 into main Nov 11, 2026
14 of 15 checks passed
@morluto
morluto deleted the codex/fix-prefix-read-failure branch November 11, 2026 10:16
@morluto morluto added bug Something isn't working area: evidence Evidence, artifacts, and reconstruction labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant