Repository navigation
fix(environment)!: attribute source errors to caller fields - #7900
Conversation
[Low impact] The PR appears safe to merge; no actionable defect was found. SummarySource-file errors now point to the caller's field instead of the reader's internal role.
Source review found no actionable new issue or security regression. The diff whitespace check passed; tests were not run during this review. Supersession could not be checked because GitHub access required authentication. The previous-review merge bases differed, so the full PR diff was reviewed. Reviews (3) · Last reviewed commit: "Merge branch 'main' into codex/fix-envir..." · Reviewed by Greptile |
Codex Review SummaryThis 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. |
Summary
export_environment_bundlereports source-file admission and JSON errors against an internalevidencerole that is absent from its input schema. The shared reader now carries the caller's actual field path into those diagnostics.Fixes #7523
Problem and expected behavior
A missing file, directory, invalid UTF-8 or malformed JSON selected through MCP
source.pathis correctly rejected, but the resulting issue points to["evidence"]and may incorrectly claim inline JSON was supplied. It now points to["source", "path"]. The relatedenvironment-buildCLI consumer identifiescapturerather than an internal role.Change and scope
The environment file reader separates its internal manifest/Evidence role from optional caller-field context. Its existing size checks, reads and error categories remain in place. This is a read-only diagnostic correction; a maintainer scope decision is not applicable.
Contract and boundary impact
Expected effects:
Evidence and regression coverage
MCP exercises missing and directory paths, invalid UTF-8 and malformed JSON, asserting the caller field and no output directory; built CLI tests assert the related capture field.
The memory-boundary regression confirms existing resource refusal behavior after the shared function signature change.
Remaining proof gaps: Windows filesystem and stdio MCP were not separately tested; MCP coverage is in-memory against the production handler.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run test:focused -- tests/boundary/mcp/environmentBundleMcp.test.ts tests/boundary/cli/environmentBuildCli.test.ts tests/process-global/environmentExportMemory.test.ts— 10 passed on macOS.npm run check:fast— passed.git diff HEAD --check— passed.Compatibility, safety, and release
Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.