feat(linearagent): responder routing + async dispatcher (RIG-2717 T4/T6) - #646
Open
rigel-mintaka wants to merge 1 commit into
Open
Conversation
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>
This was referenced Aug 26, 2026
|
Compass engineering docs preview: https://compass-server-rig-2717-rout.compass-eng-docs.pages.dev Deployed from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of a stack containing 3 PRs:
mainT4 (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