test: rework bundle-policy skips into expectation updates for the bundled tree - #182
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2782f05b9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7eaa794dd6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…dled tree Rework of PR #182 per codex review: tests that assert contracts which survive bundle-all-plugins are active again with expectations updated to the patched tree; patch-carried dead tests are removed. - bundled-plugin-metadata: startup activation inventory now includes imap, openai, visitor-access (34 onStartup plugins); empty-config Gateway startup inventory updated (cua-computer/openai in, diagnostics-otel out after its enabledByDefault removal); Slack configured-state specifier/export expectations restored; manifest-edit lifecycle test restored to the upstream shape (explicit clearPluginMetadataLifecycleCaches). - release-check: slack runtime-api.js is now a required bundled sidecar (negative expectation flipped positive). - runtime-postbuild: diffs/diffs-language-pack viewer runtime assets are expected in the static asset inventory (bundledDist: true). - release-plan-producer: publisher inventory is 4 npm (core only) and 0 ClawHub packages - bundled plugins defer external publication. - openclaw-npm-postpublish-verify: acpx is now a required bundled extension root on installed packages. - official-channel-catalog: docs index regenerated via pnpm channels:catalog:gen (bundled classification for slack, googlechat, discord, matrix, signal, whatsapp, ...). - write-unified-entry-dts.test.ts + tsdown-declaration-fixture.ts removed: carried by this patch, absent at the 999239d base, and scripts/write-unified-entry-dts.ts does not exist anywhere in the tree. Kept skips (verified failing for policy-reversal, not stale expectations): build-entries exclusion tests, tsdown dist-graph exclusion, Docker-selected external plugin trees, official external provider endpoint mirroring, dual-published plugin selectability, and the runtime sidecar path baseline (needs a product-code update to src/plugins/runtime-sidecar-paths.ts, out of scope for this test-only branch).
7eaa794 to
29753e7
Compare
bundle-all-plugins is an intentional contract change: all plugins ship in the core tarball. Tests are evaluated per-assertion, not per-test: - bundled-plugin-build-entries: six skipped cases reworked per Rule 2 — the bundled build-entry structure assertions (entry presence, Docker selection parsing/mapping/ordering, pack-artifact selection independence) are kept active; only the superseded pack-artifact exclusion conditions are removed. The seven pure-exclusion cases (entire assertion = externalized plugin kept out of artifacts) remain skipped per Rule 1. - runtime sidecar path baseline: Rule 3 — the baseline JSON is generated output (pnpm runtime-sidecars:gen derives it from bundled plugin metadata and the root package files list, both changed by the bundle-all patch), so it is regenerated to the patched-tree truth and the baseline check is active again.
51e69dc
into
brightfire/999239d745d/bundle-all-plugins
|
Follow-up on the two remaining CI failures: this PR was merged while the fixes were in verification, so they landed on the 1.
|
|
Correction to the commit refs above: to make this follow-up landable after the squash merge, the branch was rebased onto |
What Problem This Solves
Doctrine (per maintainer ruling): bundle-all-plugins is an intentional contract change — all plugins ship in the core tarball. Tests are evaluated per-assertion, not per-test: old-contract assertions are removed or surgically dropped (Rule 1: whole case = externality/exclusion → skip or delete; Rule 2: exclusion is one portion of a broader valid contract → keep the rest, drop the condition; Rule 3: bundled-content presence/correctness → unskip and update expected values to patched-tree truth, so the test enforces the new contract). Real bundle-content regressions are never masked.
The original head of this branch blanket-skipped every bundle-all-affected test with a generic "asserts upstream's external-plugin bundling policy" comment. The codex review (7 comments) showed most of those tests assert contracts that survive bundle-all-plugins — they just needed their expectations updated to the patched tree — while two carried test files were foreign to this base entirely. This rework converts the skips into expectation updates, deletes the dead tests, and keeps only skips whose asserted policy is genuinely reversed by bundle-all (each verified by unskipping and running it).
Why This Change Was Made
Squashed to a single commit (29753e7) implementing all 7 review findings:
imap,openai,visitor-access); empty-config Gateway startup inventory updated (cua-computer/openaiin,diagnostics-otelout — itsenabledByDefaultis removed by the patch deliberately). Note: the review's named examples verified differently —brave/slackdeclareonStartup: falseanddiagnostics-otelwas already listed; the real gaps were the three added ids.dist/extensions/slack/runtime-api.jsflipped fromnot.toContaintotoContain—listBundledPluginPackArtifacts()now includes it.test/scripts/write-unified-entry-dts.test.tsandtest/scripts/tsdown-declaration-fixture.tsaregit rm'd — neither exists at base999239d745dandscripts/write-unified-entry-dts.tsdoes not exist anywhere in the tree.docs/channels/index.mdregenerated viapnpm channels:catalog:gen(23 channels reclassified "official plugin" → "bundled plugin"); docs.json nav unchanged; guard test active.isPluginExternalPublicationDeferred()treatsbundledDist: trueas publication-deferred; test retitled to match../configured-state/hasConfiguredSlackChannelStateexpectations restored (still declared inextensions/slack/package.json); test active.Bonus converts (same evidence standard, tests whose real contracts survive):
openclaw-npm-postpublish-verify:acpxmoved from the "must not flag" list to the expected-missing list (now a bundled extension root); file fully green, zero skips.clearPluginMetadataLifecycleCachesbetween reads) instead of the older foreign variant the patch had swept in.Follow-up commit
19ee23d8ff2applies the per-assertion doctrine:test/scripts/bundled-plugin-build-entries.test.tsnow: 26 passed / 7 Rule-1 skips.scripts/lib/bundled-runtime-sidecar-paths.jsonviapnpm runtime-sidecars:gen— it is generated output derived from bundled plugin metadata plus the rootpackage.jsonfiles list (both changed by the patch), not product source — and the baseline guard is active.bundled-plugin-metadata.test.tsnow: 37/37 green, zero skips; all consumer suites green (openclaw-npm-postpublish-verify,release-check,test-projects, and thesrc/infra/update-global*/package-update-steps*family: 283/283).Remaining skips — all Rule 1 (entire assertion = external-plugin exclusion, the policy this patch reverses; each unskipped and run to confirm): the seven pure-exclusion build-entries cases (byteplus/cohere/meta/mistral/novita/opencode/xiaomi, vydra, comfy, teams-meetings/zoom-meetings, duckduckgo, voyage, volcengine), tsdown dist-graph exclusion (amazon-bedrock/-mantle out of root dist graph), release-check Docker-selected external plugin trees, official external provider endpoint mirroring (no dist-excluded plugins remain to mirror), and dual-published plugin selectability (the publication inventory is now covered by the active Rule-3 publisher test).
User Impact
None — test files and generated docs only. No product code changes. The regenerated channel docs index now truthfully states which channels ship bundled in the core package.
Evidence
Full six-patch stack rebuilt fresh from
999239d745d(upstream-test-fixes5cb15f9a095+ slack-mrkdwn + cli-http-fallback2966a901bec+ webhook-sessiontarget-support + otel-improvements + bundle-all-plugins43c8b3b545+ this branch29753e70051), clean replay with zero conflicts. Final sweep of every test file touched by the patch branch:bundled-plugin-metadata.test.ts36 passed / 1 justified skip;release-check.test.ts62 passed / 1 kept skip;runtime-postbuild.test.ts40/40;official-channel-catalog.test.ts20 passed / 1 canonical skip;release-plan-producer.test.tsgreen;openclaw-npm-postpublish-verify.test.ts57/57 green;doc-baseline.integration.test.tsfully green; all other patch-touched files green (see PR comments for per-file numbers).missing-configured-plugin-install.test.tsfails identically on the clean unpatched base (live gateway owns the state-DB lock on this host);docs-i18n.test.tsGo-toolchain guard (from canonical upstream-test-fixes) crashes on this Go-less host;corner-shape.browser.test.tsknown local browser-env artifact; tui-pty e2e not collected outside its gated project. CI is authoritative for these.oxfmt --checkclean on every touched file.