Skip to content

Publish complete final results with finalized trace references - #94

Open
areshand wants to merge 1 commit into
mainfrom
codex/fix-result-trace-publication
Open

Publish complete final results with finalized trace references#94
areshand wants to merge 1 commit into
mainfrom
codex/fix-result-trace-publication

Conversation

@areshand

@areshand areshand commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Why

The production report dropped the first six lines of an 85-line, sub-6KB final answer because result publication always kept only the last 80 lines. It also emitted the public report before normalized agent events appeared, so the first transcript referenced only lifecycle logs.

What changes

  • Preserve the complete final message whenever it is within the 6KB public bound; truncate by UTF-8 bytes only when it actually exceeds the bound.
  • After stopping a session, wait up to two seconds for each latest agent attempt to publish events.jsonl.
  • Re-checkpoint after that bounded finalization wait before generating and delivering the report.
  • Add regression tests for the 85-line case, Unicode byte bounds, late trace readiness, and timeout behavior.

Validation

  • Control-server test suite — 62 passed

Deployment

Source-only PR. It does not deploy or change trace storage.

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