Skip to content

fix: unify SCM audience and echo routing - #2124

Open
baixiaohang wants to merge 1 commit into
mainfrom
fix/shared-scm-audience-actor-echo
Open

fix: unify SCM audience and echo routing#2124
baixiaohang wants to merge 1 commit into
mainfrom
fix/shared-scm-audience-actor-echo

Conversation

@baixiaohang

Copy link
Copy Markdown
Collaborator

Summary

  • centralize SCM audience composition around exact (humanAgentId, wakeAgentId) personnel authority while preserving distinct existing and legacy routes
  • carry discriminated target-chat intent through GitHub persistence so strict personnel lines cannot fall back to another delegate's human-scoped mapping
  • keep actor-echo cards in chat while suppressing only matching-line wakes, and move GitHub App Task data behind an opaque provider-task context
  • update GitHub/GitLab parity coverage and the reusable cross-surface QA case

Validation

  • targeted SCM, provider-adapter parity, target-chat, echo, and App Task suites (including an 8-file / 210-test pass and final adapter-specific reruns)
  • pnpm exec vitest run --maxWorkers=2 --reporter=dot in packages/server (257 files, 2923 tests)
  • pnpm typecheck (11/11 tasks)
  • pnpm check (passes with 16 existing warnings and 1 info)
  • git diff --check

Formal cross-surface QA is warranted for production webhook delivery, but was not started as part of this implementation task.

Scope

  • no generic message.ts behavior changes
  • no schema or migration changes
  • no lifecycle, delivery-claim, cleanup, or orphan-chat reliability changes
  • no merge requested; Context Tree reconciliation is required before merge because the GitHub routing node is decision-locked

@baixiaohang
baixiaohang requested a review from yuezengwu as a code owner July 31, 2026 10:52

@yuezengwu yuezengwu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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