Skip to content

fix(doctor): resolve ClawHub plugin drift targets from ClawHub - #145103

Merged
fuller-stack-dev merged 13 commits into
openclaw:mainfrom
DasX:fix/doctor-clawhub-plugin-drift-target
Sep 19, 2026
Merged

fuller-stack-dev merged 13 commits into
openclaw:mainfrom
DasX:fix/doctor-clawhub-plugin-drift-target

Conversation

@DasX

@DasX DasX commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Current integration candidate — a3ce3af

Current head: a3ce3af, directly above the contributor's d1a847f merge of main 1e8ba48. Contributor history, authorship, and renderer test split are preserved. The full source tree is exactly 5cfc00884b0505d2445dca0ffc81f69800011dff, matching the independently API-reviewed candidate; the redundant private merge commit was not pushed.

  • Main's manifest-readability probe and this PR's channel-aware diagnostics coexist. The only textual merge conflict was adjacent imports; both were retained. The integrated post-upgrade command suite passed 50/50 tests, including missing/unreadable/optional manifests, cached transitions, unchanged persisted index, channel intent and persisted enablement.
  • Fresh review identified rollback-tag downgrade advice. The narrow follow-up uses the updater's existing version-ordering owner to leave older targets explicitly unresolved. Four new regression cases failed before; seven affected cases passed after, including valid newer correction and build-metadata targets. Exact equality remains distinct from version precedence.
  • Final independent API-only source review: no actionable P0–P2 findings. It confirmed read-only diagnostics, preserved channel intent and correct rollback suppression.
  • The two accepted native cells below remain bound to packaged aa42, not relabeled as executions of this head. Mainline manifest validation is covered by the new post-upgrade suite. The added guard does not change those native cells' equal/newer targets. No accepted native registry-lag cell was replayed.
  • Exact-head CI run 35461805170 passed (153 successful jobs, 15 selected skips); Security Review 35461841902 passed. The final-head audit passed without retry. ClawSweeper review 35461928507 found no actionable findings and accepted the native/compatibility evidence. Native preparation and landing gates passed; merged at 2026-09-19T19:07:04Z as 5ad3c49. Prior aa42 clearance remains bound to aa42.

Data-model and upgrade compatibility

PR #145103 introduces no persistent schema, migration, backfill, install-record layout, config shape, or new writer. The resolver consumes existing install records and existing update-channel intent. Added target-resolution fields are transient diagnostic output, not persisted state. Doctor post-upgrade reads the persisted installed-plugin index; it does not recreate or overwrite it. Existing updater and plugin installer remain the only state owners.

Both accepted packaged aa42 native cells began with actual installer-created records under untouched published OpenClaw 2026.9.4. After its real updater handed off to aa42, ordinary Doctor, deep status, and post-upgrade JSON preserved records, plugin bytes, selected config/enablement, and global plugin policy. A real first-hop registry outage was limited to the retained-record scenario and fully removed before diagnostics and repair. The ordinary normal-network first hop separately succeeded with documented auto-update behavior. Neither is a fabricated migration fixture.

Current-main integration keeps ordinary Doctor, deep rendering and contributor test split byte-identical to aa42. It incorporates main's post-upgrade manifest-readability probe and tests; the textual conflict was adjacent imports and both are retained. Fresh independent review additionally identified advice to downgrade when the registry latest tag moves backward. The resolver now uses the updater's existing isPackageVersionDowngrade helper to leave those targets explicitly unresolved. Four new downgrade regressions failed before this fix; seven affected cases passed after, including valid correction/build-metadata updates. This guard does not change the accepted native cells' equal/newer target inputs. The integrated post-upgrade command suite passed all 50 tests, including stable/beta/extended-stable behavior, persisted enablement, unreadable/missing/optional manifests, cached existence transitions, and explicitly unchanged installed-index records. There is no new data-model migration requiring operator approval.

The accepted native package is still exactly aa42, not relabeled as the integration head. The narrow integration is covered by new entrypoint tests, independent review, and required fresh hosted CI. No native registry-lag cell is replayed.

Retained packaged/native qualification at aa42f79 — 2026-09-19

Head aa42f796d4a7c93079bdf7b569cd09041ee9d73a. This section supersedes the earlier unexecuted package/managed-service gaps below; the contributor’s earlier observations remain historical evidence.

  • Untouched published [email protected] drove the first hop to the maintained package built from this exact head (version 2026.9.5). No installed-updater patch, source launcher, synthetic plugin version, or hand-seeded/reseeded plugin index was used.
  • Candidate SHA-256: 062d0693033f92cc4c41c22ce060a551f9164705e5c1fde84d7d4bef8083ae82; build identity: 2026.9.5-aa42f796d4a7-2026-09-19T17-26-33.256Z. All shipped regular bytes were checked after installation; source hashes were verified before and after the maintained build.
  • Environment: dedicated disposable Linux VM with real systemd user service and D-Bus, Node 24.20.0, npm 11.19.0. No host mounts, production config, or live Odin service were used.
  • A normal-network first hop also succeeded and automatically advanced diffs2026.9.2→2026.9.5, as the existing updater contract permits. That success is not counted as retained-stale diagnostic proof.
  • For the two retained-record cells below, an explicitly controlled TCP refusal to resolved public clawhub.ai:443 destinations was applied only during the first hop. Direct TCP and metadata probes confirmed refusal. Exact firewall state was restored before diagnostics/repair and real registry metadata was fetched again. The updater succeeded with plugin-unavailable notices, preserving the genuine baseline installer records and plugin bytes. This is outage-qualified handoff evidence, not an assertion that normal core updates never update plugins.
  • Fresh API-only whole-head source review and changed-fixture review found no actionable P0–P2 findings. Fixture review fixes have failing-before/passing-after controls. Contributor history and renderer test split remain unchanged.

stale-repair — PASS

Published installer selected [email protected] from ClawHub. Exact install-record hash before/after core handoff: f98b273fd4a508d899ccdfdf2dacd97e27860a8d0b54c2ffc4dd6acaacd16043. Candidate service PID/build identity, plugin load, selected enablement/config, plugin bytes, and global plugin-selection policy were checked. All six stable/beta diagnostic commands exited 0, retained records/bytes, and observed the owned active managed service.

Real openclaw doctor --non-interactive on stable:

◇  Plugin restart readiness ────────────────────────────────────────╮
│                                                                   │
│  Running Gateway: OpenClaw 2026.9.5                               │
│  1 active official plugin not on post-restart OpenClaw 2026.9.5   │
│  - diffs: 2026.9.2 (clawhub) -> expected 2026.9.5                 │
│  Fix: openclaw plugins update diffs && openclaw gateway restart.  │
│                                                                   │
├───────────────────────────────────────────────────────────────────╯

