Skip to content

improve(doctor): skip unused plugin catalogs during startup - #150670

Merged
steipete merged 1 commit into
mainfrom
codex/startup-empty-catalog-main
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/startup-empty-catalog-main

Conversation

@steipete

@steipete steipete commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Gateway startup's Doctor inspection loads plugin catalogs even when no selected provider, plugin, or channel can use their entries.

User Impact

Startup avoids unnecessary catalog work for empty selections. Configured plugins, environment-selected official providers, and declared migration obligations retain their existing behavior. No configuration or update migration changes are required.

Why This Change Was Made

Guard the two catalog lookups with their existing canonical selection results. This follows #149737 without adding another cache or migration path.

Evidence

  • Three new regression cases fail against the original catalog lookups and pass with the guards; all nine selection tests pass.
  • Full changed-code checks pass, including core and all 20 core-test type graphs, lint, dead-export checks, and owner guards.
  • Independent review through P2 is clean. The patch and all 29 supplied supporting files plus the three build inputs are byte-identical after applying it to the landed improve(doctor): reuse metadata snapshots during startup inspection #149737 commit.
  • Exact candidate 517a5b44 and package SHA-256 25d0259d61cd504e9335bdd5eccc58c9630b2bdbc61a8f6c4cacd10939fd4803 passed fresh npm onboarding and the published 2026.9.2 configured-plugin upgrade in Package Acceptance attempt 2. The missing-plugin cell exposed a tooling assertion defect; the narrowly reviewed repair is now merged. The complete missing-plugin cell passed using that same retained package: all 15 required phases include Gateway health/status, deferred state after startup and Doctor, and successful migration/config validation once Codex becomes available. Its survivor artifact was digest-verified (bdb10cc0f3202509c0998224b471016d0474b48aa8fba5e610a254129dc03b2e). These are manual-restart published-updater cells; original infrastructure and assertion failures remain recorded.
  • Exact-head CI passed. Current-main reconciliation is underway: the two guarded owners and canonical selection helpers are unchanged, while surrounding migration, dependency, and build inputs have advanced. Existing package proof applies to the exact original candidate; native landing must assess any refreshed integration before merge.
  • A broader Windows fixture cleanup failure was reproduced on the unchanged baseline; fix(doctor): close test state before Windows fixture cleanup #150676 repairs it separately and passes all 140 original cases. No end-to-end startup timing gain is claimed for this incremental change.

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 17, 2026 06:10
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: S maintainer Maintainer-authored PR labels Sep 17, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 18, 2026, 1:47 AM ET / 05:47 UTC (Revision 4).

ClawSweeper review

What this changes

Doctor skips plugin catalog lookups when existing provider, plugin, and channel selections cannot use their entries, with regression coverage for empty selections and environment-selected providers.

Merge readiness

⛔ Blocked before merge - 1 item remains

The PR remains useful: current main lacks these guards, and no blocking defect was found. The completed acceptance evidence resolves the previous review’s proof request for the unchanged candidate.

Priority: P2
Reviewed head: 517a5b44dab9512e9cf2165b1efaa39c04039815

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable optimization with completed package compatibility evidence and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The captured evidence ties the unchanged Doctor guards to the exact installed package’s fresh onboarding and published-2026.9.2 upgrade, including Gateway serving, retained deferred inputs, and successful Doctor resumption after package availability. GitHub confirms the recovery run and artifact identity; archive retrieval was proxy-blocked. The prior proof request is resolved, without claiming a timing gain or coverage of a future changed build.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The captured evidence ties the unchanged Doctor guards to the exact installed package’s fresh onboarding and published-2026.9.2 upgrade, including Gateway serving, retained deferred inputs, and successful Doctor resumption after package availability. GitHub confirms the recovery run and artifact identity; archive retrieval was proxy-blocked. The prior proof request is resolved, without claiming a timing gain or coverage of a future changed build.
Evidence reviewed 10 items Introduced scope: The verified merge-base-to-head patch contains two catalog guards and selection regression tests. The supplied test merge has the pinned base and head as its parents and changes only these same three files; unrelated endpoint drift is not attributed to this PR.
Provider selection remains authoritative: Official provider IDs, including environment-selected providers, are collected before the new guard. The skipped loop can add an installed-catalog provider only when its ID or alias matches the now-empty selection set.
Candidate guard preserves outputs: Every channel, provider, official, runtime, and legacy declaration candidate requires membership in one of the three sets checked by the guard. With all three empty, the existing implementation cannot produce a candidate.
Findings None None.
Security None None.

