Skip to content

fix(init-workspace): read flake pin from the real input line, not the doc comment - #1113

Merged
c-vigo merged 2 commits into
release/1.2.1from
bugfix/1110-skew-warning-grep
Jul 15, 2026
Merged

c-vigo merged 2 commits into
release/1.2.1from
bugfix/1110-skew-warning-grep

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

rc1 finding

Found during 1.2.1-rc1 verification on the commit-action consumer: the #1093 flake-pin / DEVKIT_VERSION skew warning (new in 1.2.1) read the pinned vigos ref from the wrong line of the consumer flake.nix.

The standard-layout flake.nix ships a doc-comment example line
(# vigos.url = "github:vig-os/devkit?ref=<tag>";) above the real input line. The unanchored extractor matched the comment first, and head -n1 picked it. Consequences:

  • (a) the warning always reported the current pin as the literal <tag> instead of the real value;
  • (b) because <tag> never equals a real DEVKIT_VERSION, the warning false-fired even when the consumer's pin already matched the target — violating the changelog contract "a floating (unpinned) input or a matching pin stays silent". It never wrongly stays silent, so severity is quality/noise, but it defeats the feature's contract.

Fix

Anchor the grep on ^[[:space:]]*vigos\.url so only the real (non-comment) input line is read (the doc-comment starts with #, so the anchor skips it). One-line change in assets/init-workspace.sh.

Test evidence (TDD)

New fixture flake.nix carries BOTH the ?ref=<tag> doc-comment and a real pin, mirroring the shipped template:

Changelog

Amends the frozen ## [1.2.1] - TBD #1093 entry with a sub-bullet noting the pin is now read from the real input line, not the doc comment.

Issue closure

Refs: #1110. Closes # only auto-fires on default-branch (main) merges here, so #1110 will be closed manually after rc2 verification.

Refs: #1110

c-vigo added 2 commits July 15, 2026 12:05
…doc-comment pin

Cover the #1110 defect: the #1093 skew-warning pin extractor matches the
doc-comment example line (`?ref=<tag>`) that ships in the standard-layout
flake.nix before the real input line, so `head -n1` reports `<tag>` and the
warning false-fires even on an aligned pin. Seed a fixture flake.nix carrying
both the doc-comment example and a real pin.

Refs: #1110
… doc comment

The #1093 skew-warning pin extractor matched the doc-comment example line
(`#   vigos.url = "github:vig-os/devkit?ref=<tag>";`) that ships above the real
input in the standard-layout flake.nix, and `head -n1` picked it — reporting the
literal `<tag>` and false-firing even when the consumer's pin already matched
the target, violating the feature's "matching pin stays silent" contract.

Anchor the grep on `^[[:space:]]*vigos.url` so only the real (non-comment) input
line is read. Found during 1.2.1-rc1 verification on commit-action.

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