Repository navigation
fix(agents): read the self-test's log from its byte offset - #3
Merged
Merged
Conversation
dev agents test recorded the hooks log size in bytes and then sliced the decoded text at that offset. With multi-byte characters in earlier lines (the guard's messages use … → ·), the slice skipped the new lines, so the live test reported the PreToolUse guard as silent while it had refused the test branch. The canary check had the same flaw. Both read the appended bytes now; the live test passes 9 of 9.
Merged
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.
What and why
dev agents testreported the PreToolUse guard as silent although the guard had refused the test's branch. It recorded the hooks log size in bytes and sliced the decoded text at that offset; with multi-byte characters in earlier lines (the guard's messages use … → ·), the slice skipped the new lines. The canary check had the same flaw.Changes
providers._appended(path, offset)reads the bytes written after the offset and decodes them; the guard and canary checks use it.How to verify
python3 -m unittest tests.test_quotaand the full suite on Python 3.15 and 3.9.dev agents test claude: 9 of 9 (it was 8 of 9 after 26.11.1 was installed).dev ci --runpassed (evidence for tree9b74d63).Risk and rollback
Links