How this fits together

Doctor inspects configured plugins during Gateway startup, diagnostics, and updates. It combines configuration and environment selections with installation metadata to identify package repairs and deferred migrations.

flowchart TD
  A[Configuration and environment] --> B[Collect selected providers and plugins]
  B --> C{Relevant selections or missing plugins?}
  C -->|Yes| D[Read installation catalogs]
  C -->|No| E[Skip unused catalog reads]
  D --> F[Package repair and migration inspection]
  E --> F
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +9, Tests +40. Total +49 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 20 11 +9
Tests 1 41 1 +40
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 61 12 +49

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor/shared/configured-provider-plugin-installs.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep catalog access conditional on canonical selections while preserving environment-selected providers and retained migration obligations.

Do we have a high-confidence way to reproduce the issue?

Not applicable to a correctness bug: source inspection confirms unnecessary catalog reads for empty selections, but no startup timing improvement was measured in this review.

Is this the best way to solve the issue?

Yes. The guards reuse existing selection owners and skip work whose results cannot contribute, without introducing another cache, configuration option, or migration path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b97803a2f3b2.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured evidence ties the unchanged Doctor guards to the exact installed package’s fresh onboarding and published-2026.9.2 upgrade, including Gateway serving, retained deferred inputs, and successful Doctor resumption after package availability. GitHub confirms the recovery run and artifact identity; archive retrieval was proxy-blocked. The prior proof request is resolved, without claiming a timing gain or coverage of a future changed build.

Label justifications:

  • P2: This is a bounded startup-efficiency improvement with preserved selection behavior and no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The captured evidence ties the unchanged Doctor guards to the exact installed package’s fresh onboarding and published-2026.9.2 upgrade, including Gateway serving, retained deferred inputs, and successful Doctor resumption after package availability. GitHub confirms the recovery run and artifact identity; archive retrieval was proxy-blocked. The prior proof request is resolved, without claiming a timing gain or coverage of a future changed build.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured evidence ties the unchanged Doctor guards to the exact installed package’s fresh onboarding and published-2026.9.2 upgrade, including Gateway serving, retained deferred inputs, and successful Doctor resumption after package availability. GitHub confirms the recovery run and artifact identity; archive retrieval was proxy-blocked. The prior proof request is resolved, without claiming a timing gain or coverage of a future changed build.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-17T06:17:30.142Z sha 517a5b4 :: blocked before merge. :: none
  • reviewed 2026-09-17T06:31:02.248Z sha 517a5b4 :: blocked before merge. :: none
  • reviewed 2026-09-17T06:40:05.641Z sha 517a5b4 :: blocked before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Please refresh the review of unchanged head 517a5b44dab9512e9cf2165b1efaa39c04039815. Native hosted prepare passed; merge admission stopped because the previous completed review expired.

The PR body now records completed proof for the identical retained package: fresh npm onboarding and published2026.9.2 configured-plugin upgrade passed in run35190299360 attempt2; all15 missing-plugin serving, deferred-state, and Doctor-resumption phases passed in run35204618475 after the independently reviewed assertion repair150748. Exact-head CI35188692725 is green. Current-main guard owners and canonical selection helpers remain unchanged; supporting migration/dependency drift is explicitly documented. No startup timing gain is claimed.

@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 18, 2026
@steipete
steipete merged commit b46071e into main Sep 18, 2026
299 checks passed
@steipete
steipete deleted the codex/startup-empty-catalog-main branch September 18, 2026 05:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant