Skip to content

perf(runtime): append ordinary run facts incrementally - #168

Merged
Eclipseic1848 merged 2 commits into
mainfrom
codex/issue-161-runstore-append
Sep 3, 2026
Merged

perf(runtime): append ordinary run facts incrementally#168
Eclipseic1848 merged 2 commits into
mainfrom
codex/issue-161-runstore-append

Conversation

@Eclipseic1848

Copy link
Copy Markdown
Owner

Summary

  • keep a bounded, file-identity-checked cursor for normal FileRunStore.append() calls
  • atomically create the first JSONL record, then append one ordinary Fact at a time without rewriting prior history
  • retain the existing full-prefix sync plus atomic rename path for critical commits so a failed durability barrier cannot publish an unacknowledged Fact
  • invalidate the cursor after external file changes, preserve old-sequence idempotency/conflicts, and keep bounded torn-tail repair
  • rebuild the Python bundled Worker and align the durable-run documentation

Verification

  • npx vitest run --project coremind-runtime — 800 passed, 2 skipped
  • python -X utf8 -m unittest discover -s python/tests -p "test_node_parity.py" — 6 passed
  • npm run check — lint, all workspace typechecks, module contracts, docs pairing, and 466-file Markdown audit passed
  • independent read-only review found no remaining High issues

Critical commits intentionally retain copy-on-write publication because in-place append cannot preserve the existing guarantee that a failed sync leaves an unacknowledged Fact unpublished without adding a WAL or changing the persistence format.

Closes #161

@Eclipseic1848
Eclipseic1848 merged commit 0c3caa5 into main Sep 3, 2026
2 checks passed
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.

perf(runtime): avoid full JSONL rewrite on every RunStore append

1 participant