Skip to content

feat(ci): add language and flake-eval cells to the consumer matrix - #1807

Merged
c-vigo merged 6 commits into
devfrom
feature/1762-consumer-matrix-languages
Oct 1, 2026
Merged

c-vigo merged 6 commits into
devfrom
feature/1762-consumer-matrix-languages

Conversation

@c-vigo

@c-vigo c-vigo commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Part 2 of 2 for #1762. This PR is stacked on #1803 (part 1) and targets feature/1762-consumer-matrix. It will be retargeted to dev once #1803 merges.

It adds language cells and a flake-evaluation cell to the Consumer Matrix job from part 1.

Expected reds: only the #1800/#1801 cells, as on #1803, until those fixes land on dev.

rust is a strict expected-fail on #1496. A scaffolded Rust consumer gets the stock Python justfile.project, so just test exits 0 without compiling anything. The cell still runs every gate, and is accepted only when:

  • test is its sole failed gate, and
  • that gate failed with the silent-no-op signal ("just test exited 0 but the rust fixture suite never ran").

If the cell passes, it fails ("rust now passes — remove the #1496 expected-fail marker"). If it fails in any other way, it fails. The marker is one entry, EXPECTED_FAIL[rust]="test #1496", next to the cell list, and the summary shows expected-fail (#1496). #1496 now has a comment saying this cell is its acceptance test and that its fix must remove the marker.

CI run: https://github.com/vig-os/devkit/actions/runs/36880846330. The only failing cells are devcontainer, trunk, ci-runner, tag-prefix, language-guard and features-disabled (#1801 exceeds 500 KB, plus #1800 too many blank lines on features-disabled). rust is expected-fail (#1496). direnv, bare, python, node and direnv-flake pass. Every other job is green. An earlier run, https://github.com/vig-os/devkit/actions/runs/36878543444, gave the same verdicts.

Type of Change

  • feat -- New feature
  • test -- Adding or updating tests
  • ci -- CI/CD pipeline changes

Changes Made

  • Fixtures in tests/fixtures/consumer/{python,node,rust}/: a zero-dependency hello world plus one test each. Python uses pytest from a dev dependency group. Node uses node --test and ships a dependency-free package-lock.json so npm ci works. Rust uses a #[test] in src/lib.rs. Each test writes $CONSUMER_MATRIX_SENTINEL when it is set.
  • Language cells python, node, rust:
    • The fixture is copied in as the marker files, then rendered in bare mode with --force. That is the adoption path for an existing project: no .vig-os yet, so nothing is upgraded, and without --force init-workspace.sh refuses a non-empty directory. bare ships the scaffolded hook config with no mode-specific files, so the result reflects the language and not the mode.
    • New gates sync (just sync) and test (just test), as the consumer's CI runs them. These apply to every cell.
    • A fixture cell's test gate fails if the sentinel was not written. seed also checks that the scaffold detected the language into DEVKIT_LANGUAGES.
  • direnv-flake cell:
    • nix flake check on the rendered flake with --override-input vigos "path:$ROOT" (same approach as test-project's "Check downstream flake stub") and --no-write-lock-file.
    • It then builds the dev shell into a profile, and every later gate runs inside it. The shell hook installs the flake-generated .pre-commit-config.yaml, so first-commit and precommit exercise the direnv hooks for the first time. The plain direnv cell still skips them.
  • Toolchains:
  • pyproject.toml: added fixtures to norecursedirs so devkit's own pytest does not collect the fixture suite.

Changelog Entry

Two sub-bullets added to the existing Consumer matrix in devkit PR CI entry under Added:

  - Language cells for python, node and rust adopt a zero-dependency hello
    world (`tests/fixtures/consumer/`) and run `just sync` and `just test`; the
    fixture test must prove it ran, so a `just test` that silently skips fails
  - A `direnv-flake` cell runs `nix flake check` on the rendered flake against
    the PR's own devkit and runs the direnv cell's gates inside its dev shell,
    so the flake-generated hooks are exercised too

Testing

  • TDD: tests/bats/consumer-matrix.bats extended first (later also the strict expected-fail verdict: exact match accepted, a passing cell refused, any other failure refused) (cell list, fixture detection, node npm-mapped recipes, the sentinel contract, direnv-flake render shape). It was committed red, then made green by the implementation.
  • just precommit green.
  • Local run: python 6 s, node 6 s and direnv-flake 22 s, all passing. rust red on Rust pack: L1/L4/L7 never shipped — the pack cannot be adopted cold #1496.

CI timing

Each cell's summary now lists the time of every gate, because the cells run concurrently and their logs are printed afterwards.

part 1 (#1803, 8 cells) this PR (12 cells)
setup-env 44 s 35 s
cells step 130 s 176 s
Consumer Matrix job 182 s 219 s
slowest other lane 267 s (BATS) 284 s (Flake Gates)
run wall clock 5m39s 5m14s

The job still finishes about 65 s before the slowest lane, so the critical path does not change, and the flake cell stays in the same job (no separate job is needed). Per-cell times under 12-way concurrency on the 4-vCPU runner: direnv-flake 163 s, the both-mode cells 163–176 s, python/node/rust 67–70 s, bare 65 s, direnv 5 s. The flake cell is not the outlier: the nix flake check and dev-shell build reuse the closure setup-env already pulled. Locally, with a warm store and no contention, it takes 22 s.

Refs: #1762

Base automatically changed from feature/1762-consumer-matrix to dev October 1, 2026 16:42
@c-vigo
c-vigo enabled auto-merge October 1, 2026 16:47
@c-vigo
c-vigo merged commit 468f5d3 into dev Oct 1, 2026
16 checks passed
@c-vigo
c-vigo deleted the feature/1762-consumer-matrix-languages branch October 1, 2026 16:50
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