Repository navigation
fix(channels): honor supported account reply-threading policies - #129679
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 10:46 PM ET / August 26, 2026, 02:46 UTC. ClawSweeper reviewWhat this changesThe PR allows Feishu, IRC, and Nextcloud Talk to accept reply-threading settings at channel and named-account scope, with account policy overriding the channel default. Merge readinessNo blocking correctness or security defect was found. Keep this maintainer-labeled PR open for exact-head checks and maintainer confirmation of the additive multi-account configuration contract. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherOutbound reply preparation reads the routed channel, account, and chat type, then resolves whether to keep a reply reference. Strict plugin schemas must accept the same policy that the shared reply-threading resolver consumes. flowchart LR
A[Channel configuration] --> B[Strict plugin schema]
B --> C[Account policy lookup]
C --> D[Reply-threading resolver]
D --> E[Outbound reply payload]
E --> F[Channel transport]
Decision needed
Why: The patch changes configuration acceptance and precedence for existing multi-account operators; the protected maintainer label requires an explicit maintainer merge judgment. Before merge
Agent review detailsSecurityNone. PR surfaceSource +28, Tests +40, Docs +6, Generated 0. Total +74 across 14 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Retain one shared account-aware resolver and align only reply-capable channel schemas with it, while preserving the existing default when no account override is configured. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main’s generic resolver ignores account policy and the three strict schemas reject the setting; the focused owner test encodes the failing precedence cases, though this read-only review did not execute it. Is this the best way to solve the issue? Yes: resolving account policy in the shared fallback owner is preferable to adding channel-specific resolver copies, while strict schemas expose only the policy that those transports consume. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72adefbca06c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
0ff521f to
b1c0a1f
Compare
b1c0a1f to
99e8692
Compare
Co-authored-by: ayaangazali <[email protected]>
Co-authored-by: ayaangazali <[email protected]>
99e8692 to
69f914b
Compare
|
Merged via squash.
|
…claw#129679) * fix(channels): honor supported account reply-threading policies Co-authored-by: ayaangazali <[email protected]> * fix(channels): document valid account reply policies Co-authored-by: ayaangazali <[email protected]> --------- Co-authored-by: ayaangazali <[email protected]>
* origin/main: (24 commits) fix(gateway): reject rootless session permission modes (#128149) docs(memory): document shipped turn-taint propagation for network tool output (#129837) fix(ui): pool reply-less wake activity into one chat rollup (#128442) fix(package): prevent installs from deleting validated runtime assets (#129724) fix(nodes): approve silent initial node surfaces and name the pending surface approval (#129795) fix(backup): preserve configured agent state roots (#129773) fix(ui): own chat history issuance with a closed state machine (#129776) fix(cron): preserve cancellation reason after late finalization (#129331) fix(cron): prevent run waits from failing after clock changes (#129805) fix(telegram): route commentary through one frozen progress owner (#128259) fix(release): start approved VCR mirror recovery jobs (#129829) test: complete current-plugin-metadata-snapshot mock factories (#129791) test(telegram): remove duplicate reaction case (#129848) fix(channels): honor supported account reply-threading policies (#129679) refactor(cli): deduplicate lazy subcommand registration (#129351) fix(ai): report interrupted local-model streams instead of empty success (#129794) refactor(cli): consolidate Gateway fallback and hook ownership (#129802) fix(qa): reject token confidence lanes without executed evidence (#129830) fix(tui): fence session state and delayed actions (#129810) fix(control-ui): keep task progress full width on hover (#129832) ...
Related: #119030
What Problem This Solves
Fixes an issue where operators configuring reply threading for Feishu, IRC, or Nextcloud Talk would have otherwise valid channel settings rejected. Named-account threading settings could also silently inherit the channel-wide setting instead of honoring the account override.
Why This Change Was Made
The channel schemas now expose the existing reply mode only where the actual transport consumes it. The shared threading-policy owner resolves canonical account names and exhausts account-level policy before channel-level policy. Buzz, ClickClack, Tlon, and QA Channel are intentionally excluded because their inbound transports currently hardcode reply anchors, making that setting inert. This preserves the useful work from #119030 without introducing misleading settings or unrelated generated-baseline drift.
User Impact
Feishu, IRC, and Nextcloud Talk operators can control reply threading at channel or account scope. Scalar account overrides, human-form account names, and channel-wide defaults resolve consistently; existing defaults and unsupported channels do not change. Each affected channel now documents both configuration scopes.
Evidence
node scripts/run-vitest.mjs src/plugins/contracts/channel-reply-to-mode.contract.test.tspasses all three cases.all, human-form account/direct =all, a second account override =first, unknown-account fallback =off, and channel-only fallback =off. Before the owner fix, all three account cases incorrectly returned the channel-wideoffsetting.node --import tsx scripts/generate-bundled-channel-config-metadata.ts --checkpasses.Original proposal and foundational account-precedence work: @ayaangazali in #119030.