Repository navigation
fix(guardrails): review ListDir results without reading directories - #2001
Merged
Merged
Conversation
Exclude ListDir directory operands from supplemental text-file evidence while retaining inbound result review. Cover acceptable delivery and prohibited or malformed withholding through the real application composition. Co-authored-by: Mecatl <[email protected]>
JAORMX
marked this pull request as ready for review
September 29, 2026 14:02
This was referenced Sep 30, 2026
Merged
2 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the first narrow regression found while investigating contextual guardrail failures from #1510:
ListDirwas being treated as a source of supplemental text-file evidence.The tool successfully produced a directory listing, but evidence preparation then attempted a bounded file read of the directory itself. The filesystem correctly rejected that read, setting
EvidenceComplete=false. A checker returningacceptablewas rejected on all three attempts; enforcing runs could then withhold an otherwise valid listing.ListDirfrom supplemental text-file evidence paths.Scope
Routine bug fix restoring documented behavior, delivered directly as requested. No acceptance plan, new interface, or authority change. The shared
LocalFileOperandshelper remains unchanged. Yolo/advisory policy, retries, evidence limits, and all other tools keep their existing behavior.Large-file preview completeness, reviewer instruction isolation, end-to-end deadlines, and terminal failure semantics are deliberately separate increments. This PR does not claim to resolve every guardrail failure.
Verification
The regression was observed failing before the fix: three checker calls for an acceptable listing and a directory selected as file evidence. After the fix, the real
Buildtest verifies one checker call, complete listing evidence, and delivery to the working model. Prohibited and malformed responses still produce a model-visible error without leaking the listing.go test ./internal/app: passed.task test: passed.task docs: passed.task test:raceandtask site:build: passed.task lint: passed with zero issues across every module. The initial outer 600-second deadline expired during root analysis; the retry completed with a longer outer budget and no code changes.Candidate:
ff425f8ec.Documentation owner:
user-docs/building/what-you-get/permissions.md. The added sentence explains what ListDir inbound review inspects; it does not add a new workflow or configuration option.