Skip to content

fix(plugins): reject unknown targeted update owners - #117333

Merged
steipete merged 1 commit into
mainfrom
codex/qa400-plugin-update-tracked-owner
Aug 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/qa400-plugin-update-tracked-owner

Conversation

@steipete

@steipete steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw plugins update missing-plugin returned exit code 0 after reporting that no install record existed. Scoped missing packages, inherited prototype names, ambiguous npm package owners, and --dry-run all shared the false-success path. Updating a valid hook pack also dispatched the plugin updater for a nonexistent plugin owner.

Why This Change Was Made

The plugin update selector synthesized an owner from an arbitrary requested string when no unique tracked plugin matched. The existing generic updater correctly treats missing records as an advisory skip for its broader internal callers, so the fix belongs at CLI target ownership selection. Select only tracked plugin ids or uniquely mapped npm packages; let the separate hook selector own hook targets; emit a specific actionable CLI error when an explicitly supplied target resolves to neither owner.

User Impact

  • Unknown, inherited-prototype, ambiguously owned, and dry-run explicit update targets fail on stderr with exit code 1 before any updater or configuration mutation.
  • Hook-only updates run only the hook updater, with no misleading plugin warning or redundant package work.
  • Tracked npm ids, scoped package aliases, tags and versions, --all with no tracked packages, and intentionally skipped linked plugins keep existing behavior.

Evidence

  • Authentic production-baseline regressions: owner selector 4 failed / 8 passed; real Commander CLI 6 failed / 36 passed before production changes.
  • Frozen candidate: 55/55 existing owner tests (12 selector + 43 Commander) in one cache-disabled single-worker run.
  • A source-blind product harness independently loads immutable baseline/candidate production owners, runs 9 actual Commander/defaultRuntime subprocess cases each, checks stdout/stderr/process exit and updater/config-write side effects, and passes all 9 RED + 9 GREEN assertions.
  • Four fresh independent hostile P0-P3 audits are clean; the sole official full strict autoreview with real TruffleHog is clean at 0.94 confidence.
  • Exact root-approved four existing files; production +8/-12, net -4. No generic-updater, config, SQLite, SDK, auth, security policy, trust, or install-source changes.
  • Current main 3edbe19fbd84ba58fdbf8e83042da9efd1d06f81 retains all 17 reviewed owner/caller/docs/root blobs unchanged; synthetic merge is clean.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Aug 1, 2026
@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. P2 Normal backlog priority with limited blast radius. labels Aug 1, 2026
@clawsweeper

clawsweeper Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 5:55 AM ET / 09:55 UTC.

ClawSweeper review

What this changes

The PR makes targeted openclaw plugins update requests resolve only to tracked plugin IDs or an unambiguous tracked npm package, returning an actionable nonzero error for unknown targets while preserving hook-only updates.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for protected maintainer handling and exact-head CI completion. The patch correctly moves explicit-target validation into the CLI owner-selection boundary, so untracked or ambiguous targets fail instead of reaching the generic updater’s intentional advisory-skip path.

Priority: P2
Reviewed head: 741882873f505f7d55f7a32768f2aaaf8eda1e23
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned repair with concrete real-behavior harness evidence; it awaits protected maintainer handling and normal exact-head CI completion.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The PR body provides after-fix subprocess-harness evidence for actual Commander/defaultRuntime behavior and side effects, and the supplied GitHub context reports the Real behavior proof check as successful.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides after-fix subprocess-harness evidence for actual Commander/defaultRuntime behavior and side effects, and the supplied GitHub context reports the Real behavior proof check as successful.
Evidence reviewed 5 items Current-main false-success path: Current selection returns an arbitrary explicit ID when parsing fails or the npm package has zero/multiple tracked matches; the command then passes that ID to the generic updater, whose missing-record contract is an advisory skipped outcome rather than a CLI error.
Documented target contract: The plugin-management documentation describes targeted updates as a plugin ID or npm package/spec for a tracked npm install, including explicit package specs used to switch the tracked record; it does not establish successful unknown-target updates as a supported outcome.
Patch preserves the generic updater boundary: The proposed selector now returns no plugin owner for unknown, inherited-prototype, or ambiguous package targets, and the command emits a specific error only when neither plugin nor hook selection resolves. The added selector and Commander tests cover unknown, dry-run, scoped, prototype, ambiguous, and hook-only cases.
Findings None None.
Security None None.

How this fits together

The plugin-update CLI reads tracked plugin install records and hook-pack records, resolves an explicitly requested target, then invokes the appropriate updater and persists any resulting changes. This PR changes only the ownership-resolution decision before either updater is called.

flowchart LR
  A[CLI update request] --> B[Tracked plugin records]
  A --> C[Tracked hook-pack records]
  B --> D[Plugin target selection]
  C --> E[Hook target selection]
  D --> F{Known owner?}
  E --> F
  F -->|yes| G[Plugin or hook updater]
  F -->|no| H[Actionable error and exit 1]
  G --> I[Config and registry refresh]
Loading

Decision needed

Question Recommendation
Should this protected maintainer-labeled CLI contract repair be approved once the remaining exact-head checks complete? Approve after exact-head checks: Accept the focused owner-selection repair once required checks finish on the reviewed head.

Why: The patch is source-backed and proof-positive, but the maintainer label requires explicit human handling rather than an automated cleanup or merge decision.

