Skip to content

refactor(plugins): consume admitted metadata directly - #177436

Merged
steipete merged 1 commit into
mainfrom
deslop/r08-3-plugin-projections-20261015
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/r08-3-plugin-projections-20261015

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Plugin metadata projections repeat shape checks and normalization after their owners have already admitted the values. This recovers the plugin-area slice of the parked backup cleanup; the other infrastructure areas are deliberately separate for CI attribution.

What Changed

Read the two repository-bundled JSON catalogs using their inferred shapes, consume provider request policies normalized by manifest admission, and retain the fresh scope list after Control UI registration validates every scope. External manifest validation, provider ownership filtering, endpoint classification, HTTPS checks, required presentation fields, duplicate IDs, and operator-scope rejection remain in place. No SDK, config, protocol, dependency, or stored-data change.

The manifest test exercises the real load boundary with raw provider keys, padded policy fields, an unowned provider, and a malformed policy. The snapshot fixture now supplies canonical admitted facts without changing its expected result. Two obsolete assertion-baseline rows disappear with their casts; no budget grows.

29 net production lines removed, excluding tests and generated/baseline files. This is an area-split recovery, not the total parked-family reduction.

Best-effort tradeoffs accepted

Evidence

  • Narrow product proof: 8 passed across recommended installs, endpoint mirror consistency, and manifest model/provider admission.
  • Targeted four-owner source typecheck, focused syntax lint, six-file commit-hook formatting, and diff check passed. Runtime cycles 0, Madge cycles 0. Independent P0–P2 review with complete unchanged admission/record/host-hook/registrar evidence is scoped-clean with no actionable findings.
  • Mandatory suppression audit: 13 passed / 1 inherited failure; unchanged src/gateway/session-row-scope.ts|unicorn/no-new-array|1 (98 received / 97 expected), matching the open scheduled-main signature in runs 39270035500 and 39261680942. No suppression or allowance added.
  • The broader metadata/registrar consumer selection was stopped before assertions when cold setup expanded into worker compilation. Ordinary focused lint likewise expanded into package-boundary artifact preparation and was stopped; it is not a lint pass. The supported syntax-only route is used locally, with targeted types separate. No full local build, broader consumer pass, isolated live UI proof, or SDK comparison is claimed. Exact-head PR CI owns broad proof.

Hosted result and remaining status-owner blocker

Exact-head CI 39279185290, attempt 1 completed success; its native gate job 118165995736 also succeeded. The separate Security Review publisher 39285796872 subsequently published a contradictory CI-only failure status while its dependency and sensitive-change guards both succeeded. Its historical API snapshot was not logged, so the reason for that false negative is not claimed known. The scheduled reconciler treats the newer terminal status as settled and skipped review in the next two observed runs. This remains an unresolved status-owner recovery need, not a product CI failure or a verified merge. The original accepted exact-head squash auto-merge intent remains armed; no CI rerun, repush, status injection, cancellation or rearming was performed.

Recover the plugin-area portion of the parked backup cleanup. Manifest admission remains the provider-policy owner, registration still validates every scope, and source-controlled catalog inputs use their inferred shapes. Malformed hand-edited bundled JSON may fail visibly instead of silently producing empty entries.
@clawsweeper

clawsweeper Bot commented Oct 19, 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 October 19, 2026 15:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-10-19T15:38:16.412896Z a7d4354 Draft marked ready
ℹ️ 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Oct 19, 2026
@clawsweeper

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes repeated metadata checks after manifest admission and Control UI registration have validated the values.

Example: A plugin declares provider key " DEMO " with family " demo-family ".

  • Before: Manifest admission normalizes the policy, and the metadata collector normalizes it again.
  • After: Manifest admission produces demo and demo-family, and the collector consumes those admitted values directly.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported simplification with useful manifest-boundary coverage, but only test-level execution evidence and incomplete broad validation.
Proof confidence 🦐 gold shrimp (3/6) Supplied evidence is focused test output rather than a live CLI or Gateway run; this maintainer-authored refactor is outside the ordinary proof gate and introduces no material authority-chain change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The maintainer-directed change follows the existing admit-once contract and reduces duplicated logic without changing supported configuration, public APIs, or stored data.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-directed simplification with no actionable correctness or security findings.

