Repository navigation
Conversation
Root-owned tests (no Cargo crate, no nested JS package, no Dart package) went through one detectRunner call. It returns pytest only when every file is .py and node --test only when every file is .js/.mjs, so a selection holding scripts/*.test.mjs and a test_*.py got no runner at all: PREGATE_INCOMPLETE, with a fix line asking for one declared `runner` that cannot serve both. When no single runner fits the whole root group, split it by language and detect each part. A root that already gets one runner (bun, vitest, jest, one language) keeps today's plan; a file no runner claims stays unclaimed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Thank you for this fix. A crew lane is picking it up, together with your related pregate PRs, to land on current main with Co-authored-by credit to you. |
…s; literals stops flagging stray digits (#3598, #3492) (#3741) * fix(pregate): runner detection for pytest, Playwright and mixed-language roots; literals binds one-character values A missing pytest is PREGATE_ENVIRONMENT, not the diff's failure (#3598). Playwright specs run under playwright test, with missing browsers reported as the machine's gap (#3629). Root tests in two languages each get their runner, and a repo's bun/vitest/jest claims only JS/TS (#3600). literals counts a one-character old value only in a statement naming the constant, and a call-site name also needs the module (#3492, gstack-evals#97). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(pregate): name the import-type shapes the Playwright detection skips Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: escape Playwright file filters; skip type-only Playwright imports; pytest probe and summary read hardening Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(pregate): linear Playwright import scan; comments and no-space imports detected Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(pregate): Playwright missing-browsers exception and literals continuation rule Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
Thanks @vilano93. This landed in v1.93.15.0 as #3741: root tests in two languages now each get their own runner ( |
Why (in your own words)
A repo whose root tests come in two languages never gets a
lanesrun. Root-owned tests are the ones in no Cargo crate, nested JS package or Dart package. They all go through onedetectRunnercall. That call returns pytest only when every file is.py, andnode --testonly when every file is.js/.mjs. Soscripts/doku-gate.test.mjs+scripts/version-gate.test.mjs+scripts/local-targets/test_prepare_native_culling_assets.pyget no runner at all. The lane isPREGATE_INCOMPLETE, and the receipt is never written. The fix line asks for one declaredrunner. One command can't run both languages without a hand-written dispatcher script.With this change, when no single runner fits the whole root group, the group is split by language and each part is detected on its own. A root that already gets one runner (bun, vitest, jest, a single language) keeps today's plan. A file no runner claims stays unclaimed, so the lane is still incomplete for it, never a pass.
Live evidence
The real repo: a Cargo workspace in
engine/, a pnpm+vitest package inapp/, no rootpackage.json, and root tests inscripts/written in both.mjsand Python. The throwaway branch touches exactly those three root tests.Both languages now run. This machine has no pytest, so the Python half exits 1. Pregate reports that as
PREGATE_LANE_FAILED("fix the in-branch failure") instead ofPREGATE_ENVIRONMENT. That misattribution already exists on main for any.pyselection and is not part of this change. It is filed with a main-only repro as #3598.The new test was red first, then green:
Scope
lib/pregate/checks/lanes.ts(planRuns): whendetectRunnerfinds no single runner for the root group, the group is split by language (.py,.js/.mjs/.cjs, other JS/TS) and each part is detected separately. Any other file is its own part, so it stays unclaimed as before.test/pregate-selection.test.ts: one plan-level case. It covers a.mjs+.pyselection getting both runners, and a.mjs+.batsselection running the.mjswhile the.batsstays unclaimed.bun run typecheck: clean;bun run typecheck:test: "814 known diagnostics, none new".upstream/mainworktree on macOS:test/pregate-selection.test.tsfails the same 4gstack-pregate (bin)tests on both (macOS host, as noted in fix(pregate): Rust crate lanes and nested JS package runners (#3344) #3346). The new case passes only on this branch.bun run teston this branch fails tests in 12 files, none of them in pregate lane planning: capy wrapper, codex probe, cso, doctor, pregate remote, qa, ship-receipt carry, test-free-shards settlement, ubicloud, update-check. I ran those 12 files on both trees. Main fails 126 and this branch fails 125. No test fails only on this branch. The one extra failure on main istest-free-shards … endpoint-mix, which is flaky.runneris unchanged by construction (planRunsreturns before this code), and the existing negative control covers it.Liveness proof (required for external contributors)
Checklist
GSTACK PRtyped live into a real surface) or PR author is @garrytan (owner exemption)🤖 Generated with Claude Code