Repository navigation
fix(discord): bind transcript capture to source account [AI] - #118579
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 2:43 PM ET / 18:43 UTC. ClawSweeper reviewWhat this changesThe PR carries the trusted Discord account into transcript operations, binds capture and lifecycle control to it, and adds provider-level ownership authorization plus recovery handling for historical sessions. Merge readinessThis PR remains necessary: current main lets a model-provided account select the Discord voice manager. Its core approach is appropriate, but the new public provider authorization and persisted ownership contract needs explicit SDK/security-owner acceptance before merge. Priority: P1 Review scores
Verification
How this fits togetherThe transcript tool converts agent requests into persisted sessions and provider start/stop calls. Discord supplies the account-specific voice manager, so trusted inbound account context must constrain both manager selection and later lifecycle actions. flowchart LR
A[Discord inbound turn] --> B[Trusted account context]
B --> C[Transcript tool]
C --> D[Provider ownership policy]
D --> E[Persisted session owner]
E --> F[Discord voice manager]
Decision needed
Why: This determines a durable third-party plugin authority boundary and historical session-access policy that code review cannot choose unilaterally. Before merge
Findings
Agent review detailsSecurityNeeds attention: The intended behavior is security hardening, but the new public provider authorization surface needs explicit security-owner acceptance before merge. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Explicitly approve the generic provider ownership contract and its documented local recovery policy, then merge only the coherent changes needed to enforce trusted account binding across transcript creation and lifecycle control. Do we have a high-confidence way to reproduce the issue? Yes, at source level: a Discord-origin turn for account A can request Is this the best way to solve the issue? Unclear: binding trusted ingress identity at the core-to-provider boundary is the correct repair shape, but the public SDK and historical-session policy need explicit owner acceptance before this can be called the best permanent solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1db88feeef05. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What 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 (63 earlier review cycles; latest 8 shown)
|
|
ClawSweeper proof for current head a009f3b0574d15b2e4334983ba6c4173d5423592 Behavior proved: a Discord-origin agent turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility/operator note: same-channel capture is bound to the inbound account. Explicit account selection for a different provider channel remains unchanged. Live gaps: no private Discord token or live guild was used. The external manager calls were stubbed, while the account-binding decision, persistence, and Discord provider manager selection were exercised from production modules. |
3 similar comments
|
ClawSweeper proof for current head a009f3b0574d15b2e4334983ba6c4173d5423592 Behavior proved: a Discord-origin agent turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility/operator note: same-channel capture is bound to the inbound account. Explicit account selection for a different provider channel remains unchanged. Live gaps: no private Discord token or live guild was used. The external manager calls were stubbed, while the account-binding decision, persistence, and Discord provider manager selection were exercised from production modules. |
|
ClawSweeper proof for current head a009f3b0574d15b2e4334983ba6c4173d5423592 Behavior proved: a Discord-origin agent turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility/operator note: same-channel capture is bound to the inbound account. Explicit account selection for a different provider channel remains unchanged. Live gaps: no private Discord token or live guild was used. The external manager calls were stubbed, while the account-binding decision, persistence, and Discord provider manager selection were exercised from production modules. |
|
ClawSweeper proof for current head a009f3b0574d15b2e4334983ba6c4173d5423592 Behavior proved: a Discord-origin agent turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility/operator note: same-channel capture is bound to the inbound account. Explicit account selection for a different provider channel remains unchanged. Live gaps: no private Discord token or live guild was used. The external manager calls were stubbed, while the account-binding decision, persistence, and Discord provider manager selection were exercised from production modules. |
|
ClawSweeper proof for current head cbd4b406056d5113ecf0d40725228d56696a4c9b Behavior proved: a Discord-origin agent turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility/operator note: Discord explicitly declares its inbound account namespace. Same-channel capture is bound to the inbound account, while lookup aliases and explicit account selection for other provider channels remain unchanged. The effective account is returned in the tool result. Live gaps: no private Discord token or live guild was used. The external manager calls were stubbed, while the account-binding decision, persistence, and Discord provider manager selection were exercised from production modules. |
2 similar comments
|
ClawSweeper proof for current head cbd4b406056d5113ecf0d40725228d56696a4c9b Behavior proved: a Discord-origin agent turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility/operator note: Discord explicitly declares its inbound account namespace. Same-channel capture is bound to the inbound account, while lookup aliases and explicit account selection for other provider channels remain unchanged. The effective account is returned in the tool result. Live gaps: no private Discord token or live guild was used. The external manager calls were stubbed, while the account-binding decision, persistence, and Discord provider manager selection were exercised from production modules. |
|
ClawSweeper proof for current head cbd4b406056d5113ecf0d40725228d56696a4c9b Behavior proved: a Discord-origin agent turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility/operator note: Discord explicitly declares its inbound account namespace. Same-channel capture is bound to the inbound account, while lookup aliases and explicit account selection for other provider channels remain unchanged. The effective account is returned in the tool result. Live gaps: no private Discord token or live guild was used. The external manager calls were stubbed, while the account-binding decision, persistence, and Discord provider manager selection were exercised from production modules. |
|
Behavior proof for current head 602c8be353321616c466e70d2a7e3b57ee9eca19 Behavior proved: a Discord-origin turn for Environment: local PR checkout on the exact head. The harness invoked the real Command/artifact:
Evidence:
Compatibility note: same-channel lifecycle actions require the bound account. Same-agent CLI/webchat management, lookup aliases, and explicit accounts for other provider channels remain unchanged. The effective account is model-visible in the tool result. Live gap: no private Discord token or live guild was available. External manager methods were stubbed; account binding, persistence, lifecycle authorization, Copilot propagation, and Discord manager selection ran through production modules. |
|
Behavior proof for current head 602c8be353321616c466e70d2a7e3b57ee9eca19 Behavior proved: a Discord-origin turn for Environment: local PR checkout on the exact head. Two complementary harnesses were used. The production-adapter harness invoked the real Command/artifact:
Evidence:
Compatibility note: same-channel lifecycle actions require the bound account. Same-agent CLI/webchat management, lookup aliases, and explicit accounts for other provider channels remain unchanged. The effective account is model-visible in the tool result. Live gap: no private Discord token or live guild was available. AWS runner capacity preflight was ready, but the broker handoff required a new interactive GitHub OAuth login, so no remote lease was created. External Discord manager methods were stubbed; account binding, persistence, lifecycle authorization, Copilot propagation, Discord manager selection, and the denied/allowed agent turns ran through production modules and the repository's ephemeral Gateway QA infrastructure. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
What Problem This Solves
Discord voice transcript capture could honor a model-provided bot account instead of the account that received the active turn. In multi-account setups, that let one bot route a capture through another bot's voice manager.
Why This Change Was Made
accountOwnership: { channelId, resolveAccountId }.accountIdfor that path.User Impact
Discord-originated capture stays on the bot account that received the turn. Channel-less local capture and configured auto-start may use an explicit capable account, the sole capable account, or a capable configured default; otherwise multiple capable accounts require
accountId. Historical rows without complete ownership metadata remain recoverable only through the documented local path.Maintainer Decision
Accept the public
openclaw/plugin-sdk/transcriptsownership contract added by this PR. Its complete surface isaccountOwnership: { channelId, resolveAccountId }. Core owns generic trusted-account binding and lifecycle enforcement; Discord owns capability and canonical-account resolution.Current starts and imports record authoritative ownership when the session is created. No historical ownership inference or Doctor-based ownership repair is included; incomplete ownership is not guessed or rewritten. The change uses the existing transcript metadata JSON and does not change the SQLite schema version.
Current-Head Verification
mainand resolved the 22 generated Plugin SDK baseline conflicts in favor ofmain's deletion; no deleted baseline is reintroduced by the PR.git diff --check origin/main...HEADpasses.git merge-tree --write-tree origin/main HEADreports no conflicts.AI-assisted implementation and validation.