Repository navigation
fix(spend,docs): a large Claude Code log no longer closes the cap; the install docs give a runnable sakk (F-244, F-245) - #9
Merged
Conversation
…e install docs give a runnable sakk (F-244, F-245)
F-244: a Claude Code transcript past Node's longest string (about 512 MiB)
made the spend read throw ERR_STRING_TOO_LONG, which the cap reported as
SPEND_LOGS_UNLISTABLE with "fix the permissions", so a set cap would deny
every call. Found on the owner's machine during a real install (one
transcript had reached about 800 MB).
- The unread tail is read in 8 MiB pieces and split on the newline byte.
A carried line is held as bytes; a line over 3 x MAX_LINE bytes counts as
one unreadable line without being decoded.
- Parsed lines are booked only after the whole read of the file succeeds,
so a failed read leaves the stored offset where it was.
- The deny and sakk spend name the error code and say to fix permissions
only for EACCES/EPERM. Error codes are unchanged.
- Red before: the new test writes a log past the running Node's limit and
failed with ERR_STRING_TOO_LONG in the deny; green after. Piece sizes
1, 7, 64 and the default give the same offsets and spend.
F-245: the README installed with `npm install @sakk-dev/sakk` (not on
PATH), showed only the per-project guard and did not say Claude Code
2.1.295+ is needed for a fail-closed guard.
- Both READMEs install with -g, show `sakk guard install claude-code
--user` and its uninstall, name 2.1.295 and `claude update`, and give a
no-risk check in a folder with no remote.
- Both tutorials point a real install to the README.
- New test reads every fenced npm install of the package in the READMEs
and tutorials and the minimum version from src/guard-install.mjs. Red
before on README.md:115 and README.zh-CN.md:110.
Release prep for 0.4.1: package.json, plugin.json and the Python package
move to 0.4.1 (F-111). The tutorials' install, guard, try, cap, spend,
hook, cap raise, json, prices, halt/status and uninstall steps were re-run
with 0.4.1 in a throwaway home; outputs match apart from dates and the
version lines, which now say 0.4.1, and one punctuation fix the run showed
("changes the policy. If").
Gate: 1513 + 106 pass, 0 fail.
Signed-off-by: sakk-dev <maintainers@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <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.
First half of the 0.4.1 sync, split out so each answers file is judged on its own range (the release commit follows in #8).
SPEND_LOGS_UNLISTABLE. Logs are read in 8 MiB pieces and split on newline bytes; a deny names the error code and says "fix permissions" only for EACCES/EPERM. A single line over 3 MiB still counts as unreadable (with a cap set:SPEND_UNREADABLE).npm install -g @sakk-dev/sakk, runsakk --version, name--userfor a whole-machine guard and Claude Code 2.1.295+, and give a no-risk real-session check.Same commit as the private repository's merged change, history filtered as in ADR-0012.
🤖 Generated with Claude Code