update.channel=stable; real openclaw gateway status --deep:

Plugin version drift: 1 active official plugin not on gateway 2026.9.5
- diffs: 2026.9.2 (clawhub) → expected 2026.9.5; clawhub target @openclaw/[email protected]
Fix: openclaw plugins update diffs && openclaw gateway restart.

Real openclaw doctor --post-upgrade --json:

[
  {
    "level": "warn",
    "code": "plugin.version_drift",
    "plugin": "diffs",
    "message": "Plugin diffs is 2026.9.2, but OpenClaw is 2026.9.5. Run `openclaw plugins update diffs`, then restart the Gateway."
  }
]

Real openclaw doctor --non-interactive on beta:

◇  Plugin restart readiness ────────────────────────────────────────────╮
│                                                                       │
│  Running Gateway: OpenClaw 2026.9.5                                   │
│  1 active official plugin not on post-restart OpenClaw 2026.9.5       │
│  - diffs: 2026.9.2 (clawhub) -> expected 2026.9.5                     │
│  Repair target resolution failed for diffs: ClawHub latest metadata   │
│  cannot confirm the selected target clawhub:@openclaw/diffs@beta. No  │
│  install command generated.                                           │
│                                                                       │
├───────────────────────────────────────────────────────────────────────╯

update.channel=beta; real openclaw gateway status --deep:

Plugin version drift: 1 active official plugin not on gateway 2026.9.5
- diffs: 2026.9.2 (clawhub) → expected 2026.9.5
Plugin repair target resolution failed:
- diffs: ClawHub latest metadata cannot confirm the selected target clawhub:@openclaw/diffs@beta

Real openclaw doctor --post-upgrade --json:

[
  {
    "level": "warn",
    "code": "plugin.version_drift",
    "plugin": "diffs",
    "message": "Plugin diffs is 2026.9.2, but OpenClaw is 2026.9.5. No confirmed repair target is available; check registry availability and rerun this command."
  }
]

The ID-only command advertised by the stable diagnostics, openclaw plugins update diffs, was then executed unchanged. It reached real registry version2026.9.5; artifact bytes and ClawHub ownership were verified, followed by managed restart and successful plugin load.

Teardown verified the user service, listener, runtime tree, default state, and temporary lease path absent; the exact prior firewall rules were restored.

registry-current-lag — PASS

Published installer selected [email protected] from ClawHub. Exact install-record hash before/after core handoff: 4b43a1a6691e3959bef46f3fca72b9b14c577e6c2dee279da6b251ec6c02d78f. Candidate service PID/build identity, plugin load, selected enablement/config, plugin bytes, and global plugin-selection policy were checked. All six stable/beta diagnostic commands exited 0, retained records/bytes, and observed the owned active managed service.

Real openclaw doctor --non-interactive on stable:

◇  Plugin restart readiness ───────────────────────────────────────────────╮
│                                                                          │
│  Running Gateway: OpenClaw 2026.9.5                                      │
│  1 active official plugin not on post-restart OpenClaw 2026.9.5          │
│  - tokenjuice: 2026.9.3 (clawhub) -> expected 2026.9.5                   │
│  tokenjuice already holds registry version 2026.9.3; no release reaches  │
│  2026.9.5 yet, so no update command applies.                             │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────╯

update.channel=stable; real openclaw gateway status --deep:

Plugin version drift: 1 active official plugin not on gateway 2026.9.5
- tokenjuice: 2026.9.3 (clawhub) → expected 2026.9.5
- tokenjuice: registry version 2026.9.3 is already installed; no release reaches 2026.9.5 yet, so no update command applies.

Real openclaw doctor --post-upgrade --json:

[
  {
    "level": "warn",
    "code": "plugin.version_drift",
    "plugin": "tokenjuice",
    "message": "Plugin tokenjuice is 2026.9.3, but OpenClaw is 2026.9.5. The registry already serves 2026.9.3; no release reaches 2026.9.5 yet, so no update applies."
  }
]

Real openclaw doctor --non-interactive on beta:

◇  Plugin restart readiness ─────────────────────────────────────────╮
│                                                                    │
│  Running Gateway: OpenClaw 2026.9.5                                │
│  1 active official plugin not on post-restart OpenClaw 2026.9.5    │
│  - tokenjuice: 2026.9.3 (clawhub) -> expected 2026.9.5             │
│  Repair target resolution failed for tokenjuice: ClawHub latest    │
│  metadata cannot confirm the selected target                       │
│  clawhub:@openclaw/tokenjuice@beta. No install command generated.  │
│                                                                    │
├────────────────────────────────────────────────────────────────────╯

update.channel=beta; real openclaw gateway status --deep:

Plugin version drift: 1 active official plugin not on gateway 2026.9.5
- tokenjuice: 2026.9.3 (clawhub) → expected 2026.9.5
Plugin repair target resolution failed:
- tokenjuice: ClawHub latest metadata cannot confirm the selected target clawhub:@openclaw/tokenjuice@beta

Real openclaw doctor --post-upgrade --json:

[
  {
    "level": "warn",
    "code": "plugin.version_drift",
    "plugin": "tokenjuice",
    "message": "Plugin tokenjuice is 2026.9.3, but OpenClaw is 2026.9.5. No confirmed repair target is available; check registry availability and rerun this command."
  }
]

The stable ordinary Doctor and deep-status explanation offered no update command. Beta remained explicitly unresolved. The no-op path retained the install record and every installed plugin byte.

Teardown verified the user service, listener, runtime tree, default state, and temporary lease path absent; the exact prior firewall rules were restored.

Remaining landing gate

At native-qualified head aa42f79, CI run 35457821789 and Security Review now both passed. The sole failed npm503 audit job was retried once after a fresh HTTP200 advisory-endpoint probe; GitHub reran dependent jobs. No passed CI or native cells were manually replayed. This clearance is bound to aa42, not the later integration head.


What Problem This Solves

openclaw doctor reports under Plugin restart readiness a target version that the plugin's own registry does not offer. Measured on 2026-09-11 against OpenClaw 2026.9.4:

Plugin restart readiness
Running Gateway: OpenClaw 2026.9.4
4 active official plugins not on post-restart OpenClaw 2026.9.4
- llama-cpp: 2026.8.2 (npm) -> expected 2026.9.4
- lobster: 2026.9.1 (clawhub) -> expected 2026.9.4
- parallel: 2026.8.2 (npm) -> expected 2026.9.4
- tokenjuice: 2026.9.1 (clawhub) -> expected 2026.9.4

