fix(compaction): preserve drafts and queue messages through durable admission - #512
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
5f8815c to
48fbfcb
Compare
(cherry picked from commit ef6fa118749572da1905eca5d0543d1e98f0b1b2)
Adapt upstream compaction queueing to the pure decider and exact provider admission. Persist FIFO and in-flight ownership, settle compaction through correlated commands, and expose explicit cancellation receipts on stop, failure, and restart. Preserve composer drafts and acknowledge queued messages without waiting for provider startup. Upstream-Commit: 57aee3e19f1910f3323f06384bb2a1d02b79e369 Completes Pylon API adaptation of ef6fa118749572da1905eca5d0543d1e98f0b1b2.
Use the ordinary pending-session bind CAS for compaction startup, retain explicit null expectations, and emit uncertain-delivery receipts for dequeued messages interrupted before admission. Add deterministic slow-start Stop and in-flight cancellation regression coverage.
…trap Keep migration 48 assertions on its historical schema, then apply current migrations before comparing a modern projector rebuild. This includes the compaction queue column required by the current session repository and matches production startup ordering.
48fbfcb to
c9c901d
Compare
|
Deployment failed for project pylon-marketing with the following error: Learn More: https://vercel.com/pylon-code?upgradeToPro=build-rate-limit |
|
Final landing review verified head The exact compaction and settings heads were also composed at |
Compacting context now sends
/compactseparately while preserving the composer draft, attachments, and cursor. Messages submitted during compaction are persisted in FIFO order and sent afterward with their selected model, permissions, and interaction mode.Pylon previously rejected these messages in the pure decider because compaction still owned the pending turn admission. The port adds a durable queue and correlated internal completion/resume receipts, preserving exact admission and provider-incarnation checks. Provider snapshots cannot erase the queue; only the queued admission's validated session bind can move it to a new provider incarnation during a settings transition. Stop and interrupt cancel unsent entries, while failure and restart leave explicit per-message explanations. An interrupted in-flight send is labeled as uncertain delivery rather than replayed automatically. Slow compaction startup uses the existing bind-pending CAS so a late provider cannot overwrite Stop.
Prime Agent's native compact/abort controls, provider availability gates, and rollback fences remain authoritative. The new queue applies to the shared slash-command compaction path across local, remote, relay, and tunnel clients; it adds no provider-specific protocol behavior.
Upstream cycle #497, frozen range
6c583620ff7ad3235b135af7107c0543467eecfa..4a4c6dd2adc350a68ba18bb28b24b5a7e4660dab:ef6fa118749572da1905eca5d0543d1e98f0b1b2— preserve drafts when compacting context (#11103), adapted to Pylon's settings and source-epoch APIs.57aee3e19f1910f3323f06384bb2a1d02b79e369— queue messages during context compaction (#11107), adapted to the persisted decider/admission architecture rather than a reactor-only memory map.Migration 059 from merged #510 precedes compaction migration 060. This branch is rebased onto Pylon after #510 and #511.
Validation: 377 focused tests across reactor, decider, lifecycle, projection, engine, migration, contracts, and web dispatch logic; typechecks for server, contracts, shared, client-runtime, web, desktop, and mobile; scoped lint and formatting; frozen install. Regression cases cover FIFO settings, single projected bubbles, stale provider snapshots/completion, stop before send and during slow session startup, and restart cancellation. Independent adversarial review is approved; CI is pending on the final rebased head.
Upstream UI recording demonstrates preserved draft/cursor behavior in T3. This is upstream evidence; no Pylon UI recording or manual provider/device session was captured for this port. Native Prime compaction is unchanged.
Implemented and reviewed with GPT-6 in Codex.