test: fix changed-run routing, dedupe gateway package lanes, repair force-rerun triggers#104287
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d82cdefe44
ℹ️ 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".
| }; | ||
| const EXTENSION_TEST_CONFIG_ROUTES = [ | ||
| [(root) => channelTestRoots.includes(root), "test/vitest/vitest.extension-channels.config.ts"], | ||
| [isActiveMemoryExtensionRoot, "test/vitest/vitest.extension-active-memory.config.ts"], |
There was a problem hiding this comment.
Make active-memory routing reachable from test-extension
This new active-memory route is not reachable through the main extension planner: resolveExtensionDirectory() only accepts targets whose directory contains package.json, while extensions/active-memory is a manifest-only plugin (openclaw.plugin.json with no package.json). As a result, pnpm test:extension active-memory still throws Unknown extension target, and batch planning via listAvailableExtensionIds() also omits it, so the new route/test only verifies the helper directly rather than the user-facing command path.
Useful? React with 👍 / 👎.
…orce-rerun triggers - route extensions/active-memory changed runs to their dedicated lane; add a generic guard that every catch-all-excluded extension root resolves to a dedicated config so future split lanes cannot silently skip changed tests - exclude packages/gateway-client and packages/gateway-protocol from the unit lane; explicit targets now route to the gateway-client lane (was double-run) - generate forceRerunTriggers from the test/vitest directory and resolve all entries absolute: Vitest matches triggers against absolute changed-file paths, so the old hand-maintained relative list never matched at all - replace deprecated envFile:false with envDir:false (Vitest 4.1.9 warning) - give scripts/test-live.mjs stall detection teeth: kill the process group and exit non-zero when OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS elapses quietly - consolidate the live-docker shell target list into changed-lanes.mjs so the lane regex and check targets cannot drift; cover subagent-announce edits - delete orphans: vitest.extension-clickclack.config.ts, vitest.full-core-unit.config.ts, scripts/test-docker-all.sh, scripts/test-live-acp-spawn-defaults-docker.sh Closes #104231
…nfig Vite 8 types envDir as string | false; the bare object literal widened false to boolean and broke check:test-types at the defineConfig call sites.
d82cdef to
4ca42f5
Compare
|
Merged via squash.
|
…orce-rerun triggers (openclaw#104287) * test: fix changed-run routing, dedupe gateway package lanes, repair force-rerun triggers - route extensions/active-memory changed runs to their dedicated lane; add a generic guard that every catch-all-excluded extension root resolves to a dedicated config so future split lanes cannot silently skip changed tests - exclude packages/gateway-client and packages/gateway-protocol from the unit lane; explicit targets now route to the gateway-client lane (was double-run) - generate forceRerunTriggers from the test/vitest directory and resolve all entries absolute: Vitest matches triggers against absolute changed-file paths, so the old hand-maintained relative list never matched at all - replace deprecated envFile:false with envDir:false (Vitest 4.1.9 warning) - give scripts/test-live.mjs stall detection teeth: kill the process group and exit non-zero when OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS elapses quietly - consolidate the live-docker shell target list into changed-lanes.mjs so the lane regex and check targets cannot drift; cover subagent-announce edits - delete orphans: vitest.extension-clickclack.config.ts, vitest.full-core-unit.config.ts, scripts/test-docker-all.sh, scripts/test-live-acp-spawn-defaults-docker.sh Closes openclaw#104231 * test: keep envDir literal so sharedVitestConfig satisfies Vite UserConfig Vite 8 types envDir as string | false; the bare object literal widened false to boolean and broke check:test-types at the defineConfig call sites.
- test/tsconfig/tsconfig.test.root.json: root-test program (strict unused checks, fixtures excluded; two Docker E2E clients that import built dist/** stay out, same rationale as the scripts/e2e exclusion in tsconfig.scripts.json) - tsgo:test:root wired into tsgo:test, check:test-types, scripts/check.mjs, and the ci.yml test-types shard, mirroring the tsgo:scripts lane (#104348) - changed-lane routing: test/**/*.ts (excluding fixtures) and the lane tsconfig now trigger 'typecheck test root' in check:changed; previously test/ paths ran lint only, so harness type errors surfaced first in CI (#104287 envDir case) - burn down all 1071 latent type errors in the program: precise param/local types across test/scripts, test/vitest, test/e2e, and transitive scripts/e2e program members; 205 sibling .d.mts declaration files for imported .mjs modules (committed separately); zero any, zero ts-expect-error - resolve the pre-existing testing star-export ambiguity in scripts/e2e/parallels/common.ts with an explicit re-export Closes #104388
…04475) * chore(types): add declaration files for scripts/lib and scripts/e2e modules * chore(types): add declaration files for top-level script modules (a-m) * chore(types): add declaration files for top-level script modules (n-z) * test: use a non-secret-shaped gateway token fixture * test: type ci workflow guard helpers for the root test lane * chore(tooling): typecheck root test/** with a dedicated tsgo lane - test/tsconfig/tsconfig.test.root.json: root-test program (strict unused checks, fixtures excluded; two Docker E2E clients that import built dist/** stay out, same rationale as the scripts/e2e exclusion in tsconfig.scripts.json) - tsgo:test:root wired into tsgo:test, check:test-types, scripts/check.mjs, and the ci.yml test-types shard, mirroring the tsgo:scripts lane (#104348) - changed-lane routing: test/**/*.ts (excluding fixtures) and the lane tsconfig now trigger 'typecheck test root' in check:changed; previously test/ paths ran lint only, so harness type errors surfaced first in CI (#104287 envDir case) - burn down all 1071 latent type errors in the program: precise param/local types across test/scripts, test/vitest, test/e2e, and transitive scripts/e2e program members; 205 sibling .d.mts declaration files for imported .mjs modules (committed separately); zero any, zero ts-expect-error - resolve the pre-existing testing star-export ambiguity in scripts/e2e/parallels/common.ts with an explicit re-export Closes #104388 * chore(types): correct declaration fidelity per structured review - re-derive 51 .d.mts files from implementation data flow instead of initializers: fix a wrong never return (runTestProjectsDelegation returns the child), add encoding-sensitive exec/spawn overloads (plain-gh), restore the full release profile union, make parsed paths string | null, add missing parseArgs fields via help/non-help unions, add a missing sibling declaration (budget-number-args), drop 15 unused lint directives - precise install-record/tuple typing removes the type-aware oxlint regressions the first declarations caused in scripts/e2e implementations - route .mts declaration edits under test/ to the testRoot lane and reference the test-root project from tsconfig.projects.json so tsgo:all covers it (closes both review findings against the lane wiring) * chore(scripts): keep telegram runner dist typing structural for the boundary guard * chore(types): declare runtime pack and gateway readiness exports added on main * test: pin the importTargetPlan form of the plugin-contract plan import The guard expectation still referenced the raw await import( form that 7ae5996 (#103975) replaced with the importTargetPlan fallback helper; the assertion fails on current main.
…orce-rerun triggers (openclaw#104287) * test: fix changed-run routing, dedupe gateway package lanes, repair force-rerun triggers - route extensions/active-memory changed runs to their dedicated lane; add a generic guard that every catch-all-excluded extension root resolves to a dedicated config so future split lanes cannot silently skip changed tests - exclude packages/gateway-client and packages/gateway-protocol from the unit lane; explicit targets now route to the gateway-client lane (was double-run) - generate forceRerunTriggers from the test/vitest directory and resolve all entries absolute: Vitest matches triggers against absolute changed-file paths, so the old hand-maintained relative list never matched at all - replace deprecated envFile:false with envDir:false (Vitest 4.1.9 warning) - give scripts/test-live.mjs stall detection teeth: kill the process group and exit non-zero when OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS elapses quietly - consolidate the live-docker shell target list into changed-lanes.mjs so the lane regex and check targets cannot drift; cover subagent-announce edits - delete orphans: vitest.extension-clickclack.config.ts, vitest.full-core-unit.config.ts, scripts/test-docker-all.sh, scripts/test-live-acp-spawn-defaults-docker.sh Closes openclaw#104231 * test: keep envDir literal so sharedVitestConfig satisfies Vite UserConfig Vite 8 types envDir as string | false; the bare object literal widened false to boolean and broke check:test-types at the defineConfig call sites.
…enclaw#104475) * chore(types): add declaration files for scripts/lib and scripts/e2e modules * chore(types): add declaration files for top-level script modules (a-m) * chore(types): add declaration files for top-level script modules (n-z) * test: use a non-secret-shaped gateway token fixture * test: type ci workflow guard helpers for the root test lane * chore(tooling): typecheck root test/** with a dedicated tsgo lane - test/tsconfig/tsconfig.test.root.json: root-test program (strict unused checks, fixtures excluded; two Docker E2E clients that import built dist/** stay out, same rationale as the scripts/e2e exclusion in tsconfig.scripts.json) - tsgo:test:root wired into tsgo:test, check:test-types, scripts/check.mjs, and the ci.yml test-types shard, mirroring the tsgo:scripts lane (openclaw#104348) - changed-lane routing: test/**/*.ts (excluding fixtures) and the lane tsconfig now trigger 'typecheck test root' in check:changed; previously test/ paths ran lint only, so harness type errors surfaced first in CI (openclaw#104287 envDir case) - burn down all 1071 latent type errors in the program: precise param/local types across test/scripts, test/vitest, test/e2e, and transitive scripts/e2e program members; 205 sibling .d.mts declaration files for imported .mjs modules (committed separately); zero any, zero ts-expect-error - resolve the pre-existing testing star-export ambiguity in scripts/e2e/parallels/common.ts with an explicit re-export Closes openclaw#104388 * chore(types): correct declaration fidelity per structured review - re-derive 51 .d.mts files from implementation data flow instead of initializers: fix a wrong never return (runTestProjectsDelegation returns the child), add encoding-sensitive exec/spawn overloads (plain-gh), restore the full release profile union, make parsed paths string | null, add missing parseArgs fields via help/non-help unions, add a missing sibling declaration (budget-number-args), drop 15 unused lint directives - precise install-record/tuple typing removes the type-aware oxlint regressions the first declarations caused in scripts/e2e implementations - route .mts declaration edits under test/ to the testRoot lane and reference the test-root project from tsconfig.projects.json so tsgo:all covers it (closes both review findings against the lane wiring) * chore(scripts): keep telegram runner dist typing structural for the boundary guard * chore(types): declare runtime pack and gateway readiness exports added on main * test: pin the importTargetPlan form of the plugin-contract plan import The guard expectation still referenced the raw await import( form that 7250680 (openclaw#103975) replaced with the importTargetPlan fallback helper; the assertion fails on current main.
Closes #104231
What Problem This Solves
Fixes an issue where maintainers and agents running
pnpm test:changedafter editingextensions/active-memorytests would get a false green: the changed-run planner routed those files to the catch-all extensions lane, which excludes them, so nothing executed. Also resolves a set of verified test-harness integrity defects from the same audit: 22 gateway package test files ran twice in the root Vitest matrix, the hand-maintainedforceRerunTriggerslist never matched anything (and had drifted), the shared config printed a Vitest 4.1.9 deprecation warning on every run, stalledtest:liveruns printed heartbeats forever without terminating, the live-docker changed-lane regex missed one of its own shell targets, and four files (two Vitest configs, two shell scripts) were orphaned with zero references.Why This Change Was Made
A test-setup verification pass (issue #104231) confirmed each defect against source, the Vitest 4.1.9 dependency internals, and live runs. The fixes prefer deleting drift-prone hand-maintained lists over patching them: the extension routing ternary became a table with a generic drift guard, the force-rerun list is generated from the config directory, and the live-docker target list has a single owner. Net non-test LOC goes down.
Notable dependency-verified detail: Vitest matches
forceRerunTriggerswith picomatch against absolute changed-file paths and appends absolutesetupFilesitself ([email protected]resolveConfig/handleFileChanged), so the old repo-relative entries silently never matched; entries are now resolved absolute. The explicit file enumeration is kept alongside a glob because chokidar v5 (used forwatcher.add) does not support globs.User Impact
None at product runtime — this is developer/CI test-harness behavior.
test:changedproof for active-memory edits is now real, root-matrix runs stop double-executing gateway package tests, watch mode reruns when lane configs change, and stalled live runs terminate with a non-zero exit instead of hanging.Evidence
cbx_3f4981493e64, c7a.8xlarge):test/vitest-projects-config.test.ts,test/package-scripts.test.ts,test/vitest-unit-paths.test.ts,test/scripts/{test-projects,run-vitest,changed-lanes,test-live,test-extension}.test.ts.pnpm test:changedon the same box: 3 shards, 5588 passed, 1 failed —test/scripts/release-ci-summary.test.ts"hashes and safely streams one bounded manifest entry", which requires theunzipbinary; the box has nounzip(command -v unzip→ missing) and the file is untouched by this diff. The same file passes 39/39 whereunzipexists.pnpm check:changed(typecheck/lint/guards for affected lanes) green on the same box, exit 0.gpt-5.6-sol, thinking xhigh): clean, "patch is correct (0.91)", no actionable findings.