Skip to content

fix(codemode): bound eval status history#324

Closed
minpeter wants to merge 2 commits into
code-yeongyu:mainfrom
minpeter:fix/eval-status-history-bound
Closed

fix(codemode): bound eval status history#324
minpeter wants to merge 2 commits into
code-yeongyu:mainfrom
minpeter:fix/eval-status-history-bound

Conversation

@minpeter

@minpeter minpeter commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bound Code Mode eval status history to 100 rows per cell
  • reserve one row for an exact omitted-event count after overflow
  • retain the newest 99 real events without changing normal small histories or agent-status coalescing
  • document the bounded-history contract in the package README and changelog

This PR is deliberately independent and based directly on current main; it has no compaction lifecycle or TUI
dependency. It supersedes the old fork-only third PR in that stack.

Root cause

Each eval cell kept every emitted status event in state.events. Read/update-heavy child work could emit thousands of
events, and every render rebuilt the full unbounded list. A long session could therefore retain and repeatedly render
enough history to drive V8 toward its heap limit.

Behavior

  • at most 100 retained status rows per cell
  • after overflow: one synthetic omission row plus the newest 99 events
  • exact omitted-event count remains correct as additional events arrive
  • small histories and existing coalescing behavior remain byte-for-byte unchanged

Verification

  • focused status/render/tool-output regressions
  • full senpi-codemode package suite and root build/check
  • real low-heap 125-read and 20,000-read scenarios
  • exact retained row and omitted-count assertions

Fresh validation receipts will be attached to this Draft before it is marked ready.


Summary by cubic

Bound each eval cell’s status history in senpi-codemode to 100 entries to prevent unbounded growth and costly re-renders. Updated renderer, tests, and docs accordingly.

  • Bug Fixes
    • Limit per-cell history to 100; after overflow, keep one “earlier events omitted” row plus the latest 99.
    • Maintain an exact omitted-event count as more events arrive; small histories and agent-status coalescing remain unchanged.
    • Add renderer support for the new status-events-omitted op (e.g., “26 earlier events omitted”).
    • Add tests for partial/final details and bounds; document the bounded history in README and CHANGELOG.

Written for commit 98e7ca6. Summary will update on new commits.

Review in cubic

@minpeter

Copy link
Copy Markdown
Contributor Author

Superseded by verified current-main Draft #334. The replacement is based directly on main@38bd3a3cf, carries patch-identical minimal commits, and passed the root build/check, scoped Code Mode tests, and real 256 MB source-CLI QA at 20,000 status events. Closing this stale branch only after confirming #334 live with the verified head SHA.

@minpeter

Copy link
Copy Markdown
Contributor Author

Superseded by #335, the clean replacement based directly on current main at 38bd3a3.

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