Repository navigation
fix(scaffold): gate CI on the project languages a repo declares in .vig-os - #1484
Merged
Merged
Conversation
c-vigo
force-pushed
the
bugfix/1478-declare-project-languages
branch
from
August 13, 2026 08:05
b3f0189 to
7bc10f7
Compare
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.
Description
CI reported a green
Testscheck for a repo whose entire Python project had beendeleted. Two individually-correct leniencies composed into one blind spot: no
pyproject.toml-> the recipe body is skipped and exits 0;pyproject.tomlpresent but nothing collected -> pytest's exit 5 is swallowed (#1281). Together,
CI could not distinguish "no Python suite by design" from "the Python suite
vanished" — and reported success for both. That is why #1466's damage travelled
as far as it did.
Type of Change
fix-- Bug fixModifiers
Changes Made
The key is a sticky DECLARATION, not a detection cache. A cache would not have
caught #1466: the deploy that deleted
pyproject.tomlre-ran the scaffold in thesame commit, so a cache would have been rewritten to empty and CI would still have
been green. So
DEVKIT_LANGUAGESis seeded from detection, grows when alanguage appears, and is never narrowed by the scaffold — removal is a
deliberate
.vig-oshand-edit. A declared-but-undetected language prints a loudscaffold notice rather than being silently reconciled.
.vig-os— newDEVKIT_LANGUAGES=key, shipped empty, documented in house style.init-workspace.sh— read before the template overwrite (else an upgrade woulderase the declaration); enum guard (unknown name aborts,
DEVKIT_FEATURES_DISABLEDshape); union with
DETECTED_LANGUAGES; canonical ordering so the written-backvalue is deterministic and does not read as drift each upgrade.
resolve-toolchain— newlanguagesoutput, always emitted (explicit emptystring when nothing is declared), following the
drift-checkprecedent.ci.yml— oneCheck declared languagesgate as a step ofresolve-toolchain.Every toolchain job already
needs:that job, so a failure stops lint/test/commit-checks before they start — which closes the identical
lint/formatblindspot (the issue's option 4) at the same time — and it costs no extra runner,
container pull or
needs:edge. The gate lives in managedci.ymlon purpose:justfile.projectis a preserved file, so a recipe-only fix would never reach anexisting consumer.
justfile.project— recipes now report the skip instead of no-oping silently,and exit 5 is swallowed only while there is no
tests/directory (the issue'soptions 2 and 3). The scaffold ships no
tests/directory, so a fresh scaffoldstays green.
nixis declared and notified but never gated in CI: it has no single marker file(
flake.nixships with every direnv scaffold), so its absence is not decidable froma path. Stated in the manifest comment, the action output,
ci.ymlandMIGRATION.md.A language-neutral repo stays green at all three levels — bare template line, explicit
empty output, gate prints "nothing to check" and exits 0. A consumer whose
.vig-ospredates the key resolves to the seeded-from-detection default; no hard failure is
reachable from an absent key.
Changelog Entry
(full entry with sub-bullets is in
CHANGELOG.md)Testing
uv run pytest tests/test_declared_languages.py-> 28 failed;batsfilter -> 4 not okuv run pytest tests/test_declared_languages.py tests/test_vig_os_manifest.py-> 51 passeduv run pytest(+test_ci_runner,test_scaffold_drift,test_scaffold_lint,test_install_script,test_integration) -> 223 passed, 19 skippedjust test-bats-> 511 ok, 0 not okprek run --all-files-> onlycheck-expirationsfails;.vulnixignoreis byte-identical todevon this branch. Fixed by fix(security): renew the glibc exception block to 2026-09-02 #1482 — merge that first.Manual Testing Details
Reproduced #1466's shape end to end: scaffolded a Python repo, deleted
pyproject.toml, re-scaffolded — the declaration survived and the noticesprinted; the real
resolve-toolchainscript then emittedlanguages=pythonandthe real
ci.ymlgate step exited 1 with the diagnosable error.Closes #1478
Refs: #1478