fix(agent): report truncated project hints - #4236
Open
kiranmagic7 wants to merge 1 commit into
Open
Conversation
Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.com>
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
load_hint_files_implsilently stopped at the firstAGENTS.mdthat crossed the 128 KiB project-hints budget. It also appended the inter-file separator before checking the remaining space, so an exact-budget parent followed by a deeper file returned 131,074 bytes while dropping the deeper file without any signal.This keeps the combined output within 128 KiB, emits a structured warning naming the file that crossed the limit, and reserves room inside the same budget for an in-band truncation marker. File ordering and UTF-8 boundary handling are unchanged.
Related issue
Follow-up to #4163 and #4167. The discussion on #4163 identifies the
AGENTS.mdchain as a separate silent-loss path, and #4167 intentionally limits its fix toload_skill.Duplicate search: no focused issue or PR was found for
load_hint_files_implorMAX_HINTS_BYTES. #3732 touches home-directory resolution in the same file, while #3262 is a broad draft refactor.Testing
cargo test -p buzz-agent load_hint_files_reports_ -- --nocapturecargo test -p buzz-agentcargo clippy -p buzz-agent --all-targets --all-features -- -D warningscargo fmt --all -- --checkjust ciAll passed on macOS arm64. No UI change; screenshots are not applicable.