Skip to content

build(devkit): adopt vigOS devkit 1.3.0 in direnv mode - #108

Merged
c-vigo merged 1 commit into
devfrom
chore/106-adopt-devkit
Jul 15, 2026
Merged

c-vigo merged 1 commit into
devfrom
chore/106-adopt-devkit

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

Adopt vigOS devkit 1.3.0 (direnv) — replace the bespoke CI/release stack

Second consumer of the mode-aware devkit, following the commit-action pilot (vig-os/commit-action#32). Deployed off dev with the released install.sh --version 1.3.0 --mode direnv --prune-devcontainer.

What changed

  • Devkit scaffold (direnv): Nix flake dev-shell (+pkgs.nodejs), .envrc, managed workflows/justfiles at 1.3.0; legacy .devcontainer/ pruned. Tag scheme declared day one: DEVKIT_TAG_PREFIX=v, DEVKIT_FLOATING_TAGS=major,minor.
  • Flake-generated pre-commit hooks (hooks = { }, hooksExcludes = ["^dist/"]): replaces the committed .pre-commit-config.yaml whose binary typos hook could not run on NixOS. scripts/setup-node.sh + .node/ provisioning retired — node flows from the flake.
  • Crown jewels preserved:
    • 8-scenario integration-test.yml matrix kept, wired to PRs via integration-pr.yml and to pushed tags via published-tag-smoke.yml (runs the action checked out AT the tag — consumer semantics).
    • Provenance attestation re-homed in attest-release.yml (tag push). ⚠️ Deviation from the plan: it cannot live in the release-extension.yml seam — the managed release.yml calls the seam under a contents: read, packages: read token ceiling and a called workflow can never elevate GITHUB_TOKEN (id-token: write would be denied). Devkit seam limitation to be filed upstream.
  • release-extension.yml re-purposed as the dist-freshness release backstop (ported from commit-action): its old floating-tag mover is superseded by the managed promote's native DEVKIT_FLOATING_TAGS job.
  • Ported gates: dist-check.yml (Dist Check, PRs to release/**+main), js-quality.yml (eslint + prettier via just).
  • codeql.yml push paths hand-patched to TS — devkit renders only the language matrix; upstream fix tracked in [BUG] Scaffold codeql.yml push paths hardcoded to '**.py' — not rendered per language, consumer hand-fixes lost on upgrade devkit#1142 (re-apply after every upgrade until fixed).
  • Retired: security-scan.yml (pure placeholder), CODEOWNERS, prepare_changelog.py + release_helpers.sh + their tests, resolve-image composite.
  • package.json: add bundle alias (devkit-standard name driving just bundle and release-core's native dist prep) and format:check.

Verification (local, NixOS, direnv)

  • nix develop resolves: node v24.16.0, npm 11.13.0, just, prek; flake-generated pre-commit config self-installs.
  • just sync / lint / format-check / build / bundle green; 115 jest tests pass; dist/ clean after rebuild (bundle fresh).
  • Full prek suite green — including typos, now flake-sourced (the pilot's NixOS fix, reproduced here).
  • actionlint clean across all workflows.

Follow-ups (not this PR)

Refs: #106

Replace the bespoke CI/release stack with the devkit 1.3.0 scaffold:

- install.sh --version 1.3.0 --mode direnv --prune-devcontainer; declare
  DEVKIT_TAG_PREFIX=v and DEVKIT_FLOATING_TAGS=major,minor day one
- Nix flake dev-shell with nodejs; flake-generated pre-commit hooks
  (hooks = { }, hooksExcludes ^dist/) replace the committed config whose
  typos hook could not run on NixOS
- keep the 8-scenario integration-test matrix; wire it to PRs
  (integration-pr.yml) and to pushed tags (published-tag-smoke.yml)
- re-home provenance attestation in attest-release.yml: the managed
  release.yml calls the extension seam under a contents:read token
  ceiling, so id-token:write cannot live there
- re-purpose release-extension.yml as the dist freshness backstop
  (floating tags now move natively at promote); port dist-check.yml and
  js-quality.yml gates from commit-action
- hand-patch codeql.yml push paths to TS (upstream: vig-os/devkit#1142)
- retire security-scan.yml placeholder, CODEOWNERS, bespoke
  changelog/release helpers, resolve-image composite, setup-node.sh

Refs: #106
@c-vigo
c-vigo merged commit 2a6409f into dev Jul 15, 2026
22 checks passed
@c-vigo
c-vigo deleted the chore/106-adopt-devkit branch July 15, 2026 21:07
c-vigo added a commit that referenced this pull request Jul 16, 2026
## Upgrade the action runtime to node24

Locked follow-up to the devkit migration (#106 → PR #108): switch
`runs.using` from `node20` to `node24` ahead of GitHub's forced default
on June 2, 2026
([changelog](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/)).

### What changed
- `action.yml`: `runs.using: node20` → `node24`
- `.nvmrc`: 20 → 24 (informational since the devkit migration — node
comes from the flake dev-shell, already 24.16)
- Changelog entry under Unreleased / Changed

Only live `node20` reference in the repo was `action.yml`;
`docs/issues/`/`docs/pull-requests/` mirrors are generated and
untouched. Dependencies were already node24-compatible (toolkit bumps
landed on dev; @types/node ^25).

### Verification
- 115 jest tests green on node v24.16.0 (flake dev-shell)
- `just bundle` → dist/ clean (bundle unchanged, as expected for a
metadata-only change)
- Full prek suite green
- The 9-scenario integration matrix on this PR executes the bundled
action under the node24 runtime — the real runtime test

Refs: #77
c-vigo added a commit to vig-os/devkit that referenced this pull request Jul 16, 2026
…e lines (#1146)

## Summary

The #1111 gitignore migration (`migrate_root_gitignore()` in
`assets/init-workspace.sh`) copied consumer lines from the old root
`.gitignore` into `.gitignore.project` with two defects, both observed
live on the sync-issues-action 1.3.0 deploy (field report:
vig-os/sync-issues-action#106, PR vig-os/sync-issues-action#108):

1. **It migrated entries that shadow scaffold-COMMITTED files.** The old
Python-template `.gitignore` shipped `.envrc`; in direnv mode `.envrc`
is scaffold-committed for nix-direnv onboarding (#640). Because
`.gitignore.project` is appended to the regenerated root `.gitignore`
(#1092), the migrated entry silently kept the scaffolded `.envrc`
untracked and broke direnv onboarding on every clone.
2. **It migrated stale devkit language-template junk as if
consumer-authored.** The `managed` set was built from the template base
plus the DETECTED languages' fragments only, so a repo that switched
language templates (old Python-flavored managed `.gitignore`, now a Node
repo) got ~90 lines of `__pycache__/`/`.tox/`-style template material
dumped into its consumer-owned file.

## Fix (two never-migrate rules)

- **Rule 1 — scaffold-committed denylist:** entries whose pattern equals
a file the scaffold itself commits never migrate: `.envrc`,
`.gitignore.project`, `flake.nix`, `flake.lock`, `justfile`,
`justfile.project`, `.vig-os`. These are literal file names, not glob
patterns, so a plain literal line match suffices (commented in the
code).
- **Rule 2 — filter against ALL fragments:** the `managed` set now
iterates every `gitignore.d/*.gitignore` fragment instead of only the
detected languages'. The OLD root `.gitignore` was a devkit-managed
template for whatever language set applied back then, so any line found
in ANY devkit fragment is template material, never consumer-authored.

Order, dedup, idempotency, and append-only behavior are unchanged; the
function's header comment documents both rules.

## Test evidence (strict TDD)

- RED: two new bats tests (`tests/bats/init-workspace.bats`, #1145
section) failed on the pre-fix code exactly at the leak assertions
(`.envrc` and `__pycache__/` found in `.gitignore.project`), committed
first.
- GREEN: both #1145 tests pass post-fix; `.envrc` also verified
untracked via `git check-ignore`.
- No regression: the full `tests/bats/init-workspace.bats` file passes —
208/208 tests, including all #1111 / #1092 / #1117 gitignore tests.
- `prek run --all-files`: all hooks green.

## Notes

Closes #1145

Note: `Closes #N` does not auto-close on dev-targeted merges in this
repo (main-only) — close #1145 manually on merge.

Refs: #1145
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