Skip to content

fix(ci): make scaffolded CI and release pipeline language-neutral - #1033

Merged
c-vigo merged 6 commits into
devfrom
bugfix/1029-language-neutral-ci-release
Jul 14, 2026
Merged

c-vigo merged 6 commits into
devfrom
bugfix/1029-language-neutral-ci-release

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Bundles the two pilot-surfaced "CI layer is Python-shaped" bugs (both from vig-os/commit-action#32) — same theme, one CI run.

#1028 — gate python/uv env in setup-devkit-toolchain

All three Python-assuming spots now gate on pyproject.toml at the repo root: UV_PROJECT_ENVIRONMENT (container branch), the Nix-CPython $GITHUB_PATH filter, and the UV_PYTHON_DOWNLOADS_JSON_URL forward (direnv branch). On a non-Python consumer the composite is a no-op for those steps — and the Nix python stays on PATH, removing the latent footgun. DEVKIT_MODULES was verified still Reserved/empty in .vig-os, so file presence is the gating signal (the issue's primary suggestion). The devkit itself has a root pyproject.toml, so its own CI is unchanged.

#1029 — language-neutral release pipeline with opt-in bundle

  • Neutral labels: "Sync Python dependencies" → "Sync dependencies" (release-core.yml), "Pytest" → "Run tests" (ci.yml header). Remaining python hits in the scaffold workflows are genuinely Python-specific and untouched.
  • Opt-in release artifact: the finalize job detects a bundle just recipe (just --summary | grep -qw bundle), runs just bundle, and adds dist to the existing finalization commit's FILE_PATHS — so the tagged commit ships a fresh bundle. Zero new config surface: the recipe's presence is the flag, matching the capability-by-presence idiom of the [BUG] setup-devkit-toolchain applies python/uv CI env unconditionally on non-python consumers #1028 fix. Verified commit-action's FILE_PATHS supports directories ("directory expansion" per its README) and that commit-action itself already defines a bundle recipe.
  • Release choreography untouched (epic [EPIC] Mode-aware scaffold: CI/release toolchain per deployment mode #988 keeps it single-source) — the step is additive and gated.

TDD: each fix lands as failing-test commit → implementation commit (tests/bats/init-workspace.bats, 3 new shape tests).

Test evidence

  • bats tests/bats/init-workspace.bats → 162 ok / 0 failed
  • bats tests/bats/just.bats → 46 ok
  • actionlint clean on both edited workflows
  • prek run --all-files → green (re-verified independently before push)

Closes #1028
Closes #1029
Refs: #988, #1027

c-vigo added 4 commits July 14, 2026 09:40
Rename the Python-shaped sync/test labels and add an opt-in artifact
build to release-core finalize: detect a `bundle` just recipe via
`just --summary`, run `just bundle`, and commit dist/ in the
finalization commit. Gated on the recipe existing, so it is a no-op for
non-artifact (e.g. Python) consumers.

Refs: #1029
@c-vigo
c-vigo merged commit abb1d56 into dev Jul 14, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1029-language-neutral-ci-release branch July 14, 2026 08:26
c-vigo added a commit that referenced this pull request Jul 14, 2026
…es (#1042)

## Summary

Implements the node/typescript capability module per the design decision
recorded on the issue (module = v1 shell contract; scaffold statics via
#1024/#1025; release bundling via #1029).

### `node` capability module (v1 contract)
- `modules = [ "node" ]` puts `nodejs` (bundles npm) in the dev shell —
replaces the hand-wired `extraPackages = [ pkgs.nodejs ]` every
TS-action consumer copied.
- **Lands the per-module-options mechanism the ADR deferred** (this is
"the first module that needs it"): a `modules` entry may be `{ name =
"node"; version = 22; }` alongside plain strings — additive, no break
for the string form. Modules are now uniformly `pkgs -> options ->
contribution`; unknown option names, malformed entries, and unavailable
Node majors all fail at eval time with clear messages.
- **PATH nuance (flagged for review):** the toolchain SSoT
(`nix/devtools.nix`) already ships `nodejs` for `@devcontainers/cli`,
and the ADR orders devTools before module packages — so a pinned module
node would be shadowed. When (and only when) an explicit `version` is
given, the module prepends its node in `shellHook` (a v1-contract
fragment, same pattern as `native`'s CC/CXX exports). Documented in the
module and `docs/NIX.md`.
- `nodejs_20` (the Actions runtime major the issue mentions) is
EOL/insecure in the pinned nixpkgs — pinning it surfaces nixpkgs' own
error unless the consumer opts into `permittedInsecurePackages`; the
versioned test uses maintained LTS 22.
- Zero-module invariant intact: `modules = [ ]` drvPath byte-identity
and the parity suite pass untouched. `checks.<system>.module-node` is
registry-generated.

### First-scaffold npm recipes
Node-detected consumers (`package.json`, via #1024's
`DETECTED_LANGUAGES`) get `justfile.project` seeded from
`assets/justfile.d/node.justfile.project` at **first scaffold only** —
`sync`=`npm ci`, `lint`/`format`/`test`/`test-cov`, `build` (tsc),
`bundle` (ncc) — so the CI contract (`just sync`/`just test`) and the
#1029 release bundle probe work out of the box. Guarded on
`JUSTFILE_PROJECT_PREEXISTED`: an existing consumer-owned file is never
touched. Full replacement, not append (appending would redeclare recipe
names).

### Out of scope (per the recorded decision)
eslint/prettier hooks (#883 seam), gitignore/codeql (landed via #1035),
release bundle step (landed via #1033).

TDD: two failing-test → implementation commit pairs + a docs commit.

## Test evidence
- `uv run pytest tests/test_flake_modules.py` → 6 passed (node/npm
resolve; `version = 22` pins 22.x; unknown option rejected)
- `bats tests/bats/init-workspace.bats` → 174 ok / 0 failed (5 new
seeding tests; re-run after merging dev)
- Zero-module drvPath parity → passed; flake checks `module-node`,
`deadnix`, `statix` build
- `prek run --all-files` → green (re-verified independently before push)

Closes #1027
Refs: #884, #1024, #1029
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