fix(context): review follow-ups — resilience, sanitize, truncation, docs#11
Merged
Conversation
…runcation Address follow-up review findings on the §0.1 context plane: - Per-file resilience: a single unreadable source file (git show error) is now skipped instead of sinking the whole context pack — the symbol pass wraps extraction in try/catch, matching the convention-parsing behavior. - Sanitize consistency: augmentTaskPrompt now strips the block-closing delimiter from file paths, symbol names, and the test command too — not just AGENTS.md/ CLAUDE.md — so no injected repo string can break out of <workspace-context>. - Surface truncation: ContextPack.truncated (always false today) is now rendered as a header note, so once truncation exists the agent is told the list is partial. - Docs: note that WORKSPACE_ENABLED makes `typescript` a runtime dep (heaviest new prod dep) and that the symbol pass is synchronous (git cat-file --batch / worker thread is the escalation). Documented AGENT_ALLOWED_REPO_ROOTS + WORKSPACE_ENABLED. - Noted single-flight is moot while _build() is synchronous (revisit if async). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Addresses the follow-up review findings on the §0.1 context plane.
_symbolshad no per-file error handling — one badgit showsank the whole pack_testCommand)sanitize()now applied to all interpolated repo stringsContextPack.truncatedwas never surfacedtypescriptpromoted to a runtime dep (heaviest new prod dep)git show× N spawnsgit cat-file --batch/ worker-thread escalation) — deferred refactor_build()is synchronous (no await between check/set); noted for the future async caseAlso documented
WORKSPACE_ENABLED+AGENT_ALLOWED_REPO_ROOTSin the config reference.Gates
typecheck✅ ·lint✅ ·test:coverage✅ (409 tests, 100%) ·build✅.🤖 Generated with Claude Code