Skip to content

feat(linearagent): responder routing + async dispatcher (RIG-2717 T4/T6) - #646

Open
rigel-mintaka wants to merge 1 commit into
compass-server/rig-2717-serverfrom
compass-server/rig-2717-routing-dispatch
Open

feat(linearagent): responder routing + async dispatcher (RIG-2717 T4/T6)#646
rigel-mintaka wants to merge 1 commit into
compass-server/rig-2717-serverfrom
compass-server/rig-2717-routing-dispatch

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 3 PRs:

  1. main
  2. feat(linearagent): Linear Agent Session webhook types + API client (RIG-2717 T1/T2) #638
  3. feat(server): per-deployment public URL + deep-link builder (RIG-2717 T5) #639
  4. "feat(linearagent): responder routing + async dispatcher (RIG-2717 T4/T6)" (this PR)

T4 (routing.go): ResolveResponder maps a verified SessionEvent to the stable Manager + home channel via the recorded DL-055 ownership index (AuthoredArtifactByCoordinate), walking the recorded authoring agent to its owning Manager; unstamped issue or bare @mention falls back to the supervisor + dedicated routing channel. Never parses routing from forge text (DL-050/DL-094). Two narrow seams: OwnershipIndex (*store.Store satisfies) + ManagerResolver (agent-tree walk, wired at assembly).

T6 (dispatcher.go): a single-goroutine drain of a bounded event channel. created -> resolve -> ensure @linear membership -> get-or-create topic -> upsert association -> ack thought + external-URL deep link (the 10s SLA leg, before the post) -> promptContext post with client_request_id="linear-delivery:". prompted -> follow-up post into the recorded topic (miss synthesizes via the resolver). No relay. A per-event failure (incl. a recovered panic) emits an error activity and the loop never crashes; a full queue returns ErrQueueFull -> 500 so Linear retries.

Injected seams only (CommsPoster, Memberships, Topics, Associations, Client, DeepLinkFor) so the package never imports go/server. Assembly note: Topics.GetOrCreateTopic has no landed concrete store backer yet (only the unexported resolveTopicForAppend) — T7 wires it.

Ref: RIG-2717

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

T4 (routing.go): ResolveResponder maps a verified SessionEvent to the stable Manager + home channel via the recorded DL-055 ownership index (AuthoredArtifactByCoordinate), walking the recorded authoring agent to its owning Manager; unstamped issue or bare @mention falls back to the supervisor + dedicated routing channel. Never parses routing from forge text (DL-050/DL-094). Two narrow seams: OwnershipIndex (*store.Store satisfies) + ManagerResolver (agent-tree walk, wired at assembly).

T6 (dispatcher.go): a single-goroutine drain of a bounded event channel. created -> resolve -> ensure @linear membership -> get-or-create topic -> upsert association -> ack thought + external-URL deep link (the 10s SLA leg, before the post) -> promptContext post with client_request_id="linear-delivery:<uuid>". prompted -> follow-up post into the recorded topic (miss synthesizes via the resolver). No relay. A per-event failure (incl. a recovered panic) emits an error activity and the loop never crashes; a full queue returns ErrQueueFull -> 500 so Linear retries.

Injected seams only (CommsPoster, Memberships, Topics, Associations, Client, DeepLinkFor) so the package never imports go/server. Assembly note: Topics.GetOrCreateTopic has no landed concrete store backer yet (only the unexported resolveTopicForAppend) — T7 wires it.

Ref: RIG-2717

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

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

RIG-2717

@github-actions

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-server-rig-2717-rout.compass-eng-docs.pages.dev

Deployed from compass-server/rig-2717-routing-dispatch at ccaa1d7.

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.

1 participant