For the two npm plugins the target was reachable, and they are on 2026.9.4 now. For the two ClawHub plugins it is not. Running the suggested command reports:

ClawHub latest resolves to 2026.9.3

After the update they sit on 2026.9.3, which is the newest version ClawHub publishes, and doctor keeps reporting them as drifted:

- lobster: 2026.9.3 (clawhub) -> expected 2026.9.4
- tokenjuice: 2026.9.3 (clawhub) -> expected 2026.9.4

openclaw plugins inspect lobster --json shows installSpec: clawhub:@openclaw/lobster, so this is a floating install with no version pin. The result is a warning that cannot be cleared plus a fix hint that cannot reach the version it names.

Cause

detectPluginVersionDrift compares every active official external install against the running OpenClaw version. resolveEntryTarget then confirms an attainable target only for exact npm pins; ClawHub installs never get one, so resolvePluginVersionDriftUpdateCommand returns an id-only update and the renderer prints the host version as expected. ClawHub publishes plugins on its own release train, so its latest version can sit below the host version.

Related: #139718 describes the same unclearable loop for a pinned install.

Why This Change Was Made

The diagnostic and the update owner disagreed about what an update would actually do, in two ways that the maintainer review at bed372823a1 identified as P1.

1. A stale recorded ClawHub pin got no executable repair. Target resolution read the recorded selector literally, so an exact pin never reached the registry, and the unresolved-target guard then suppressed the update command. That left the reporter's case in #139718 with a visible warning and no confirmed repair. Resolution now goes through the update owner (resolveClawHubUpdateSpecs) with the catalog spec carried from admission, so a pin at or below the target Gateway resumes the catalog's release policy here exactly as it does during an update. The prescribed repair is the plugin id, which the ClawHub update-selection owner (src/cli/plugins-update-selection.ts) accepts for ClawHub installs. A pin above the target Gateway stays unresolved, because moving off it is not obviously the repair.

2. Registry lag was dropped instead of explained. When the installed version and the registry latest matched but the expected Gateway version was newer, the entry was removed from the report and therefore from every downstream diagnostic. That hid the precise case documented above. The entry now carries a registry-current outcome with the observed registry version and the expected Gateway version, and only the no-op update command is suppressed.

Earlier revisions on this branch resolve the ClawHub target from ClawHub rather than assuming the host version exists there, preserve plugin API and minimum Gateway compatibility before suppressing drift, use the installation's recorded registry, and honor the configured update channel. The two diagnostic follow-ups at bed372823a1 (configured update-channel intent in post-upgrade probes, and the registry-confirmed target in Doctor output) were pushed by @vincentkoc on this branch.

User Impact

  • A stale recorded ClawHub pin now produces a repair command the CLI accepts, instead of a warning with no way out.
  • An install that already holds the newest version its registry publishes is no longer silently absent from diagnostics. openclaw doctor reports it as an informational finding with no fix hint, gateway status --deep explains it outside the repair-failure surface, and doctor --post-upgrade states that no release reaches the expected version yet. No surface offers an update command that cannot change anything.
  • Registry lag no longer raises a warning an operator cannot clear: the doctor finding for that case is info, so it does not turn into an unfixable doctor --lint failure.

Evidence

Head 5be45672ff43279896a24a01929805243e47c074. The PR head now matches this commit; the earlier mismatch was a stale PR record on GitHub, not a missing push, and it was resynced without rewriting history.

Real CLI behavior on an isolated instance

Measured on 2026-09-15 against head 5be45672ff43279896a24a01929805243e47c074, Node 24.21.0 on Linux. The candidate CLI runs from the reviewed checkout through the repository's own tsx loader and reports itself as OpenClaw 2026.9.4 (5be4567). Each run uses its own state directory, its own config file and a synthetic workspace; channel, cron, Gmail, browser and canvas sidecars are disabled. Package metadata comes from the public ClawHub registry, so the observed versions are real published ones; no credentials are used. The host's own OpenClaw configuration, state and Gateway service were left untouched.

1. Published package handoff, not seeded records

The real installer downloads and installs two published ClawHub packages into the isolated instance, and the installer itself writes the install index. Nothing is hand-seeded in this run.

$ openclaw plugins install clawhub:@openclaw/[email protected] --accept-capabilities --acknowledge-install-policy-warning
Resolving clawhub:@openclaw/[email protected]…
  Package   @openclaw/[email protected]
  Type      bundle-plugin
  Requires  pluginApi >=2026.9.2 · minGateway >=2026.4.30
  ClawHub   https://clawhub.ai/plugins/@openclaw/diffs
Downloading bundle @openclaw/[email protected] from ClawHub…
Extracting <tmp>/openclaw-diffs-2026.9.2.tgz…
Installing to <instance>/extensions/diffs…
Installed plugin: diffs
Saved for the next Gateway start.
exit=0

$ openclaw plugins install clawhub:@openclaw/lobster --accept-capabilities --acknowledge-install-policy-warning
Resolving clawhub:@openclaw/[email protected]…
  Package   @openclaw/[email protected]
  Type      plugin
  Requires  pluginApi >=2026.9.3 · minGateway >=2026.4.25
Downloading plugin @openclaw/[email protected] from ClawHub…
Extracting <tmp>/openclaw-lobster-2026.9.3.tgz…
exit=1

The install records the installer persisted, which are the input the diagnostic actually reads:

{"pluginId":"diffs","source":"clawhub","spec":"clawhub:@openclaw/[email protected]",
 "clawhubPackage":"@openclaw/diffs","clawhubUrl":"https://clawhub.ai","clawhubChannel":"official"}
{"pluginId":"lobster","source":"clawhub","spec":"clawhub:@openclaw/[email protected]",
 "clawhubPackage":"@openclaw/lobster","clawhubUrl":"https://clawhub.ai","clawhubChannel":"official"}

Two honest notes on this run. The lobster install exits 1 and both plugins fail to load in a source checkout with TypeError: Cannot read properties of undefined (reading 'argvDirectories'), and lobster additionally collides with the bundled lobster in the checkout's dist/. Neither affects what is being proven here: both installs persist their records ("installation is saved"), and the drift diagnostic consumes install records rather than loaded plugin instances. I am not claiming the plugin runtime load path is green in this environment.

2. Doctor rendering on that instance

@openclaw/diffs is installed at 2026.9.2 with a recorded exact pin, and ClawHub publishes 2026.9.3: the stale-pin case. @openclaw/lobster is installed at 2026.9.3, which is the newest version ClawHub publishes, while the Gateway is 2026.9.4: the registry-lag case.

