Repository navigation
fix(plugins): canonicalize service registration identity - #117232
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 6:42 PM ET / 22:42 UTC (Revision 25). ClawSweeper reviewWhat this changesThe PR stores a canonical service ID separately from plugin descriptors, uses it throughout service and discovery lifecycles, updates regression fixtures, and integrates the publisher-inventory test correction. Merge readiness✅ Ready for maintainer review This remains a useful repair: current main and the latest release still reread plugin-controlled service IDs. The previous descriptor-compatibility findings are resolved, and no actionable introduced defects were found. Priority: P2 Review scores
Verification
How this fits togetherPlugins register background services and local Gateway discovery advertisers with OpenClaw. The registry supplies their identities to startup, reload selection, health reporting, diagnostics, and cleanup. flowchart TD
A[Plugin service descriptor] --> B[Read and normalize ID once]
B --> C{Valid and available?}
C -->|No| D[Registration diagnostic or duplicate no-op]
C -->|Yes| E[Registration with canonical ID]
E --> F[Startup and discovery callbacks]
E --> G[Reload selection and health reporting]
F --> H[Owned cleanup]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +7, Tests +125. Total +132 across 27 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep canonical identity in the existing registration owner while preserving plugin descriptors, callback receivers, and lifecycle authority. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main admits IDs through an unguarded getter and rereads them later, so throwing or changing accessors can disrupt registration and lifecycle identity. Runtime reproduction was not performed here. Is this the best way to solve the issue? Yes. A core-owned snapshot fixes the mismatch at registration while preserving supported descriptor objects and updating downstream consumers together. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 75ba5e3fae5c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (24 earlier review cycles; latest 8 shown)
|
Integrate Peter Steinberger's original fix at the current retained registry boundary while preserving original objects, prototypes and callback receivers. Reject unsafe identity accessors with redacted diagnostics and retain the verified upstream contract-fixture correction.
Security-sensitive guard clearedThis PR no longer has blocked security-sensitive file changes. A future security-sensitive change requires a fresh
|
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
Follow #150316: Logbook, Memory Wiki, and 1Password remain bundled and are deferred from both registries. Restore the exact release-plan integration inventory to 95 npm and 91 ClawHub packages while preserving publisher equality checks.
|
Merged via squash.
|
…7232) * fix(plugins): canonicalize service registration identities * test(plugins): isolate service identity loader coverage * fix(plugins): snapshot canonical service registration identities * test(release): align publisher inventory with deferred plugins Follow openclaw#150316: Logbook, Memory Wiki, and 1Password remain bundled and are deferred from both registries. Restore the exact release-plan integration inventory to 95 npm and 91 ClawHub packages while preserving publisher equality checks. --------- Co-authored-by: Jason (Json) <[email protected]>
What Problem This Solves
Plugin background services and Gateway discovery services could register a whitespace-padded ID, then use a different identity for duplicate ownership, reload selection, health or diagnostics. Reading plugin-controlled ID accessors repeatedly could also throw after admission.
User Impact
A service has one canonical core-owned identity throughout its lifecycle. Frozen and getter-only descriptors remain supported, native/private-field callback receivers are preserved, and unreadable IDs produce redacted registration diagnostics. No operator action or configuration migration is required.
Why This Change Was Made
Read and trim the descriptor ID once at registration, store it on the core registration, and use that snapshot in ownership checks and runtime identity consumers. The plugin descriptor is never mutated or cloned. Callback
thisremains the original descriptor; its own raw ID remains unchanged.This replaces the earlier mutation approach after the ClawSweeper readonly-descriptor compatibility finding. Contributor ancestry and Peter Steinberger’s original contribution are preserved. Earlier catalog/publication prerequisites from #149587 are in main. The subsequent exact inventory correction is integrated as described below.
Evidence
3dc8f54c56755fd6c551d385826cb84356c6e93cpreserves contributor ancestry. Exact-published-head hosted CI and native preparation/merge remain pending. Historical proof for the superseded mutation approach is not used to clear this repair.Canonical CI prerequisites
CI on the prior head exposed two main-branch prerequisites: the exact inventory count was stale after #150316, and
src/scripts/ci-changed-scope.test.tsneeded formatting. This head merges the exact published #150341 correction (95 npm / 91 ClawHub), whose base already includes the landed #150330 formatting fix. Both complete publisher-set comparisons are preserved; production publication policy is unchanged.All 26 Registry source hashes and the checked runtime/dependency context are unchanged. The single affected inventory case passed on this committed integration (107 unrelated cases skipped), and formatting passed for both prerequisite files. The canonical fixes remain credited in their original history. Existing Registry runtime proof and fresh review are retained without replay; the new published-head CI and native merge gates remain mandatory.