Priority: P3
Reviewed head: a7d4354ef22c8a9be082468a274cd9946009f497

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-entry-point run exercises these projections; the maintainer-authored proof exemption applies.
Agent review details

How this fits together

Plugin manifest admission and registration turn external declarations into canonical metadata consumed by provider requests, config schemas, onboarding, and Control UI projections.

flowchart TD
  A[Plugin manifests] --> B[Manifest admission]
  B --> C[Metadata projections]
  D[Bundled catalogs] --> C
  C --> E[Provider and setup consumers]
  F[Control UI registration] --> G[Validated UI descriptors]
Loading

Technical review

Best possible solution:

Keep validation in the existing admission owners and let these projections consume their canonical values directly.

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

This is a behavior-preserving refactor rather than a reported bug; source inspection confirms the repeated checks and their upstream admission owners.

Is this the best way to solve the issue?

The change is appropriately small: it removes downstream revalidation, preserves external admission and feature checks, and adds coverage at the real manifest boundary.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Bundled provider endpoint catalog changes intended behavior with a stated reason (49302fc: Preserve native endpoint classification when externalized provider plugins are absent; hosted catalogs must not influence classification.)
  • Recommended install catalog changes intended behavior with a stated reason (6ac1597: Provide unified actionable onboarding recommendations with validated presentation metadata; this PR explicitly trusts the source-controlled catalog shape.)
  • Provider request policy collection changes intended behavior with a stated reason (af2c008: Share last-declaration request ownership between model-parameter validation and schema presentation; this PR preserves ownership and relies on existing manifest normalization.)
  • Control UI required scopes keeps the original intent (a46de01: Validate scope declarations before registering Control UI metadata; the later passive-snapshot repair keeps descriptors readable without executable authority.)
  • Metadata snapshot fixture keeps the original intent (e085b37: Prepare reusable per-turn metadata facts; the adjusted fixture supplies canonical admitted request policy while retaining the expected consumer result.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 91a86e4 adds src/plugins/plugin-provider-request-policy.ts:6 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 91a86e494e86; files: src/plugins/plugin-provider-request-policy.ts)
  • Mathias Bucher: Raw commit af2c008 adds src/plugins/plugin-provider-request-policy.ts:34 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: af2c00828eb3; files: src/plugins/plugin-provider-request-policy.ts)

PR surface

Source -29, Tests +34, Other -2. Total +3 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 18 47 -29
Tests 2 37 3 +34
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 2 -2
Total 7 55 52 +3

Review metrics

Metric Value Why it matters
Production versus test changes Production +18/-47; tests +37/-3 The production reduction removes redundant checks, while the test growth exercises raw declarations through manifest admission without new production machinery.

Labels

Label changes:

  • add P3: This is focused internal cleanup with no demonstrated user-facing failure or urgent regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is focused internal cleanup with no demonstrated user-facing failure or urgent regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 19, 2026, 11:52 AM ET / 15:52 UTC.

@steipete
steipete enabled auto-merge (squash) October 19, 2026 15:57
@steipete

Copy link
Copy Markdown
Contributor Author

Coordinator landing evidence for exact head a7d4354ef22c8a9be082468a274cd9946009f497:

  • CI run 39279185290 (pull_request, head a7d4354) completed success.
  • Security Review run 39279185711 (head a7d4354) completed success.
  • The red openclaw/ci-gate status (16:29:48Z) links run 39285796872, a workflow_run Security Review for a different head (d0e8fc8a103b). It is the same misfire that hit refactor(ui): reuse presentation lifetime owners #177437, so the gate was published from another commit's run. No failing check exists for this head.

Merging with the exact-head SHA guard (squash). This works around a misfiring gate publisher; it does not bypass any failing check.

@steipete
steipete merged commit d0254a6 into main Oct 19, 2026
209 of 212 checks passed
@steipete
steipete deleted the deslop/r08-3-plugin-projections-20261015 branch October 19, 2026 22:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 20, 2026
Recover the plugin-area portion of the parked backup cleanup. Manifest admission remains the provider-policy owner, registration still validates every scope, and source-controlled catalog inputs use their inferred shapes. Malformed hand-edited bundled JSON may fail visibly instead of silently producing empty entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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