Repository navigation
refactor(plugin-sdk): replace API baselines with diffs - #123036
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Security-sensitive guard clearedThis PR no longer has blocked security-sensitive file changes. A future security-sensitive change requires a fresh
|
690ea83 to
79aadc0
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 6:05 AM ET / 10:05 UTC. ClawSweeper reviewWhat this changesReplaces committed Plugin SDK API baseline records with base-to-head declaration diffs and adds a digest acknowledgement to release publication workflows when that API changes. Merge readinessKeep open for maintainer merge handling. The proposed replacement is still absent from current main, but the exact PR head could not be hydrated locally and current GitHub status has unresolved failures, so this review cannot certify the merge result. Priority: P2 Review scores
Verification
How this fits togetherPlugin SDK declarations define the public contract consumed by plugins. CI reports contract changes for pull requests, while release workflows preserve reviewed evidence before publishing OpenClaw packages and plugins. flowchart LR
A[Plugin SDK declarations] --> B[API diff renderer]
B --> C[Pull request CI]
B --> D[Release preflight receipt]
D --> E[Digest acknowledgement]
E --> F[Package and plugin publication]
Before merge
Agent review detailsSecurityNone. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Validate the clean GitHub merge result against current main, resolve or classify the three failed checks, and retain one fail-closed acknowledgement path shared by every publication route. Do we have a high-confidence way to reproduce the issue? Not applicable as an end-user bug report. The PR documents a controlled baseline-conflict reproduction, but this review could not rerun it because the exact head is unavailable locally. Is this the best way to solve the issue? Unclear: the supplied patch appears to replace all current baseline owner paths and preserve intentional-change review at publication, but the exact submitted source could not be independently read. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 7a7f6dfbd41e. 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
HistoryReview history (3 earlier review cycles)
|
d96bd35 to
39b9316
Compare
|
Exact-head maintainer review completed at e34079f (addresses the ClawSweeper rank-up move: exact-head confirmation of the release acknowledgement enforcement). Release gate verified from workflow source on this head:
Proof run: focused suites on this exact head — Non-blocking follow-ups noted: stale Landing now via the repo-native flow. |
|
@obviyus heads-up before your next push: the branch now carries two maintainer commits on top of your rebase — please pull/rebase onto the current remote head instead of force-pushing over them (your last rebase dropped their first versions).
Landing flow continues on the combined head once CI is green. |
|
Merged via squash.
|
* refactor(plugin-sdk): replace API baselines with diffs * perf(plugin-sdk): bound API diff resources * fix(plugin-sdk): isolate API diff dependencies * fix(release): forward Plugin SDK acknowledgement * fix(release): enforce SDK acknowledgement on publish * chore: preserve generated-doc ignore policy * fix(release): freeze SDK API evidence before publish * fix(ci): satisfy SDK evidence guards * fix(release): bind complete SDK evidence * fix(release): authenticate plugin SDK evidence * fix(plugin-sdk): abort interrupted API diffs * test(ui): freeze page clock in background-tasks rail e2e The rail transcript is compared byte-for-byte across the detail-panel round-trip while it renders live relative ages; on slow CI runners the second boundary ticks between the two reads (11s -> 12s) and fails the equality assertion. Fix the page Date with Playwright setFixedTime while keeping timers running so the tasks.list polling assertions still hold. Repro: a 1.5s stall between the reads fails pre-fix with the exact CI diff and passes post-fix. * fix(scripts): drop unused export on dependency-evidence CLI main Knip's workflow scan re-roots script references after an actions/checkout step that sets path:, so the new trusted-tooling checkout in openclaw-npm-release.yml stops marking this CLI as a workflow entry and its exported main() surfaces as an unused export in check-dependencies. Nothing imports main; the module invokes it through its own entry guard, so the export keyword was dead surface either way. --------- Co-authored-by: Peter Steinberger <[email protected]>
Why this is needed
OpenClaw main moves fast. The current Plugin SDK check commits one generated hash record for each SDK entrypoint. When two PRs change the same entrypoint, both rewrite the same one-line record. Their source changes may be independent, but Git still reports a conflict.
Resolving that conflict means rebasing, regenerating the hashes, pushing again, and rerunning the full merge-head CI. Main often moves again before the PR lands, so maintainers repeat the same work.
The committed records are not used at runtime. Each record contains an entrypoint, an import name, and an opaque hash. CI checks that the hash matches the current declarations. Regenerating and committing the record makes the check pass. The record proves that the SDK changed, but it does not explain the change or decide whether the change is compatible.
#122082 split the original shared baseline into one file per entrypoint. That removed cross-entrypoint conflicts, but hot entrypoints still conflict whenever unrelated changes reach the same public API.
What changes
A Plugin SDK change no longer fails PR CI only because a generated hash file needs an update. The CI report still shows reviewers exactly what changed.
Example
Before, Alice adds one field to
SendOptionsand Bob adds an unrelated field toSendResult. Both changes rewrite the same entrypoint hash, so one PR conflicts after main moves.After, neither PR commits generated approval state. CI compares the two revisions and reports both declaration changes:
Release protection
This PR does not remove release awareness. It makes the release check stronger and more useful.
During npm preflight, trusted workflow code:
If the SDK changed, the release operator must review the diff and supply its eight-character digest. The candidate check, the parent publish workflow, and the direct npm publish workflow validate the receipt independently. Publication stops when evidence is missing, altered, stale, produced by different workflow code, tied to another release SHA, based on an outdated npm predecessor, or acknowledged with the wrong digest.
The same parent check protects broad plugin and ClawHub publication. Older release tags do not need this new script because current trusted tooling renders their source directly.
Neither the old hashes nor this replacement can decide whether an API change is safe for every plugin. That remains a maintainer decision. The new report gives the maintainer the declarations to review instead of an opaque hash.
Alternatives considered
Tradeoffs
Proof
git merge-fileconflict and proves both independent declaration changes appear in the new diff.v2026.8.1-beta.1, which has no diff script, and produces a checked exact-SHA receipt with no changes and digestff7b090f.pnpm checkpassed, including policy guards, production types, script types, test types, lint, and formatting.pnpm check:workflowspassed.Follow-up to #121496 and #122082.
Maintainer decision by @obviyus: keep digest acknowledgement at release time. It replaces PR-blocking generated state with one deliberate check before publication.
Exact head:
942858f35c30e887f12de8ebdd871adf45f27ffe.