aboutsummaryrefslogtreecommitdiff
path: root/languages/bash
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-31 06:07:34 -0500
committerCraig Jennings <c@cjennings.net>2026-07-31 06:07:34 -0500
commitf57105773366aebdceeafdb51dc3584c42b0e4e4 (patch)
treee2291c94586bb962ab732277494958d914eb1b8b /languages/bash
parent84bd121683add4440a3652b12b70e6e2d45f5384 (diff)
downloadrulesets-f57105773366aebdceeafdb51dc3584c42b0e4e4.tar.gz
rulesets-f57105773366aebdceeafdb51dc3584c42b0e4e4.zip
refactor(startup): extract the template sync into a tested script
The .ai/ sync is how every workflow, protocol and script change reaches every project, and until now it was untested inline bash in startup.org. Yesterday it failed in two ways at once and nothing anywhere reported either. An uncommitted edit of mine under the synced paths skipped all three rsyncs for a full day, so no project got anything. Five workflow files went stale in .emacs.d alone. One of them was a telegram plugin whose staleness crashed telega-server on every triage run, which is the only reason anyone noticed. Work found the second failure. The --delete rsync silently reverts a local patch to a rulesets-owned file, so they hit a bug, fixed it, restarted, and came back running the broken version. Their own log still said it was patched. I want both guards changed. Neither change is safe to make against inline bash that runs in every session, so this commit only moves the logic and pins what it does. sync-templates is a faithful extraction, rough edges included. I verified it differentially rather than by reading: the old block and the new script over the same fixtures produce identical stdout, exit status and resulting tree. Two of the fifteen characterization tests pin the failures above. "ONE dirty file blocks ALL THREE rsyncs" is the blast radius in one assertion, and the narrowing lands by turning it red on purpose. "a locally-edited template is silently overwritten, with no record kept" pins work's regression, asserting the output is indistinguishable from an ordinary sync and that no warning exists anywhere. A third test pins a false-success path I found but deliberately did not fix: the success line prints unconditionally, so a run whose rsyncs all failed still reports a clean sync. That matters next rather than now, because a last-synced manifest written from that branch would stamp success onto a sync that did nothing. The script carries the warning at the line itself. startup.org keeps a fallback for the case where it holds this file but the script is missing. It announces the skip and names the recovery command, because that state cannot heal itself: the fallback runs instead of the sync, so no later sync can deliver what is missing.
Diffstat (limited to 'languages/bash')
0 files changed, 0 insertions, 0 deletions