Repository navigation
fix(plugins): load source artifacts without losing credential targets - #132166
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Use the canonical plugin loader for source and built public artifacts, retire transformed module dependencies with their cache generation, and report broken contracts during source credential-reference generation. Fixes #132153
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 6:50 PM ET / 22:50 UTC. ClawSweeper reviewWhat this changesThe PR routes source plugin public artifacts through the canonical cached loader and makes generated credential metadata fail when a present channel contract cannot load. Merge readinessKeep this maintainer-owned PR open: it removes the duplicate source-only loader path and makes generated credential metadata fail visibly instead of silently omitting a broken owner; no introduced blocking correctness defect was found, but exact-head CI is still incomplete. Priority: P2 Review scores
Verification
How this fits togetherPlugin public-surface loading feeds channel credential-contract discovery. The resulting registry drives generated SecretRef credential documentation while runtime discovery can isolate unavailable plugin owners. flowchart LR
A[Plugin public artifact] --> B[Canonical plugin loader]
B --> C[Channel secret contract]
C --> D[Credential target registry]
D --> E[Generated credential documentation]
C --> F[Runtime secret discovery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -28, Tests +59, Docs +2. Total +33 across 16 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the single canonical-loader path once exact-head CI confirms the source-artifact subprocess and generated credential-matrix checks, while preserving runtime isolation for unavailable owners. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: fetched main contains the distinct TypeScript-hook require branch, and the added subprocess regression targets import-only dependency resolution and cache retirement. This review could not rerun it because the checkout lacks installed dependencies. Is this the best way to solve the issue? Yes: removing the source-only require branch and using the existing canonical loader is the narrowest maintainable fix; the registry separately makes generation strict without weakening runtime owner isolation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 86a0b223142e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
9ba57d5 to
3af5ae1
Compare
|
Land-ready verification for The original TypeScript-hook failure and stale source-cache generation were reproduced before repair. Public source and compiled artifacts now use the same canonical loader; cache retirement replaces plugin-owned source dependencies while retaining shared outside-root module identity. Source credential generation intentionally fails for a present broken owner, while normal runtime discovery continues to isolate unavailable owners. This is the best owner-boundary fix: the alternate loader and silent omission are removed, not replaced with dependency overrides or another fallback. Verification includes 135 focused tests across 13 files, the final 12-test generation fixtures, and public/cache/SDK boundary coverage (overlapping counts). Final fixture command: Final On the final built head, a fresh process with network and operator-home access denied imported the real Google Chat entrypoint: The latest review's rank-up is satisfied by completed exact-head CI. Its missing installed-dependency context was checked directly by the maintainer against the executing Node 24.20 resolver/cache and installed Jiti 2.7 source, plus the real subprocess/cache-generation proof. The stricter generation contract is intentional and verified; runtime degradation is preserved. Production +49/-77 (net -28); tests +246/-187; docs +2. No new config, dependency, database, schema, or version changes. No external Google Chat authentication or native-Windows live claim. The separate metadata-generator prefix catch remains a named follow-up because its actual check passes and no defect was established. |
|
Merged via squash.
|
…openclaw#132166) Use the canonical plugin loader for source and built public artifacts, retire transformed module dependencies with their cache generation, and report broken contracts during source credential-reference generation. Fixes openclaw#132153
What Problem This Solves
Fixes an issue where developers loading source plugin artifacts could get
ERR_PACKAGE_PATH_NOT_EXPORTEDdespite valid installed dependencies, and credential-reference generation could silently omit a channel's targets after that failure.Closes #132153. Found while validating Buzz multi-account setup; this repair leaves Google Chat's source and all dependency versions unchanged. AI-assisted maintainer repair.
Why This Change Was Made
Source and compiled public artifacts now share the existing canonical plugin loader instead of choosing a second
requirepath whenever a TypeScript hook exists. Cache retirement clears transformed source modules and their plugin-local dependencies while preserving shared modules outside that boundary. Source credential-reference generation reports a present but broken contract; ordinary runtime discovery still isolates unavailable owners and retains healthy siblings. Optional artifact absence is resolved structurally rather than inferred from an error-message prefix.User Impact
Source-checkout plugin tooling works with import-only package exports. Credential metadata cannot silently lose an affected owner's entries during generation. Built native loading, module identity, runtime degradation, and plugin boundary checks retain their existing contracts. There are no new configuration settings, dependency changes, migrations, or schema/version changes.
Evidence
Final normal build and hosted CI run 33217830954 passed on exact head
3af5ae1da35c4c5330846c62046bef79c1021a64.pnpm buildpassed all runtime/package bundles, 63 external plugins, 48 native control-plane module checks, public SDK checks, and UI performance checks. The first build on the older base failed the final UI guard at 347,446 gzip bytes against 347,037 allowed. None of this repair's six production owners occur in its UI source maps. Integrating upstream main at64f9e1302eda8e99479099a111ec9bb00601928b, including the existing fix(ui): compact mobile session actions #132020 and fix(control-ui): re-scope credentials when editing Gateway URLs #131788 UI changes, resolved that build failure;git range-diffconfirms this repair's patch stayed identical. No limit or assertion was relaxed by this PR.Production LOC: +49/-77 (net -28). Tests: +246/-187. Docs: +2. The duplicate loader branch and obsolete export are removed; no replacement fallback or dependency workaround is added.
Provenance: the available shallow history ends at a carrier snapshot, so original introduction and merger are unknown. The carrier commit is not attributed as the cause. Installed Jiti 2.7.0 and executing Node 24.20 resolver/cache source were inspected directly.
Nearby follow-up: the separate bundled-channel metadata generator still has an older optional security-artifact prefix catch. Its actual check passes here; no defect was established for that path, so it is not changed in this PR.
Release context: plugin source artifacts correctly load import-only dependencies, and credential-reference generation reports broken owners instead of silently omitting targets.