Skip to content

fix(install): prune scaffold paths retired since the consumer pin - #1352

Merged
c-vigo merged 3 commits into
devfrom
bugfix/1348-prune-retired-scaffold-paths
Aug 7, 2026
Merged

c-vigo merged 3 commits into
devfrom
bugfix/1348-prune-retired-scaffold-paths

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

install.sh --force regenerates what the current scaffold manages and
prunes what the current mode / workflow model / feature set excludes. A path an
old devkit shipped and a later devkit retired is claimed by neither, so
it rode along through every upgrade. Observed going 0.3.4 → 1.6.0
(exo-pet/playground-carlos#9): .cursor/, .github/actions/resolve-image/,
.github/workflows/renovate-changelog.yml and .hadolint.yaml all survived.

renovate-changelog.yml is the sharp one — left in place it is a live
workflow that duplicates the renovate-changelog-build/-commit pair that
replaced it and calls the pruned resolve-image action, so it fails at its
next trigger rather than at upgrade time.

Change

assets/init-workspace.sh:

  • PREVIOUS_PIN — the pin .vig-os carried before this run rewrites it, read
    alongside the other manifest values, far ahead of the Smoke-test dispatch failed for 0.4.0-rc1 #852 rewrite. Legacy
    DEVCONTAINER_VERSION included: repos still on that key are the oldest ones,
    i.e. exactly the population carrying the leftovers.

  • retired_paths() — the cumulative manifest, one <version> <path> line per
    path, <version> being the first release that stopped shipping it:

    Path Retired in Superseded by
    .github/workflows/renovate-changelog.yml 0.3.5 the build/commit pair
    .cursor/ 0.4.0 .claude/
    .hadolint.yaml 0.4.0 — (Debian build path decommissioned)
    .github/actions/resolve-image/ 1.1.0 resolve-toolchain
  • version_lt() — prerelease-aware in the direction that matters (X.Y.Z-rcN
    sorts below X.Y.Z, so an rc of the retiring release is still pruned).

  • retired_prune_paths() — the single resolver consulted by both the
    --preview DELETIONS report and the post-copy prune, so the report can
    never disagree with what the run does. Four gates: a present, semver-shaped
    pin; the pin predates the retirement; the current template does not ship the
    path; the path is not in PRESERVE_FILES.

.devcontainer/justfile.base (also retired in 0.4.0) deliberately keeps its
dedicated block: its prune is mode-guarded (#738 never touches a direnv/bare
consumer's own .devcontainer/), which a version-only manifest cannot express.

The version gate is the safety property

.cursor/ and .hadolint.yaml are generic names. A repo pinned at or past the
retiring version was never shipped them by devkit, so an identically named path
there is the consumer's own — deleting it would be data loss. The deliberate
trade is under-pruning a repo that already upgraded past a retirement before
this fix; those are cleaned once by hand, and docs/MIGRATION.md says so.

Testing

  • New tests/test_scaffold_retired_paths.py (RED → GREEN, committed
    separately) — 6 tests over the real init-workspace.sh: manifest contents,
    prune from an old pin, legacy DEVCONTAINER_VERSION pin, no prune past
    the retirement, no prune without a pin, and --preview reporting without
    mutating. tests/workflow_scaffold.py gained a preview passthrough.
  • uv run pytest (excluding the image/integration suites, which need the
    container) — 987 passed, 1 skipped.
  • just test-bats — 9 pre-existing IN_CONTAINER githooks failures, verified
    identical on a clean origin/dev worktree; unrelated to this change.
  • just precommit (full suite, all files) green locally.

Closes #1348

c-vigo added 3 commits August 7, 2026 10:19
Resolves the CHANGELOG conflict created when #1347 (PR #1350) landed on dev:
both entries belong side by side in the Unreleased Fixed section.

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