Repository navigation
Releases
Release v2.4.0
[2.4.0] - 2026-11-11
Minor release: new features and one long-standing exit-code fix, no removals.
Added
- macOS system updates stay out of the routine.
mac-routine.shnow
passes topgrade--disable system. A recorded run had the macOS
system-update step auto-consent through--yesto downloading a full
macOS upgrade and prompt for a password mid-routine; an OS upgrade is a
deliberate decision, not part of weekly maintenance. The flag set was
read out oftopgrade --help(17.16.0) and is pinned by a new test that
fails if a step id the wrapper disables ever stops being listed there.
Fixed
mac-routine.shnow reports damage instead of waving it through. The
final Ruby/gem health report decided the exit code in the docs but not in
the code: its result was discarded and the "no ownership or version
drift" banner printed unconditionally, so damage present before the
run produced a false all-clear and exit 0. The exit code is now the
report's verdict —0clean,1FAIL found,2usage error,3
stopped mid-way — and the success banner prints only when the report is
clean, exactly as the script's own comments always claimed.- A legitimate Ruby keg upgrade no longer stops the routine. Any
gem -vchange mid-routine used to abort with the site_ruby-override
scolding. The drift check now re-measures parity of the new state: if the
active version still matches what the active Ruby ships — abrew upgrade rubykeg move — the routine reports the change and continues; a
parity-breaking change stops exactly as before. - Small hardening. The option parser rejects a stray argument after a
valid option (exit 2) instead of silently ignoring it;--helpdocuments
all four exit codes; and ambient exportedPREV_*variables can no
longer seed the drift check with garbage.
Release v2.3.0
[2.3.0] - 2026-10-10
Minor release: new features, no removals.
Added
-
.github/required-checks.txt, and a test that keeps it honest. The
required status check names inmain's branch protection have to match the
job namesquality.ymlactually produces. When the runners were renamed from
ubuntu-latest/macos-latesttoubuntu-24.04/macos-15, branch protection
still required the old names and blocked a merge of an entirely green PR.
tests/required-checks.batsnow derives the expected names from the workflow
itself and fails with instructions if they drift from the file. -
make verify-protection. Local and read-only: asks GitHub what the
required checks actually are and compares them with the file. Not in CI and
not inci-local, because it needsghand because it asserts remote state. -
scripts/lib/ruby_gem_health.shand the Ruby/gem guard.
On 2026-09-16 a rootgem update --systemwrote a 591-file RubyGems tree into
/opt/homebrew/lib/ruby/site_ruby, blockingbrew linkandbrew cleanup
while every other check still read PASS. The new library checks root
ownership under Homebrew and~/.gem,site_rubyoverrides,gem -v
against the RubyGems actually shipped by the active Homebrew Ruby, dangling
plugins and dead shebangs, and duplicate gem versions. -
templates/guard.zsh. The zsh guard is now under version control instead
of living only in one machine's~/.config/zsh. It refusessudoforgem
orbrewby basename, refuses any unambiguous abbreviation ofgem update --system(--sy,--sys,--syst,--syste), prints a refusal that names
the command refused, and prints a bypass line that is runnable as typed. It
covers interactive shells only and does not cover a program that shells out,
such as topgrade; that limit is documented in the file and asserted by test. -
scripts/mac-routine.sh. Runs topgrade,mo clean,brew doctorand
brew cleanupin order, measuring root-owned counts andgem -vbetween
steps and stopping the routine the moment either drifts. Never usessudo,
never deletes, passes--no-ask-retryso a prompt cannot hang it. -
make ci-local. Prints the localbash,bats,shellcheckandshfmt
versions, warns when any differs from the pins in
.github/workflows/quality.yml, then runs CI's steps in order. -
make test-bash32. Runs the whole suite under/bin/bash, which is bash
3.2 on macOS and older than anything a Linux CI runner has. Skips with a
clear message where/bin/bashdoes not exist. -
tests/safety.bats. A suite-wide PATH fence puts recording fakes for
gem,sudoandbrewin front of the real ones, plus a canary, a static
scan for commands that can damage the machine, a scan for mid-test bare!
negations that bats never checks, and one-pass scanners for duplicate
@testnames and@testtext inside heredocs.
Changed
- Every
.batsfile is machine-independent. Fixtures live in
tests/fixtures/; the root-ownership tests build their own tree and stand in
for root withRGH_ROOT_USER; the container-runtime test puts failing shims
first on PATH instead of deleting a working one; the shebang test creates a
real interpreter. The one test that asserted the state of this machine was
removed from bats - that check still runs, throughrgh_report. make lintusesshellcheck -x, matching CI exactly. Without-xthe
local target and the CI step were not the same command.- CI runners are pinned to
ubuntu-24.04andmacos-15with
timeout-minutes: 15, because the pinned apt package versions
(shellcheck=0.9.0-1,shfmt=3.8.0-1,bats=1.10.0-1) only exist on the
distribution they were taken from.strategy.fail-fastisfalse, so a
failure on one OS no longer hides the other.
Release v2.2.1
Merge pull request #20 from fix/changelog-extraction Fix release changelog extraction leaking the next version's heading
Release v2.2.0
[2.2.0] - 2026-10-02
Minor bump. Substantial new behaviour (backup integrity verification) and a
large body of fixes, but no breaking interface change: backup.sh and
restore.sh keep their existing flags and environment variables, and
backups taken before this release still restore.
The guiding theme of this release is that the framework had checks that could
not fail. Several safeguards existed only on paper -- an assert helper with
no callers, a verification harness invoking a flag that never existed, a
standards document mandating a versioning scheme nothing used -- so a test
suite could be comprehensively green while a data-loss bug sat in
restore.sh. Each item below is a case where a check was made to actually
exercise the behaviour it claimed to cover.
Backup and restore integrity
-
Backups are now recorded and verified. Each run of
backup.shwrites
amanifest_<timestamp>.jsonrecording the backup filename, source path and
a SHA-256 of the copied content.restore.shverifies a backup against its
manifest before overwriting anything; a mismatch names the file, refuses it,
and continues with the remaining sources.--dry-runreports the same
verdict, so it cannot be used to discover that a corrupt backup would
have been installed. Manifests are written600via a temp file and rename,
so a reader never sees a partial one, and a run that failed partway writes
none. -
A manifest cannot redirect a write. It is read as text, never evaluated,
and only a digest is taken from it; the destination always comes from
BACKUP_SOURCES. A tampered manifest can force a refusal but cannot cause a
file to be written elsewhere. This property has a test that fails when
broken. -
A 0-byte backup is refused outright. Checked before the manifest is
consulted, because the SHA-256 of empty content is a fixed constant: a
manifest written for an empty backup matches it perfectly, so the hash check
alone could never catch this. -
Safety copies can no longer overwrite each other. The pre-restore safety
copy is what makes a restore reversible, yet its name had one-second
resolution, so two restores of one source inside the same second destroyed
the first copy. Measured before: one copy in four runs out of five. After:
two in five out of five. A symlink at the chosen name is still refused
rather than skipped past, preserving the fail-closed behaviour. -
Legacy backups still restore. Any backup predating manifests lacks one
and is restored with a notice rather than refused; refusing them would
strand real backups. -
Backup naming and permissions. Backups are keyed on the source path
relative to$HOMErather than basename, so~/.ssh/configand a top-level
~/configno longer share one backup file.BACKUP_SOURCESaccepts a
newline-separated list for paths containing spaces, and a token that looks
like a split space-containing path is warned about. Backup files are written
600byinstall -m 600, removing the window in which a copy of
~/.ssh/configexisted at the source's mode.BACKUP_DIRitself is
tightened to700, and any pre-existing permissive store is tightened too.
Destructive-path safety
- Path validation before deletion.
uninstall.shvalidates its
install directory before removing anything and fails closed on/,//,
relative paths, and top-level paths such as/usr/local. - Only named artefacts are removed outside
INSTALL_DIR, and only after
that validation. The install marker,config/andVERSIONare the only
paths ever touched. - Test isolation. The destructive-path tests resolve paths from the test's
own temporary directory, so a regression cannot delete a real dotfile.
A loggingrmstub asserts that no removal was even attempted. repo-clean.shno longer treats an installed copy as a scratch tree, and
reports honest failures instead of claiming success.
Secrets handling
lib/secrets.shwas dead code with a real contract; it is now wired,
documented and covered by tests. Call sites document that item names may be
visible in process listings, and the 1Password read path fails loudly when
jqis absent rather than silently falling through to a different backend.
Diagnostics and correctness
- Systematic exit codes.
diecall sites pass adie "$EX_*"value
where they had passed a bare name, which produced "numeric argument
required" crashes instead of the intended code. - Absent tools are reported as an incomplete environment, never as a lint
failure, so a missing ShellCheck cannot be mistaken for a code defect. update.shparses arguments properly, skipsgit pullgracefully with no
upstream or in detached HEAD, andmake syntaxgates every batch.sync.shretries its fetch and explains an unreachable remote in its own
words instead of leaking git's stderr; it documents that it prunes.check-project.shreports every failure in one pass instead of aborting at
the first, and checksVERSION,Makefile,config, required utilities and
each of the ten utility scripts by name.
CI
- Tool versions are pinned and asserted: exact apt versions on Ubuntu, and
an explicit version check afterbrew installon macOS, since Homebrew has
no per-version pin.bats_require_minimum_versionis declared rather than
left to warn.
Documentation and dead code
- The shell coding standards documented a per-script SemVer header that no
script had used since 2.1.0; it now describes the singleVERSIONfile the
whole project actually uses. - Removed: the unused
eval-basedasserthelper, two existence predicates
with zero call sites, andlib/colors.sh, whose constants were used by none
of the six scripts that sourced it and were already provided by
logging.sh. doctor.shnow checksbatsand reports whether the installedVERSION
still matches the source, which is what previously let the live machine run
several releases behind unnoticed.
Developer Workstation Framework v1.0.0
[1.0.0] - 2026-07-17
Added
- Initial Developer Workstation Framework project structure.
- Modular Bash utility architecture.
- Shared libraries for logging, validation, configuration, filesystem operations, and ANSI colors.
- Centralized configuration system with default, user, and environment variable support.
- Bootstrap, installation, update, uninstall, cleanup, synchronization, doctor, backup, restore, project verification, and shell quality utilities.
- GitHub Actions workflow for continuous integration.
- Automated Bats behavioral test suite.
- Project documentation covering architecture, roadmap, coding standards, review checklist, AI handover, and project knowledge.
- VS Code workspace recommendations.
- Project templates for future utility development.
Changed
- Refactored utilities to reuse shared libraries.
- Standardized logging and validation across all scripts.
- Improved installer architecture and maintainability.
- Unified configuration loading throughout the framework.
- Improved backup and restore reliability.
- Updated README with complete project documentation.
- Improved repository organization and engineering consistency.
Fixed
- Configuration precedence now correctly honors environment variables.
- Backup and restore workflows are fully testable.
- CI failures caused by configuration overrides.
- Shell formatting inconsistencies.
- Minor documentation inconsistencies discovered during repository audit.
Future Releases
Future releases will continue to follow Semantic Versioning and Keep a Changelog conventions.