Repository navigation
fix(plugin-sdk): detect private type changes in API baseline - #120975
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
05d2324 to
e6dc1be
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 9, 2026, 3:43 AM ET / 07:43 UTC. ClawSweeper reviewWhat this changesThis PR updates Plugin SDK API baselines to hash transitive, repository-local TypeScript declarations referenced by public exports, detecting breaking changes to private option and result types. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readinessKeep this maintainer-authored, maintainer-labeled PR open for normal review. Current main still hashes only each public declaration, while the PR adds a deterministic local declaration-closure digest that covers private types reachable from public exports; no concrete patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherPlugin SDK baseline generation converts public TypeScript entrypoints into a committed compatibility manifest checked by CI. The new closure step follows compiler-emitted local declarations before producing the per-export digest used by that manifest. flowchart LR
A[Public Plugin SDK export] --> B[TypeScript declaration emit]
B --> C[Local declaration closure]
C --> D[Stable closure digest]
D --> E[Committed API baseline]
E --> F[Plugin SDK CI check]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +341, Tests +105, Generated 0. Total +446 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land one deterministic compiler-based closure digest per public export after exact-head baseline CI passes, retaining external declarations outside the committed closure. Do we have a high-confidence way to reproduce the issue? Yes, source reproducible: current main hashes the public declaration without its private referenced declarations, and the PR fixture demonstrates the resulting hash blind spot. This read-only review did not execute the test locally. Is this the best way to solve the issue? Yes: compiler-emitted declaration closure hashing follows the actual TypeScript public contract without creating a second handwritten type-analysis system. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 484765582656. LabelsLabel changes:
Label 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
|
|
Landed with exact-head proof complete.
ClawSweeper found no concrete defect. Its optional rank-up move was to wait for the exact-head Plugin SDK baseline check; that check passed before merge. |
#120975 changed the baseline generator to hash private types but landed without regenerating the manifest; the check-plugin-sdk-api-baseline lane was gated off on that PR and first failed here. Regenerated via pnpm plugin-sdk:api:gen with no SDK surface change in this branch.
…ng AI setup (#120907) * fix(macos): let AI setup proceed when the login keychain is unavailable A missing/locked login keychain made GatewayActivationBindingKeyStore unable to mint the activation binding key, and onboarding refused every candidate and manual-key activation with 'Secure storage is unavailable'. The fingerprint only protects the crash/relaunch resume receipt, so degrade instead of refusing: write an ownerless pending record (still matched exactly, never as a wildcard), keep the full activation-ambiguity window, and skip only restart reconciliation, which needs fingerprint proof by design. A relaunch then repeats activation rather than trusting the receipt. Reported by Peter Steinberger. * fix(macos): render proper provider brand icons in onboarding AI setup Nearly every provider icon URL the gateway sends is a simpleicons.org SVG, which AsyncImage cannot decode, so the Connect your AI page fell back to generic symbols for every tool and provider; the two GitHub avatar PNGs that did render clashed as full-color rasters. Bundle nine monochrome template marks (Simple Icons CC0; xAI from LobeHub icons, MIT) and resolve them local-first by brand id/kind, including composed choice ids like xai-oauth. Remote icons now load via NSImage(data:), which decodes SVG, with vector payloads tinted as templates so plugin-supplied icons blend too. Every glyph sits in a uniform rounded well; install cards show host-only links, hover states, and a softer translucent surface shared by all setup sections instead of controlBackgroundColor. Requested by Peter Steinberger. * fix(macos): use failable UTF-8 decode in icon vector sniffing (swiftlint) * fix(macos): address ClawSweeper review of onboarding icon/keychain changes - Refuse relaunch handoff from ownerless (keychain-unavailable) completed receipts at the reconciliation trust boundary; such receipts can belong to replaced credentials, so setup repeats a fresh activation instead. - Decode and pass the canonical brandId the gateway sends for candidates, auth options, and manual providers so bundled marks resolve for opaque choice ids. - Scan the bounded XML prolog (comments, declarations, doctype) when sniffing remote SVG payloads; comment-prefixed vectors now tint as templates. * refactor(macos): move setup error enum to support file (swiftlint file length) * chore(i18n): refresh native source inventory * fix(macos): give keychain-unavailable activations attempt-specific unbound leases A nil owner made concurrent unbound attempts indistinguishable: a stale attempt's delayed response could complete or clear a newer attempt's record. Unbound attempts now mint a random per-attempt lease id with a sentinel fingerprint — live matching stays attempt-exact, restart reconciliation's fingerprint guard rejects them, and relaunch verification refuses unbound receipts before any handoff. * chore(macos): ship third-party artwork notices with provider icons Simple Icons (CC0) attribution and the LobeHub Icons MIT license text for the xAI mark now travel inside the bundled ProviderIcons directory. * fix(ci): refresh plugin-sdk API manifest for private-type hashing #120975 changed the baseline generator to hash private types but landed without regenerating the manifest; the check-plugin-sdk-api-baseline lane was gated off on that PR and first failed here. Regenerated via pnpm plugin-sdk:api:gen with no SDK surface change in this branch.
…w#120975) * fix(plugin-sdk): hash private declaration dependencies * chore(plugin-sdk): refresh API baseline
…ng AI setup (openclaw#120907) * fix(macos): let AI setup proceed when the login keychain is unavailable A missing/locked login keychain made GatewayActivationBindingKeyStore unable to mint the activation binding key, and onboarding refused every candidate and manual-key activation with 'Secure storage is unavailable'. The fingerprint only protects the crash/relaunch resume receipt, so degrade instead of refusing: write an ownerless pending record (still matched exactly, never as a wildcard), keep the full activation-ambiguity window, and skip only restart reconciliation, which needs fingerprint proof by design. A relaunch then repeats activation rather than trusting the receipt. Reported by Peter Steinberger. * fix(macos): render proper provider brand icons in onboarding AI setup Nearly every provider icon URL the gateway sends is a simpleicons.org SVG, which AsyncImage cannot decode, so the Connect your AI page fell back to generic symbols for every tool and provider; the two GitHub avatar PNGs that did render clashed as full-color rasters. Bundle nine monochrome template marks (Simple Icons CC0; xAI from LobeHub icons, MIT) and resolve them local-first by brand id/kind, including composed choice ids like xai-oauth. Remote icons now load via NSImage(data:), which decodes SVG, with vector payloads tinted as templates so plugin-supplied icons blend too. Every glyph sits in a uniform rounded well; install cards show host-only links, hover states, and a softer translucent surface shared by all setup sections instead of controlBackgroundColor. Requested by Peter Steinberger. * fix(macos): use failable UTF-8 decode in icon vector sniffing (swiftlint) * fix(macos): address ClawSweeper review of onboarding icon/keychain changes - Refuse relaunch handoff from ownerless (keychain-unavailable) completed receipts at the reconciliation trust boundary; such receipts can belong to replaced credentials, so setup repeats a fresh activation instead. - Decode and pass the canonical brandId the gateway sends for candidates, auth options, and manual providers so bundled marks resolve for opaque choice ids. - Scan the bounded XML prolog (comments, declarations, doctype) when sniffing remote SVG payloads; comment-prefixed vectors now tint as templates. * refactor(macos): move setup error enum to support file (swiftlint file length) * chore(i18n): refresh native source inventory * fix(macos): give keychain-unavailable activations attempt-specific unbound leases A nil owner made concurrent unbound attempts indistinguishable: a stale attempt's delayed response could complete or clear a newer attempt's record. Unbound attempts now mint a random per-attempt lease id with a sentinel fingerprint — live matching stays attempt-exact, restart reconciliation's fingerprint guard rejects them, and relaunch verification refuses unbound receipts before any handoff. * chore(macos): ship third-party artwork notices with provider icons Simple Icons (CC0) attribution and the LobeHub Icons MIT license text for the xAI mark now travel inside the bundled ProviderIcons directory. * fix(ci): refresh plugin-sdk API manifest for private-type hashing openclaw#120975 changed the baseline generator to hash private types but landed without regenerating the manifest; the check-plugin-sdk-api-baseline lane was gated off on that PR and first failed here. Regenerated via pnpm plugin-sdk:api:gen with no SDK surface change in this branch.
What Problem This Solves
Resolves a problem where Plugin SDK API baseline checks could miss breaking changes to private option or result declarations referenced by public exports. A required member could become optional, or a result shape could change, without changing the recorded per-entrypoint hash.
Why This Change Was Made
The baseline now hashes TypeScript's compiler-emitted declaration closure for each public export owner, following repo-local declaration imports and re-exports transitively while leaving external package declarations external. This preserves the public Plugin SDK surface and existing baseline JSON schema, avoids a fragile handwritten semantic type walker, and keeps the visible export declaration compact by storing only the closure digest.
User Impact
Plugin authors see no API change. Maintainers and CI now reliably detect private declaration changes that alter the effective public Plugin SDK contract.
Evidence
node scripts/run-vitest.mjs src/plugin-sdk/api-baseline.test.ts— 9 tests passed.pnpm plugin-sdk:api:genandpnpm plugin-sdk:api:check— generated manifest and check mode passed.node scripts/check-changed.mjs -- <changed paths>— all selected core, extension, lint, typecheck, boundary, and Plugin SDK gates passed on Testboxtbx_01kzjm921gdz8jgmn460zcbb4q(run).git diff --check— passed.AI-assisted: implementation and review were completed with coding-agent assistance; the maintainer reviewed the final diff and proof.