refactor(channels): migrate googlechat, imessage, and whatsapp group policy onto the scope tree#106830
refactor(channels): migrate googlechat, imessage, and whatsapp group policy onto the scope tree#106830steipete wants to merge 4 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 8:00 PM ET / July 14, 2026, 00:00 UTC. Summary PR surface: Source +130, Tests +498, Generated 0, Other +2. Total +630 across 12 files. Reproducibility: yes. Current main trims Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Preserve legacy group-ID normalization, complete the bundled migration behind one canonical resolver, then publish one documented Plugin SDK contract with compatibility tests and redacted live channel parity proof. Do we have a high-confidence way to reproduce the issue? Yes. Current main trims Is this the best way to solve the issue? No. Canonicalizing policy resolution is a good direction, but the safest solution must preserve normalization and avoid publishing a second public SDK path during a partial bundled migration. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 48817f6cea46. Label changesLabel justifications:
Evidence reviewedPR surface: Source +130, Tests +498, Generated 0, Other +2. Total +630 across 12 files. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
5eee430 to
f8ceb04
Compare
…policy onto the scope tree
f8ceb04 to
2ce5b63
Compare
What Problem This Solves
First channel batch of the group-policy scope normalization (stage 2). Google Chat, iMessage, and WhatsApp resolved group
requireMention/tool policy through the older generic resolver with per-channel plumbing; this migrates them onto the canonical ScopeTree resolvers so every channel converges on one resolution model before the custom-walker channels (discord, telegram, msteams, …) migrate and their ~600 LOC of private walkers get deleted.Why This Change Was Made
Depends on #106819 (ScopeTree core resolver — this branch stacks on it). These three are pure delegates, so they prove the migration pattern at minimal risk. A shared
buildChannelGroupsScopeTree(cfg, channel, accountId)builder was added to core because 13+ channels share the flatgroupsconfig shape (wildcard"*"→ defaults node, exact keys → scopes); richer channels will ship their own builders. Account scoping stays core-owned viaresolveChannelGroups, preserving the single-account empty-groups:{}fallback quirk.User Impact
None — behavior parity: exact-group hit, wildcard fallback, account-level groups overriding root, sender-scoped tool policy (explicit
messageProvidermatches the old resolver's default), and defaulttrue/undefinedwhen nothing is configured. Each plugin's group-policy module ended smaller than before (17/40/40 lines vs 18/41/41).Evidence
pnpm test src/config/group-scope-tree.test.ts src/config/group-policy.test.ts extensions/googlechat extensions/imessage extensions/whatsappall green;check:changedlanes green with the regenerated Plugin SDK API baseline hash committed.