From e064779fd54e82221fd52cd148ecd9775ec05141 Mon Sep 17 00:00:00 2001 From: mintaka Date: Wed, 2 Sep 2026 23:50:29 -0400 Subject: [PATCH] fix(design): renumber colliding ledger ids DL-319/DL-320 to DL-322/DL-323 A concurrent-merge window landed two records claiming the same ledger ids: #836 (RIG-2616 error/abort surfacing) allocated DL-318/319/320 off a pre-#833 main, but #833 (RIG-3139 embedded-revival), merged first, already held DL-319/320/321. The double-booked DL-319/320 fail design-ledger-gate:check on main ("duplicate ledger id"), which fail-fast-cancels the whole moon(bun) battery and blocks every open PR in the repo. Renumber this record's two rows to the next free ids (max on main is 321): DL-319 to DL-322 (emit rule), DL-320 to DL-323 (FrameSink never-drop routing). DL-318 is unchanged; #833's ids are load-bearing supersede pointers and stay put. Also annotates the frozen record header with the mapping (annotate-don't-rewrite house rule). Byte-identical to the ledger hunks already carried by #850 (RIG-2616 T2); landing it standalone on main unblocks the fleet ahead of the stack. Ledger-impact: renumber DL-319 to DL-322 (emit rule) and DL-320 to DL-323 (FrameSink never-drop routing); no new rows. Co-authored-by: Matt Wilkinson --- docs/designs/DECISIONS.md | 4 ++-- .../agent/compass-agent-error-abort-surfacing/design.md | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/designs/DECISIONS.md b/docs/designs/DECISIONS.md index c5cd34d1..f92a973b 100644 --- a/docs/designs/DECISIONS.md +++ b/docs/designs/DECISIONS.md @@ -429,5 +429,5 @@ check enforces the mechanical half. Full rationale: | DL-303 | The public `SessionInjection.traceparent` field (`compass.proto`, field 4) exposes the Server's active-span W3C `traceparent` on the SubscribeAgentSession observation surface, so a public subscriber can join a SessionInjection to the message's server-side trace (Matt ruled OQ2 = yes at the T4b freeze gate). Additive string scalar beside `from_handle` (a W3C trace-context token `00---`, not an identifier); EMPTY when the Server had no active span; trace machinery never blocks or fails a delivery. The internal control-op (`agent.proto` SteerControl/DeliverControl) and causal-link (`agent_gateway.proto` CommsCallRequest.trigger_traceparent) legs are internal-tree, not a public-API decision | Active (Matt, 2026-08-27) | [server+runner OTel §T4](observability/compass-server-runner-otel/design.md#t4--trace-proto-fields-control-ops-public-observation-causal-link-stacked-seam) | | DL-310 | SubscribeAgentSession sends a leading zero-payload registration-ack frame (existing AgentSessionFrame, session_id only, no event, UNSPECIFIED state) immediately after subscribe() registers, before the live tail — mirroring SubscribeEvents' snapshotBoundary / SubscribeComms' commsSnapshotBoundary. It makes "open the tail before the post" a server-guaranteed happens-before, closing the idle-session drop where a driven injection races subscribe() and fans to zero subscribers (no replay ring). Not a replay/resync/reattach — the ack carries no history (RIG-3044, e2e flake TestLegThreeFourSpawnAndMessaging). | Active (Matt, 2026-08-31) | [first-turn delivery](agent/compass-first-turn-delivery/design.md) | | DL-318 | Pre-stream/inner error and abort content surface on the session trace as a dedicated `SessionError` message (`compass.v1.SessionEvent` oneof field 10) with a `SessionErrorKind` discriminator (ERROR \| ABORTED), a failure `message`, and an optional HTTP `status` — not `SessionNotice`, not a comms `Message` block (RIG-2616) | Active (Matt, 2026-09-02) | [error/abort surfacing](agent/compass-agent-error-abort-surfacing/design.md) | -| DL-319 | Error/abort emit rule: `reason=error` emits `SessionError(ERROR)` AND the existing `ERRORED` lifecycle transition (additive — board/presence/delivery key off `ERRORED`); `reason=aborted` emits `SessionError(ABORTED)` with NO lifecycle transition (abort is not a crash) and replaces the prior counted-`UnmappedEvent` staging | Active (Matt, 2026-09-02) | [error/abort surfacing](agent/compass-agent-error-abort-surfacing/design.md) | -| DL-320 | The `SessionError` trace frame rides the FrameSink never-drop PRIORITY lane (not the bounded drop-oldest trace queue), via an `isSessionError` classifier extending the `frame-sink.ts` priority predicate — matching the `SessionInjection` never-drop carve-out, so surfaced failure content is as durable-on-the-spine as the lifecycle transition it reports | Active (Matt, 2026-09-02) | [error/abort surfacing](agent/compass-agent-error-abort-surfacing/design.md) | +| DL-322 | Error/abort emit rule: `reason=error` emits `SessionError(ERROR)` AND the existing `ERRORED` lifecycle transition (additive — board/presence/delivery key off `ERRORED`); `reason=aborted` emits `SessionError(ABORTED)` with NO lifecycle transition (abort is not a crash) and replaces the prior counted-`UnmappedEvent` staging | Active (Matt, 2026-09-02) | [error/abort surfacing](agent/compass-agent-error-abort-surfacing/design.md) | +| DL-323 | The `SessionError` trace frame rides the FrameSink never-drop PRIORITY lane (not the bounded drop-oldest trace queue), via an `isSessionError` classifier extending the `frame-sink.ts` priority predicate — matching the `SessionInjection` never-drop carve-out, so surfaced failure content is as durable-on-the-spine as the lifecycle transition it reports | Active (Matt, 2026-09-02) | [error/abort surfacing](agent/compass-agent-error-abort-surfacing/design.md) | diff --git a/docs/designs/agent/compass-agent-error-abort-surfacing/design.md b/docs/designs/agent/compass-agent-error-abort-surfacing/design.md index 32ba8d08..474466ea 100644 --- a/docs/designs/agent/compass-agent-error-abort-surfacing/design.md +++ b/docs/designs/agent/compass-agent-error-abort-surfacing/design.md @@ -5,6 +5,13 @@ Status: Active Refs: RIG-2616 (parent RIG-974). Surface: compass-agent event mapper + `compass.v1` session-trace contract. +> Ledger-id note (post-freeze, annotate-don't-rewrite): a concurrent-merge +> window allocated this record's emit-rule and never-drop-routing ledger rows +> the same DL ids as an earlier-dated UI record. They were renumbered on +> `DECISIONS.md` to keep ids unique: **DL-319 → DL-322** (emit rule), +> **DL-320 → DL-323** (FrameSink never-drop routing). DL-318 is unchanged. The +> in-body citations below read as point-in-time; the ledger rows are canonical. + ## Problem / Intent An inner-stream failure or a deliberate abort reaches the compass-agent event