aboutsummaryrefslogtreecommitdiff
path: root/.ai/sessions/2026-05-31-18-16-startup-sync-churn-commit-fix.org
blob: d01d5aafefbc5d8ccacb1ee668d28356db1d0f25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#+TITLE: Session Context
#+DATE: 2026-05-31

* Summary

** Active Goal

Startup + inbox processing that turned into implementing the fix the inbox asked for: make the startup template-sync churn commit deterministically so it stops accumulating and blocking Phase A.0's auto-ff. One commit, pushed.

** Decisions

- Two inbox handoffs (jr-estate + work) merged as one systemic issue per the work note's dedupe request — not two TODOs.
- Implemented the converged fix now (Craig's option 1) rather than filing: fix #1 (wrap-up commit, primary) + fix #3 (startup Phase C surfacing, safety net), both with the byte-for-byte canonical guard the notes proposed.
- Detection for fix #3 placed in startup Phase C (sequential, post-rsync), not a Phase A step — keeps that parallel batch race-free.
- Both guards skip the rulesets repo itself (claude-templates/.ai present = the tell), since there .ai/ is a committed mirror, not downstream churn.
- lint-followups.org's 4 findings were real (misplaced PROPERTIES drawers), fixed by moving drawers under the CLOSED line rather than deleting them (preserves LAST_REVIEWED metadata).

** Data Collected / Findings

- Sandbox-verified the wrap-up guard: all-match case (incl. a retired-upstream deletion) → safe, queues files; a synced file hand-edited to differ → refuses auto-commit. Both pass.
- lint-org --check on todo.org after the drawer moves: mechanical=0 judgment=0.
- review-code → Approve with two non-blocking Minors: (1) the wrap-up loop's ${line:3} parse would mishandle a git rename, but renames don't surface in pre-stage porcelain so it can't fire; (2) pre-existing "step 11/12" references in startup Phase C actually point at Phase A steps 9/10.

** Files Modified

- =claude-templates/.ai/workflows/wrap-it-up.org= (+ mirror =.ai/workflows/wrap-it-up.org=) — new Step 4.0 sync-commit + a Validation Checklist line.
- =claude-templates/.ai/workflows/startup.org= (+ mirror) — Phase C template-sync-churn safety-net bullet.
- =todo.org= — 4 misplaced PROPERTIES drawers moved under their CLOSED lines.
- =.ai/notes.org= — =:LAST_INBOX_PROCESS:= bumped to 2026-05-31.
- Deleted =inbox/lint-followups.org= (findings resolved). Inbox clean.
- Shipped in commit 18f6c4c, pushed origin aee7793..18f6c4c.

** Next Steps

- First real adopter of the new wrap-up Step 4.0 on a consuming project is the live test — logic is sandbox-verified but hasn't run against an actual accumulated-churn tree yet.
- Future one-line fix: the pre-existing step 11/12 numbering drift in startup.org Phase C (points at Phase A steps 9/10).
- Carryover unchanged: Signal MCP install at the desktop (GPG pinentry blocks remote); build out the real Go bundle so the coverage slice becomes sync-maintainable; first adopters sanity-check the Python/TS coverage scripts against a live run.
- Replies confirming the fix are in jr-estate's and work's inboxes; both already reconciled to clean trees manually today.

* Session Log

** 2026-05-31 17:51 CDT — Startup + inbox processing

Fresh session (clean prior wrap-up). Startup scan: repos current, .ai/ synced, language bundle clean, no reminders/pending decisions, task-staleness 0.

Inbox held three items:
- jr-estate (16:36) + work (16:44) handoffs: same systemic issue — startup Phase A rsync copies template updates from rulesets into each project's .ai/, but neither startup nor wrap-up ever commits that churn, so it accumulates and eventually blocks Phase A.0's auto-ff (git won't ff a dirty tree). Both verified the dirty files were byte-identical to rulesets canonical. Converging fix: (1) commit sync at wrap-up via wrap-it-up.org, guarded on dirty-set == synced .ai paths AND each matches canonical; (3) surface dirty-template state at startup Phase C as a crashed-session safety net.
- lint-followups.org: 4 misplaced PROPERTIES drawers in todo.org (DONE tasks, lines 2304/2321/2335/2418) — drawers sit after resolution prose instead of under the heading.

Craig chose option 1: implement the rsync fix now (wrap-it-up.org + startup.org), fix the 4 lint drawers, reply to both sender projects. Editing canonical at claude-templates/.ai/workflows/, then syncing the mirror.

** 2026-05-31 — Implemented rsync-commit fix + lint fixes

Fix #1 (wrap-it-up.org canonical, new Step 4.0): commits template-sync churn as its own "chore: sync .ai tooling from templates" before the session-work commit. Guard: dirty synced path auto-committed only when it matches rulesets canonical byte-for-byte (modified/new == canonical, or deletion pairs with retired-upstream); non-matching synced paths surfaced not committed; skips rulesets itself (claude-templates/.ai present = the tell). Doesn't push (later push step covers both commits). Added a Validation Checklist line.

Fix #3 (startup.org canonical, Phase C bullet): surfaces uncommitted synced-.ai churn at session start as the crashed-session safety net. Placed in Phase C (sequential, after rsync) not Phase A, to keep that batch race-free.

Verified the guard logic in a sandbox: TEST1 (all synced files match canonical incl. a retired-upstream deletion) → safe, 3 queued; TEST2 (synced file hand-edited to differ) → refuses auto-commit. Both pass.

Synced mirror via scripts/sync-check.sh --fix; re-check clean (canonical == mirror).

Lint: moved 4 misplaced PROPERTIES drawers in todo.org (DONE tasks at the category-3, language-rule-dup, daily-prep-delegation, .aiignore entries) from after the resolution prose to immediately under the CLOSED line. lint-org --check now reports mechanical=0 judgment=0.

Replies sent to jr-estate and work via inbox-send (2026-05-31-1800-from-rulesets-...). Three inbox files removed; inbox clean (just .gitkeep).

** 2026-05-31 — Committed + pushed

Publish flow: Step 0 reconcile clean (0/0). review-code --staged → Approve (2 Minor, non-blocking: a non-firing rename-parse edge in the wrap-up loop; pre-existing step 11/12 numbering drift in startup Phase C). /voice personal walked 41 patterns (#32 third→first person fired; no #39 warnings — rulesets' own private repo, files are the change). .ai/ tracked → approval gate skipped per commits.md. Committed 18f6c4c, pushed to origin (aee7793..18f6c4c). Author Craig Jennings <c@cjennings.net>, no AI attribution. Tree clean except untracked session-context.org.