diff --git a/memory/MEMORY.md b/memory/MEMORY.md index fc69c93fc..1ea9fd7b6 100644 --- a/memory/MEMORY.md +++ b/memory/MEMORY.md @@ -1,6 +1,6 @@ [AutoDream last run: 2026-04-23] -**šŸ“Œ Fast path: read `CURRENT-aaron.md` and `CURRENT-amara.md` first.** +**šŸ“Œ Fast path: read `CURRENT-aaron.md` and `CURRENT-amara.md` first.** - [**Bare `main` is ambiguous — automation uses explicit refs (Amara, 2026-04-29)**](feedback_bare_main_ambiguity_automation_discipline_explicit_refs_required_amara_2026_04_29.md) — Generic multi-remote-repo automation rule: scripts use `refs/remotes//` (or `refs/heads/`); bare branch names only for interactive humans. Hard-stop on fatal base-ref errors. Caught when bare `git checkout main` was hitting `fatal: matched multiple (2) remote tracking branches` and the loop continued past the failure with wrong downstream state. diff --git a/memory/feedback_lfg_master_acehack_zero_divergence_fork_double_hop_aaron_2026_04_27.md b/memory/feedback_lfg_master_acehack_zero_divergence_fork_double_hop_aaron_2026_04_27.md index 95a9d1555..d5f40c2c6 100644 --- a/memory/feedback_lfg_master_acehack_zero_divergence_fork_double_hop_aaron_2026_04_27.md +++ b/memory/feedback_lfg_master_acehack_zero_divergence_fork_double_hop_aaron_2026_04_27.md @@ -135,22 +135,77 @@ caught missing content in the reset-readiness claim. ### Required content-equivalence audit (BEFORE any hard-reset) ```bash -# Both checks required for safety: - -# (1) Files present only on AceHack (not on LFG) -git diff --name-status --diff-filter=A origin/main..acehack/main - -# (2) Shared files MODIFIED on AceHack (may contain unique content) +# All categories required for safety. Use BOTH --find-renames +# AND --find-copies so moved/copied content isn't misclassified +# as "AceHack-only" or "deleted". Note: --diff-filter=C only +# emits Copied entries when copy detection is enabled; filter +# alone is not sufficient. + +# (1) Comprehensive status across content-loss categories +# A=added (AceHack-only path) +# C=copied (content reused under new path; requires --find-copies) +# M=modified (shared path with possibly-unique content) +# R=renamed (moved content; requires --find-renames; compare by content, not path) +# T=type change (symlink vs file etc.; inspect manually) +git diff --name-status --find-renames --find-copies \ + --diff-filter=ACMRT \ + origin/main..acehack/main + +# (1b) D=deleted SEPARATE pass — not AceHack-content-loss in +# this reset direction (LFG already lacks the file), but +# can be SEMANTIC REGRESSION if AceHack intentionally +# removed bad/stale/unsafe content. Review separately +# when the deleted path is workflow / security config / +# tooling / governance substrate. +git diff --name-status --diff-filter=D \ + origin/main..acehack/main + +# (2) Numstat for shared MODIFIED files (sizing the audit) git diff --numstat --diff-filter=M origin/main..acehack/main -# Then for each modified shared path, content-compare: +# (3) For each shared / renamed / copied path, content-compare: git diff origin/main..acehack/main -- -# And test reachability of each candidate SHA: +# (4) Test reachability of each candidate SHA: git merge-base --is-ancestor origin/main # 0=ancestor, 1=not git merge-base --is-ancestor acehack/main ``` +**Plumbing-vs-porcelain (when this becomes scripted tooling):** +human auditors are fine with `git diff` (porcelain). When +this audit graduates to a CI tool or shell script, prefer +`git diff-tree -r --name-status -M -C --diff-filter=ACMRT +origin/main acehack/main` (plumbing; `-M`/`-C` are the +plumbing flags for rename/copy detection). Output is more +stable and immune to user `core.*` config interference. +Alternatively add `git -c core.quotepath=false diff +--no-ext-diff …` for predictable byte sequences. + +**Copy-detection cost (CI bound):** `-C` (find-copies) +includes an O(n²) fallback that compares each added file to +each deleted file. Bound with `-l200` (or similar) for CI: + +```bash +# Two-pass tooling pattern (cheap then thorough) +# Fast pass — A/M/R/T with rename detection only +git diff-tree -r --name-status -M --diff-filter=ACMRT \ + origin/main acehack/main + +# Slow pass — copy detection bounded, only if first pass +# leaves suspicious add/delete clusters +git diff-tree -r --name-status -M -C -l200 \ + --diff-filter=ACMRT \ + origin/main acehack/main +``` + +For human audit (one-shot), the unbounded full form is fine. + +**Inverse of "same path is not same substrate":** different +path can still be same substrate. R/C status entries (renamed +/ copied) require content comparison, not path equality. Don't +over-flag a moved file as content-loss when its content lives +under a new path on LFG main. + ### Required classification per unforwarded substantive PR ```text