Skip to content

feat(discord): /pair worker·reviewer에 coordinationContext 배선 (AGT-4055) - #902

Open
unohee wants to merge 1 commit into
mainfrom
heewonoh/agt-4055-discord-coordination
Open

unohee wants to merge 1 commit into
mainfrom
heewonoh/agt-4055-discord-coordination

Conversation

@unohee

@unohee unohee commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

무엇

  • PairSession/CreatePairSessionOptions에 linearIssueId(Linear 이슈 UUID)를 추가했다. !pair start와, Linear 조회에 성공한 !pair run에서 채운다.
  • discordPair.ts에 pairCoordinationContext(session, role)을 추가하고 runWorker/runReviewer 호출에 coordinationContext로 넘긴다.
  • coordinationContextFor의 인자 타입을 CoordinationSubject(task id 3종, projectPath, runMetadata)로 좁혔다. PipelineContext는 그대로 만족하므로 pairPipeline 쪽 호출은 바뀌지 않는다.

설계 결정 (DoD 1·2)

  1. 이슈가 없는 세션의 신원: 합성 taskId를 만들지 않고 coordinationContext를 아예 주지 않는다. 아무도 그 주소로 보내지 않으므로 합성 id는 쓸모가 없다. 이슈가 있으면 데몬 파이프라인과 같은 키(이슈 UUID)를 써서, 같은 이슈의 Discord 실행과 데몬 실행이 보드에서 같은 참가자가 된다.
  2. Discord 스레드 가시성: v1은 보드(대시보드/CLI) 전용이다. coordination_publish를 스레드로 에코하지 않는다. 스레드 에코는 필요하면 후속으로 한다.

왜

AGT-4054(#445)의 inbox nudge·가이드 프롬프트·coordination 도구가 Discord /pair 흐름에서는 동작하지 않았다. 이 흐름은 pairPipeline을 거치지 않고 worker/reviewer를 직접 부르기 때문이다.

검증

  • 신규 src/discord/discordPair.coordination.test.ts 5건: 이슈 없음 → undefined, UUID 키·identifier 라벨, 역할별 handle 안정성, !pair run에서 worker/reviewer 양쪽 전달, 조회 실패 시 미전달
  • tsc --noEmit -p tsconfig.check.json 통과, oxlint 0
  • src/discord src/agents src/coordination 109 files / 1504 tests 통과

…iewer (AGT-4055)

The Discord /pair flow calls runWorker/runReviewer directly and never built a
coordinationContext, so the AGT-4054 inbox nudge, guidance prompt and
coordination tools were inert there.

- PairSession carries the Linear issue UUID when the session is backed by a
  real issue (!pair start, and !pair run when the lookup resolves).
- pairCoordinationContext() derives the board identity with the pipeline's
  own coordinationContextFor, keyed by the issue UUID like the daemon, so a
  Discord run and a daemon run on one issue are the same participants.
- Sessions with no issue behind them get no coordination tools rather than a
  synthetic id nobody would address.
- coordinationContextFor now takes a narrower CoordinationSubject (task ids,
  projectPath, runMetadata); PipelineContext still satisfies it.
- v1 visibility is board-only: publishes are not echoed into the thread.
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