$ openclaw doctor --post-upgrade          (update.channel=stable)
[warn] plugin.version_drift: Plugin diffs is 2026.9.2, but OpenClaw is 2026.9.4. Run `openclaw plugins update diffs`, then restart the Gateway.
[warn] plugin.version_drift: Plugin lobster is 2026.9.3, but OpenClaw is 2026.9.4. The registry already serves 2026.9.3; no release reaches 2026.9.4 yet, so no update applies.
exit=0

The same run with --json:

{
  "probesRun": ["plugin.index_unavailable","plugin.entry_unresolved","plugin.manifest_drift","plugin.version_drift"],
  "findings": [
    {"level":"warn","code":"plugin.version_drift","plugin":"diffs",
     "message":"Plugin diffs is 2026.9.2, but OpenClaw is 2026.9.4. Run `openclaw plugins update diffs`, then restart the Gateway."},
    {"level":"warn","code":"plugin.version_drift","plugin":"lobster",
     "message":"Plugin lobster is 2026.9.3, but OpenClaw is 2026.9.4. The registry already serves 2026.9.3; no release reaches 2026.9.4 yet, so no update applies."}
  ]
}

3. The same instance on the parent commit, before this fix

The identical scenario, identical state seed, run against bed372823a17 (OpenClaw 2026.9.4 (bed3728)), on the stable channel:

$ openclaw doctor --post-upgrade          (update.channel=stable)
[warn] plugin.version_drift: Plugin diffs is 2026.9.2, but OpenClaw is 2026.9.4. No confirmed repair target is available; check registry availability and rerun this command.
exit=0

That is both P1s in real output. The stale pin gets no executable repair, and the registry-lag entry for lobster is absent from the report entirely rather than explained.

4. Configured update channel reaching the probe

Only update.channel in the isolated config file changes between these two runs; the instance, the install records and the registry are the same.

$ openclaw doctor --post-upgrade          (update.channel=beta)
[warn] plugin.version_drift: Plugin diffs is 2026.9.2, but OpenClaw is 2026.9.4. No confirmed repair target is available; check registry availability and rerun this command.
[warn] plugin.version_drift: Plugin lobster is 2026.9.3, but OpenClaw is 2026.9.4. No confirmed repair target is available; check registry availability and rerun this command.
exit=0

On beta the update owner selects @beta, which latest metadata cannot confirm, so both entries stay unresolved and neither offers a command. The configured channel therefore reaches the drift target resolution through the CLI, and the stable-channel results above are a property of the fix rather than of the channel default.

Test-level evidence

New and updated cases in src/plugins/plugin-version-drift.test.ts:

  • prescribes an executable repair for a stale recorded ClawHub pin: installed and recorded pin 2026.9.2, registry latest 2026.9.3, Gateway 2026.9.4. The registry is queried, the target resolves to 2026.9.3, and the command is openclaw plugins update whatsapp.
  • keeps a recorded pin above the target Gateway unresolved: pin 2026.9.5 against Gateway 2026.9.4 stays unresolved, and no registry request is made.
  • explains registry lag when the install already holds the newest ClawHub version: registry-current with version 2026.9.3 and requestedTarget 2026.9.4, and no update command.
  • unchanged selectors still block a latest claim: a @beta spec on the stable channel, an unpinned spec on the beta channel, and a @latest spec on extended-stable all stay unresolved with no registry request.

Rendered output:

  • src/commands/doctor-workspace-status.plugin-version-drift.test.ts covers the resolved, registry-current, and unresolved cases through the health findings and the note text. The registry-current case asserts severity info, no fix hint, no openclaw plugins update in the note, and no repair-failure wording.
  • src/cli/daemon-cli/status.print.test.ts adds the registry-current case for gateway status --deep, asserting the explanation line and that nothing reaches the error surface.
  • src/commands/doctor-post-upgrade.test.ts now distinguishes the stable-channel case (registry reached, nothing newer published) from the beta and extended-stable cases (selector cannot be confirmed as latest).

Local runs on this head:

  • vitest run over plugin-version-drift, doctor-workspace-status.plugin-version-drift, doctor-post-upgrade, status.print, install-channel-specs, and plugins/update: 6 files, 409 passed, 1 skipped.
  • tsc --noEmit -p tsconfig.core.json: no errors in any changed file.
  • oxfmt and oxlint on the eight changed files: clean.
  • pnpm check:import-cycles: 0 runtime value cycles, including the new import from the drift diagnostic into the update owner.
  • pnpm check:max-lines-ratchet: OK.

CI diagnosis and remaining qualification request (2026-09-15)

ClawSweeper revision 11 accepts the reviewed-head post-upgrade CLI observations, the before/after comparison, and configured-channel propagation as real evidence. It reports no actionable code or security findings, but explicitly keeps the published-updater handoff and managed-service diagnostics open.

check-lint-core-5 failed in job 104540878450: extensions/codex/src/app-server/run-attempt.model-attribution.test.ts, duplicate thread/backgroundTerminals/list case. This is present unchanged in that CI run's base, not introduced by this PR: both base 54dc4a8988179748b8709ff17215fc2d6c9e3c40 and merge candidate 9945dfc25e0359e0b2181691e13061485ae23dd7 have blob 0e039e520f32aed6417cf6df3a610a69e85987e9, including the duplicate cases at lines 173 and 179. No unrelated test change is included here. Other CI jobs were still running when this note was added; the complete run is not claimed green.

I also inspected this run's dist-runtime-build artifact. Its build identity is the CI merge commit 9945dfc25e0359e0b2181691e13061485ae23dd7, not standalone reviewed head 5be45672ff43; it contains runtime build outputs, not a validated installable candidate package. I have not mixed those outputs into the reviewed source or counted that download as upgrade proof.

Remaining request for a package-capable isolated CI/maintainer runner: qualify published [email protected] updating to a package containing this reviewed change, with a managed Gateway belonging entirely to the test environment. Install the stale pinned and registry-current plugin cases through the published CLI, retain those records through the actual updater handoff, then capture candidate doctor, gateway status --deep, and doctor --post-upgrade on stable and beta. Record the exact candidate commit/package identity, plugin enablement and install records before/after, exit codes, and rendered findings. Do not reseed the index after the update. Expected stale-pin and registry-lag findings are the ones shown above. No production data or credentials are needed. The existing evidence remains partial until that run is available.

