Skip to content

fix(tracing): snapshot mutable evolution trace payloads - #579

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
Yushu-Li:fix/trace-payload-snapshots
Nov 2, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
Yushu-Li:fix/trace-payload-snapshots

Conversation

@Yushu-Li

@Yushu-Li Yushu-Li commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

When callers reuse or mutate a metrics, prompt, artifacts or metadata dictionary after log_trace(), buffered traces currently pick up those later changes. The improvement delta and statistics were already calculated, so an exported transition can contain inconsistent metrics and deltas; immediate JSONL writes also behave differently from buffered JSONL and JSON output.

I snapshot the retained mutable payloads at log time, including nested artifacts and metadata. Code/response fields and prompt inclusion settings keep their existing behavior. Three regression methods exercise real JSON/JSONL files, reused programs across two transitions, nested payload reuse, and excluded prompts. The original source produces four failing subcases, while immediate JSONL and prompt-exclusion controls pass.

Validation (Python 3.12, no live model calls):

  • Trace tests: 28 passed.
  • Full unit suite: 1,006 tests run, OK with 2 skipped.
  • Repository-pinned Black/isort hooks and whitespace checks passed.

HDF5 payload-type handling and export-level metadata reuse are outside this change; this is separate from #574 and #575.

I used Codex assistance for implementation and regression testing.

@codelion
codelion merged commit 09dd866 into algorithmicsuperintelligence:main Nov 2, 2026
5 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.

2 participants