Repository navigation
fix(discord): avoid doctor runtime loading - #119391
Conversation
Punchcard-Session: amber-workshop-river-yr
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 10:26 PM ET / August 5, 2026, 02:26 UTC. ClawSweeper reviewWhat this changesThis PR adds Discord’s existing Doctor policy metadata to the package catalog and makes Doctor read that static packaged catalog before loading a channel plugin. Merge readinessKeep open: the exact head resolves the prior packaged-layout finding by using generated channel metadata before either runtime loader. Current main still takes the bundled-discovery route, so this repair remains necessary. Priority: P2 Review scores
Verification
How this fits togetherDoctor validates channel allowlist policy and migrations before a channel runtime is needed. Packaged OpenClaw uses the generated channel catalog for static metadata when separately distributed plugins such as Discord are absent from the core distribution. flowchart LR
A[Doctor policy check] --> B[Channel identifier]
B --> C[Generated channel catalog]
C --> D[Discord policy metadata]
D --> E[Doctor validation]
C --> F[Runtime plugin fallback]
F --> E
Before merge
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +134, Config +6, Other +6. Total +150 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the generated catalog as the canonical static control-plane source, with runtime loading only as the fallback for channels that do not publish Doctor capabilities. Do we have a high-confidence way to reproduce the issue? Yes—package an install without Discord under dist/extensions, then run the Doctor allowlist-policy path; current main misses static Discord metadata and reaches runtime loading, while the PR fixture models that layout. Is this the best way to solve the issue? Yes—the generated catalog is the established packaged control-plane artifact, and the patch removes the duplicate bundled-only lookup rather than adding another runtime path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 392e1c0620b5. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
Punchcard-Session: amber-workshop-river-yr
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(discord): avoid doctor runtime loading This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Merged via squash.
|
* origin/main: (22 commits) refactor(plugins): consolidate lifecycle hook dispatch (#119429) fix(ci): stabilize TUI PTY proof ownership (#119420) test(system-agent): reduce suite setup overhead (#119424) fix(ui): keep session rail pill status from overlapping the headline (#119397) fix(discord): avoid doctor runtime loading (#119391) fix(media): decouple playback cache retention (#119417) fix(slack): infer upload filename extensions from MIME types (#119399) refactor(channels): unify configured binding resolution (#119414) refactor(google-meet): unify gateway and tool dispatch (#119413) test(state): reuse legacy database fixtures (#119423) fix(reset): preserve bootstrap guidance for dynamic models (#119179) fix(chutes): honor serving context limits (#119196) refactor(status): consolidate scan projections and lazy loaders (#119412) fix(status): status --all slows down with missing plugins (#119203) refactor(gateway): consolidate usage reporting and caches (#119409) perf(gateway): keep reload and recovery machinery off gateway cold start (#119094) fix(cli): align TaskFlow controller columns for wide text (#118801) fix: make startup migration restart guidance install-neutral (#119406) fix(ci): preserve cache warmer shard envelopes (#119403) fix(sessions): preserve compatible auth profiles on model changes (#117550) ...
* fix(discord): publish doctor capability metadata Punchcard-Session: amber-workshop-river-yr * fix(doctor): read packaged channel metadata Punchcard-Session: amber-workshop-river-yr
What Problem This Solves
Fixes an issue where the release unit-fast lane could exceed its 120-second per-test timeout while evaluating Discord
allowFrompolicy. Doctor capability discovery loaded the full Discord plugin graph when static metadata was unavailable, including in packaged installs where Discord is excluded fromdist/extensions.Why This Change Was Made
Publishes Discord's existing doctor capability contract and makes doctor read it through the canonical bundled channel catalog before falling back to runtime plugin loading. That reader uses package manifests in source checkouts and the generated
dist/channel-catalog.jsonin packaged installs.The packaged-layout regression removes the bundled plugin directory, supplies only the generated catalog, and verifies that neither runtime plugin loader is called.
User Impact
No intentional product behavior changes. Release and CI validation no longer pay the Discord runtime-load cost for static doctor policy checks, and packaged installs use the same static capability contract.
Evidence
b0d230f403271e0c840cc06ff051f62c65865a64pnpm check:changed: passedpnpm build: passedopenclaw/ci-gatepassednode scripts/write-official-channel-catalog.mjs --checkgit diff --checkb0d230f: no accepted/actionable findings; patch correct at 0.99 confidence.Before mergeitems satisfied:AI-assisted: yes. The implementation was independently reviewed with the repository autoreview workflow.
Punchcard-Session: amber-workshop-river-yr