Skip to content

feat: trace records with ordered turns and batch ID lookup - #304

Merged
beinan merged 4 commits into
mainfrom
codex/trace-record
Oct 4, 2026
Merged

beinan merged 4 commits into
mainfrom
codex/trace-record

Conversation

@beinan

@beinan beinan commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Add a built-in TraceRecord schema for one conversation turn per row: session_id, ordered turn_id, stable row id, role, content, and optional source/metadata. Separate row identity preserves content variants at the same turn position.

TraceStore wraps the existing local/remote GenericStore API, reusing its indexed base/WAL batch reads and ID-only deduplication probes (up to 1,024 IDs). This creates one dataset and requires no new dependencies, registries, or HTTP routes. Document retry/visibility semantics and the fact that lookup plus append is not atomic insert-if-absent.

Validation: 21 API tests, 3 real-Lance integration tests, and an actual HTTP/Rust-client round trip pass locally. Coverage includes late turns, variants, replay, merge/reopen, null content/metadata, 1,024-ID batch bounds, deferred visibility, and rejection of invalid batches before writes. Formatting and all-target Clippy for API/core/server pass locally; all 10 GitHub checks pass on 44910a1, including Rust/HA tests, coverage, Clippy, Python tests and three-platform wheel builds.

@beinan
beinan marked this pull request as ready for review October 4, 2026 18:31
@beinan
beinan merged commit 38c942e into main Oct 4, 2026
10 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.

1 participant