Repository navigation
fix(hooks): bind transcript scan cache to path - #1102
Draft
KooshaPari wants to merge 7 commits into
Draft
KooshaPari wants to merge 7 commits into
KooshaPari wants to merge 7 commits into
Conversation
tx-agent: codex tx-validated: test
tx-agent: codex tx-validated: test
tx-agent: codex tx-validated: test
tx-agent: codex tx-validated: test
tx-agent: codex tx-validated: test
tx-agent: codex tx-validated: test
tx-agent: codex tx-validated: test
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
Two transcript files with the same basename can reuse one incremental scan cache. If both have a newline at the cached byte offset but different prefix line counts, the second scan reports the wrong line count.
Changes
Test plan
The default focused rename-failure invocation passed its assertion but exited 1 because the 80% Python coverage floor had no Python data for this shell-only test. Also checked Bash syntax and git diff --check. An independent source review found no new blocker for distinct paths under append-only input.
Checklist
This is a draft: same-path replacement or rewriting that preserves the cached newline boundary remains an existing limitation. The pre-existing hook JSON field extractor does not decode Unicode escape sequences; an isolated full-hook payload with an escaped Unicode transcript path did not publish the expected sidecar, while the raw UTF-8 form passed. In a small Fedora WSL bubblewrap sample with sidecar republication confirmed on every call (12 alternating warm calls per commit, 100-line transcript), median latency was 42.8 ms for a81f2c8 (mv only) and 49.8 ms for f3ceb8b (mktemp and mv), a 7.0 ms difference. This is not a Windows or production benchmark; the original redirect baseline and those platforms remain unmeasured. A directory concurrently writable by another process of the same user remains outside the protection established here: the temp path is reopened after creation. No hostile-directory race test was performed. Real summarizer integration and performance remain unverified; the existing integration fixtures override HOME, which was outside this validation's constraints.