What This Does Not Solve

  • Two renderers were not exercised by a real command. The doctor workspace-status health finding (severity: info, src/commands/doctor-workspace-status.ts) and the deep gateway status line (src/cli/daemon-cli/status.print.ts) both reach the diagnostic through daemon status gathering, which binds itself to the default install identity and the loaded native Gateway service (src/cli/daemon-cli/status.gather.ts, useNativeServiceTargetContext and targetServiceCommand). The state/config overrides used for this attempt did not isolate that service lookup: openclaw gateway status --deep reported the host's service instead. A complete test needs a separate managed-service environment, such as an isolated container or VM with its own service manager. I did not redirect the production service to the candidate. They remain covered by the unit and rendering tests listed above.
  • The candidate CLI was not installed from a packed artifact. The runs above execute the reviewed source through the repository's tsx loader, not a npm pack tarball installed into a prefix. pnpm build:package refuses under the memory budget available here: [tsdown-build] The resolved OpenClaw build heap is 2263MB, and a full build needs 4352MB, peaking near 4.7GB once rolldown's native allocations are counted. These are published-plugin installation observations, not a published OpenClaw updater-to-candidate handoff. The host is the reviewed source, launched as node --import ./scripts/tsx.mjs src/index.ts, not the supported package-installation flow.
  • The full local suite was not re-run. The previously missing dependencies (import-meta-resolve, @openclaw/fs-safe/copy) are installed in the checkout used for the runs above, which is why the CLI starts at all, but I did not re-run the whole suite locally. Remote CI remains the gate.
  • Only ClawHub catalog specs unpin a stale recorded pin. For catalog entries that declare npm install metadata only, the update owner passes no ClawHub catalog spec, so the diagnostic does not unpin either. The diagnostic deliberately promises exactly what the updater delivers rather than more.
  • Diagnostics cover latest intent only. A recorded selector that is a tag other than latest, an exact version above the target Gateway, or the extended-stable core cohort is reported as unresolved with its reason rather than resolved against latest metadata.

@clawsweeper

clawsweeper Bot commented Sep 11, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-11T17:32:37.183039Z 5d711d0 PR opened
🔒 Security Review ✅ Completed 2026-09-11T17:34:24.765264Z 5d711d0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. size: S labels Sep 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d711d0527

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/plugins/plugin-version-drift.ts Outdated
Comment on lines +133 to +137
if (
resolveOpenClawReleaseCohortVersion(latestVersion) ===
resolveOpenClawReleaseCohortVersion(entry.installedVersion)
) {
return null;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep incompatible latest ClawHub installs in the drift report

When the installed plugin is already ClawHub's latest release but that release declares a pluginApiRange or minGatewayVersion incompatible with entry.gatewayVersion, this branch returns null solely because the versions match. The ClawHub install path explicitly rejects the same compatibility mismatch in validateClawHubPluginPackage, so doctor and deep status now suppress the drift entry even though that Gateway/plugin pairing may not run; consult the existing compatibility owner before dropping the entry.

AGENTS.md reference: AGENTS.md:L31-L32

Useful? React with 👍 / 👎.

Comment thread src/plugins/plugin-version-drift.ts Outdated
try {
return {
version: resolveLatestVersionFromPackage(
await fetchClawHubPackageDetail({ name: packageName }),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve the target from the install record's ClawHub URL

When OPENCLAW_CLAWHUB_URL or CLAWHUB_URL points to a custom registry while this persisted official install came from https://clawhub.ai, omitting baseUrl makes this lookup query the environment-selected registry. The actual update path passes record.clawhubUrl, so an equal, different, or missing package on the custom registry can suppress the warning or advertise a target that the suggested update will not use; carry the recorded URL into the drift entry and pass it here.

AGENTS.md reference: AGENTS.md:L55-L56

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 19, 2026, 2:45 PM ET / 18:45 UTC (Revision 19).

ClawSweeper review

What this changes

Doctor and deep Gateway status resolve ClawHub plugin repair targets from the recorded registry, preserve update-channel intent, explain registry lag, and avoid recommending downgrades.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open for landing: the diagnostic fix remains absent from current main and the latest release. No actionable patch defects were found, and the supplied upgrade evidence resolves the previous compatibility concern.

Priority: P2
Reviewed head: a3ce3af92ea0d987c69b3d6f0ad5ebd65e96d424

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful repair with strong packaged upgrade evidence and no remaining actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The matching captured body contains packaged aa42 Linux/systemd transcripts exercising the changed resolver through Doctor, deep status, and post-upgrade JSON after a published 2026.9.4 updater handoff. They demonstrate successful stale-pin repair, registry-lag explanations, channel preservation, and unchanged records. Source comparison preserves that coverage through the current head's narrow rollback guard and mainline probe integration; those later changes have supplemental regression evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The matching captured body contains packaged aa42 Linux/systemd transcripts exercising the changed resolver through Doctor, deep status, and post-upgrade JSON after a published 2026.9.4 updater handoff. They demonstrate successful stale-pin repair, registry-lag explanations, channel preservation, and unchanged records. Source comparison preserves that coverage through the current head's narrow rollback guard and mainline probe integration; those later changes have supplemental regression evidence.
Evidence reviewed 8 items Current main still needs the repair: Current main resolves registry targets only for exact npm pins; ClawHub entries still bypass target resolution and receive generic update guidance.
Latest release also lacks ClawHub target resolution: The supplied latest release, v2026.9.5, retains the npm-only target resolver. This PR's central diagnostic behavior is not already shipped there.
Existing owners supply selection and version ordering: The resolver delegates selector handling to resolveClawHubUpdateSpecs, checks compatibility, retains exact registry-current results, and uses isPackageVersionDowngrade before advertising a repair. Earlier compatibility, registry-selection, stale-pin, and hidden-registry-lag findings are addressed.
Findings None None.
Security None None.

How this fits together

Plugin diagnostics compare installed plugin records with the Gateway version and registry metadata. Doctor and Gateway status turn those results into repair commands or explanations without changing installed plugins.

flowchart TD
  A[Installed plugin records] --> C[Plugin drift diagnostics]
  B[Gateway version and update channel] --> C
  C --> D[Existing update selector]
  D --> E[Recorded ClawHub registry]
  E --> F[Compatibility and version checks]
  F --> G[Doctor and deep status]
  G --> H[Repair command or explanation]
Loading

Before merge

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

Security

None.

PR surface

Source +267, Tests +677. Total +944 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 5 281 14 +267
Tests 6 832 155 +677
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 1113 169 +944

Review metrics

Metric Value Why it matters
Production and regression coverage Net production +267 lines; tests +677 lines Production growth implements registry-aware diagnostics across three existing output surfaces; tests cover selection, compatibility, lag, and rollback outcomes.
Persistent contract changes 0 schemas, migrations, or config options added The additional resolution fields are transient diagnostics, resolving the previous migration-gate concern.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-post-upgrade.ts, migration/backfill/repair: src/commands/doctor-workspace-status.ts, migration/backfill/repair: src/commands/doctor.ts, unknown-data-model-change: src/commands/doctor-post-upgrade.ts, unknown-data-model-change: src/commands/doctor-workspace-status.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep diagnostics aligned with the existing update selector, showing attainable targets and explicit non-actionable outcomes while leaving install state untouched.

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

Yes, from source: a ClawHub plugin whose latest release trails the Gateway receives an unattainable host-version target on current main. Supplied runtime transcripts corroborate the failure and repaired behavior; this review did not execute it.

Is this the best way to solve the issue?

Yes. Reusing the update selector and version-ordering owners is a focused repair, and the inspected native handoff evidence supports preservation of existing operator state.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This fixes misleading plugin maintenance guidance with a bounded diagnostic scope.
  • 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 (terminal): The matching captured body contains packaged aa42 Linux/systemd transcripts exercising the changed resolver through Doctor, deep status, and post-upgrade JSON after a published 2026.9.4 updater handoff. They demonstrate successful stale-pin repair, registry-lag explanations, channel preservation, and unchanged records. Source comparison preserves that coverage through the current head's narrow rollback guard and mainline probe integration; those later changes have supplemental regression evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The matching captured body contains packaged aa42 Linux/systemd transcripts exercising the changed resolver through Doctor, deep status, and post-upgrade JSON after a published 2026.9.4 updater handoff. They demonstrate successful stale-pin repair, registry-lag explanations, channel preservation, and unchanged records. Source comparison preserves that coverage through the current head's narrow rollback guard and mainline probe integration; those later changes have supplemental regression evidence.

Evidence

What I checked:

  • Current main still needs the repair: Current main resolves registry targets only for exact npm pins; ClawHub entries still bypass target resolution and receive generic update guidance. (src/plugins/plugin-version-drift.ts:82, 0e9181234a42)
  • Latest release also lacks ClawHub target resolution: The supplied latest release, v2026.9.5, retains the npm-only target resolver. This PR's central diagnostic behavior is not already shipped there. (src/plugins/plugin-version-drift.ts:82, ec9c1a13db89)
  • Existing owners supply selection and version ordering: The resolver delegates selector handling to resolveClawHubUpdateSpecs, checks compatibility, retains exact registry-current results, and uses isPackageVersionDowngrade before advertising a repair. Earlier compatibility, registry-selection, stale-pin, and hidden-registry-lag findings are addressed. (src/plugins/plugin-version-drift.ts:185, a3ce3af92ea0)
  • No introduced persisted-data change: Post-upgrade diagnostics read the existing installed index and preserve its enablement selection; only configured update-channel intent is added. The introduced diff changes no schema, install-record writer, migration, or persisted config shape, so the previous generic migration blocker does not apply. (src/commands/doctor-post-upgrade.ts:93, a3ce3af92ea0)
  • Packaged upgrade and real diagnostic proof: Retrieved body SHA-256 matches the captured snapshot: 8484f85e2a42a4d3ed8f2209cc45b7cb942e733d97f290e22ff6aa4bca5b428e. Its native transcript records published OpenClaw 2026.9.4 updating to packaged aa42 on an isolated Linux systemd VM. Both stale diffs and registry-current tokenjuice were exercised through ordinary Doctor, deep status, and post-upgrade JSON on stable and beta. Records and plugin bytes survived the handoff; the advertised diffs repair subsequently succeeded. Normal-network upgrade success is distinguished from the outage-qualified retained-record cells. (aa42f796d4a7)
  • Proof continuity through the current head: GitHub comparison confirms the ordinary Doctor and deep-status production files are unchanged since packaged aa42. Relevant subsequent changes are main's manifest-readability probe and the narrow rollback-target guard. The latter preserves the native cells' equal/newer targets; the body records four failing-before downgrade cases and seven passing affected cases. Native execution remains attributed to aa42, not the current head. (src/plugins/plugin-version-drift.ts:247, a3ce3af92ea0)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; 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 (18 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-15T20:23:58.605Z sha 5be4567 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-15T21:04:09.823Z sha 5be4567 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-19T12:23:09.676Z sha e01f988 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-19T14:07:17.639Z sha 6446a72 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-19T16:48:20.562Z sha e0ee747 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-19T17:28:31.406Z sha aa42f79 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-19T18:11:11.847Z sha aa42f79 :: blocked before merge. :: none
  • reviewed 2026-09-19T18:31:42.925Z sha d1a847f :: blocked before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 11, 2026
Plugin restart readiness compared every active official external plugin
against the running OpenClaw version, including installs whose upgrade
target lives in ClawHub. ClawHub publishes on its own release train, so
its latest version can sit below the host version. Doctor then named an
expected version that no update can reach and suggested a command that
cannot clear the warning.

Resolve the upgrade target for ClawHub installs from ClawHub itself.
An install that already holds the newest version ClawHub offers is not
drift and is dropped from the report. When ClawHub cannot answer, the
drift stays reported with an unresolved target so a real gap is never
hidden. The status line now names the registry-confirmed target instead
of the host version.
@DasX
DasX force-pushed the fix/doctor-clawhub-plugin-drift-target branch from 5d711d0 to fcd01e1 Compare September 11, 2026 18:29
@DasX

DasX commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Pushed dd5c188 addressing the review findings, with after-fix runtime evidence.

Changes since fcd01e1 (2 files, +166/-6: src/plugins/plugin-version-drift.ts and its test):

  1. Compatibility is preserved instead of dropped. A ClawHub target that fails the plugin-API requirement now surfaces as targetResolution.status: "unresolved" carrying the reason, rather than being silently omitted from the report.
  2. The recorded registry is honoured. Resolution uses the source/spec actually recorded for the installed plugin instead of re-deriving it.
  3. Selector and update channel are carried through, so the resolved target matches the channel the plugin was installed from.

Red/green per finding (each test was first red against the unfixed code):

Area Red Green
compatibility red-compat.log 38/38 PASS
recorded registry red-registry.log PASS
selector/channel red-selectors.log PASS

Focused suite: 44/44 PASS. Sibling shards: 2 Vitest shards, 3/3 PASS in doctor-workspace-status.plugin-version-drift.test.ts. check:changed completed clean (import cycles 0, all guards OK). doctor-update.ledger.test.ts passes 7/7 locally without modifying that test; I am not claiming that proves the earlier CI shard failure is fixed, only that it is green here.

After-fix runtime evidence (the piece that was missing). Run against an isolated profile with real installed packages and a synthetic config on an unused port, seeded through the real owner, never against a live Gateway:

  • host 2026.9.4, both plugins installed at 2026.9.3 → status: "resolved", drifts: []
  • rollback boundary 2026.9.2 → both plugins status: "unresolved" with ClawHub @openclaw/<name> requires plugin API >=2026.9.3, but the target Gateway is 2026.9.2

That second case is the regression this PR is about: previously the unresolvable target disappeared from the report; now it is reported with its reason.

doctor --post-upgrade --json ran all four plugin probes (index_unavailable, entry_unresolved, manifest_drift, version_drift) with findings: [].

One honest caveat: doctor --lint exits 1 on that fixture, but all five findings are severity: warning and belong to the fixture profile itself (Codex route, heartbeat cadence, loopback bind, device-pair disabled, Control UI assets not built in the checkout). None come from a plugin.* probe. Remote CI is the real gate.

An independent automated review of the working tree returned "patch is correct" (confidence 0.68). Its two P2 findings applied only to a stale index, not to the committed tree; I staged exactly the reviewed tree and confirmed no unstaged difference. Remaining lower-priority observations: the env probe is mocked, and no versionBoundToCore input is exercised, because the CLI individual-plugin update path does not supply versionBoundPluginIds. The diagnostics intentionally cover latest-intent only.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 11, 2026
@vincentkoc vincentkoc self-assigned this Sep 13, 2026
@vincentkoc

Copy link
Copy Markdown
Member

@DasX I'm taking the two narrow diagnostic follow-ups on this existing PR, preserving your branch and credit: carry configured update-channel intent into post-upgrade probes while keeping the persisted plugin index authoritative for enablement, and make Doctor show the registry-confirmed target. Both gaps remain at dd5c188437eb82069c914ffdf4562a2667ead2a7; current main b3285132a5bde72717c3178953696bd0691121db still lacks the ClawHub resolution repair. I'll add focused entrypoint and rendered-output coverage before handoff. No merge or broader updater changes are planned here.

@vincentkoc
vincentkoc marked this pull request as draft September 13, 2026 11:21
@vincentkoc
vincentkoc marked this pull request as ready for review September 13, 2026 11:32
@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations size: L and removed size: M labels Sep 13, 2026
Two maintainer P1 findings on the ClawHub drift diagnostic:

1. A stale recorded ClawHub pin got no executable repair. The diagnostic
   read the recorded selector literally, so an exact pin never reached the
   registry and the unresolved-target guard then suppressed the update
   command. Resolution now goes through the update owner
   (resolveClawHubUpdateSpecs) with the catalog spec carried from
   admission, so a pin at or below the target Gateway resumes the
   catalog's release policy here exactly as it does during an update. The
   prescribed repair is the plugin id, which the ClawHub update-selection
   owner accepts. A pin above the target Gateway stays unresolved.

2. Registry lag was dropped instead of explained. When the installed and
   registry-latest versions matched but the expected Gateway version was
   newer, the entry was removed from every downstream diagnostic. It now
   carries a registry-current outcome with the observed registry version
   and the expected Gateway version; only the no-op update command is
   suppressed. Doctor reports it as an informational finding without a fix
   hint, deep Gateway status explains it outside the repair-failure
   surface, and post-upgrade states that no release reaches the expected
   version yet.
@DasX

DasX commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

@steipete Thanks, both P1s reproduced from source and both are fixed on 5be45672ff43279896a24a01929805243e47c074. Pushed myself rather than taking you up on the offer, so the next round runs on this head.

1. Stale recorded ClawHub pins (plugin-version-drift.ts:163). Confirmed: an exact recorded pin returned before the registry lookup, and the unresolved-target guard then suppressed the command, so the entry ended with a warning and no repair. The cause was that the diagnostic read the recorded selector literally while the update owner does not: resolveClawHubUpdateSpecs runs resolveUnpinnedOfficialReleaseSpec first, so a pin at or below the target Gateway resumes the catalog's unpinned policy during an actual update. Target resolution now calls that same owner with the catalog spec carried from admission, instead of calling resolveClawHubInstallSpecsForUpdateChannel directly. The prescribed move is openclaw plugins update <pluginId>; resolvePluginUpdateSelection accepts an id for any tracked install, while its spec-override path is npm-only, so an id is the only selector a ClawHub install actually takes. A pin above the target Gateway stays unresolved, since moving off it is not obviously the repair. The test that asserted the old outcome is replaced by one asserting the resolved target plus the accepted command, and a second one pinning the above-Gateway boundary.

2. Registry lag dropped (plugin-version-drift.ts:201). Confirmed, and it was the case the PR itself documented. null is gone. The entry now carries status: "registry-current" with the observed registry version and the expected Gateway version, and only the no-op command is suppressed. Renderers distinguish it from a resolution failure: the doctor health finding is info with no fix hint, gateway status --deep prints the explanation outside the repair-failure surface, and doctor --post-upgrade says no release reaches the expected version yet. info rather than warning is deliberate, so a host running ahead of the plugin release train does not get a doctor --lint failure it cannot clear; say the word if you would rather have it at warning.

Test status on this head: 409 passed, 1 skipped across plugin-version-drift, doctor-workspace-status.plugin-version-drift, doctor-post-upgrade, status.print, install-channel-specs, and plugins/update. tsc -p tsconfig.core.json reports no errors in any changed file, oxfmt/oxlint are clean on all eight, import cycles are 0.

Still open, and I would rather say so than paper over it: the real-CLI qualification ClawSweeper keeps asking for is not done. The evidence here is test-level plus the original real-package run at dd5c188, which predates the Doctor rendering and channel work, and the published-driver to candidate handoff has not been executed. Locally this checkout cannot run the full suite because its dependencies are stale after the sync with main (import-meta-resolve and @openclaw/fs-safe/copy are declared but not installed); src/commands/doctor.test.ts fails identically on the unmodified head, so that is environment state rather than a regression, but it does mean CI is the gate for those. The PR body is updated with all of this.

@DasX

DasX commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor Author

The head is reconciled, and reviewed-head post-upgrade and configured-channel CLI proof is now in the body. The published OpenClaw updater handoff and managed-service diagnostics remain unproven.

Head. The fix commit 5be45672ff43 was pushed on 2026-09-14 and has been on the branch since, but this PR's head record was stuck at its parent bed372823a17, which is why the body and the PR disagreed. The branch was never wrong and nothing was rewritten: I resynced the PR record, and the head now reads 5be45672ff43279896a24a01929805243e47c074. No force push, no rebase.

Proof. All runs are on an isolated OpenClaw instance at that head: its own state directory, its own config file, a synthetic workspace, sidecars disabled. The production Gateway and its configuration were not modified or restarted. A separate deep-status attempt resolved the host's service metadata instead of the test instance; it is excluded from the isolation proof. Package metadata comes from the public ClawHub registry, so the versions are real published ones.

  • Published-plugin installation, not an updater handoff. openclaw plugins install clawhub:@openclaw/[email protected] and clawhub:@openclaw/lobster download and install the real published artifacts, and the real installer writes the install index the diagnostic then reads. The body quotes those records.
  • Doctor rendering. On that instance, openclaw doctor --post-upgrade prints the executable repair for the stale pin ("Run openclaw plugins update diffs, then restart the Gateway.") and the registry-lag explanation for the install that already holds the newest published version ("The registry already serves 2026.9.3; no release reaches 2026.9.4 yet, so no update applies."). Rendered and --json forms are both in the body.
  • Before/after. The identical scenario on the parent commit bed372823a17 shows both P1s: the stale pin gets "No confirmed repair target is available", and the registry-lag entry is missing from the report entirely.
  • Configured channel. Changing only update.channel from stable to beta in the isolated config changes both findings to unresolved, because the update owner selects @beta and latest metadata cannot confirm it. So the configured channel does reach the target resolution through the CLI, and the stable-channel results are a property of the fix rather than of the channel default.

What I did not prove, stated rather than skipped.

  • The doctor workspace-status health finding and the deep gateway status line were not exercised by a real command. Both reach the diagnostic through daemon status gathering, which binds to the default install identity and the loaded native Gateway service (status.gather.ts); the state/config overrides used here did not isolate the loaded service, and the deep-status attempt reported the host's service. A separate managed-service test environment is needed; this does not require changing the production Gateway. They stay covered by the rendering tests.
  • The candidate CLI itself runs from the reviewed source through the repository's tsx loader, not from a packed tarball. pnpm build:package refuses under the memory available here: it reports a 4352 MB heap requirement peaking near 4.7 GB. The plugin artifacts are genuinely published, but the host runs from source; no published OpenClaw updater was exercised.
  • Both installed plugins fail to load in a source checkout (TypeError: ... 'argvDirectories'), and lobster exits 1 and collides with the bundled lobster in dist/. Their install records are still persisted, and the diagnostic reads records rather than loaded instances, so this does not affect the results above. I am not claiming that load path is green here.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 15, 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.

@clawsweeper

clawsweeper Bot commented Sep 15, 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:

status.print.test.ts exceeded the line-cap ratchet. The five plugin
version drift renderer cases move into a sibling file unchanged, except
for the explicit loaded: true that the old wrapper supplied. No assertion
was removed or weakened.

Line-cap ratchet against origin/main passes with no new violation.
status.print and the new sibling run green: 59 tests, 1 existing skip.
Keep distinct correction releases and build metadata actionable while suppressing only exact installed package versions. Preserve the current plugin update selector and rejection contracts.
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 19, 2026
@fuller-stack-dev
fuller-stack-dev merged commit 5ad3c49 into openclaw:main Sep 19, 2026
225 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 20, 2026
…law#145103)

* fix(doctor): resolve ClawHub plugin drift targets from ClawHub

Plugin restart readiness compared every active official external plugin
against the running OpenClaw version, including installs whose upgrade
target lives in ClawHub. ClawHub publishes on its own release train, so
its latest version can sit below the host version. Doctor then named an
expected version that no update can reach and suggested a command that
cannot clear the warning.

Resolve the upgrade target for ClawHub installs from ClawHub itself.
An install that already holds the newest version ClawHub offers is not
drift and is dropped from the report. When ClawHub cannot answer, the
drift stays reported with an unresolved target so a real gap is never
hidden. The status line now names the registry-confirmed target instead
of the host version.

* fix(doctor): preserve ClawHub compatibility and update intent

* fix(doctor): preserve ClawHub diagnostic targets

* style(plugins): format ClawHub drift diagnostics

* test(plugins): cover resolved ClawHub status targets

* fix(doctor): repair stale ClawHub pins and explain registry lag

Two maintainer P1 findings on the ClawHub drift diagnostic:

1. A stale recorded ClawHub pin got no executable repair. The diagnostic
   read the recorded selector literally, so an exact pin never reached the
   registry and the unresolved-target guard then suppressed the update
   command. Resolution now goes through the update owner
   (resolveClawHubUpdateSpecs) with the catalog spec carried from
   admission, so a pin at or below the target Gateway resumes the
   catalog's release policy here exactly as it does during an update. The
   prescribed repair is the plugin id, which the ClawHub update-selection
   owner accepts. A pin above the target Gateway stays unresolved.

2. Registry lag was dropped instead of explained. When the installed and
   registry-latest versions matched but the expected Gateway version was
   newer, the entry was removed from every downstream diagnostic. It now
   carries a registry-current outcome with the observed registry version
   and the expected Gateway version; only the no-op update command is
   suppressed. Doctor reports it as an informational finding without a fix
   hint, deep Gateway status explains it outside the repair-failure
   surface, and post-upgrade states that no release reaches the expected
   version yet.

* test(cli): split plugin version drift cases into their own file

status.print.test.ts exceeded the line-cap ratchet. The five plugin
version drift renderer cases move into a sibling file unchanged, except
for the explicit loaded: true that the old wrapper supplied. No assertion
was removed or weakened.

Line-cap ratchet against origin/main passes with no new violation.
status.print and the new sibling run green: 59 tests, 1 existing skip.

* fix(doctor): preserve exact ClawHub correction targets

Keep distinct correction releases and build metadata actionable while suppressing only exact installed package versions. Preserve the current plugin update selector and rejection contracts.

* fix(plugins): reject registry rollback repair targets

---------

Co-authored-by: Peik S. <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Jason (Json) <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: Richard355168 <[email protected]>
Co-authored-by: ggbond <[email protected]>
Co-authored-by: IWhatsskill <[email protected]>
Co-authored-by: VACInc <[email protected]>
Co-authored-by: njuboy11 <[email protected]>
Co-authored-by: Alix-007 <[email protected]>
Co-authored-by: Altay <[email protected]>
Co-authored-by: xydt-juyaohui <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: Jason Sy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations 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: XL 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.

4 participants