Skip to content

feat(proto): add traceparent to SteerControl/DeliverControl for trace continuity (RIG-2508) - #694

Open
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-server/rig-2508-t4-traceparent-proto
Open

feat(proto): add traceparent to SteerControl/DeliverControl for trace continuity (RIG-2508)#694
rigel-mintaka wants to merge 1 commit into
mainfrom
compass-server/rig-2508-t4-traceparent-proto

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

T4 (partial) of the message->turn trace-continuity record: the agent.proto
half of the cross-lane wire contract. Adds an additive proto3 string traceparent to SteerControl (field 3) and DeliverControl (field 4) so the
Server can denormalize its active-span W3C traceparent onto the inbound
control, letting the agent join its turn to the message's server-side trace
(creation -> routing -> delivery -> turn -> tool calls, one connected trace) --
mirroring the from_handle denorm (RIG-2486 T1). W3C format; empty when the
Server has no active span (trace machinery never blocks a delivery).

Buf-breaking-safe additive fields, internal-only (gen-fence clean). Regenerates
the internal Go and agent TS lanes. Server-side stamping + the compass.proto
SessionInjection / agent_gateway.proto trigger_traceparent seam land as a
follow-up. Unblocks compass-agent T3 (RIG-2871) wire decode.

Record: docs/designs/platform/compass-agent-message-trace-continuity/design.md

Co-authored-by: Matt Wilkinson matt@rigel.build

… continuity (RIG-2508)

T4 (partial) of the message->turn trace-continuity record: the agent.proto
half of the cross-lane wire contract. Adds an additive proto3 `string
traceparent` to SteerControl (field 3) and DeliverControl (field 4) so the
Server can denormalize its active-span W3C traceparent onto the inbound
control, letting the agent join its turn to the message's server-side trace
(creation -> routing -> delivery -> turn -> tool calls, one connected trace) --
mirroring the from_handle denorm (RIG-2486 T1). W3C format; empty when the
Server has no active span (trace machinery never blocks a delivery).

Buf-breaking-safe additive fields, internal-only (gen-fence clean). Regenerates
the internal Go and agent TS lanes. Server-side stamping + the compass.proto
SessionInjection / agent_gateway.proto trigger_traceparent seam land as a
follow-up. Unblocks compass-agent T3 (RIG-2871) wire decode.

Record: docs/designs/platform/compass-agent-message-trace-continuity/design.md

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Aug 27, 2026

Copy link
Copy Markdown

RIG-2508

@github-actions

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-server-rig-2508-t4-t.compass-eng-docs.pages.dev

Deployed from compass-server/rig-2508-t4-traceparent-proto at d7a2071.

rigel-mintaka added a commit that referenced this pull request Aug 28, 2026
…(RIG-2891)

T4 completion of the T4b trace-continuity record `docs/designs/platform/compass-server-runner-otel/design.md` (RIG-2685): the two remaining additive proto3 fields of the cross-lane trace-continuity contract, after the agent.proto control-op pair (SteerControl.traceparent=3 / DeliverControl.traceparent=4) that #694 already carries.

**Public observation (OQ2 = yes)** — `SessionInjection.traceparent` (`compass.proto`, field 4): the Server's active-span W3C `traceparent`, denormalized onto the SubscribeAgentSession observation so a subscriber joins the injection to the message's server-side trace. An additive string scalar beside `from_handle` (a W3C trace-context token, not an identifier); empty when the Server had no active span. This is the public-API leg — a new DL row (DL-282) records Matt's OQ2 ruling, since the platform record stayed `Ledger-impact: none`.

**Causal-link source** — `CommsCallRequest.trigger_traceparent` (`agent_gateway.proto`, field 10): the delivered message's `traceparent`, re-attached by the agent on an outbound call so the Server links the reply's fresh trace back to its trigger (a trace terminates at the turn; a reply is a new causally-linked root, never an unbounded child span). Empty on a human-seeded first turn. Field 10 leaves 7-9 for the in-flight org-management oneof arms (RIG-2673); numbers are frozen (DL-186 / OQ-1b), so 10 is stable.

Pure-additive proto3, buf-breaking-safe (the breaking gate is removed pre-dogfood, SEA-1922); `moon run compass-proto:gen` regenerates the public Go (`go/gen`), internal Go (`go/internal/gen`), and both TS lanes (`compass-agent`, `compass-client`). Generated accessors `GetTraceparent()` / `GetTriggerTraceparent()` compile.

