Skip to content

fix(protocol): reopen large audit logs without argument overflow - #29

Merged
steipete merged 1 commit into
mainfrom
fix/large-audit-reopen
Sep 15, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/large-audit-reopen

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Problem and fix

Reopening a valid large audit log failed with Maximum call stack size exceeded: the loader passed every historical entry as an argument to one array push call. Once the log exceeded the JavaScript argument limit, reading or appending to it failed after restart.

Append the verified entries iteratively, preserving their order and the existing file format, integrity checks, and durable append behavior. Add a 150,000-record regression that reopens the log, appends the next event, and verifies the full resulting chain. Document recovery behavior.

Validation

  • The new regression failed at the original argument spread before the fix.
  • Built-package synthetic proof reproduced the failure on 150,000 valid records and verifies all 150,000 reopen after the fix.
  • pnpm -r build and pnpm -r test pass.
  • Independent autoreview returned scoped-clean through P2.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(protocol): reopen large audit logs without argument overflow This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete merged commit 7a9c818 into main Sep 15, 2026
8 checks passed
@steipete
steipete deleted the fix/large-audit-reopen branch September 15, 2026 07:33
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