Skip to content

fix(history): hold the history rebuild in the usage-projection e2e instead of racing it - #1792

Merged
V3RON merged 4 commits into
mainfrom
bug/1720
Nov 20, 2026
Merged

V3RON merged 4 commits into
mainfrom
bug/1720

Conversation

@V3RON

@V3RON V3RON commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1720

Status

Implement: done (build 1/1, audit 4/4, fix 1/1 green) Review: passed round 2 (R1 intentional, R3 fixed and verified) Hardware: n/a Gate: running
Next: gate

Assumptions

  • Assumption: hook shape — SIMLOCK_TEST_HOLD_HISTORY_REBUILD=<path> makes the daemon wait for that file before the rebuild; the smallest seam, read in openEventHistory only.

Review

Spec review: 1 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 1 notes. Claims review: 0 blocking, 0 fixed, 1 notes.
Rounds: 2. Tokens: 1.5M.
Runs: 9. Cost USD: 2.4658. Agent seconds: 1417.

Rejected:

Assessment: complete

Written by an agent.

@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 21 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 44ffd4e0-540f-470c-8c07-a09dd911bc77
Commits

Reviewing files that changed from the base of the PR and between d7bd191 and be2a1d4.

Files selected for processing: 6

  • e2e/helpers/env.ts
  • e2e/usage-projection.test.ts
  • src/daemon/main.ts
  • src/history/history-start-recovery.test.ts
  • src/history/index.ts
  • src/history/test-history.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@V3RON

V3RON commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 29aea92
Round 2: be2a1d4

Runs: 9. Cost USD: 2.4658. Agent seconds: 1417.
Tokens input 205, output 45727, cache read 4249786, cache write 388631.
- build implementer: claude-sonnet-5-5 235 s $0.3619
- audit implementer: claude-sonnet-5-5 61 s $0.1076
- review 1 reviewer: claude-sonnet-5-5 329 s $0.2033
- review 1 spec: claude-sonnet-5-5 16 s $0.1046
- review 1 code behaviour: claude-opus-5-5 257 s $0.6518
- review 1 claims: claude-sonnet-5-5 19 s $0.1166
- fix 1 implementer: claude-sonnet-5-5 117 s $0.2047
- review 2 reviewer: claude-sonnet-5-5 219 s $0.1439
- review 2 code behaviour: claude-opus-5-5 164 s $0.5714
Finding outcomes: {"duplicate":1,"fixed":1,"intentional":1}. Classes: {"architecture 12":1,"fix differs from triage's rejected alternative":2}.
{"findings":[{"id":"R1","role":"spec","class":"fix differs from triage's rejected alternative","outcome":"intentional","path":"src/daemon/main.ts","round":"1"},{"id":"R2","role":"spec","class":"fix differs from triage's rejected alternative","outcome":"duplicate","path":"src/history/index.ts","round":"1","canonicalId":"R1"},{"id":"R3","role":"code","class":"architecture 12","outcome":"fixed","path":"src/daemon/main.ts","round":"1","fix":"be2a1d4fca17feaff39c03131850ff003a395f18"}]}

Written by an agent.

@V3RON

V3RON commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • claims: src/history/AGENTS.md, src/daemon/AGENTS.md stay true without a line for SIMLOCK_TEST_HOLD_HISTORY_REBUILD; production unchanged when the env var is unset or empty (code lens probe)
  • code: src/daemon/main.ts:785 the !isStopped() check has no direct unit test, only the history-side test; the hook runs only under a test env var

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 20, 2026 07:51
@V3RON
V3RON merged commit 2addc64 into main Nov 20, 2026
66 checks passed
@V3RON
V3RON deleted the bug/1720 branch November 20, 2026 07:53
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.

flaky: usage-projection e2e rebuilt-history test times out its 60 s wait on a slow runner

1 participant