Verification: `compass-proto:gen`/`drift`/`gen-fence`/`lint` pass, `go build ./...` + `go vet ./...` clean, `compass-agent` + `compass-client` typecheck clean, `design-ledger-gate` green (DL-282 anchor resolves, no duplicate). Rebased onto current main; the ledger row is DL-282 (main's DL-279/280 test-harness rows and DL-281 board-ingestion row landed since first submit).

Unblocks compass-agent RIG-2871 (T3 decode/emit) — regen against this once merged. Server-side stamping/link logic (T5, RIG-2892) is the follow-up that populates these fields.

Spec-impact: none. Refs RIG-2891, RIG-2685

Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka added a commit that referenced this pull request Aug 28, 2026
…(RIG-2891)

T4 completion of the T4b trace-continuity record `docs/designs/platform/compass-server-runner-otel/design.md` (RIG-2685): the two remaining additive proto3 fields of the cross-lane trace-continuity contract, after the agent.proto control-op pair (SteerControl.traceparent=3 / DeliverControl.traceparent=4) that #694 already carries.

**Public observation (OQ2 = yes)** — `SessionInjection.traceparent` (`compass.proto`, field 4): the Server's active-span W3C `traceparent`, denormalized onto the SubscribeAgentSession observation so a subscriber joins the injection to the message's server-side trace. An additive string scalar beside `from_handle` (a W3C trace-context token, not an identifier); empty when the Server had no active span. This is the public-API leg — a new DL row (DL-283) records Matt's OQ2 ruling, since the platform record stayed `Ledger-impact: none`.

**Causal-link source** — `CommsCallRequest.trigger_traceparent` (`agent_gateway.proto`, field 10): the delivered message's `traceparent`, re-attached by the agent on an outbound call so the Server links the reply's fresh trace back to its trigger (a trace terminates at the turn; a reply is a new causally-linked root, never an unbounded child span). Empty on a human-seeded first turn. Field 10 leaves 7-9 for the in-flight org-management oneof arms (RIG-2673); numbers are frozen (DL-186 / OQ-1b), so 10 is stable.

Pure-additive proto3, buf-breaking-safe (the breaking gate is removed pre-dogfood, SEA-1922); `moon run compass-proto:gen` regenerates the public Go (`go/gen`), internal Go (`go/internal/gen`), and both TS lanes (`compass-agent`, `compass-client`). Generated accessors `GetTraceparent()` / `GetTriggerTraceparent()` compile.

Verification: `compass-proto:gen`/`drift`/`gen-fence`/`lint` pass, `go build ./...` + `go vet ./...` clean, `compass-agent` + `compass-client` typecheck clean, `design-ledger-gate` green (DL-283 anchor resolves, no duplicate). Rebased onto current main `9755815f`; the ledger row is DL-283 — the DL-279/280 test-harness rows, DL-281 board-ingestion, and DL-282 GTK4-shell rows all landed since first submit, so the traceparent row settled at the next free number.

Unblocks compass-agent RIG-2871 (T3 decode/emit) — regen against this once merged. Server-side stamping/link logic (T5, RIG-2892) is the follow-up that populates these fields.

Spec-impact: none. Refs RIG-2891, RIG-2685

Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka added a commit that referenced this pull request Aug 28, 2026
…(RIG-2891)

T4 completion of the T4b trace-continuity record `docs/designs/platform/compass-server-runner-otel/design.md` (RIG-2685): the two remaining additive proto3 fields of the cross-lane trace-continuity contract, after the agent.proto control-op pair (SteerControl.traceparent=3 / DeliverControl.traceparent=4) that #694 already carries.

**Public observation (OQ2 = yes)** — `SessionInjection.traceparent` (`compass.proto`, field 4): the Server's active-span W3C `traceparent`, denormalized onto the SubscribeAgentSession observation so a subscriber joins the injection to the message's server-side trace. An additive string scalar beside `from_handle` (a W3C trace-context token, not an identifier); empty when the Server had no active span. This is the public-API leg — a new DL row (DL-283) records Matt's OQ2 ruling, since the platform record stayed `Ledger-impact: none`.

**Causal-link source** — `CommsCallRequest.trigger_traceparent` (`agent_gateway.proto`, field 10): the delivered message's `traceparent`, re-attached by the agent on an outbound call so the Server links the reply's fresh trace back to its trigger (a trace terminates at the turn; a reply is a new causally-linked root, never an unbounded child span). Empty on a human-seeded first turn. Field 10 leaves 7-9 for the in-flight org-management oneof arms (RIG-2673); numbers are frozen (DL-186 / OQ-1b), so 10 is stable.

Pure-additive proto3, buf-breaking-safe (the breaking gate is removed pre-dogfood, SEA-1922); `moon run compass-proto:gen` regenerates the public Go (`go/gen`), internal Go (`go/internal/gen`), and both TS lanes (`compass-agent`, `compass-client`). Generated accessors `GetTraceparent()` / `GetTriggerTraceparent()` compile.

Verification: `compass-proto:gen`/`drift`/`gen-fence`/`lint` pass, `go build ./...` + `go vet ./...` clean, `compass-agent` + `compass-client` typecheck clean, `design-ledger-gate` green (DL-283 anchor resolves, no duplicate). Rebased onto current main `9755815f`; the ledger row is DL-283 — the DL-279/280 test-harness rows, DL-281 board-ingestion, and DL-282 GTK4-shell rows all landed since first submit, so the traceparent row settled at the next free number.

Unblocks compass-agent RIG-2871 (T3 decode/emit) — regen against this once merged. Server-side stamping/link logic (T5, RIG-2892) is the follow-up that populates these fields.

Spec-impact: none. Refs RIG-2891, RIG-2685

Co-authored-by: Matt Wilkinson <matt@rigel.build>
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.

2 participants