Skip to content

feat: wire RunCutover + SeqCounter into startup#104

Merged
hironow merged 2 commits intomainfrom
feature/cutover-wiring
Apr 4, 2026
Merged

feat: wire RunCutover + SeqCounter into startup#104
hironow merged 2 commits intomainfrom
feature/cutover-wiring

Conversation

@hironow
Copy link
Copy Markdown
Owner

@hironow hironow commented Apr 4, 2026

Summary

  • Wire EnsureCutover into run startup (idempotent cutover on first boot, skipped in dry-run)
  • RecorderFactoryAdapter.SetSeqCounter injects SeqCounter into all new recorders
  • Add NewSessionRecorderWithSeqCounter + LoadAllEventsWithStatus

Test plan

  • go build ./... PASS
  • go test ./... -count=1 -short PASS

🤖 Generated with Claude Code

hironow and others added 2 commits April 5, 2026 03:41
EnsureCutover runs idempotent one-time migration on startup.
RecorderFactoryAdapter carries SeqCounter for SeqNr allocation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move seq.db from .run/ to stateDir root (.run/ is ephemeral)
- Fix NewSessionRecorderWithSeqCounter to call rec.SetSeqCounter(sc)
- Fix RunCutover to skip cutover for empty stores (fresh install)
- Fix TestRunCutover_EmptyStore to match fresh-install behavior

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hironow hironow merged commit 507dac6 into main Apr 4, 2026
6 checks passed
@hironow hironow deleted the feature/cutover-wiring branch April 4, 2026 19:51
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