fix: unify SCM audience and echo routing - #2124
Conversation
yuezengwu
left a comment
There was a problem hiding this comment.
Implementation goal and core changes: this PR centralizes SCM audience composition around the exact (humanAgentId, wakeAgentId) pair, preserves distinct existing/legacy routes, carries strict personnel target-chat intent through GitHub persistence, keeps provider-task capability data discriminated, and changes actor echo handling so cards remain in chat while only the matching line's wake is suppressed. The core implementation is coherent, and I did not find a code-level defect in the reviewed diff.
Blocking governance issue: the current decision-locked Context Tree contract has not been reconciled with these behavior changes. system/cloud/automation/github-webhook-routing.md still says actor-owned entries are pruned before delivery and a self-only chat receives no card (S7/S11), while this PR deliberately writes a silent card. Its S2 target wording also still describes human-scoped existing-line reuse, while this PR moves authority to the exact human/wake pair and creates a strict current-delegate line when only a same-human/different-wake carrier line exists. decisionLocksCode: true means the existing Tree contract wins until the owners approve a replacement.
Please land the companion Context Tree reconciliation (and ensure both the GitHub-specific and provider-neutral SCM nodes state the same settled contract), then re-request review. There are no schema or migration changes, but the core in-memory routing data structures and delivery semantics changed, so this needs explicit human-owner inspection before merge.
I did not run tests per review scope. The current Test Server CI failure is a Docker pull failure, not a product-test failure.
Summary
(humanAgentId, wakeAgentId)personnel authority while preserving distinct existing and legacy routesValidation
pnpm exec vitest run --maxWorkers=2 --reporter=dotinpackages/server(257 files, 2923 tests)pnpm typecheck(11/11 tasks)pnpm check(passes with 16 existing warnings and 1 info)git diff --checkFormal cross-surface QA is warranted for production webhook delivery, but was not started as part of this implementation task.
Scope
message.tsbehavior changes