Repository navigation
fix(memory): preserve native read permission errors - #188531
Conversation
Normalize fs-safe permission-denied causes through the existing memory read adapter so scoped EACCES/EPERM diagnostics retain their shipped shape. Co-authored-by: steipete <[email protected]>
|
🦞👀 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 changesThe memory reader unwraps fs-safe permission failures to preserve the original native error. Example: Reading an allowed extra-memory file at /notes/blocked.md fails with EACCES during traversal.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR restores an existing diagnostic contract still broken on main, and no actionable patch defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared memory reader receives workspace configuration and a requested Markdown path, delegates confined reads to fs-safe, and returns excerpts or errors consumed by memory_get and remote workspace readers. flowchart TD
A[Memory get or remote reader] --> B[Shared memory reader]
B --> C[Workspace and extra path admission]
C --> D[Confined fs safe read]
D --> E[Native error normalization]
D --> F[Bounded memory excerpt]
E --> G[Caller error result]
F --> G
Technical reviewBest possible solution: Extend the existing memory-reader error adapter while preserving confined reads, relevant-root selection, and native error identity. Do we have a high-confidence way to reproduce the issue? Current-main normalization excludes the dependency's verified permission-denied wrapper, so a traversal EACCES or EPERM retains the wrapper; the PR reports matching base-red regressions, but this review executed no target code. Is this the best way to solve the issue? The change is the smallest complete repair: extend the existing adapter rather than revert the dependency's intentional classification or introduce another read path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 32bff6b57b79. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +7. Total +7 across 2 files. Added test files: 0. View PR surface stats
LabelsLabel 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 Reviewed October 30, 2026, 12:59 PM ET / 16:59 UTC. |
|
Merged via squash.
|
Normalize fs-safe permission-denied causes through the existing memory read adapter so scoped EACCES/EPERM diagnostics retain their shipped shape. Co-authored-by: steipete <[email protected]>
Requested by @steipete.
Work sessions
Discussion, implementation and verification
What Problem This Solves
Fixes memory file reads returning an fs-safe wrapper instead of the original permission error for an inaccessible Markdown file.
User Impact
Memory readers retain scoped EACCES/EPERM diagnostics and the existing path authorization rules.
Why This Change Was Made
fs-safe 0.26.14 intentionally wraps traversal permission failures as
permission-deniedand retains the native error incause. Extend the memory reader's existing cause normalization to preserve its shipped error contract. The existing error-scoping regression also covers EPERM and checks original error identity.The dependency update is #188352; the scoped memory-read contract is #139402.
Evidence
--maxWorkers=1). Final owning-file run: 0.95 s; five-file wrapper: 41.94 s, mostly module/worker preparation. Hosted CI completed successfully in run 41092510722 on the exact source head.6614c50b2de7isscoped-cleanthrough P2; no findings. Parent review accepted the same patch.Co-authored-by: steipete [email protected]