Skip to content

Delphi: versioned config and clone migrations - #37

Merged
bracyw merged 2 commits into
mainfrom
delphi-versioned-migrations
Oct 11, 2026
Merged

bracyw merged 2 commits into
mainfrom
delphi-versioned-migrations

Conversation

@bracyw

@bracyw bracyw commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Shared config changes now carry a version, and any cleanup people's clones need ships as a script that runs on its own, instead of as instructions.

Versions

  • .delphi/manifest.yml lists Delphi's own files, the ones identical on main and every ws/* branch. It lists itself and starts at version: 0.0.1 (MAJOR.MINOR.PATCH).
  • .delphi/versions adds one line per version: the version, a hash of the listed files, and what changed. .delphi/version.sh prints a checkout's version and hash. Line endings don't change the hash.
  • ci/check.sh fails until a change to any listed file (the manifest included) bumps the version and adds its line, and it prints the line to add. It also requires:
    • versions only go up;
    • a version with a migration bumps MAJOR (MINOR while 0.x);
    • checked against main in CI, released lines and released migrations never change. That's why the workflow now checks out full history.
  • The list of required scripts and the identical-everywhere workflow check now come from the manifest instead of hard-coded lists.

Migrations

  • .delphi/migrations/<version>-<slug>.sh are run by setup.sh:
    • oldest first, only those above the workspace's recorded version (git config delphi.<name>.version);
    • stopping at a failure, so the next run retries;
    • per workspace, so a parked workspace migrates when someone switches back to it.
  • setup.sh also warns when .delphi/ isn't exactly the version it says.
  • 0.0.1's migration turns old link.sh worktrees in linked/ into read-only copies. It deletes a worktree only when nothing would be lost: no changes and no untracked files, and its commit is on a branch. Otherwise it stops and says what to do.

After merge
Each person pulls their ws/* branch and runs bash .delphi/setup.sh, nothing else.

Tests

  • e2e: 72 checks, shellcheck clean.
  • Rehearsed on a scratch clone of the real repo: ws/argos-dev with 2 old link.sh worktrees migrated cleanly, and linked/main came back as a read-only copy.

…igrations run by setup.sh

.delphi/manifest.yml lists Delphi's own files (identical on main and every ws/*, itself included)
under a MAJOR.MINOR.PATCH version; .delphi/versions records each version's hash of them, printed by
.delphi/version.sh. check.sh requires the last line to match, rising versions, migrations that bump
MAJOR (MINOR while 0.x), and, against main in CI, that released lines and migrations never change;
the managed workflow and required scripts now come from the manifest. setup.sh runs the
.delphi/migrations/<version>-*.sh a workspace hasn't (git config delphi.<name>.version), stopping
at one that fails, and warns when .delphi/ isn't the version it says. 0.0.1's migration turns old
link.sh worktrees in linked/ into read-only copies, deleting only what nothing is lost from.
@bracyw
bracyw merged commit dca4974 into main Oct 11, 2026
2 checks passed
@bracyw
bracyw deleted the delphi-versioned-migrations branch October 11, 2026 22:50
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