Repository navigation
chore: sync dev with main - #1223
Merged
Merged
Conversation
… docs
The runner-json output description and a bash comment contained a
literal ${{ fromJSON(...) }}; the Actions runner template-evaluates
both scalars when loading the composite action manifest, so the
placeholder dots were parsed as a real expression and failed every
consumer CI run at manifest load.
Refs: #1187
… docs (#1188) ## Summary 1.4.0-rc1 smoke test failed at manifest load of the managed `resolve-toolchain` composite action ([run](https://github.com/vig-os/devkit-smoke-test/actions/runs/29584889283)): documentation text added by #1173 contained a literal `${{ fromJSON(...) }}` in two runner-evaluated scalars (the `runner-json` output description and a bash comment in the `run:` block). There is no escape for `${{` in Actions YAML, so the placeholder dots were parsed as a real expression and the manifest failed to load, killing every consumer CI run at "Resolve toolchain". This rephrases both doc strings without the expression wrapper. Repo-wide grep confirms no other literal-expression doc text remains in managed assets. No changelog entry: the bug was introduced by the unreleased #1173 feature, so there is no user-visible delta versus 1.3.1. Per the RC-validation runbook the fix targets `release/1.4.0`; dev picks it up via sync-main-to-dev after the release merges. Refs: #1187
The #1180 env forward captured the whole stdout of nix develop as the env dump, so the scaffolded flake's shellHook banner glued onto the first NUL record and produced an invalid GITHUB_ENV name, failing every direnv-mode consumer CI job. Dump the env to a file inside the shell command instead, and skip any record whose name is not a valid env identifier as defense in depth. Refs: #1189
## Summary 1.4.0-rc2 consumer validation failed on every direnv-mode host CI job (org-config vig-os/org-config#54, sync-issues-action vig-os/sync-issues-action#143) at "Set up devkit toolchain": ``` ##[error]Unable to process file command 'env' successfully. ##[error]Invalid format 'devcontainer dev environment loaded (nix)' ``` The #1180 shellHook env forward captured the **whole stdout of `nix develop`** as the env dump, so the scaffolded flake's shellHook banner glued onto the first NUL-delimited record and produced an invalid GITHUB_ENV heredoc name. Both banner and action are devkit-managed — every direnv consumer breaks and cannot fix it locally. rc2's smoke test missed it because the smoke-test consumer is container-mode. ## Fix (TDD) - `dcbcbd02` **test (RED)**: stub `nix` now echoes the banner on stdout on every invocation, exactly like the real flake; asserts the banner never reaches GITHUB_ENV and the first env record survives. Reproduced the exact live corruption. - `20b6d58b` **fix (GREEN)**: dump the env to a file *inside* the shell command (`--command bash -c 'env -0 > "$1"' _ <file>`) so shellHook stdout stays on the job log; plus defense in depth — skip any record whose name is not a valid env identifier. 19/19 tests green. The step's other two stdout captures (PATH, UV download URL) are already banner-safe via their `grep` filters; the env dump was the only raw capture. Note: 4 unrelated local pytest failures against the stale local `:dev` image (missing DOWNSTREAM_RELEASE.md / 1.4.0 devtools) — CI builds fresh. Per the RC-validation runbook this targets `release/1.4.0`; rc3 follows. Second rc finding after #1187. Refs: #1189
The direnv toolchain path hard-coded install-nix-action, which aborts on a runner that already ships Nix and leaves NIX_CONFIG malformed — breaking the direnv + DEVKIT_CI_RUNNER self-hosted combination. Detect host Nix first: fresh runners install as before, preinstalled runners get the same settings via a well-formed multi-line NIX_CONFIG. Refs: #1192
) ## Summary Third rc finding (after #1187, #1189), from the first live exercise of the #1173 `DEVKIT_CI_RUNNER` knob on exo-pet/exo-fleet (PR exo-pet/exo-fleet#230): the direnv branch of `setup-devkit-toolchain` hard-codes `cachix/install-nix-action`, which **aborts on a self-hosted runner that already ships Nix** and leaves `NIX_CONFIG` malformed — the next `nix develop` dies with `syntax error in configuration line 'experimental-features' in "NIX_CONFIG"`. The runner routing itself worked exactly as designed. ## Fix (TDD) - `0429b290` **test (RED)**: structural gate (detect step precedes install; install gated on `has-nix != 'true'`), executed-bash test of the new host-Nix config step (well-formed newline-separated NIX_CONFIG in GITHUB_ENV), and a lockstep test pinning both paths to identical Nix settings. - **fix (GREEN)**: new `Detect host Nix` step; `install-nix-action` now runs only when no host Nix exists (hosted runners unchanged); preinstalled runners get the same settings via a multi-line `NIX_CONFIG` heredoc. 22/22 action tests + related suites green, full hook suite green. Hosted-runner consumers are untouched by this path (detect → has-nix=false → identical install flow), so the four rc3-green validation lanes stay valid. Refs: #1192
…#1201) ## Summary The `Detect host Nix` step in `setup-devkit-toolchain` logged `Host Nix present: /…/nix ()` on exo-fleet's multi-user host because `$(nix --version)` wrote to stderr and the substitution captured nothing. Now captures `nix --version 2>&1` so the version is retained. Cosmetic follow-up to #1192; the step already branched correctly. ## Test TDD — RED test first, then fix. New pytest runs the step's script against a stub `nix` that prints its version only to stderr and asserts the log line carries the version, not an empty `()`. `uv run pytest tests/test_setup_toolchain_env.py -q` → **23 passed**. Found during 1.4.0 RC validation. No CHANGELOG change (fix to an unreleased-1.4.0 feature, per the #1187/#1189/#1192 precedent). Closes #1198
## Summary `init-workspace.sh` set `+x` on **every** `.sh` in the consumer tree via a blanket `find "$WORKSPACE_DIR" -name '*.sh' -exec chmod +x`, which re-dirtied consumers' own sourced-only libraries on each `--force` re-scaffold (seen in exo-pet/exo-fleet#230). The sweep is now keyed to the **template-delivered** `.sh` set: it iterates the template's scripts and chmods only the matching workspace files, leaving consumer-owned libs at their original mode. ## Test TDD — RED test added first (`test:` commit), then fix. New bats case asserts a pre-existing consumer sourced lib stays non-executable while a delivered script gets `+x`. `bats tests/bats/init-workspace.bats` → **224 passed**. Found during 1.4.0 RC validation. No CHANGELOG change (fix to an unreleased-1.4.0 feature, per the #1187/#1189/#1192 precedent). Closes #1195
## Summary `init-workspace.sh --preview` reported files as ADDED that the real copy then skipped (notably the legacy `.typos.toml` case from exo-pet/vault#31), because the preview classification didn't apply the mode/config-dependent excludes the rsync copy uses. The exclude decision is now a single SSoT array (`MODE_CONFIG_EXCLUDES`) consumed by **both** the `--preview` classifier and the rsync copy — so the preview is a faithful dry-run and the logic isn't duplicated (DRY). ## Test TDD — RED test first, then fix. New bats case asserts an excluded file is not listed under ADDED by `--preview`. `bats tests/bats/init-workspace.bats` → **224 passed**; `shellcheck` clean. Found during 1.4.0 RC validation. No CHANGELOG change (fix to an unreleased-1.4.0 feature, per the #1187/#1189/#1192 precedent). Closes #1196
…rktrees (#1202) ## Summary `print_preserved_template_diff` used `git diff --no-index`, which aborted with `fatal: not a git repository: (null)` (once per preserved file, diff suppressed) when `init-workspace.sh` ran via bare `podman` inside a git **worktree** whose `.git` file points at a gitdir outside the bind mount (how the rollout agents run — exo-pet/vault#31). Both invocations now run with `GIT_DIR=/dev/null`, which makes git skip repository discovery entirely, so a broken/foreign `.git` in the cwd can't abort the pure file comparison. `GIT_CEILING_DIRECTORIES` was verified not to help (the `.git` is in the cwd itself). ## Test TDD — RED test first, then fix. New bats case scaffolds a workspace whose `.git` is a file pointing at a nonexistent gitdir, runs the function, and asserts no `fatal:` appears while the divergence diff is still produced. `bats tests/bats/init-workspace.bats` → **224 passed**. Found during 1.4.0 RC validation. No CHANGELOG change (fix to an unreleased-1.4.0 feature, per the #1187/#1189/#1192 precedent). Closes #1197
…1204) ## Summary `justfile.worktree` declares `_wt_repo := \`basename "$(git rev-parse --show-toplevel)"\``, a top-level backtick `just` evaluates **eagerly on every invocation** — so `git rev-parse --show-toplevel` runs for any recipe (`just sync`, `just lint`, …). In a git worktree whose `.git` file points at a gitdir outside a bind mount (the bare-`podman` scaffold context from #1197), git can't resolve the repo and leaks `fatal: not a git repository: (null)` to stderr on every `just` call. The substitution now falls back to `pwd` (`… 2>/dev/null || pwd`), matching the existing `setup-labels.sh` idiom. Split out from #1197 (agent observation) — a separate code path from `print_preserved_template_diff`. ## Scope - **SSoT:** the repo-root `justfile.worktree` is fixed; the scaffolded `.devcontainer/justfile.worktree` is regenerated from it via `scripts/manifest.toml` (both committed, in sync). - CHANGELOG `Fixed` entry added under `[1.4.0]` (unlike the other RC fixes, this corrects **pre-existing, already-released** behavior). ## Test TDD — RED test first, then fix. New `worktree.bats` case runs `just -f justfile.worktree --evaluate _wt_repo` in a foreign-git cwd and asserts no `fatal:` leaks. `bats tests/bats/worktree.bats` → **9 passed** (new case confirmed RED before, GREEN after). Closes #1203
This deliberately pulls epic #1205 (the per-consumer DEVKIT_WORKFLOW gitflow/trunk model), which was originally targeted at 1.5.0, into the 1.4.0 release, together with the renovate github-backup 0.64.0->0.64.2 bump (#1213). All seven release-branch hardening fixes are preserved and the complete workflow-model feature is composed on top of them. Refs: #1205
…el (#1215) ## Summary Unfreezes release/1.4.0 by merging `dev` into it, deliberately pulling epic #1205 (per-consumer `DEVKIT_WORKFLOW` gitflow/trunk model, merged to dev via #1212) and the renovate `github-backup` 0.64.0→0.64.2 bump (#1213) into the 1.4.0 release. **This deviates from the epic's documented 1.5.0 target** — accepted trade-off: an rc5 was required anyway (the branch is five fixes past rc4), and gitflow consumers get a provable byte-for-byte no-op. ## Gates cleared before this merge - **Dev composite tree proven green**: the merged dev head `4ac2ca90` (feature + renovate bump as one tree) passed a full dispatched `ci.yml` run ([29726877354](https://github.com/vig-os/devkit/actions/runs/29726877354)) — the pre-merge PR checks had only tested stale bases. - **Epic completeness audited**: every acceptance criterion of #1206–#1211 mapped to merged code; gitflow no-op pinned by `test_gitflow_scaffold_matches_default_path` and `test_gitflow_render_files_are_byte_identical_to_template`. Sub-issues remain open only as bookkeeping (dev-PR `Refs:` doesn't auto-close). ## Merge composition Two real conflicts, composed to preserve both sides: - `assets/init-workspace.sh`: kept #1196's `MODE_CONFIG_EXCLUDES` array (supersedes dev's older explicit exclude blocks) **and** appended #1205's trunk-only `sync-main-to-dev.yml` exclude + preview skip-guard; `render_workflow_model()` and its invocation intact. - `tests/bats/init-workspace.bats`: additive union of #1195's chmod-scope test and #1205's six trunk tests. CHANGELOG surgery: dev's two Unreleased entries moved into the `[1.4.0]` section (Added/Changed), `## Unreleased` restored to the empty skeleton (#590 invariant); `assets/workspace/.devcontainer/CHANGELOG.md` re-synced byte-identical (sync-manifest hook green). All seven release-branch hardening fixes (#1190 #1193 #1199 #1200 #1201 #1202 #1204) survive. ## Verification - Targeted suites: 66 passed (`test_workflow_model`, `test_install_script`, `test_workflow_prepare_extension`, `test_workflow_sync_checkout`) - Full pytest: 1098 passed, 28 skipped; 3 failures all environmental/pre-existing (2× `vig-utils` `TestFindRepoRoot` env, 1× `test_manifest_files` stale local image — CI rebuilds) - bats: 331 ok, 0 not ok (`init-workspace.bats`, `install.bats`) - `pre-commit run --all-files`: fully green - Containment: `git log HEAD..origin/dev` empty; diff vs dev = release fixes + changelog structure only ## After merge Cut **rc5** (required regardless of this PR) and extend rc validation with the trunk-render suites + a gitflow-consumer scaffold byte-identity check. Refs: #1205
A malformed ambient NIX_CONFIG on a self-hosted runner's service environment makes `nix --version` fail with a config parse error before printing the version, so the detect log captures the error instead of the version the diagnostic aims to record. This test drives the "Detect host Nix" step against a stub `nix` that rejects a malformed NIX_CONFIG, and asserts the log shows the version, not the parse error. Refs: #1216
The direnv-mode "Detect host Nix" step captured `nix --version 2>&1` (#1198) with the runner's ambient NIX_CONFIG in effect. On a self-hosted runner whose service environment carries a malformed NIX_CONFIG (exo-fleet's meatgrinder), nix rejects the config before printing the version, so the detect log recorded a config parse error instead of the version. Run the probe with `env -u NIX_CONFIG` so the captured string is the version even when the runner environment is broken, keeping the `2>&1` fold as a fallback for other failure shapes. Refs: #1216
…1217) ## Summary Fixes #1216 (found during rc5 consumer-lane validation): the direnv-mode "Detect host Nix" step captured `nix --version 2>&1` (#1198) with the runner's ambient `NIX_CONFIG` in effect. On a self-hosted runner whose service env carries a malformed `NIX_CONFIG` (exo-fleet's meatgrinder, live evidence in exo-pet/exo-fleet#230 run 29738048251), nix errors on the config before printing the version, so the log records a parse error instead of the version the probe exists to capture. The probe now runs `env -u NIX_CONFIG nix --version 2>&1` (`env -u` over `NIX_CONFIG=` to stay shellcheck-clean, SC1007), keeping the stderr fold for other failure shapes. Scope: the probe line only — has-nix detection, the gated install, and "Configure host Nix" are untouched. Single action copy (scaffold template; no devkit-own twin, not manifest-synced — verified). ## TDD - RED `238cf1a6`: stub nix errors on malformed ambient NIX_CONFIG before `--version` — reproduces the exact meatgrinder log symptom. - GREEN `fe97f457`: 24/24 in `tests/test_setup_toolchain_env.py`. - Full pre-commit suite green (verified by orchestrator). Requires an rc6 cut after merge; live proof = exo-fleet lane re-bump on meatgrinder. Refs: #1216
Scheduled refresh of the nixpkgs-unstable pin (uv, gh, claude-code via the fastMovers overlay). Full CI on this PR is the merge gate. Refs: #817
Brings main's #1220 (CODEOWNERS cleanup, Refs #1219) into release/1.4.0 so the release PR #1186 is no longer BEHIND main — the #1132 promote mergeability gate rejects BEHIND. Governance-only delta (one file, no image/scaffold impact); merge-base is the 1.3.1 branch point and main has moved only by #1220, so the merge is conflict-free. Unblocks the 1.4.0 finalize re-dispatch. Refs: #1219
Set release date to 2026-07-20 and regenerate release docs. Refs: #1186
# [Release 1.4.0](https://github.com/vig-os/devkit/releases/tag/1.4.0) - 2026-07-20 This PR prepares release 1.4.0 for merge to main. ## [1.4.0](https://github.com/vig-os/devkit/releases/tag/1.4.0) - 2026-07-20 ### Added - **Per-consumer workflow model: `DEVKIT_WORKFLOW` (gitflow | trunk)** ([#1205](#1205)) - New optional `.vig-os` key `DEVKIT_WORKFLOW` (and matching `install.sh` / `init-workspace.sh` `--workflow` flag) selects a consumer's branching model. Empty/absent resolves to the unchanged `gitflow` default (long-lived `dev` + `main` with `sync-main-to-dev.yml`); `trunk` opts into a trunk-based flow: feature/bugfix/chore branches merge straight to `main`, releases fork `release/X.Y.Z` from `main` and merge back into `main`, and the `dev` branch and `sync-main-to-dev.yml` disappear ([#1207](#1207), [#1208](#1208), [#1209](#1209)). - Realized entirely at scaffold time (mirroring `DEVKIT_MODE`): an anchored `dev -> main` render of the scaffolded workflows (`prepare-release`, `ci`, `codeql`, `sync-issues`), the branch-naming skill and the pre-commit branch guard, plus a `sync-main-to-dev.yml` copy-exclude and upgrade prune. No resolve-toolchain runtime wiring and no workflow twin. gitflow is a provable byte-for-byte no-op, so existing consumers and their `.vig-os` are unchanged (the key is written back only for `trunk`). - Loud enum and contradiction guards refuse an unknown model or an implicit workflow switch (an explicit `--workflow` that contradicts the persisted value), mirroring the `DEVKIT_MODE` guards; `--preview` shows the would-be switch first. - **`docs` capability module — typst document toolchain** ([#1178](#1178)) - New opt-in `docs` capability module puts `typst` (the document compiler) and `typstyle` (its formatter) on the dev-shell PATH, so document-oriented consumers (exo-pet/vault, the future `qms` app, EXOMA presentations/grants) declare `mkProjectShell { modules = [ "docs" ]; }` instead of pinning `typst` via PyPI. It stays out of the base `devTools` and the published image, so non-doc consumers and the slimmed image are unaffected (opt-in only, backward compatible). No version option in v1 — nixpkgs carries a single typst per pin and the module tracks that toolchain pin. Deliberate v1 exclusions (documented in `docs/NIX.md`): pandoc/LaTeX (ask-gated), headless drawio/excalidraw export (electron-shaped, repo-owned), and Python doc-processing libraries (`pymupdf4llm`, `openpyxl`) which belong in the consumer's own `pyproject.toml` via uv. - **Route scaffolded CI jobs to self-hosted runners via `.vig-os`** ([#1173](#1173)) - New optional `.vig-os` key `DEVKIT_CI_RUNNER` (comma-separated runner label list, e.g. `self-hosted,linux,x64,meatgrinder`) lets a self-hosted consumer route the scaffold-managed `ci.yml` onto its own runners without hand-editing a managed file (hand-edits are clobbered on upgrade). `resolve-toolchain` reads the key and emits a `runner-json` output — a JSON array of labels, defaulting to `["ubuntu-24.04"]` when the key is absent — which the toolchain jobs (`lint`, `test`, `commit-checks`) and the `summary` gate consume via `runs-on: ${{ fromJSON(needs.resolve-toolchain.outputs.runner-json) }}`. The `resolve-toolchain` job itself stays on the hosted default (it produces the output), and `dependency-review` stays hosted (public-repo-only, toolchain-free). Absent key => unchanged behavior for every existing consumer; the value is persisted across re-scaffolds like the other manifest keys. Documented in `docs/MIGRATION.md`. - **Opt-in `gitleaks` secret-scanning hook** ([#1172](#1172)) - `gitleaks` joins the shared toolchain (`nix/devtools.nix` → dev-shell, image, and `vigos.packages`) and is defined as a `language: system` pre-commit hook resolved from the pinned nixpkgs binary — no upstream pre-commit repo clone, works offline. It is **default-disabled** and lives only on the `mkProjectShell` consumer generation surface: absent from devkit's own committed `.pre-commit-config.yaml`, the scaffold copy, and the sandbox `checks.pre-commit` gate, so no devkit lane runs it. A secret-bearing consumer opts in with `mkProjectShell { hooks = { gitleaks.enable = true; }; }`; the hook runs `gitleaks git --pre-commit --staged --redact --verbose` and a repo-root `.gitleaks.toml` is honored automatically. Off by default because false-positive tuning is repo-specific (`docs/NIX.md`). Backward compatible: zero behavior change for consumers that do not enable it. - **Nix as a first-class consumer language** ([#1171](#1171)) - Language detection: a repo is nix-oriented when it carries `*.nix` files **beyond** the scaffold-managed `./flake.nix` (excluding `.git/`, `.direnv/`, `.worktrees/`) — `flake.nix` alone would false-positive on every direnv consumer at re-scaffold time, so the beyond-flake.nix rule is deterministic and re-scaffold-safe. - New `nix` gitignore fragment (`result`, `result-*` build symlinks), appended to the managed root `.gitignore` on detection and feeding the never-migrate managed set like every other fragment. - `statix` and `deadnix` join the **flake-generated consumer hook surface** (`mkProjectShell` hooks) as `language: system` hooks. They are NOT injected into the committed hand-managed `.pre-commit-config.yaml`, so existing container-mode consumers see zero change until they opt into flake hooks. `deadnix` runs with `--no-lambda-arg --no-lambda-pattern-names` so the scaffolded consumer `flake.nix` (idiomatic `{ self, … }` pattern, `extraPackages = pkgs: [ ]` seed) passes out of the box; devkit's own stricter internal `nix flake check` gates are unchanged. - CodeQL is untouched: nix is not a CodeQL language, so the rendered matrix and push paths omit it (same treatment as rust). - **Package pymarkdown in the flake and promote it to a system hook** ([#1170](#1170)) - `pymarkdownlnt` is now packaged as a Nix derivation (`nix/pymarkdown.nix`, with its two PyPI-only pure-Python deps `application-properties` and `columnar`; `pyjson5` comes from nixpkgs) and added to the toolchain SSoT (`nix/devtools.nix`), so it ships in the dev-shell, the image, and the `vigos.packages` home module. - The `pymarkdown` hook is promoted from a runner-only remote-repo hook to a `language: system` hook resolved from PATH — like `shellcheck`/`typos` — in **all three** hook artifacts: the committed runner + scaffold YAML, the sandbox `checks.pre-commit` gate, and the consumer generation surface. Same `-c .pymarkdown fix` command and README/CONTRIBUTE/TESTING excludes as before. - This retires the last runner-only residual of the single-SSoT hook system (#883): **every** `direnv`/`bare` consumer regains (or gains) markdown lint from the shared flake hook set, and the container/both lanes converge on the same system hook. - **Document enabling the dependency graph on new public consumers** ([#1166](#1166)) - The scaffolded `ci.yml` Dependency Review gate reads GitHub's dependency graph, which the `vig-os` org leaves **disabled** on new repos (`dependency_graph_enabled_for_new_repositories: false`) — so a fresh public consumer's first run `403`s until it is enabled. `docs/MIGRATION.md` gains an "Enable the dependency graph on new public consumers" step (idempotent `gh api -X PUT repos/<owner>/<repo>/vulnerability-alerts`, one-time per repo, mode-agnostic), and the scaffolded `ci.yml` `dependency-review` job carries a pointer comment at the failure site. Private consumers are unaffected (the gate is neutral there). ### Changed - **Renovate: update `github-backup` from `==0.64.0` to `==0.64.2`** ([#1213](#1213)) - **direnv scaffolds default to flake-generated pre-commit hooks** ([#1167](#1167)) - The direnv CI lane runs on the bare host runner (`resolve-toolchain` emits an empty container image), which lacks the devkit image's FHS loader and C++ runtime that the hand-managed `.pre-commit-config.yaml`'s `pymarkdown` hook (native `pyjson5`) needs — so it fails with `ImportError: libstdc++.so.6` there, and every direnv consumer had to switch to flake-generated hooks by hand. A fresh `direnv` scaffold now activates an empty `hooks = { }` in `flake.nix` and drops the hand-managed YAML, so the shared flake hook set generates `.pre-commit-config.yaml` (a gitignored `/nix/store` symlink, dropping `pymarkdown`) and runs host-side. A consumer's own preserved `flake.nix` or committed config is never rewritten; `container`/`both` keep the hand-managed YAML (they run inside the image where `pymarkdown` works); `bare` is unaffected (it ships no flake and owns its own toolchain). ### Fixed - **Detect host Nix probe scrubs the ambient `NIX_CONFIG`** ([#1216](#1216)) - The direnv-mode "Detect host Nix" step captured `nix --version 2>&1` (#1198) with the runner's ambient `NIX_CONFIG` still in effect. On a self-hosted runner whose service environment carries a malformed `NIX_CONFIG` (observed on exo-fleet's meatgrinder), nix rejects the config before printing the version, so the detect log recorded a `syntax error in configuration` parse error instead of the version string the diagnostic aims to capture. The probe now runs `env -u NIX_CONFIG nix --version 2>&1`, keeping the `2>&1` fold for other failure shapes, so the log shows the real version even when the runner's environment is broken. Non-fatal before the fix (the "Configure host Nix" step rewrites a clean `NIX_CONFIG`), diagnostic-only impact. - **uvx tools with native wheels load libstdc++ in direnv-mode CI** ([#1181](#1181)) - On a non-Python direnv-mode consumer the CI preamble keeps the Nix CPython on `PATH`, whose loader does not search `/usr/lib`, so a `uvx`-run tool's manylinux native wheel (e.g. otterdog's `rjsonnet`) aborted with `libstdc++.so.6: cannot open shared object file` — the same failure class as the dropped `pymarkdown`/`pyjson5` hook. The root `justfile` now ships a base `with-native-libs` recipe that wraps one command with a command-scoped `LD_LIBRARY_PATH` sourced from `$VIGOS_STDCPP_LIB` or derived from the on-`PATH` `cc` wrapper, so a `justfile.project` recipe can run such a tool (`just with-native-libs uvx …`) without the wheel failing to import. It degrades to a no-op when neither source resolves the library. - **direnv CI: forward the flake `shellHook` environment** ([#1180](#1180)) - The direnv-mode `setup-devkit-toolchain` preamble exported the dev-shell store bin dirs to `GITHUB_PATH` but dropped every environment variable a project's flake `shellHook` exports, so env defaults present in every local `nix develop`/direnv session silently vanished on CI — surfacing as unrelated tool errors (vig-os/org-config#40: a shellHook-seeded `OTTERDOG_TOKEN` placeholder worked locally, failed on CI). The preamble now diffs the ambient environment against the dev-shell environment (the `shellHook` has run inside `nix develop`) and forwards the vars the dev-shell adds or changes to `GITHUB_ENV`, minus a denylist of shell session state (`PATH`, `HOME`, `SHLVL`, `TMPDIR`, …) and Nix/stdenv build machinery (`NIX_*`, `buildInputs`, `stdenv`, `shellHook`, `*Phase`, …). The ambient diff keeps host secrets out of `GITHUB_ENV`; a random heredoc delimiter keeps multi-line values intact. Local-vs-CI parity is now the default in direnv mode, no consumer change. - **`just` no longer leaks a git `fatal:` in a foreign-git worktree cwd** ([#1203](#1203)) - The `justfile.worktree` `_wt_repo` variable is a top-level backtick that `just` evaluates eagerly on every invocation, so its `git rev-parse --show-toplevel` ran for any recipe (`just sync`, `just lint`, …). In a git worktree whose `.git` file points at a gitdir outside a bind mount (the bare-`podman` scaffold context), git couldn't resolve the repo and printed `fatal: not a git repository: (null)` to stderr on every `just` call. The substitution now falls back to `pwd` (`git rev-parse --show-toplevel 2>/dev/null || pwd`), matching the existing `setup-labels.sh` idiom — cosmetic only, the worktree recipes are unaffected. ### Security - **Audit and baseline the managed GitHub Actions workflows (zizmor)** ([#1182](#1182)) - `zizmor` over the 14 devkit-managed workflows previously surfaced 73 findings (40 high / 32 medium) that every consumer had to baseline against code it does not own. Devkit now audits its own output: 8 findings fixed upstream and the intentional remainder shipped as a devkit-owned baseline so consumer baselines shrink to zero. - **Fixed (8):** `persist-credentials: false` on the read-only checkouts that never push or fetch (CI lint/test/resolve-toolchain/dependency-review, `codeql.yml`, and the `renovate-changelog-build`/`sync-issues` toolchain checkouts) — 7 `artipacked` findings; and the `sync-main-to-dev` cleanup step's release-app token moved into `env:` — 1 `template-injection` finding. All behavior-preserving. - **Baseline shipped:** a maintained `zizmor.yml` (scaffolded/managed, registered in `scripts/manifest.toml`) suppresses the 65 residual findings that cannot be fixed without changing release/CI behavior (`unpinned-images` for the runtime-resolved toolchain image, broadly-scoped `github-app` release tokens, `secrets: inherit` release fan-out, the renovate-changelog `dangerous-triggers`, and credential-persisting push checkouts). Every exemption is scoped to a managed-workflow basename, so a consumer-authored workflow never inherits one. - **Gate added:** devkit CI (`ci.yml` `project-checks`) lints the managed set against the shipped baseline, so a regression or a new audit fails devkit CI instead of reaching consumers. Policy documented in `docs/WORKFLOW_SECURITY.md`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
devwithmain(sync-main-to-dev workflow).