Skip to content

fix(prime): preserve applied refinement notices across synchronization - #553

Merged
rynfar merged 2 commits into
pylonfrom
fix/prime-refinement-notices
Sep 14, 2026
Merged

rynfar merged 2 commits into
pylonfrom
fix/prime-refinement-notices

Conversation

@rynfar

@rynfar rynfar commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Applied Prime refinements emit both an outcome and a model-facing notice. Pylon recognized only the outcome, so a valid notice could trigger a protocol violation or make the next snapshot fail transcript continuity.

Recognize refinement_notice with its own private transcript identity. Preserve existing outcome and harness-digest fingerprints; both refinement message types remain absent from client projections. Reconciliation continues to reject changed, reordered, missing or incorrectly attributed history.

Fixes #550.

Validation: reproduced the decoder failure before implementation; 531 focused tests passed across event decoding, adapter synchronization, restart replay, runtime-event projection and session runtime. After a type-narrowing correction, the 22 affected decoder/restart tests passed again. Server package typecheck, targeted lint, formatting and diff checks pass. Tests cover outcome-plus-notice ordering, valid session/prompt attribution, invalid provenance, live tool snapshot recovery, restart suffix replay, changed/reordered history and private-content exclusion.

Audit: remaining built-in native message/summary transitions are recorded in #552. They remain unsupported by transcript reconciliation pending scoped proofs; this change does not accept arbitrary custom messages. This is server-side Prime normalization shared by web, desktop and mobile in local/remote modes; no contracts, other providers, persistence schema, release or live userdata changes. It does not repair old recovery proofs persisted by a version that dropped these messages.

Model: GPT-6. Harness: Codex.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 14, 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 14, 2026 4:50pm UTC

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

github-actions Bot commented Sep 14, 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 −146 B (−1.0%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB −4 B (−0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.8 KiB 6.7 KiB −142 B (−2.0%) 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.1 KiB 13.9 KiB −153 B (−1.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB +3 B (+0.0%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.9 KiB 6.7 KiB −156 B (−2.2%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 59.7 KiB 58.8 KiB −928 B (−1.5%) 66.4 KiB ✅
Claude Live turn messages 10 8 −2 (−20.0%) 21 ✅

Baseline: d773507 · PR result: 43473f4 · 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 740a8a2 into pylon Sep 14, 2026
20 checks passed
@rynfar
rynfar deleted the fix/prime-refinement-notices branch September 14, 2026 16:58

This branch was successfully deployed

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

Labels

size:S 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.

fix(prime): retain refinement notices in transcript continuity

1 participant