Repository navigation
ci: check the Plugin SDK export surface on every pull request - #207167
Merged
Merged
Conversation
…hat touches the SDK surface - PR CI ran check:changed lint-only, and the surface budget step in Workflow Sanity runs only on workflow_dispatch, so #206995 merged an unbudgeted export. - The baseline-ratchets job (every node PR) adds plugin-sdk:check-exports and plugin-sdk:surface:check when the PR's changed paths touch the SDK surface; the path predicate moves to changed-path-facts and check:changed reuses it.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 28, 2026
…aw#207167) ## Problem openclaw#206995 added a Plugin SDK export without a surface budget line and merged with green PR CI. Main's SDK surface check then failed (`public exports 3933 > 3932`, `public callable exports 2260 > 2259`) until a follow-up added the line. Why PR CI did not catch it: - `check:changed` selects `plugin-sdk:check-exports` and `plugin-sdk:surface:check` for SDK paths. But PR CI calls it lint-only (`ci.yml`, "Run changed lint", `lintOnly: true`), so only lint commands run. - The only other runner is the `generated-doc-baselines` job in `workflow-sanity.yml`. It runs only on `workflow_dispatch`, never on a pull request. ## Fix The baseline-ratchets job (`scripts/ci-baseline-ratchets.mts`) already runs on every node PR. It now also runs `plugin-sdk:check-exports` and `plugin-sdk:surface:check` on every run: - The surface check is a large TypeScript program, so it runs in the same slot as the database-worker and database-dialect snapshots. They run one after another and never overlap (the memory rule from `4d6287da`). The export check is light and joins the shared queue. - It runs on every PR, not only SDK-path PRs: the SDK import closure reaches far outside `src/plugin-sdk`. For example, adding `@deprecated` to `src/channels/chat-type.ts` moves the deprecated-export count, and no changed-path rule sees that. No new workflow or job. ## Impact Contributors: a PR that changes the SDK export surface without its budget line now fails `checks-fast-baseline-ratchets` instead of turning main red after merge. Cost per PR: one surface check (about 7 s and 3.5 GB peak locally) in the existing job. ## Evidence - Red/green on a PR-like change set: a scratch copy of main with openclaw#206995's export added on top of a tagged base, run with `pnpm check:baseline-ratchets --base <base> --no-merge-base`: - a new SDK function without a budget line: `plugin-sdk-surface` fails, `public exports 3933 > 3932`, `public callable exports 2261 > 2260`, exit 1; - the same change plus the budget lines: `[ok] plugin-sdk-exports`, `[ok] plugin-sdk-surface`, exit 0. - `test/scripts/ci-baseline-ratchets.test.ts`: the expected command list now includes both SDK checks in their slots (4/4). - Adversarial review: a first version selected the checks by changed path. The review showed that version missed real budget inputs outside `src/plugin-sdk` and reproduced a miss. This version drops path selection. - Local review on this head: patch is correct, 0 findings. - CI cost on this PR's runner: `plugin-sdk-surface` 8.48 s and `plugin-sdk-exports` 0.28 s inside `checks-fast-baseline-ratchets`, which took 4m50s in total. Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
## Problem #206995 added a Plugin SDK export without a surface budget line and merged with green PR CI. Main's SDK surface check then failed (`public exports 3933 > 3932`, `public callable exports 2260 > 2259`) until a follow-up added the line. Why PR CI did not catch it: - `check:changed` selects `plugin-sdk:check-exports` and `plugin-sdk:surface:check` for SDK paths. But PR CI calls it lint-only (`ci.yml`, "Run changed lint", `lintOnly: true`), so only lint commands run. - The only other runner is the `generated-doc-baselines` job in `workflow-sanity.yml`. It runs only on `workflow_dispatch`, never on a pull request. ## Fix The baseline-ratchets job (`scripts/ci-baseline-ratchets.mts`) already runs on every node PR. It now also runs `plugin-sdk:check-exports` and `plugin-sdk:surface:check` on every run: - The surface check is a large TypeScript program, so it runs in the same slot as the database-worker and database-dialect snapshots. They run one after another and never overlap (the memory rule from `c695d653`). The export check is light and joins the shared queue. - It runs on every PR, not only SDK-path PRs: the SDK import closure reaches far outside `src/plugin-sdk`. For example, adding `@deprecated` to `src/channels/chat-type.ts` moves the deprecated-export count, and no changed-path rule sees that. No new workflow or job. ## Impact Contributors: a PR that changes the SDK export surface without its budget line now fails `checks-fast-baseline-ratchets` instead of turning main red after merge. Cost per PR: one surface check (about 7 s and 3.5 GB peak locally) in the existing job. ## Evidence - Red/green on a PR-like change set: a scratch copy of main with #206995's export added on top of a tagged base, run with `pnpm check:baseline-ratchets --base <base> --no-merge-base`: - a new SDK function without a budget line: `plugin-sdk-surface` fails, `public exports 3933 > 3932`, `public callable exports 2261 > 2260`, exit 1; - the same change plus the budget lines: `[ok] plugin-sdk-exports`, `[ok] plugin-sdk-surface`, exit 0. - `test/scripts/ci-baseline-ratchets.test.ts`: the expected command list now includes both SDK checks in their slots (4/4). - Adversarial review: a first version selected the checks by changed path. The review showed that version missed real budget inputs outside `src/plugin-sdk` and reproduced a miss. This version drops path selection. - Local review on this head: patch is correct, 0 findings. - CI cost on this PR's runner: `plugin-sdk-surface` 8.48 s and `plugin-sdk-exports` 0.28 s inside `checks-fast-baseline-ratchets`, which took 4m50s in total. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 7c16b31) Release adaptation: Add both existing SDK checks without overlapping the large SDK surface check with either large database check. Follow-up audit: No required nonselected PR/SHA follow-up. Other same-path candidates (9c9e3c7) are not selected prerequisites in the source assessment; owner proof below checks the selected stable contract. Co-authored-by: RomneyDa <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
#206995 added a Plugin SDK export without a surface budget line and merged with green PR CI. Main's SDK surface check then failed (
public exports 3933 > 3932,public callable exports 2260 > 2259) until a follow-up added the line.Why PR CI did not catch it:
check:changedselectsplugin-sdk:check-exportsandplugin-sdk:surface:checkfor SDK paths. But PR CI calls it lint-only (ci.yml, "Run changed lint",lintOnly: true), so only lint commands run.generated-doc-baselinesjob inworkflow-sanity.yml. It runs only onworkflow_dispatch, never on a pull request.Fix
The baseline-ratchets job (
scripts/ci-baseline-ratchets.mts) already runs on every node PR. It now also runsplugin-sdk:check-exportsandplugin-sdk:surface:checkon every run:c695d653). The export check is light and joins the shared queue.src/plugin-sdk. For example, adding@deprecatedtosrc/channels/chat-type.tsmoves the deprecated-export count, and no changed-path rule sees that.No new workflow or job.
Impact
Contributors: a PR that changes the SDK export surface without its budget line now fails
checks-fast-baseline-ratchetsinstead of turning main red after merge. Cost per PR: one surface check (about 7 s and 3.5 GB peak locally) in the existing job.Evidence
pnpm check:baseline-ratchets --base <base> --no-merge-base:plugin-sdk-surfacefails,public exports 3933 > 3932,public callable exports 2261 > 2260, exit 1;[ok] plugin-sdk-exports,[ok] plugin-sdk-surface, exit 0.test/scripts/ci-baseline-ratchets.test.ts: the expected command list now includes both SDK checks in their slots (4/4).src/plugin-sdkand reproduced a miss. This version drops path selection.