aboutsummaryrefslogtreecommitdiff
path: root/todo.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-30 21:41:06 -0500
committerCraig Jennings <c@cjennings.net>2026-05-30 21:41:06 -0500
commit9a1bea9bfc066312bf9743dc23c88f191a36cc16 (patch)
tree1916eb07c27e83b3f82bc5743587517061acd899 /todo.org
parent1f79945dd4ab386a9ea4ac58fb2161c174a26bba (diff)
downloadrulesets-9a1bea9bfc066312bf9743dc23c88f191a36cc16.tar.gz
rulesets-9a1bea9bfc066312bf9743dc23c88f191a36cc16.zip
fix(startup): skip the .ai/ template sync when rulesets has uncommitted WIP
From jr-estate's handoff: Phase A's =rsync -a --delete= copies the rulesets working tree by disk presence, so a downstream session that starts while rulesets has in-flight WIP pulls that WIP into its own =.ai/workflows/= and =.ai/scripts/=, where it reads as drift the user never authored. I guarded the three rsyncs behind a =git status --porcelain= check on the synced source paths (=claude-templates/.ai/{protocols.org,workflows/,scripts/}=). It syncs when those are clean and skips with a message when dirty, catching up on the next clean session. The check is scoped to those paths, so unrelated rulesets dirt (a stray session-context.org, scratch files) doesn't block the sync. The handoff's secondary anomaly (two workflow files that didn't reach jr-estate) was a timeline artifact, not a Phase A bug. Both were added in 664bf01 on 2026-05-29, after jr-estate's rsync had already run, so they correctly didn't exist to copy yet.
Diffstat (limited to 'todo.org')
-rw-r--r--todo.org4
1 files changed, 3 insertions, 1 deletions
diff --git a/todo.org b/todo.org
index 621c9fe..5b7c924 100644
--- a/todo.org
+++ b/todo.org
@@ -1176,11 +1176,13 @@ Broader refactor proposes runtimes/ adapter manifests, generic install commands,
Before any implementation: needs a real review pass on the spec, and a decision on whether to do Phase 1 alone (low risk, fixes the race) vs commit to the larger arc.
-** TODO [#B] Startup Phase A rsync propagates dirty rulesets WIP into downstream projects :feature:
+** DONE [#B] Startup Phase A rsync propagates dirty rulesets WIP into downstream projects :feature:
+CLOSED: [2026-05-30 Sat]
:PROPERTIES:
:CREATED: [2026-05-29 Fri]
:LAST_REVIEWED: 2026-05-29
:END:
+Fixed via option 1 (skip-when-dirty), scoped to the synced source paths: startup.org Phase A now guards the protocols/workflows/scripts rsyncs behind a =git status --porcelain= check on =claude-templates/.ai/{protocols.org,workflows/,scripts/}=, skipping the sync when any are dirty. The propagation anomaly (cross-project-broadcast.org / page-signal.org not reaching jr-estate) was a timeline artifact: both files were added in 664bf01 on 2026-05-29, after jr-estate's Phase A rsync had already run — correct behavior, not a bug.
From jr-estate handoff 2026-05-29. When rulesets has uncommitted WIP at the moment a downstream project starts a session, Phase A.0 reports "dirty, skipping pull" and proceeds. Phase A's =rsync -a --delete= then runs against the dirty rulesets working tree and copies the WIP state into the downstream project's =.ai/workflows/= and =.ai/scripts/=. The downstream project's =git status= then shows drift the user did not author. Two bad recovery paths: commit the drift as "chore: sync .ai tooling from templates" (creates fake commit history about template state) or leave it dirty (noisy wrap-ups, pressure to commit anyway).