Skip to content

Commit e55a888

Browse files
paddymulclaude
andcommitted
docs: decide #48 bookkeeping storage — fold aliases into catalog.yaml
Retire the sibling tallyman_state repo recommendation. aliases.json / alias_history.json are the lone tallyman state stored as separate files; every other tallyman key already lives in catalog.yaml. Folding them in removes them from the tracked file set so assert_consistency passes (it checks the file set, not catalog.yaml contents), preserves git-based reset rollback for free, and is less code than a separate file/repo. Caveat: inherits #49's merge-rebuild fragility, deferred under single-user/--no-sync. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0eefcb0 commit e55a888

1 file changed

Lines changed: 32 additions & 15 deletions

File tree

plans/staged-catalog-perf-reactive.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,39 @@ then produces a clean parking catalog for stage 2 to measure.
4242

4343
### Work
4444

45-
1. **#48 fix.** Move `aliases.json` / `alias_history.json` (and any other non-xorq
46-
file the checkpoint commits — audit the full set written under
47-
`catalog_dir`, not just the two named) out of the xorq catalog repo.
48-
- **Open decision — where they go.** *Recommendation: a sibling
49-
`<project>/artifacts/tallyman_state/` git repo, committed in lockstep with
50-
the xorq repo by the same `checkpoint_catalog` (matching step tags), and
51-
reset by the same `reset_to`.* This keeps the xorq repo holding only what
52-
`assert_consistency` expects, while preserving the free `git reset --hard`
53-
rollback of alias state — so `test_reset_rolls_back_alias_state` stays green
54-
via git rather than bespoke reconciliation. The alternative (files outside
55-
any repo + explicit pointer reconciliation in `reset_to`) is simpler to
56-
write but reintroduces the manual-reconciliation surface #52 is about. Needs
57-
ratification before coding.
45+
1. **#48 fix — fold the bookkeeping into `catalog.yaml` (decided 2026-06-14).**
46+
Stop writing `aliases.json` / `alias_history.json` as separate files; store
47+
their content as tallyman keys in `catalog.yaml`, the same way every other
48+
tallyman-owned thing already is (`post_processing`, `stats`, `charts`,
49+
`display_configs`, `notebook`, `entry_hashes`, `result_cache`,
50+
`compute_cache`). The two files are the lone anomaly that breaks #48; folding
51+
them in removes them from the tracked file set, so `assert_consistency` (which
52+
checks the file *set*, not `catalog.yaml`'s contents, catalog.py:768-785)
53+
passes and `xorq catalog add` stops no-opping. xorq's add/add-alias
54+
read-modify-write the whole dict and round-trip unknown keys on the `--no-sync`
55+
path tallyman always uses.
56+
- **Why this over a separate file/repo.** `catalog.yaml` is git-tracked and
57+
checkpoint-committed, so `git reset --hard` already rolls alias state back —
58+
no sibling repo, no lockstep commits, no bespoke reconciliation, and
59+
`test_reset_rolls_back_alias_state` stays green via git. Strictly less code
60+
than the alternatives.
61+
- **Known caveat (deferred, not regressed).** `catalog.yaml` keys are what xorq
62+
drops when it rebuilds the file from entries+aliases on a merge-conflict
63+
`pull` (#49). Latent under single-user / `--no-sync`, and the same exposure
64+
the authored state already accepts. The multi-user fix is to move all
65+
project-global state out of `catalog.yaml` together (#48 + #49 jointly) —
66+
`catalog.yaml`-now defers that without foreclosing it.
67+
- **Optional refinement.** `set_alias` already calls `_xcat.add_alias`
68+
(`aliases.py:111`), so xorq's own `aliases` key holds `{alias: latest_hash}`
69+
and `aliases.json` partly duplicates it. Folding only `alias_history` into a
70+
tallyman key (and reading current aliases from xorq's native `aliases`)
71+
shrinks tallyman bookkeeping and survives merges for the current-alias half.
72+
- Audit the full set of non-xorq files the checkpoint commits under
73+
`catalog_dir`, not just the two named, in case anything else needs the same
74+
treatment.
5875
- The deferred `test_reset_rolls_back_alias_state` guard (PR #50) ships *with*
59-
this fix — moving the files changes reset's rollback behaviour, so the guard
60-
must travel with the change per the TDD rule.
76+
this fix — the rollback path changes, so the guard travels with the change
77+
per the TDD rule.
6178

6279
2. **#52 fix.** Add an explicit cross-view reconciliation + assertion at the end of
6380
`reset_to`: compare the tracked `entries/*.zip` set against `entry_hashes`,

0 commit comments

Comments
 (0)