Skip to content

fix(ci): the bake tests that exercise the renderer run when the renderer changes - #1106

Merged
apresmoi merged 2 commits into
mainfrom
untangle4-sel
Oct 1, 2026
Merged

apresmoi merged 2 commits into
mainfrom
untangle4-sel

Conversation

@apresmoi

@apresmoi apresmoi commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Why

Plan 4 / C2 moved renderer tests that import the bake into packages/bake. The CI selector (affected-tests.mts) joins the offline tools only when a tool changed, so on a renderer-only change those suites stopped running.

Re-including all of bake on a renderer change would restore them, but bake's whole suite is heavy and was deliberately excluded. Instead an explicit owner map, FOREIGN_TESTS, lists exactly the moved suites and the selector runs just those files when their owner (or a package it depends on) changed. A unit test guards the map: every entry must exist, sit in an offline tool and import its owner package.

What changed

  • affected-tests.mts: FOREIGN_TESTS, a files result and a new test_files output; a file whose own package already runs is left to that package's glob.
  • universe.yml: test_files is exported by changes, passed to the packages lane as CI_TEST_FILES and appended to the tests array; the lane is skipped only when both packages and files are empty.
  • check-ci.mts: the local run substitutes the new output and the updated skip expression.
  • CONTRIBUTING.md: the selector rule names the exception.

The 12 files are the 11 renderer tests moved by f309c5c (scientific-focus excluded: it runs in the integration lane, covered by the site lane) plus the prepared-volume-runtime test moved by 72803ea.

Checks

  • Selector on a renderer-only diff (identical to the committed run):
    Packages to test: renderer; extra files: packages/bake/src/contract/feature-fixture.test.mts packages/bake/src/contract/object-runtime.test.mts packages/bake/src/contract/object-selection-runtime.test.mts packages/bake/src/contract/prepared-material.test.mts packages/bake/src/contract/renderer-navigable-object-mount.test.ts packages/bake/src/objects/layers/paged-ellipsoid/renderer-surface-target.test.ts packages/bake/src/presentation/renderer-depth-partitions.test.ts packages/bake/src/sky/renderer-parallax.test.ts packages/bake/src/stars/renderer-point-field-bank.test.ts packages/bake/src/stars/renderer-validation.test.ts packages/bake/src/volume-leaves/renderer-prepared-leaf-frustum.test.ts packages/bake/src/volume-leaves/renderer-prepared-volume-runtime.test.ts; site: true.
    
  • The workflow's tests loop, run for real with CI_TEST_PACKAGES=renderer and the 12 files: the foreign files execute (87 tests, 0 fail).
  • Files-only does not skip the packages lane; the workflow YAML parses.
  • Mutation: replacing the owner filter with false fails 3 tests in affected-tests.test.mts; restored, all 6 pass.
  • affected-tests.test.mts and check-ci.test.mts: 7 pass.
  • eslint on .github/scripts, typecheck:scripts, documentation links (--base origin/main), architecture check and the commit-message range check pass.

See the PR rules.

@apresmoi
apresmoi merged commit 5513e7e into main Oct 1, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant