Skip to content

fix(setup): pin the scaffolded .vig-os to the requested install version - #853

Merged
c-vigo merged 2 commits into
release/0.4.0from
bugfix/852-vig-os-version-pin
Jul 4, 2026
Merged

c-vigo merged 2 commits into
release/0.4.0from
bugfix/852-vig-os-version-pin

Conversation

@c-vigo

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

Copy link
Copy Markdown
Contributor

Summary

Forward-fix for the 0.4.0-rc1 smoke-test failure (#852). The candidate run itself was fully green — the failure was downstream, in the consumer scaffold the RC installs.

Root cause chain: the Nix image bakes the release it was built from into the scaffolded .vig-os (flake bootstrap, from the repo-root pin). That pin only advances at finalize, so every RC image scaffolds the previous release's pin — and install.sh never wrote its --version into the scaffold. The smoke-test receiver ran install.sh --version 0.4.0-rc1 --force, got a deploy PR with the new prek-era scaffold still pinned to DEVCONTAINER_VERSION=0.3.9, and its CI Lint job ran just precommit → prek run --all-files inside the Debian 0.3.9 image → command not found. (The Debian build passed the per-tag IMAGE_TAG build-arg at build time; the reproducible Nix build can't bake the tag without breaking the same-commit-same-digest property — hence an install-time override.)

Fix (TDD, RED → GREEN commits):

  • install.sh: an explicit --version is forwarded into the init container as VIG_OS_VERSION (bash-3.2-safe empty-array expansion; latest keeps the baked pin, which equals the promoted release).
  • assets/init-workspace.sh: pins DEVCONTAINER_VERSION=${VIG_OS_VERSION} in the scaffolded .vig-os post-prune, charset-validated.

The receiver needs no change — it already passes --version "${TAG}" and curls install.sh from the dispatched tag, so rc2 will exercise the fixed path end-to-end.

Verification

  • RED: 3 new bats structure tests failed before the implementation; GREEN after (0 failures across init-workspace.bats + install.bats).
  • New integration test (test_init_workspace_pins_requested_version) runs the real containerized init with VIG_OS_VERSION=9.9.9-rc9 and asserts the scaffolded pin — runs in CI against the image built from this branch.
  • Host-side functional run: TEMPLATE_DIR=assets/workspace ... VIG_OS_VERSION=9.9.9-rc9 bash assets/init-workspace.sh --no-prompts --force → .vig-os contains DEVCONTAINER_VERSION=9.9.9-rc9.
  • install.sh --dry-run --version 0.4.0-rc1 shows -e VIG_OS_VERSION=0.4.0-rc1; dry-run without --version shows no override.
  • just precommit (full suite, all files): green, exit 0.

Refs: #852

c-vigo added 2 commits July 4, 2026 22:29
RED: the two init-workspace.bats structure tests and the install.bats
forwarding test fail (3 failures confirmed locally via bats); the new
integration test exercises the override end-to-end against the CI-built
image (VIG_OS_VERSION env -> scaffolded .vig-os pin).

The 0.4.0-rc1 smoke test surfaced the gap: the image bakes the release
it was built from into the scaffolded .vig-os (repo pin, which only
advances at finalize), so an RC install scaffolds a stale 0.3.9 pin and
consumer CI runs the new prek-era scaffold against the old Debian image.

Refs: #852
install.sh forwards an explicit --version into the init container as
VIG_OS_VERSION, and init-workspace.sh pins it in the scaffolded .vig-os
after the mode prune (validated against a safe tag charset). Plain
"latest" installs keep the image-baked pin, which equals the release the
image was built from.

The Nix image bakes the repo-root DEVCONTAINER_VERSION into the template
.vig-os at build time; that pin only advances at finalize, so every RC
image scaffolds the previous release's pin. The 0.4.0-rc1 smoke test hit
exactly this: a new prek-era scaffold pinned to Debian 0.3.9, whose CI
lint died with "prek: command not found". (The Debian build passed the
per-tag IMAGE_TAG build-arg; the reproducible Nix build cannot without
breaking the same-commit-same-digest property, hence the install-time
override.)

Verified: bats structure tests green (were RED); host-side functional
run of init-workspace.sh with VIG_OS_VERSION=9.9.9-rc9 writes the pin;
install.sh --dry-run shows the forwarded env only for explicit versions.

Refs: #852
@c-vigo
c-vigo merged commit cbd2b71 into release/0.4.0 Jul 4, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/852-vig-os-version-pin branch July 4, 2026 20:47
c-vigo added a commit that referenced this pull request Jul 4, 2026
## Summary

Forward-fix for the rc2 smoke-test failure
([#855](#855), diagnosis
posted there). Strong convergence signal from rc2: the #853 `.vig-os`
pin works (`DEVCONTAINER_VERSION=0.4.0-rc2` in the deploy PR), the Lint
job runs inside the rc2 image, the **whole prek suite executes and the
Tests job passes** — the only remaining failure is the `typos` hook
flagging scaffold-shipped content (`Nd`, `unexcepted`) that this repo
excepts in `.typos.toml` but never shipped.

Fix: add `.typos.toml` to `scripts/manifest.toml` so sync-manifest ships
it with the workspace template — the same SSoT mechanism as
`.yamllint`/`.pymarkdown`.

## Verification

- TDD: new bats template test RED before (`not ok 56`), GREEN after the
manifest entry + sync.
- Shipped copy content-identical to the repo root config (sync-manifest
keeps it so).
- `just precommit` (full suite, all files): green, exit 0.
- Changelog entry added to the open `## [0.4.0] - TBD` section.

Refs: #855
c-vigo added a commit that referenced this pull request Jul 4, 2026
…#858)

## Summary

Forward-fix for the rc3 smoke-test failure
([#857](#857), diagnosis
posted there). rc3 convergence signal: consumer CI green inside the rc3
image, **deploy PR merged** (validating #853 + #856), downstream release
cycle started — and died at `Create draft PR to main` with `GraphQL:
Body is too long`.

It's the #810 bug shipped to consumers: #812 capped only this repo's own
`prepare-release.yml`; the scaffolded copy
(`assets/workspace/.github/workflows/prepare-release.yml`) still
interpolated the full changelog section uncapped, and the smoke-test
repo's CHANGELOG is seeded from our ~67k-char 0.4.0 section. This ports
the identical cap (65,000-char budget, line-boundary truncation, pointer
to the release branch's full `CHANGELOG.md`). `release-core.yml`
(shipped) has no PR-body write, so this is the only consumer-side site.

The deploy sync carries the fixed workflow to the smoke-test repo on the
next candidate (rc4), which should complete the downstream cycle.

## Verification

- Identical cap logic harness-verified against the real 0.4.0 section in
#830 (66,794 → 64,869 chars, line-boundary truncation; sub-threshold
passthrough byte-identical).
- YAML de-indentation of the new `HEADER` asserted via `yaml.safe_load`
(no indent leak).
- `just precommit` (full suite, all files): green, exit 0.
- Changelog entry added to the open `## [0.4.0] - TBD` section.

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