Before merge

  • Complete next step (P2) - No mechanical repair is needed; the protected maintainer label requires an explicit human approval path after exact-head checks complete.
Agent review details

Security

None.

PR surface

Source -4, Tests +78. Total +74 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 8 12 -4
Tests 2 82 4 +78
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 90 16 +74

Review metrics

None.

Technical review

Best possible solution:

Keep a single explicit-target owner-selection rule: accept tracked plugin IDs or one uniquely mapped tracked npm package, let hook selection own hook packs, and retain the generic updater’s advisory missing-record behavior for its broader internal callers.

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

Yes, source establishes a high-confidence current-main reproduction: an unknown explicit target is returned by resolvePluginUpdateSelection, reaches the generic updater, and becomes a skipped missing-record outcome rather than a command failure. The submitted Commander coverage targets that exact path, although this read-only review did not execute it.

Is this the best way to solve the issue?

Yes. The selector is the owner of explicit CLI target resolution, while the generic updater intentionally supports advisory skips for wider internal callers; rejecting unresolved owners there is the narrowest maintainable repair.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against aa2a5c96f69a.

Labels

Label changes:

  • add P2: This is a bounded CLI correctness repair: explicit invalid plugin-update requests currently report a skip and exit successfully, but the blast radius is limited to targeted plugin or hook update invocations.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix subprocess-harness evidence for actual Commander/defaultRuntime behavior and side effects, and the supplied GitHub context reports the Real behavior proof check as successful.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix subprocess-harness evidence for actual Commander/defaultRuntime behavior and side effects, and the supplied GitHub context reports the Real behavior proof check as successful.

Label justifications:

  • P2: This is a bounded CLI correctness repair: explicit invalid plugin-update requests currently report a skip and exit successfully, but the blast radius is limited to targeted plugin or hook update invocations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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): The PR body provides after-fix subprocess-harness evidence for actual Commander/defaultRuntime behavior and side effects, and the supplied GitHub context reports the Real behavior proof check as successful.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix subprocess-harness evidence for actual Commander/defaultRuntime behavior and side effects, and the supplied GitHub context reports the Real behavior proof check as successful.

Evidence

What I checked:

  • Current-main false-success path: Current selection returns an arbitrary explicit ID when parsing fails or the npm package has zero/multiple tracked matches; the command then passes that ID to the generic updater, whose missing-record contract is an advisory skipped outcome rather than a CLI error. (src/cli/plugins-update-selection.ts:28, aa2a5c96f69a)
  • Documented target contract: The plugin-management documentation describes targeted updates as a plugin ID or npm package/spec for a tracked npm install, including explicit package specs used to switch the tracked record; it does not establish successful unknown-target updates as a supported outcome. Public docs: docs/plugins/manage-plugins.md. (docs/plugins/manage-plugins.md:163, aa2a5c96f69a)
  • Patch preserves the generic updater boundary: The proposed selector now returns no plugin owner for unknown, inherited-prototype, or ambiguous package targets, and the command emits a specific error only when neither plugin nor hook selection resolves. The added selector and Commander tests cover unknown, dry-run, scoped, prototype, ambiguous, and hook-only cases. (src/cli/plugins-update-selection.ts:28, 741882873f50)
  • Real behavior evidence: The PR body reports a source-blind Commander/defaultRuntime subprocess harness covering nine baseline and nine candidate cases, including process exit, stderr/stdout, updater dispatch, and config-write side effects; the provided GitHub context reports the Real behavior proof check as successful. (741882873f50)
  • Feature provenance: git blame attributes the current owner-selection and no-selection command branch to the commit that introduced these update modules, making Peter Steinberger the strongest current-history routing candidate. (src/cli/plugins-update-selection.ts:24, 51c41c25c8c3)

Likely related people:

  • steipete: Current-main blame attributes the selector and the command’s empty-selection branch to Peter Steinberger’s introduction of these CLI update modules; the same person authored the proposed focused repair. (role: introduced current update-owner selection and recent area contributor; confidence: high; commits: 51c41c25c8c3; files: src/cli/plugins-update-selection.ts, src/cli/plugins-update-command.ts, src/cli/plugins-cli.update.test.ts)

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.

@steipete
steipete merged commit 7ab05df into main Aug 1, 2026
198 of 209 checks passed
@steipete
steipete deleted the codex/qa400-plugin-update-tracked-owner branch August 1, 2026 11:36
@steipete

steipete commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

chenyangjun-xy pushed a commit to chenyangjun-xy/openclaw that referenced this pull request Aug 1, 2026
* origin/main:
  refactor(doctor): unify legacy auth migration ownership (openclaw#117361)
  fix(plugins): surface actionable doctor warnings (openclaw#117357)
  fix(ci): use corrected Kova release evaluator (openclaw#116920)
  fix(ci): stabilize release validation assertions (openclaw#117377)
  refactor(memory): use sqlite transcript identities (openclaw#117334)
  fix(plugins): require tracked owners for targeted updates (openclaw#117333)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 2, 2026
* origin/main:
  refactor(doctor): unify legacy auth migration ownership (openclaw#117361)
  fix(plugins): surface actionable doctor warnings (openclaw#117357)
  fix(ci): use corrected Kova release evaluator (openclaw#116920)
  fix(ci): stabilize release validation assertions (openclaw#117377)
  refactor(memory): use sqlite transcript identities (openclaw#117334)
  fix(plugins): require tracked owners for targeted updates (openclaw#117333)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes 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