Fix(hooks): Eliminate DocIntegrity crash and isolate stderr context leakage#1298
Open
derekslinz wants to merge 2 commits into
Open
Fix(hooks): Eliminate DocIntegrity crash and isolate stderr context leakage#1298derekslinz wants to merge 2 commits into
derekslinz wants to merge 2 commits into
Conversation
…eakage - Fix block-scoping bug in handleDocCrossRefIntegrity that threw a ReferenceError when no drift was detected - Relocate runInferenceAnalysis failure/timeout tracing out of console.error into a dedicated background file stream - Prevent background hook timeouts and script errors from bleeding into stderr and polluting the active CLI prompt context window
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.
TLDR I hit an API error with claude due to an image exceeding 2000 pixels, which cascaded to the level that I used 5 hours of claude max quota in under 3 minutes. Multiple bugs contributed, and when DocIntegrity.hook.ts ran, it hit the 15 second timeout, logged straight to the console and thus right into the active prompt payload.
Problem
The DocIntegrity.hook.ts wrapper executes background cross-reference checks at the end of major workspace milestones. When these tasks encounter an inference timeout (15,000ms hard ceiling), two systematic pipeline failures occur:
Solution
Verification Results