Skip to content

chore(release): 0.4.1 — large log no longer closes the cap; install docs give a runnable sakk - #8

Merged
RayGuo96 merged 4 commits into
mainfrom
chore/release-0.4.1
Nov 12, 2026
Merged

RayGuo96 merged 4 commits into
mainfrom
chore/release-0.4.1

Conversation

@RayGuo96

@RayGuo96 RayGuo96 commented Nov 10, 2026 •

Copy link
Copy Markdown

Release 0.4.1: a large Claude Code log no longer closes the spend cap (F-244), and the install docs give a runnable sakk (F-245).

  • F-244 — a transcript larger than the longest string Node can hold (about 512 MiB) used to fail the whole read with ERR_STRING_TOO_LONG, reported as SPEND_LOGS_UNLISTABLE, so a set cap denied every call. The unread tail is now read in 8 MiB pieces and split on newlines as bytes. The deny and sakk spend now name the error code and say "fix permissions" only for EACCES/EPERM. Stricter: a line over 3 MiB counts as one unreadable line without being decoded; with a cap set it denies as SPEND_UNREADABLE.
  • F-245 — the README install line had no -g, so sakk was not on PATH after following it. Both READMEs now install with -g, show sakk guard install claude-code --user, say Claude Code 2.1.295 or later is needed for a fail-closed guard, and give a no-risk check in a real session; a test reads every install line.
  • CHANGELOG dates [0.4.1] - 2026-11-10; package.json is 0.4.1.

Fast-forward of main (f072346 → 124ee59, 4 commits). Full suite 1513/1513 and prettier --check pass on this tree.

After merge, tag v0.4.1; release.yml publishes to npm with provenance.

🤖 Generated with Claude Code

Sakk maintainer and others added 4 commits November 9, 2026 20:26
…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>
fix(spend,docs): large Claude Code log no longer closes the cap; install docs give a runnable sakk (F-244, F-245)
The changelog's loaded [Unreleased] (F-244 spend reader, F-245 install
docs) becomes [0.4.1] - 2026-11-10 with an empty [Unreleased] above it
and the v0.4.1 link refs, so F-111 reads the package, the changelog and
the tag format as one release. SECURITY.md already supports 0.4.x.

No-finding: release prep; the entries were tested in PR #61, this adds a heading, a date and link refs
Checks: test/release.test.mjs 25/25; prettier --check on both files

Signed-off-by: sakk-dev <maintainers@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore(release): date 0.4.1 in the changelog
@RayGuo96
RayGuo96 merged commit 124ee59 into main Nov 12, 2026
22 of 26 checks passed
@RayGuo96
RayGuo96 deleted the chore/release-0.4.1 branch November 12, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant