Skip to content

fix(prime): reconcile results for observed native tool calls - #493

Merged
rynfar merged 3 commits into
pylonfrom
fix/prime-native-transcript-sync
Sep 12, 2026
Merged

rynfar merged 3 commits into
pylonfrom
fix/prime-native-transcript-sync

Conversation

@rynfar

@rynfar rynfar commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Native Prime can publish a completed tool result in a transcript snapshot before its message-completion event. Pylon rejected that delta even when it had already observed the exact tool call, failing the first real turn after MCP tool discovery.

The adapter now reconciles unique results whose IDs and names match the current correlated prompt’s attributed live tool calls. Exact transcript overlap, complete replay, current connection/proof epoch, delivered lifecycle continuity, and no queued input remain required. Unrelated calls, changed names, duplicate or previously recorded results, and mixed assistant deltas remain rejected.

The runtime also suppresses an exact late tool-result completion already published in the current attachment’s bounded correlated snapshot. This prevents duplicate transcript progress without hiding changed results or affecting provisional worker snapshots.

Validation: both the missing-result regression and delayed-completion regression fail before their fixes; 432 adapter/runtime tests pass. Coverage includes attribution through an intermediate snapshot, duplicate/unknown results, proof/lifecycle failures, and changed result content/timestamps. Server typecheck and scoped lint pass. The actual managed stable build completed the previously failing flow in 15.5 seconds with a ready checkpoint and no alerts; the final corrected real tool flow also passes. The actual restart proof passed 2/2 (116.74s) with failure-only diagnostics; an earlier run had an unexplained second-checkpoint error, retained in the evidence. No test assertion was weakened. Final checkpoint review passes at 3eb0769; full web/mobile acceptance continues in #114.

Model: GPT-6, Codex harness.

@vercel

vercel Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pylon-marketing Ready Ready Preview Sep 12, 2026 3:18am UTC

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 12, 2026
@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 14.0 KiB 13.9 KiB −145 B (−1.0%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB +1 B (+0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.8 KiB 6.7 KiB −146 B (−2.1%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.8 KiB 58.0 KiB −866 B (−1.4%) 66.4 KiB ✅
Codex Live turn messages 9 8 −1 (−11.1%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB −28 B (−0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB +11 B (+0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.8 KiB 6.8 KiB −39 B (−0.6%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 59.7 KiB 59.6 KiB −44 B (−0.1%) 66.4 KiB ✅
Claude Live turn messages 9 8 −1 (−11.1%) 21 ✅

Baseline: c6a8b64 · PR result: 3eb0769 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar
rynfar merged commit 713dd56 into pylon Sep 12, 2026
20 checks passed
@rynfar
rynfar deleted the fix/prime-native-transcript-sync branch September 12, 2026 03:24
@rynfar

rynfar commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator Author

Actual managed stable native conversation after the reviewed correction: tool use and a final answer complete with a ready checkpoint and no error alert. The earlier failed first-turn recording and diagnostic sequence are retained with #114 acceptance evidence.

task19-tool-sync-after

This branch was successfully deployed

1 active deployment
Preview — 3eb07695 Deployed Sep 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant