Skip to content

fix(doctor): keep ready plugin contracts in update validation - #149381

Closed
steipete wants to merge 3 commits into
mainfrom
codex/ready-config-only-doctor-contract-20260915
Closed

steipete wants to merge 3 commits into
mainfrom
codex/ready-config-only-doctor-contract-20260915

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Related: #147711, #146636

What Problem This Solves

Private update canaries could skip an available custom plugin's config-only Doctor contract while package installation was deferred. The installed updater already sets the supported deferral marker; candidate Doctor must still inspect ready contracts.

User Impact

Ready, activated config-only contracts remain visible during update validation. Missing or stale payloads, migration-bearing or unknown contracts, disabled plugins, and retained migration obligations keep their existing deferral rules. Downloads remain with the update finalization owner.

Why This Change Was Made

The existing availability owner already knows the selected artifact's availability and migration declaration. It now distinguishes a ready config-only contract from unavailable code. Preflight carries retained obligations through its second convergence inspection, so a ready artifact cannot erase earlier debt.

No new schema, configuration option, dependency, updater marker, or installation policy is introduced. The current-main refresh preserves bundled runtime-alias resolution from #149653 and schema repair before pending migration persistence from #149753.

Evidence

  • Both original ready-contract and retained-debt regressions failed on the original production code for their intended assertions. The focused production repair remains patch-identical after the main refresh.
  • The initial unrepaired metadata package remains recorded as failed: the published updater and private runtime loading succeeded, but the required Doctor callback was absent. Its assertion was not weakened.
  • The published [email protected] custom-plugin-siblings scenario passed against exact composition 7ddc85668baf3444b57270b04164be14bce70ba7, combining this Doctor repair at e31bdb77 with metadata fix(outbound): prepare cold channel metadata asynchronously #149304 at ea5af63c. Package SHA-256: f66f97d0711845c58bd4db6eb56e86005da3be4ebef210539624ea2ebce7c2da. All 13 phases and 12 updater steps passed; inspected canary records contain two Doctor-module, two Doctor-contract, and two runtime callbacks. Source/config preservation checks passed. This is isolated Linux ARM64 Docker proof with manual restart mode and no live provider; emitted hash fields are observations, not additional seeded-equality assertions.
  • The earlier successful Testbox composition 58b02b48 and package 19e968911f6009d0e078ec51608388a77e0f0a54ea8c1c1c1fd76feeb6ee03ab remain separate historical proof. The 0034cc96 composition never reached remote package or updater execution.
  • The completed e31 CI run failed on three unrelated fixtures: service deletion readiness, yielded-child registry draining, and PR-wrapper alias dependencies. The refresh incorporates their existing main repairs fix(worktrees): stabilize cancellation recovery test readiness #149531, test(gateway): stabilize yielded-session settlement #149558, and test(pr): initialize alias fixture dependencies once and preserve links #149638.

The retained package proofs keep their exact source identities; this refresh does not claim a newly executed package or a managed-service restart. Refresh abef83efbc2686092a2413e7fabb2efd5758ab07 preserves the production repair while adapting two existing fixtures to the new empty runtime-alias field. All 110 selected cases passed (57 final adapted-suite cases and 53 unchanged sibling cases); scoped types, lint, formatting, dead-export scans and guards passed, and fresh independent P2 review is clean. Lint reports one nonblocking line-count warning in the existing preflight owner (703 versus 700), with no suppression. Exact-head hosted CI is blocked by three contended-maintenance elapsed-time assertions in existing memory-core coverage. Their source boundary is under review; native preparation and merge are not complete.

Keep available config-only Doctor contracts visible while package installation is deferred. Preserve stale payload, state migration, activation, and retained-obligation boundaries through convergence.

Refs #147711, #146636.
@clawsweeper

clawsweeper Bot commented Sep 15, 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 15, 2026 19:50
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations size: M maintainer Maintainer-authored PR labels Sep 15, 2026
@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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 16, 2026, 7:48 AM ET / 11:48 UTC (Revision 5).

ClawSweeper review

What this changes

Doctor keeps ready plugins’ configuration-repair callbacks available during update validation while preserving previously deferred migration work.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful, focused repair with no actionable code findings. The retained published-updater evidence satisfies the previous review’s upgrade-proof concern.

Priority: P2
Reviewed head: abef83efbc2686092a2413e7fabb2efd5758ab07

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused owner-level repair with meaningful regressions and relevant published-updater evidence; no blocking patch defect was found.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Recorded Linux ARM64 Docker observations show the published 2026.9.4 updater exercising the repaired availability path in composition 7ddc8566, with private-canary Doctor callbacks, runtime registration, and preserved configuration/source. Source comparison preserves the qualified repair through the refresh; this does not claim a fresh exact-head package run or managed-service restart.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Recorded Linux ARM64 Docker observations show the published 2026.9.4 updater exercising the repaired availability path in composition 7ddc8566, with private-canary Doctor callbacks, runtime registration, and preserved configuration/source. Source comparison preserves the qualified repair through the refresh; this does not claim a fresh exact-head package run or managed-service restart.
Evidence reviewed 10 items Repair remains absent from current main: The fetched main still excludes non-bundled plugins whenever installation is deferred, including available configuration-only contracts. Comparing the availability owner against the reviewed head isolates the proposed eligibility repair.
Eligibility and retained-obligation boundaries: The exception requires an available artifact, an activated owner, an explicit configuration-repair declaration, and no retained obligation. State-bearing and unknown contracts remain outside it. Preflight forwards retained IDs through convergence; the existing completion owner still controls pending-record settlement.
Qualified repair survives refresh: Reading the qualified e31 source through GitHub and comparing it with the checkout confirms the eligibility repair is unchanged. Differences in this module are the merged runtime-alias handling from #149653. A separate preflight comparison preserves the retained-ID handoff alongside the merged schema-repair changes.
Findings None None.
Security None None.

How this fits together

Doctor validates and repairs configuration during updates and Gateway startup. Plugin metadata, installed payloads, and pending migration records determine which callbacks run and which obligations remain deferred.

flowchart TD
  A[Update or Gateway startup] --> B[Doctor preflight]
  C[Plugin metadata and payloads] --> D[Availability inspection]
  E[Retained migration obligations] --> D
  B --> D
  D -->|Ready configuration repair| F[Existing Doctor callbacks]
  D -->|Unavailable or migration pending| G[Deferred work and repair guidance]
Loading

Before merge

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

Security

None.

PR surface

Source +20, Tests +201, Docs +6. Total +227 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 4 23 3 +20
Tests 3 201 0 +201
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 230 3 +227

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-config-preflight-plugin-verification.ts, migration/backfill/repair: src/commands/doctor-config-preflight-startup.ts, migration/backfill/repair: src/commands/doctor-config-preflight.ts, unknown-data-model-change: src/commands/doctor/shared/plugin-migration-availability.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep callback eligibility in the existing availability owner, with package installation and retained migration completion governed by their existing owners.

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

Yes: current main’s deferral condition excludes an available external configuration-only contract, and the existing custom-plugin-siblings updater scenario checks the missing callback. This review established the path from source without executing it.

Is this the best way to solve the issue?

Yes: the patch narrows the existing availability decision and carries retained obligations through its existing callers, avoiding a parallel loader or installation policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs a bounded update-validation gap affecting available custom plugins with configuration-only Doctor contracts.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Recorded Linux ARM64 Docker observations show the published 2026.9.4 updater exercising the repaired availability path in composition 7ddc8566, with private-canary Doctor callbacks, runtime registration, and preserved configuration/source. Source comparison preserves the qualified repair through the refresh; this does not claim a fresh exact-head package run or managed-service restart.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded Linux ARM64 Docker observations show the published 2026.9.4 updater exercising the repaired availability path in composition 7ddc8566, with private-canary Doctor callbacks, runtime registration, and preserved configuration/source. Source comparison preserves the qualified repair through the refresh; this does not claim a fresh exact-head package run or managed-service restart.

Evidence

What I checked:

  • Repair remains absent from current main: The fetched main still excludes non-bundled plugins whenever installation is deferred, including available configuration-only contracts. Comparing the availability owner against the reviewed head isolates the proposed eligibility repair. (src/commands/doctor/shared/plugin-migration-availability.ts:124, 809c4dfc1519)
  • Eligibility and retained-obligation boundaries: The exception requires an available artifact, an activated owner, an explicit configuration-repair declaration, and no retained obligation. State-bearing and unknown contracts remain outside it. Preflight forwards retained IDs through convergence; the existing completion owner still controls pending-record settlement. (src/commands/doctor/shared/plugin-migration-availability.ts:131, abef83efbc26)
  • Qualified repair survives refresh: Reading the qualified e31 source through GitHub and comparing it with the checkout confirms the eligibility repair is unchanged. Differences in this module are the merged runtime-alias handling from fix(doctor): avoid false pending migrations for bundled runtimes #149653. A separate preflight comparison preserves the retained-ID handoff alongside the merged schema-repair changes. (src/commands/doctor/shared/plugin-migration-availability.ts:131, e31bdb77c6af)
  • Published-driver behavior evidence: The captured PR body records the published [email protected] updater exercising composition 7ddc85668baf3444b57270b04164be14bce70ba7, combining the Doctor repair with fix(outbound): prepare cold channel metadata asynchronously #149304. Package SHA-256 f66f97d0711845c58bd4db6eb56e86005da3be4ebef210539624ea2ebce7c2da passed 13 phases and 12 update steps, with two private-canary Doctor callbacks, two runtime callbacks, and preserved source/configuration. This is recorded Linux ARM64 Docker evidence in manual-restart mode, not a newly executed exact-head package or managed-service restart. (7ddc85668baf)
  • Proof exercises the changed callback path: The existing survivor scenario seeds an enabled custom plugin declaring configuration-only repair. Its assertions require actual Doctor callback execution and Gateway registration inside private canary state, sibling-path containment, unchanged original files, and preserved plugin enablement and memory selection. (scripts/e2e/lib/upgrade-survivor/custom-plugin-siblings.mjs:129, abef83efbc26)
  • Historical workflow status distinguished from scenario proof: The linked historical workflow reports cancelled overall. It is not treated as a green workflow or substituted for the separately recorded successful Docker cell. (60deb0d840d8)

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 (4 earlier review cycles)
  • reviewed 2026-09-15T19:57:15.343Z sha 911ede1 :: blocked before merge. :: none
  • reviewed 2026-09-15T21:44:36.784Z sha 911ede1 :: blocked before merge. :: none
  • reviewed 2026-09-15T23:14:42.279Z sha e31bdb7 :: blocked before merge. :: none
  • reviewed 2026-09-16T11:19:13.934Z sha abef83e :: blocked before merge. :: none

@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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Sep 15, 2026
Merge verified main repair ancestry through 6c28739, including #149349 and #149423. Preserve all eight reviewed Doctor files unchanged.
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 15, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by #150978's current Doctor policy, verified on 2337b6b3572fa5378d2c8965de84fe4d44eed87a.

Copied config plugins beneath the recognized rehearsal root are eligible for Doctor inspection; ordinary config paths remain deferred during installation deferral. Initial preparation already supplies retained IDs, and state/inspection obligations are learned monotonically and preserved through completion. The additional convergence forwarding in this PR served its broader readyConfigOnly exception, which current policy does not use.

All 17 selected existing preflight boundary cases passed, covering rehearsal availability, ordinary/stale deferral, retained obligations, and successful retry, without retries or deadline/assertion changes. Source inspection of the published 2026.9.4 driver (3a9d69db306c) confirms that it supplies the recognized path/policy markers and projects copied plugin paths beneath that root.

This is current owner-boundary proof plus a shipped-driver source-contract check, not a new installed-updater run or fresh sibling-callback-event proof. Historical 7ddc8566 / f66f97d0 updater evidence remains bound to its original combined package. The broader ordinary-path availability change is intentionally not carried forward.

@steipete steipete closed this Sep 18, 2026
steipete added a commit that referenced this pull request Sep 18, 2026
Prepare cold outbound channel metadata asynchronously through the existing state worker. Preserve the shared plugin cache and selection owner, captured workspace/state context, and currentness checks before loading or queue admission. Cancellation and preparation failures retain one queue-owned terminal audit and message hook.

Keep synchronous bootstrap for callers outside this cut. Extract unchanged retry policy and the Matrix test adapter into internal siblings; preserve canonical catalog custody and complementary regression coverage. No new configuration, stored format, or migration.

Validation: exact-head CI run 35343214882 passed; focused metadata/worker controls, relevant types, line-cap checks, and fresh P2 review passed. Historical updater proof remains bound to source 7dd / package f66; no new installed-update or live-provider proof is claimed.

Related: #144592. Doctor #149381 was superseded by canonical #150978.
Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
…#149304)

Prepare cold outbound channel metadata asynchronously through the existing state worker. Preserve the shared plugin cache and selection owner, captured workspace/state context, and currentness checks before loading or queue admission. Cancellation and preparation failures retain one queue-owned terminal audit and message hook.

Keep synchronous bootstrap for callers outside this cut. Extract unchanged retry policy and the Matrix test adapter into internal siblings; preserve canonical catalog custody and complementary regression coverage. No new configuration, stored format, or migration.

Validation: exact-head CI run 35343214882 passed; focused metadata/worker controls, relevant types, line-cap checks, and fresh P2 review passed. Historical updater proof remains bound to source 7dd / package f66; no new installed-update or live-provider proof is claimed.

Related: openclaw#144592. Doctor openclaw#149381 was superseded by canonical openclaw#150978.
Co-authored-by: Vincent Koc <[email protected]>
@RomneyDa
RomneyDa deleted the codex/ready-config-only-doctor-contract-20260915 branch October 22, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M 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