Repository navigation
feat: link Discord accounts from personal profiles - #188910
Conversation
Add browser-bound self-service Discord identity proof through the canonical profile link owner. Preserve verified members’ existing operator scopes in channel runs without granting command ownership. Co-authored-by: VACInc <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: hannesrudolph <[email protected]>
Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 82bf828a-5307-451d-bca5-5420ed98c3db
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 4f3d942d-d6a7-4f4d-8cde-3b6f7b66fbf1
Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]>
|
Codex review: needs maintainer review before merge. What this changesAdds Discord account linking to Profile and preserves verified linked members’ existing operator permissions in channel work. Example: Alice connects Discord user 123456789012345678 to her member profile.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: current main lacks self-service Discord linking, and review found no actionable introduced defect; required current-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI requests account linking through Gateway RPC; the Discord plugin verifies account control, the canonical identity store records the link, and channel admission derives current profile permissions for execution and recovery. flowchart LR
A[Profile UI] --> B[Gateway personal authorization]
B --> C[Browser callback owner]
C --> D[Discord identity adapter]
D --> E[Canonical identity store]
E --> F[Channel admission]
F --> G[Current authority at final effects]
Technical reviewBest possible solution: Retain the shared personal authorization, browser callback and canonical identity owners, then land through the existing required CI gates. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the missing self-service flow and administrator-only authority bridge; the supplied boundary regressions report member failures on the base and successful execution with the change. Is this the best way to solve the issue? The change uses the existing account, callback, identity-storage and execution-authority owners, with a narrow provider adapter and no competing persisted identity store. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 48b46f1f0908. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +963, Tests +731. Total +1694 across 50 files. Added test files: 3. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (5 earlier review cycles)
Reviewed October 31, 2026, 7:41 PM ET / 23:41 UTC (Revision 6). |
Integrate the exact failing CI base, align paused cron descriptions, and strengthen Discord linking and revoked member authority boundary proof. Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]>
Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 23a0007b-5e4e-4980-af80-12b6b7411527
Exercise persisted member recovery after database reopen, positive file writes, and unlink/reassignment before final I/O. Retain the administrator recovery compatibility control. Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]>
Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 49684b40-29cf-48f4-ad0f-ec0a8490e172
Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]>
Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: a9222b81-60a9-43a0-9c44-1923cd0262c7
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
Backport the exact catalog-context expectation from upstream #189820 (800958f), following #189795. Preserve exact project/branch identity, order, path privacy, and menu dismissal coverage; no production behavior changes. Co-authored-by: Shakker <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]>
The full-runtime fallback fixture inherited a 16k model window. Main commit e44b8f4 now enforces provider-bound context admission; CI stopped before the simulated rate limit and fallback. Use a 128k synthetic window for both providers while retaining every retry, projection, and transcript assertion. Do not alter shared small-context fixtures or production guards. Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* feat: link Discord accounts from personal profiles Add browser-bound self-service Discord identity proof through the canonical profile link owner. Preserve verified members’ existing operator scopes in channel runs without granting command ownership. Co-authored-by: VACInc <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: hannesrudolph <[email protected]> * feat: link Discord accounts from personal profiles Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 82bf828a-5307-451d-bca5-5420ed98c3db * Publish openclaw/discord-profile-self-linking Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 4f3d942d-d6a7-4f4d-8cde-3b6f7b66fbf1 * fix: keep channel authority guard lint-clean Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> * Publish openclaw/discord-profile-self-linking Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 23a0007b-5e4e-4980-af80-12b6b7411527 * test: prove queued channel member authority at final effects Exercise persisted member recovery after database reopen, positive file writes, and unlink/reassignment before final I/O. Retain the administrator recovery compatibility control. Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> * Publish openclaw/discord-profile-self-linking Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: 49684b40-29cf-48f4-ad0f-ec0a8490e172 * test: include channel recovery in owner selection Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> * Publish openclaw/discord-profile-self-linking Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: a9222b81-60a9-43a0-9c44-1923cd0262c7 * Publish openclaw/discord-profile-self-linking Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: b88bb5b3-de7b-42a7-ae9f-d9cf90ddce9e * refactor: narrow Discord profile linking scope Remove unrelated settings changes, isolate the channel-identity validator in its own generator owner, and reuse callback-owner projection for the profile view. Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> * Publish openclaw/discord-profile-self-linking Worked on by: - @obviyus - @VACInc - @hannesrudolph Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> OpenClaw-Publication: a1e2c307-a169-4aff-8a1d-73b54551e510 * test(ui): align catalog hovercard breadcrumb with upstream Backport the exact catalog-context expectation from upstream openclaw#189820 (4b5d759), following openclaw#189795. Preserve exact project/branch identity, order, path privacy, and menu dismissal coverage; no production behavior changes. Co-authored-by: Shakker <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> * test: give fallback transcript fixture full prompt capacity The full-runtime fallback fixture inherited a 16k model window. Main commit fe5a903 now enforces provider-bound context admission; CI stopped before the simulated rate limit and fallback. Use a 128k synthetic window for both providers while retaining every retry, projection, and transcript assertion. Do not alter shared small-context fixtures or production guards. Co-authored-by: obviyus <[email protected]> Co-authored-by: VACInc <[email protected]> Co-authored-by: hannesrudolph <[email protected]> --------- Co-authored-by: VACInc <[email protected]> Co-authored-by: obviyus <[email protected]> Co-authored-by: hannesrudolph <[email protected]> Co-authored-by: Shakker <[email protected]>
What Problem This Solves
People need to connect their own Discord account to their signed-in OpenClaw profile without asking an administrator to attest the link, and retain their existing session permissions when requesting work from Discord.
User Impact
User impact: Settings → Profile gains Discord account linking, verified linked-ID status, and disconnect directly below Linked emails and above GitHub account. Linked members keep their actual allowed operator scopes in channel runs; linking does not grant administrator or command-owner privileges.
Deployment requires the selected Discord application's existing OAuth client configuration and the Gateway callback URL registered with Discord. Live Discord OAuth deployment qualification has not been performed; this PR does not change live configuration or credentials.
Why This Change Was Made
The flow reuses the personal-profile authorization boundary, provider-browser callback owner, and canonical channel-identity store. Discord proves the immutable user ID with the
identifyscope; short-lived one-use state and an initiating-browser cookie bind the callback. The initiating profile, connection, scopes, plugin and account configuration are checked again before storing the link. Tokens are not persisted. Conflicting links are rejected, and administrative attestation endpoints remain administrator-only.Channel run authority now derives independently from verified profile permissions rather than command-owner status, while retaining the existing access-grant, revocation and queued-recovery checks.
Requested by Vito. Co-authors recorded on the implementation commit: VACInc, obviyus, and hannesrudolph.
Evidence
0e1777ec22982bd6368e1b96cd985eb260338beb, tree10fd014343e5a3d0c7d7bc663615a4d6f9bf22d5; pinned source base remains7b29a23da2a6e787eca43c757bbc489f83d5b682. CI 41253002528 completed successfully: 88 successful jobs, 23 skipped, none failed. It tested merge9b79558b224ee3613dbfb2f38b0e24eec81ead68against main48b46f1f09080e555bcac0a809b6a835546543e2. The aggregate CI gate and current combined CI/security statuses are successful. GitHub reports mergeable; no landing claim is made here.800958fe0caf002813b370d8b171583ca7f499f7, after inspecting its predecessor test(ui): accept combined catalog hovercard context #189795 and the actual combined breadcrumb owner. The complete corrected test file matches upstream blob778bf4a37b37c84659f41b936df0db0daf3b8ae5. It still asserts the exactopenclaw / catalog-hovercardrow, path privacy and dismissal. Focused browser proof passed 1/1; current CI's UI jobs, targeted lint, format and whitespace checks passed. No production UI changed; upstream human credit is retained on the commit.c72e4f290ec53d52a5ff522abd39df12ec094389against main4120fe0aacb1cd4a0f77fef1a358d8c2f3f38315. Both fallback API cases stopped at auto-compaction rather than returning the expected report. Main fix: prevent context overflow during long tool turns #189810 (e44b8f449184ccc3fc57ddf46cb3b88ff3b30da4) added unconditional provider-bound context admission; this full-runtime fixture inherited a 16k window, leaving 12k after the capped reserve. The current two-line fixture repair gives both synthetic providers 128k capacity while retaining every retry, model-specific context and persisted-transcript assertion. It changes neither production admission nor the shared small-window fixture. In current-head job 124690577910, both exact failing cases now pass: Responses fallback 6109ms and Chat Completions fallback 1854ms. Retry count, model-specific context, single admitted user and persisted primary projection remain asserted. Current CI types/lint and local targeted format/lint pass.c2ac741e88a4a858d1dd25ec74c3a668e96fff5c, CI 41244893575 executed seven registered-RPC/real-Discord-adapter cases, 46 channel-tool authority cases and two persisted queued final-I/O cases successfully. Visitor passed 5/5 including administrator dispatch, X authority 14/14, X verification 7/7 and Feishu lifecycle 8/8. Those are actual execution counts, not job names. These remain historical evidence; the two subsequent CI repairs did not alter any feature implementation, feature test or generated file.44b8fec8b6f26636c3206c0909cc1a8425c5ff02, every handwritten feature/test blob was identical and only canonically generatedprotocol.generated/predicates.jsdiffered. The refresh matched the old-source/new-main merge oracle outside that file.gateway:validators:gen,gateway:validators:check, protocol tests 20/20 and whitespace checks passed. Subsequent repairs are confined to two non-feature test files.0e1777ec22982bd6368e1b96cd985eb260338bebat 23:41 UTC, including the two-test repair delta: findings None, security None, before-merge items None;needs-human/review-stateready. Its CI-pending observation predates the completed green run. No duplicate re-review is needed for this status-only evidence update.154cb5b28584507ab5897478bc3e3a478b02d438while its administrator close/reopen control passes. Prior green head574e89cd9ae7b29b2f6614f284f775d0492b7656(CI, review revision 2) is historical only. Required CI was not waived for inherited failures.Earlier failures and qualification
Run 41172104353 tested merge
883eca4f99bd30153764aa6c4953fc2a87397020against main80e3fcc5acb0b31f2d0bba9a1415fdb6ba9e8c6f. Separate exact-base and tested-merge worktrees reproduced X and Visitor unbound Gateway SDK resource-host failures. The published ancestry includes verified fixture-owner fixes #189244 (2464bd85e0bc2927701c3147bf3dfc6993daaae3) and #189296 (4ad0b3eb2472db8692357cf0af69c058c021f784), including awaited cleanup.The old Feishu card-broadcast shutdown failure remains causally unproven. Both exact snapshots pass the lifecycle file 8/8 and exact five-file/two-worker cohort 97/97. An instrumented retained-snapshot run also passed 97/97: commit returned true before shutdown resolved, the canonical record remained, and no disk/replay error or release occurred. Later hosted 8/8 is qualification, not proof of that historical cause. Similarly, an earlier local Visitor administrator-dispatch timeout remains unexplained despite subsequent hosted 5/5; X 21/21 and Feishu 8/8 subsequently ran successfully. No guard, budget or timeout was bypassed.
Publication recovery is complete. The authorized rewrite used the permitted managed native route after the fast-forward-only broker rejection and a reconciled timeout; later test repairs used normal fast-forward pushes. Remote head was read back. No credential, Git configuration, hook, guard or host setting changed.
Scope reduction and generated diff
Removed feature deltas from Settings sidebar production/unit code and an unrelated deferred-search keyboard scenario, preserving incoming-main content. Reused the callback-owner projection and removed two forwarding methods. No displayed Discord UI or security regression scenario was removed.
The new channel-identity validator has a focused binding, regenerated with the unchanged supported generator. This avoids renumbering earlier unrelated validator groups; remaining churn comes from its interned predicate pool and sequential names. An unrelated generator redesign was not added.
Historical scope reduction against
d07273d4e319836cd461f65b02009e94418afb85, before the subsequent inherited-CI test repairs:Total changed-line churn fell 57.7%; generated churn fell 68.6%. This is mechanical-diff reduction, not thousands of removed handwritten production lines.
ClawSweeper review dispositions
All five earlier items remain addressed. Revision 6 independently found no actionable introduced defect or security issue on current head
0e1777ec22982bd6368e1b96cd985eb260338beb, including the two-test repair delta.profileIdrequest assertsmissing scope: operator.adminand unchanged identities, not incidental adapter call counts.src/stateimplementation changes. Administrator/member controls close and reopen existing-format SQLite. A full deployment upgrade from stablev2026.10.9was not run. Revisions 5 and 6 found all 564 existing validator exports semantically unchanged, with only the channel-identity validator added.UI evidence
Real built Control UI; synthetic profile and mocked Gateway/Discord consent. Light theme, 1280 × 900 viewport, identity section cropped. Before: base
f8fe5864ab3a; after: implementation7a6d1fd2925f. Simplification and the later test-only repairs do not change displayed UI, so these inspected screenshots remain representative. This is deterministic UI proof, not live Discord OAuth qualification.Before
After
Disconnected and recoverable-error states
Worked on by
Work sessions