Repository navigation
fix(plugins): state overdue migration once a removal date has passed - #190752
huwei-xydt wants to merge 3 commits into
Conversation
buildPluginSdkDeprecationNotices always said "retire on <date>. It keeps working until then; check for a plugin update" even after removeAfter was in the past, so plugins doctor/status and the Control UI taught operators to ignore a permanent unfixable-looking notice. Branch on whether the earliest removalDate is before today's UTC date: past dates use past-tense overdue copy and stop suggesting a plugin update; future and undated notices keep their existing wording. Fixes openclaw#190536 Co-Authored-By: Claude Code <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesCLI and Control UI plugin notices describe elapsed migration deadlines without claiming the deprecated APIs are unavailable. Example: On November 2, 2026, a loaded plugin uses an API with removeAfter set to 2026-10-01.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current diagnostic bug; the earlier findings are resolved, and no new correctness blocker was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherPlugin import and API-use observations feed structured compatibility notices, which CLI inspection formats and Control UI renders with localized dates and copy. flowchart LR
A[Plugin imports and API calls] --> B[Usage observations]
B --> C[Compatibility notice builder]
C --> D[CLI inspection output]
C --> E[Gateway plugin metadata]
E --> F[Localized Control UI notices]
Technical reviewBest possible solution: Land the focused UTC-date presentation correction while retaining the existing compatibility registry and plugin execution behavior. Do we have a high-confidence way to reproduce the issue? Elapsed removal-pending registry dates reach unconditional future-tense notices on current main; the contributor also supplies matching before/after runtime CLI output. Is this the best way to solve the issue? The existing backend notice builder and localized UI renderer are the appropriate owners; changing their date-dependent copy fixes the problem without changing removal policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against afbe0a8e8f2c. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +18, Tests +107. Total +125 across 6 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed November 1, 2026, 10:09 PM ET / November 2, 2026, 03:09 UTC (Revision 3). |
…ement ClawSweeper: removal-pending APIs stay available after removeAfter; the past notice must say the migration date passed and name plugin authors as the actors. Pin clocks in dated-notice tests and add final-day / next-UTC-day boundaries so fixtures do not flip after 2027-01-01. Co-Authored-By: Claude Code <[email protected]>
|
@clawsweeper re-review Head:
Please re-review |
|
🦞👀 Re-review progress:
|
onTestFinished callbacks that return VitestUtils fail tsgo Awaitable<void>. Wrap vi.useRealTimers() in a block body. Co-Authored-By: Claude Code <[email protected]>
|
@clawsweeper re-review Head is now Real behavior proof remains in the PR body Evidence section (elapsed-date production path + Control UI before/after screenshots for removeAfter 2026-10-01 on clock 2026-11-02). Both original P2 findings are addressed on this head. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review — head 7139500 now includes real |
|
🦞👀 Re-review progress:
|
|
Thanks for the work here. We're closing this: it doesn't show a real user-facing problem (no report from an affected user and no natural reproduction), and it follows a pattern of small, speculative or duplicate changes split across many PRs. Please open an issue with a reproduction of real harm first; a fix can follow once the problem is confirmed. |
|
Thanks for the work here. We're closing this: it doesn't show a real user-facing problem (no report from an affected user and no natural reproduction), and it follows a pattern of small, speculative or duplicate changes split across many PRs. Please open an issue with a reproduction of real harm first; a fix can follow once the problem is confirmed. |
What Problem This Solves
After a plugin SDK
removeAfterdate has passed, OpenClaw still describes the migration window as future. Operators see "retire on Oct 1… keeps working until then" on Nov 2, and Control UI never switches to an overdue notice becausecompatibilityDeprecatedPastdid not exist.User Impact
Operators of plugins that still import migration-pending SDK APIs (for example
MsgContext.mediaPathwithremoveAfter: 2026-10-01) are told the APIs still have time left. Plugin authors are not told migration is overdue. The APIs remain available (removal-pending), so the product must not claim they already retired.Why This Change Was Made
Issue #190536 reported future-tense notices after the removal date. This branch:
buildPluginSdkDeprecationNotices: whenremovalDate < today(UTC date string compare), emit elapsed-date wording that keeps the availability distinction ("migration date passed… APIs remain available; plugin authors should migrate") instead of claiming retirement.renderPluginCompatibilityNotices: same elapsed-date rule; addcompatibilityDeprecatedPast(en) so the inventory/detail rows switch to the overdue text.Evidence
Real CLI:
openclaw plugins inspect --runtime(UTC today 2026-11-02, pluginremoveAfter2026-10-01)Isolated config/state under
/tmp/pr190752-cli-proof/. Synthetic pluginelapsed-sdk-demostatically importsopenclaw/plugin-sdk/agent-media-payload(compat recordmedia-legacy-projection, statusremoval-pending,removeAfter: "2026-10-01"). Entry point: source CLInode --import ./scripts/tsx.mjs src/entry.ts plugins inspect elapsed-sdk-demo --runtimeon Node v26.12.1 (hostOpenClaw 2026.10.9 (7139500)).Before (main
sdk-deprecation-notices.ts, same inspect command):After (this branch head
71395005fe9, same inspect command):The Compatibility warnings line is produced by the shipped CLI path
buildCompatibilityNoticesForInspect→buildPluginSdkDeprecationNotices→formatPluginCompatibilityNoticeafter a real runtime plugin load records the deprecated SDK import.Control UI before/after (Chromium, page.clock fixed at 2026-11-02T12:00:00Z, removeAfter 2026-10-01)
Inventory DOM before (main overview + locale):
Inventory DOM after (this branch):
Before — inventory notice
After — inventory notice
Before — inventory row
After — inventory row
Before — detail surface
After — detail surface
Local regression suite (green on this head
71395005fe9)pnpm exec vitest run --config test/vitest/vitest.plugins.config.ts src/plugins/sdk-deprecation-notices.test.ts→ 5/5pnpm exec vitest run --config test/vitest/vitest.ui.config.ts ui/src/pages/plugins/catalog-detail.test.tsx→ 14/14pnpm ui:i18n:verify→ 0 missing keyssrc/plugins/status.test.ts→ 11/11Review findings addressed on head
71395005fe9check-test-types-core-5: wrappedvi.useRealTimers()in block bodies soonTestFinishedcallbacks return void (tsgoAwaitable<void>).openclaw plugins inspect --runtimeterminal output (above) with an elapsed-date plugin, not a bypassed builder/format-only proof.Merge Danger
compatibilityDeprecatedPast;pnpm ui:i18n:verifymust stay green (other locales keep dated/undated keys).removeAfter, same rule as Control UI; do not switch to local-time without a product decision.