Skip to content

fix(memory): preserve goal run start metadata - #7153

Merged
houko merged 7 commits into
mainfrom
fix/goal-run-store-contract
Aug 14, 2026
Merged

houko merged 7 commits into
mainfrom
fix/goal-run-store-contract

Conversation

@houko

@houko houko commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • preserve the original goal run started_at value across ordinary state upserts
  • replace a terminal predecessor with a fresh run and fresh started_at in one atomic SQLite upsert
  • remove the delete-then-insert crash window from goal restarts
  • validate phases and RFC3339 timestamps at the store boundary before SQLite writes
  • order recovery rows by parsed timestamps with a deterministic goal-ID tie-breaker
  • describe PASSIVE WAL checkpoints as best-effort instead of a durability barrier

Verification

  • CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=/Volumes/Lexar/worktrees/target-7153 cargo test -p librefang-memory goal_run_store --lib — 13 passed
  • CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=/Volumes/Lexar/worktrees/target-7153 cargo test -p librefang-kernel start_replaces_terminal_row_with_a_fresh_started_at --lib — 1 passed
  • cargo fmt --all -- --check
  • git diff --check origin/main...HEAD

Out of scope

  • changing the public GoalRunRow field types across crates
  • migrating already persisted malformed timestamps
  • changing WAL synchronous or checkpoint policy

@github-actions github-actions Bot added the size/M 50-249 lines changed label Aug 13, 2026
@github-actions github-actions Bot added the area/kernel Core kernel (scheduling, RBAC, workflows) label Aug 14, 2026
@houko
houko enabled auto-merge (squash) August 14, 2026 07:00
@houko
houko merged commit 46c871f into main Aug 14, 2026
38 checks passed
@houko
houko deleted the fix/goal-run-store-contract branch August 14, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/kernel Core kernel (scheduling, RBAC, workflows) size/M 50-249 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant