diff --git a/memory/MEMORY.md b/memory/MEMORY.md index 15c66a514..34acb5429 100644 --- a/memory/MEMORY.md +++ b/memory/MEMORY.md @@ -47,7 +47,8 @@ These per-maintainer distillations show what's currently in force. Raw memories - [**Public-company contributor compliance — generalized rule + cadenced trajectories (Aaron, 2026-04-28)**](feedback_public_company_contributor_compliance_no_insider_info_in_public_repos_with_trajectories_aaron_2026_04_28.md) — Aaron 2026-04-28 generalization: any contributor employed at a publicly-traded company is bound by their employer's policies + securities law not to disclose material non-public info in public substrate. Otto must not solicit company-specific internal info, must not frame contributor affiliation as conferring non-public access, must not encode internals that inadvertently appear, public sources only for company-specific claims. Comes with 5 trajectories (continuous self-audit / weekly+monthly compliance review / on-PR audit / on-onboarding briefing / drift retrospective). External lineage: SEC Rule 10b-5, Reg FD, Sarbanes-Oxley. Backlog row B-0092 tracks the doc + cadence operationalization. ServiceTitan-specific rule is the worked-example origin. - [**Input is not a directive — provenance framing rule (Aaron + Amara, 2026-04-28)**](feedback_input_is_not_directive_provenance_framing_rule_aaron_amara_2026_04_28.md) — Aaron + Amara correction after Otto wrote "the human maintainer's directive" in gate.yml + memory substrate. The rule isn't word-choice; it's agency-model preservation. Forbidden when describing maintainer input: directive / command / instruction / ordered / human-directed (latter only ok as concept-name). Preferred: input / ask / signal / constraint / feedback / observation. External lineage: Self-Determination Theory (Deci & Ryan) + RFC 2119 requirement-word discipline. Canonical bridge rule: "Use requirement words for protocol constraints. Use feedback words for human provenance." Two-pass audit before push. - [**Stop Mythology — operational name for the bullshit-detector at the rule level (Aaron concept; Amara naming, 2026-04-28)**](feedback_stop_mythology_layered_evidence_thresholds_aaron_amara_2026_04_28.md) — Discipline-level rule distinct from Veridicality module. Three-tier evidence threshold: factory-local (substrate) / generalized (+ external lineage) / big epistemic (+ falsifier; composes with `docs/ALIGNMENT.md` SD-9). Beacon-safe operational form. Backlog row B-0089 tracks the rainbow-table canonicalization + scoring graduation; "bullshit detector" no longer used as forward-going name. -- [**Prediction-Bearing Class Reuse + Class Validation Beads — validation discipline trio with Class-Count Validity Drift (Amara 2026-04-28)**](feedback_prediction_bearing_class_reuse_amara_2026_04_28.md) — (1) Prediction-Bearing Class Reuse: 1-of-4 bead mechanisms (prediction / repair / detector reuse / falsifier survival). (2) Class Validation Beads: factory-local accounting (0/1/2-3/N+ states). (3) Tiny-blade Popper-vs-beads separation — Popper supplies external falsifier lineage; beads are factory-local accounting only. Connects to B-0060 (external human-lineage backfill). Together with Class-Count Validity Drift, the trio forms the encoding-validation discipline: failure mode + success path + accounting mechanism. +- [**Post-Abort Dirty-Branch Resumption + Rerere Conflict-Resolution Cache Dividend — paired post-interruption git workflow classes (Amara 2026-04-28)**](feedback_post_abort_dirty_branch_resumption_amara_2026_04_28.md) — Pair from Aaron 20:53Z stop + max-mode restart. (1) Post-Abort: 8-step inventory-before-action checklist after any interrupted run; tiny-blade `--force-with-lease` not plain `--force`. (2) Rerere Cache Dividend: precise phrasing "Recorded rerere resolutions persist as cache entries; abort clears the active rebase/merge resolution state." `git rebase --abort` clears in-progress state, NOT the recorded-resolution cache. See companion `feedback_rerere_conflict_resolution_cache_dividend_amara_2026_04_28.md`. +- [**Prediction-Bearing Class Reuse + Class Validation Beads + Falsification Asymmetry + Bead Farming / Goodhart Risk + Amortized Precision — full validation discipline (Amara + Gemini Deep Think + Aaron 2026-04-28)**](feedback_prediction_bearing_class_reuse_amara_2026_04_28.md) — (1) Prediction-Bearing Class Reuse: 1-of-4 bead mechanisms. (2) Class Validation Beads: factory-local accounting (0/1/2-3/N+). (3) Falsification Asymmetry: hard falsifiers override bead counts; reset/bifurcate/retire. (4) Bead Farming / Goodhart Risk: causal-steering test prevents retrofit narratives + synthetic friction. (5) Amortized Precision (Aaron 2026-04-28T21:32Z): the positive complement — discipline-overhead amortizes to momentum across iterations; Six Sigma + Kanban as external anchors. Unified rule: "A bead requires validation, not activity. A bead count increases confidence, not immunity. Hard falsifiers can override bead counts. Bead metrics must be guarded against Goodharting." External lineage: Popper 1959/1963 + Wason 1960 + Klayman & Ha 1987 + Goodhart 1975 + Strathern 1997 + Campbell 1976 + Smith/Motorola 1986 (Six Sigma) + Ohno/Toyota 1950s (Kanban) + Anderson 2010 (software Kanban). - [**Class-Count Validity Drift — meta-class for confusing activity with correctness (Amara 2026-04-28; Aaron triggered)**](feedback_class_count_validity_drift_amara_meta_class_2026_04_28.md) — A review loop starts treating count of named classes/updates/artifacts as evidence the protocol is correct, rather than requiring each class to earn reuse via 5-step control (worked example / mechanism / control / scope / falsifier). External lineage: confirmation-bias literature + Popper falsification. Tiny blade: "reinforcement" vs "challenge" — Aaron's terse asides interrupt drift, don't reinforce framing. - [**Class-Naming Ferry Protocol + SD-9 guardrail (Amara 2026-04-28; Aaron reinforced)**](feedback_class_naming_ferry_protocol_with_sd9_guardrail_amara_2026_04_28.md) — Meta-class for the Otto→Aaron→Amara→encode genre. SD-9 guardrail LOAD-BEARING: Amara endorsement is signal, not proof. Local factory-hygiene classes encode freely; non-local claims need substrate evidence + external lineage + falsifier. Anti-pattern: "Amara blesses the name, therefore true." - [**Advisory Enforcement Workflow Gap — class name (Amara 2026-04-28); decision-fork (B-0088 instance)**](feedback_advisory_enforcement_workflow_gap_amara_class_name_otto_2026_04_28.md) — Workflow claims/implies enforcement but is not in required-status-checks set; failures observable but non-blocking. Worked example: paired-edit lint failed on PR #688/#689 but both auto-merged. Decision: promote to required OR downgrade claim to advisory. Risk: factory believes rule enforced when only logged. "Guardrail that looks like enforcement but behaves like telemetry." diff --git a/memory/feedback_post_abort_dirty_branch_resumption_amara_2026_04_28.md b/memory/feedback_post_abort_dirty_branch_resumption_amara_2026_04_28.md new file mode 100644 index 000000000..d289ae40f --- /dev/null +++ b/memory/feedback_post_abort_dirty_branch_resumption_amara_2026_04_28.md @@ -0,0 +1,217 @@ +--- +name: Post-Abort Dirty-Branch Resumption — recovery checklist after interrupted run (Amara naming, 2026-04-28) +description: Amara 2026-04-28T20:55Z named the operational class after Aaron interrupted Otto mid-rebase ("hey can you stop i'm going to upgrade you back to max mode"), Otto cleanly aborted, and the max-mode restart needed an inventory step before action. Definition — after an interrupted run, local branches may contain intact commits that were not pushed, leaving PRs DIRTY relative to main. Recovery requires inventory before new work, then serialized rebase/push/CI verification. Tiny-blade — prefer `--force-with-lease` over plain `--force`; lease behavior should be the default word in canonical memories. +type: feedback +--- + +# Post-Abort Dirty-Branch Resumption + +## Class name (Amara 2026-04-28T20:55Z) + +**Post-Abort Dirty-Branch Resumption** — Amara formalized +the recovery class after Aaron 2026-04-28T20:53Z interrupted +Otto mid-rebase ("hey can you stop i'm going to upgrade you +back to max mode this is difficult work"), Otto cleanly +aborted via `git rebase --abort`, and the max-mode restart +needed an explicit inventory step before resuming. + +## Definition (Amara verbatim) + +> After an interrupted run, local branches may contain intact +> commits that were not pushed, leaving PRs DIRTY relative to +> main. Recovery requires inventory before new work, then +> serialized rebase/push/CI verification. + +## Why this needs to be a named class + +Without an inventory step, the temptation on restart is to +either: + +- **Re-do work** — assume the abort destroyed local commits + and start again. Wastes effort; risks divergence from + what was actually committed. +- **Plough forward** — assume the workspace is in some safe + state and start new substrate work. Leaves DIRTY PRs + rotting in queue + creates more contention. + +The class names the discipline: **inventory before action** +on every restart after abort. + +## Concrete incident (Otto 2026-04-28T20:53Z) + +- **Trigger**: Aaron asked "stop, going to upgrade to max + mode" mid-rebase of PR #693. +- **Otto's clean stop**: + ```bash + git rebase --abort + git checkout main + git status --short # verified clean + ``` +- **State at restart**: + - Branch `memory/amara-class-prediction-bearing-class-reuse-2026-04-28` + had 2 commits ahead of main (845b945 + c795e40), + PR #693 was DIRTY because main had advanced past the + branch's old base. + - Branch `memory/amara-class-name-scheduled-workflow-null-result-hygiene-scan-2026-04-28` + similarly DIRTY for #690. + - Neither branch had been force-pushed; commits intact + locally; remote state = pre-rebase. +- **Recovery applied this session**: + 1. `git status` + `git log --oneline -3` on each branch + to confirm commits are intact. + 2. `git pull --ff-only origin main` to get latest base. + 3. `git rebase main` on branch #1 → resolved conflicts + (rerere helped per the Rerere Cache Dividend class). + 4. `git push --force-with-lease` (Amara tiny-blade — + not plain `--force`). + 5. Verified CI restarted; auto-merge re-armed. + 6. Repeated for branch #2 (serialized, not parallel — + because both touch MEMORY.md). + +## The control (Amara 8-step checklist) + +On restart after abort: + +1. **List in-flight PRs**: `gh pr list --repo OWNER/REPO + --state open`. +2. **Compare local branch, remote branch, and main**: + ```bash + git log --oneline origin/main..HEAD # local commits + git log --oneline @{u}..HEAD # unpushed commits + git log --oneline HEAD..origin/main # behind + ``` +3. **Identify unpushed commits vs branch-behind-main + dirtiness**. Both can coexist; treat them as separate + recovery problems. +4. **Rebase serially when shared files are involved**. + For MEMORY.md sibling-DIRTY chains, parallel rebases + create new contention each time one merges. +5. **Push with `--force-with-lease`** (NOT plain + `--force`). Lease behavior refuses the push if remote + ref no longer matches the expected value, catching + concurrent updates. +6. **Verify CI restarted**: check that GitHub Actions + detected the new push and re-ran the relevant workflows. + `gh pr view N --json statusCheckRollup` should show CI + in progress. +7. **Re-arm auto-merge** if it dropped during force-push: + `gh pr merge N --squash --auto`. +8. **Only then resume new substrate work**. The DIRTY + chain is a real-dependency wait per the + manufactured-patience-vs-real-dependency discipline; + don't add new substrate before the chain is cleared. + +## Tiny blade (Amara prescribed): `--force-with-lease` + +> *"I'd avoid 'force-push' in the canonical memory unless +> it says `--force-with-lease`. Plain force-push is too +> easy to normalize; the safer lease behavior should be +> the default word."* + +Canonical wording in this memory + future memories: + +- **Always**: `git push --force-with-lease origin + `. +- **Never** (in canonical recipes): `git push --force + origin `. + +Why: + +- `--force-with-lease` refuses the push if the remote ref + has been updated since the local ref was last fetched + (catches concurrent collaborator pushes). +- `--force` blindly overwrites whatever's on the remote. + Acceptable for one-author branches in private repos; + dangerous when CI bots, peer agents, or external + collaborators may push concurrently. +- The factory's multi-CLI / peer-agent trajectory makes + `--force-with-lease` the future-safe default. + +## What's preserved across abort vs not + +| State | Preserved by abort? | +|---|---| +| Local commits on the branch | YES (unaffected by `git rebase --abort`) | +| Branch's unpushed status | YES | +| In-progress merge state | NO (rebase --abort discards) | +| `.git/MERGE_*` files | NO (cleared) | +| Working tree (after `git checkout main`) | clean if you checkout | +| `.git/rr-cache/` (recorded resolutions cache) | YES — recorded entries persist as cache; abort clears only the active rebase/merge resolution state (see Rerere Cache Dividend class for the precise boundary) | +| Remote branch state | unchanged (no force-push happened) | + +The key insight: **abort is non-destructive of work**. It +just resets the in-progress merge state. The local commits +that need rebasing are still there. + +## Pairs with Rerere Cache Dividend + +After abort + restart, the rebase is faster IF rerere has +recorded resolutions from prior successful rebases on the +same conflict pattern. See +`feedback_rerere_conflict_resolution_cache_dividend_amara_2026_04_28.md` +for the cache mechanism. + +## Bead audit + +This class earns: + +- **1 bead via worked example**: this very session's recovery + (Aaron stop → abort → max-mode restart → 8-step checklist + applied → both PRs rebased + force-pushed-with-lease + CI + re-armed). + +Future bead-earning opportunities: + +- **Cross-session abort**: if Otto wakes in a new session + with previously-aborted local state, the same checklist + applies. +- **Different failure mode**: if the abort happens during + a different operation (cherry-pick, merge, bisect), the + checklist may need extension. +- **Falsifier**: would fail if abort destroyed local + commits. Hasn't happened; class still holds. + +## Composes with + +- `memory/feedback_destructive_git_op_5_pre_flight_disciplines_codex_gemini_2026_04_28.md` + — adjacent: 5 pre-flight disciplines for destructive git + ops. The post-abort recovery is the inverse — what to do + AFTER a non-destructive interruption. +- `memory/feedback_rerere_conflict_resolution_cache_dividend_amara_2026_04_28.md` + — companion class; rerere is the cache that makes the + rebase step (#4 in the 8-step) fast. +- `memory/feedback_class_count_validity_drift_amara_meta_class_2026_04_28.md` + — discipline applied at restart: don't claim "we did N + things" before inventorying actual state. +- `memory/feedback_aaron_terse_directives_high_leverage_do_not_underweight.md` + — Aaron's terse "stop" carries outsized leverage; the + abort + restart pattern depends on Otto respecting it + immediately, not pushing through. + +## What this is NOT + +- **NOT a license to abort frequently.** Aborts are + expensive (lose in-progress merge state). The class is + about handling abort when it happens, not encouraging it. +- **NOT a substitute for clean-shutdown.** If you can + finish the in-progress operation safely before stopping, + do that. Abort is the second-best option. +- **NOT specific to Aaron-initiated interrupts.** Same + checklist applies for any abort cause — Ctrl+C, network + failure, OS crash, runner timeout. + +## Pickup notes for future-Otto + +When restarting after any kind of stop: + +1. **Don't immediately produce new substrate.** Run the + 8-step inventory first. +2. **Local branches that are ahead of remote with no + recent push = unfinished work.** Identify them; rebase + them; force-push-with-lease. +3. **DIRTY PRs in queue = real-dependency wait.** Don't + create more memory PRs until the chain is cleared + (per the MEMORY.md sibling-DIRTY observation). +4. **rerere may have helped or hurt**: inspect with + `git rerere status` if a resolved file looks + suspicious. diff --git a/memory/feedback_prediction_bearing_class_reuse_amara_2026_04_28.md b/memory/feedback_prediction_bearing_class_reuse_amara_2026_04_28.md index e94a470a2..764b0540c 100644 --- a/memory/feedback_prediction_bearing_class_reuse_amara_2026_04_28.md +++ b/memory/feedback_prediction_bearing_class_reuse_amara_2026_04_28.md @@ -1,6 +1,6 @@ --- name: Prediction-Bearing Class Reuse — positive complement of Class-Count Validity Drift (Amara naming, 2026-04-28) -description: Amara 2026-04-28T20:43Z named the validation pattern after Otto's SASTID 28/30 → 29/30 verification of the Self-Healing Metrics class. Definition — a named class earns reuse when it makes a concrete time-exposed prediction (or control recommendation) and later substrate evidence moves as predicted (or the control prevents/repairs an incident). Pairs with Class-Count Validity Drift: that class catches the failure mode (count-as-evidence); this pattern names the success mode (prediction-as-evidence). Tiny-blade: "one reuse bead" (single data point) is signal, not proof; multiple beads = pattern. +description: Amara 2026-04-28T20:43Z named the validation pattern after Otto's SASTID 28/30 → 29/30 verification of the Self-Healing Metrics class. Definition — a named class earns reuse when it makes a concrete time-exposed prediction (or control recommendation) and later substrate evidence moves as predicted (or the control prevents/repairs an incident). Pairs with Class-Count Validity Drift: that class catches the failure mode (count-as-evidence); this pattern names the success mode (prediction-as-evidence). Tiny-blade: "one reuse bead" (single data point) is signal, not proof; multiple beads = pattern. Extensions added 2026-04-28T21:18Z (Gemini Deep Think + Amara): Falsification Asymmetry (hard falsifiers override bead counts; reset/bifurcate/retire); Bead Farming / Goodhart Risk (causal-steering test prevents retrofit narratives + synthetic friction). Unified rule: "A bead requires validation, not activity. A bead count increases confidence, not immunity. Hard falsifiers can override bead counts. Bead metrics must be guarded against Goodharting." External lineage anchors expanded with specific Popper / Wason / Klayman+Ha / Goodhart / Strathern / Campbell citations per Aaron 21:15Z stop-mythology directive. type: feedback --- @@ -90,17 +90,292 @@ retired or rewritten. ## External lineage -- **Popper's falsifiability** (Amara cited): a claim becomes - more serious when it exposes itself to possible - disconfirmation, and repeated survival of those tests can - corroborate it without finally proving it. -- **Bayesian update over base rate**: each prediction-bearing - bead updates the posterior on class-validity; flat priors - + few beads = high uncertainty; many beads = lower - uncertainty, but never zero. -- **Confirmation bias literature** (Amara cited prior memory): - "passing tests" don't validate unless failure cases also - exist. Falsifier-presence is the antidote. +Per Aaron 2026-04-28T21:15Z directive: *"we also stop +mythology with human intellectual lineage research and +anchors."* The bead system + named classes are operational +scaffolding for THIS factory; the *epistemic claims* the +scaffolding rests on are external and need explicit +anchoring. Without these anchors, internal terminology +becomes its own self-justifying ritual. + +### Falsifiability (Popper) + +- **Karl Popper, *The Logic of Scientific Discovery*** + (German *Logik der Forschung*, 1934; English translation + Hutchinson & Co., 1959). Core claim: a theory is + scientific iff it is falsifiable. Universal claims cannot + be verified by accumulating confirming examples; they + become serious when the claimant specifies what + observation would count against them. +- **Karl Popper, *Conjectures and Refutations*** (Routledge, + 1963). The "tentative-corroboration" view: theories survive + by surviving genuine attempts at refutation, never by + proof. Beads-as-corroboration tracks this: each bead is + one survived falsification attempt, not one proof. + +### Confirmation bias (Wason / Klayman & Ha) + +- **Peter Wason, "On the failure to eliminate hypotheses in a + conceptual task,"** Quarterly Journal of Experimental + Psychology 12(3): 129–140 (1960). Empirical demonstration + that subjects systematically generate confirmatory tests + when disconfirmatory tests would be more informative. +- **Joshua Klayman and Young-Won Ha, "Confirmation, + disconfirmation, and information in hypothesis testing,"** + Psychological Review 94(2): 211–228 (1987). Reframes + Wason's "confirmation bias" as a "positive test strategy" + that is sometimes optimal but mis-applied for universal + hypotheses. Relevant: bead audits that count only + cache-hits (positive tests for class reuse) without + watching for falsifier events are subject to the same + failure mode. + +### Bayesian inference (factory-local heuristic) + +- Bead-count thresholds (0/1/2-3/N+) are factory-local + heuristic, not externally-anchored. The intuition matches + Bayesian update over a flat prior — each falsifier-passing + observation shifts the posterior toward "class is real" — + but the specific thresholds are operational choices, not + derived from a formal Bayesian model. **Do not claim + Bayesian rigor for the threshold values.** + +### Stop-mythology rule (Aaron 2026-04-28T21:15Z) + +The bead system is **operational scaffolding**, not +**standalone epistemic machinery**. Internal terminology +(Class Validation Beads, Prediction-Bearing Class Reuse, +Class-Count Validity Drift, etc.) is factory-local; the +underlying epistemic claims (falsifiability, confirmation +bias, corroboration) are external and load-bearing only +when explicitly cited. + +When recording a bead audit: + +- **Bead count statements** are factory-local accounting. + No external citation needed. +- **Claims about WHY beads count as evidence** must cite + the external lineage (Popper for falsifiability; Wason + + Klayman & Ha for the failure mode the bead system + guards against). +- **Generalized claims** ("classification systems should + use bead-counting") need substrate evidence + external + lineage + falsifier per the SD-9 guardrail. + +Composes with the broader human-lineage backfill trajectory +(B-0060 P1) and the Aurora measurement-hygiene work +(task #292). + +### What this is NOT + +- **NOT a claim that beads are Popperian** in any formal + sense. Beads are factory-local accounting; Popper's + framework is the philosophical *justification* for why + falsifier-passing observations matter at all. +- **NOT a substitute for external scholarship**. If a + reader wants the deep theory of why we count beads this + way, the external citations are the right starting + point. + +### Tightened wording (Amara 2026-04-28T21:14Z) + +The earlier formulation "Confidence accumulates through +corroboration, never proof" overclaimed. **Some local +substrate facts admit proof in narrow terms** — "this grep +matched once," "this CI check failed," "this PR merged" — +proven by direct observation. + +Safer canonical wording for class-validation: + +> **Confidence in reusable classes accumulates through +> corroboration, not proof-by-count.** + +This preserves the discipline (count of beads ≠ proof of +class) without overclaiming about the philosophical status +of all knowledge. + +### Falsification Asymmetry (Gemini Deep Think 2026-04-28T21:18Z; Amara endorsed) + +> *"The bead system must not be monotonic. A high-bead +> class can still be broken by a hard falsifier; a failed +> future use should trigger rollback, bifurcation, or +> demotion rather than merely 'no new bead.'"* + +**Definition**: bead counts increase confidence +**but do not protect a class from a hard falsifier**. + +If a class with N beads catastrophically fails on its +(N+1)th use — predicts the wrong direction, fails to +prevent the incident it claimed to repair, or actively +steers the factory into a wall — the system needs an +explicit response, not just "no new bead." + +**Three falsification responses**: + +1. **Reset** — bead count drops to 0; the class is treated + as freshly-named and must re-earn corroboration. Use + when the failure invalidates the class's mechanism but + the class might still be useful. +2. **Bifurcate** — split the class into two narrower + classes, one for the regime where the original beads + were earned and one for the regime where it failed. + Use when the failure exposes a scope-boundary the + original class missed. +3. **Retire** — delete the class as a viable factory + substrate. Use when the failure invalidates the + underlying premise. + +**External lineage**: Popper's framework. Corroboration is +not equivalent to proof; theories survive by surviving +genuine attempts at refutation, never by accumulating +positive evidence alone. The asymmetry is fundamental: +**validation is additive; falsification is multiplicative +by zero**. + +The bead system MUST encode this asymmetry. Without it, +beads become a one-way ratchet that accumulates false +confidence over time. + +### Bead Farming — Goodhart's Law Risk (Gemini Deep Think 2026-04-28T21:18Z; Amara endorsed) + +> *"Once 'beads' become the survival metric for classes, +> the system may unconsciously prioritize workflows or +> engineer synthetic friction just to trigger mechanisms +> and harvest beads. Alternatively, it might execute a +> standard developer habit organically, and then +> retroactively map the action to a class checklist to +> claim a bead."* + +**External lineage**: Charles Goodhart, "Problems of +Monetary Management: The U.K. Experience" (Bank of +England paper, 1975) — generalized as Goodhart's Law: +**"When a measure becomes a target, it ceases to be a +good measure."** Marilyn Strathern's 1997 reformulation: +"When a measure becomes a target, it ceases to be a good +measure" (the canonical phrasing). Donald Campbell's +adjacent law (1976): "The more any quantitative social +indicator is used for social decision-making, the more +subject it will be to corruption pressures." + +**Failure modes to watch for**: + +1. **Synthetic friction**: agents engineer scenarios + designed to trigger class mechanisms specifically to + harvest beads. Example: deliberately introducing a + conflict so rerere can fire and earn a Cache Dividend + bead. +2. **Retrofit narratives**: agents execute standard work + (e.g., a routine rebase that didn't actually need the + Post-Abort 8-step), then narrate it as if the class + guided them, claiming a bead. +3. **Bead-target prioritization**: agents choose tasks + that earn beads over tasks that produce factory value + but don't fit any named class. + +**The discipline that holds**: + +> A bead must strictly represent the class/mechanism +> CAUSALLY steering the outcome. + +If the same outcome would have happened without the +class's existence, no bead. If the class was retroactively +mapped onto an action it didn't shape, no bead. If the +action was engineered to harvest a bead rather than to +produce factory value, the action itself is the +anti-pattern. + +**Detection heuristics**: + +- **Counterfactual test**: would I have taken the same + action without this class existing? If yes, no bead. +- **Action-shape test**: did the class's checklist / + control / detector concretely change my decision? If + not, no bead. +- **Synthetic-friction test**: did I introduce avoidable + work to make the class fire? If yes, the class earned + a *negative* bead (Goodharting penalty). + +### The unified canonical rule (Aaron 2026-04-28T21:15Z + Amara/Gemini synthesis) + +```text +A bead requires validation, not activity. +A bead count increases confidence, not immunity. +Hard falsifiers can override bead counts. +Bead metrics must be guarded against Goodharting. +``` + +This is the load-bearing summary. Memorize this; cite it +in any class-bead audit. + +### Amortized Precision — positive complement of Goodhart Risk (Aaron 2026-04-28T21:32Z; Amara compact-form 21:38Z) + +> *"amortized precision leads to momentum look at 6 sigma +> for proof and similar like kanban discipline"* — Aaron + +Precision and momentum are not opposites when the precision +work reduces future rework. Disciplined measurement, WIP +limits, explicit policies, and defect controls can look +slow locally while increasing throughput across iterations. + +**The dual-constraint pair** (preventing oscillation between +two errors): + +- **Goodhart Risk** guards against producing process + artifacts for their own sake (*"more process = more + progress"*). +- **Amortized Precision** guards against undervaluing + process discipline that measurably lowers downstream + defect, rebase, review, or recovery cost + (*"process work is not real progress"*). + +**Distilled rule** (Amara 2026-04-28T21:38Z): + +```text +Precision is not the enemy of momentum. +Unamortized process is drag. +Amortized precision is momentum. +``` + +**External lineage**: + +- **Six Sigma** — Bill Smith (Motorola, 1986); DMAIC cycle + (Define / Measure / Analyze / Improve / Control); 3.4 + defects-per-million target. Upfront measurement + infrastructure amortizes into compounding reductions in + downstream rework, warranty, and escalation cost. +- **Kanban (manufacturing)** — Taiichi Ohno (Toyota + Production System, 1950s). Visualize work-in-progress, + limit WIP, pull on demand. WIP limits look like + throttling but increase total throughput by reducing + context-switching, queue depth, and rework cascades. +- **Kanban (software)** — David J. Anderson, *Kanban: + Successful Evolutionary Change for Your Technology + Business* (Blue Hole Press, 2010). Same principle + adapted to knowledge work: WIP-limit discipline yields + faster cycle times than unconstrained alternative. + +**Falsifier** — amortized precision fails when: + +- Discipline-overhead grows faster than amortized savings + (Goodhart Risk applied at the discipline level). +- Factory throughput drops over time despite growing + discipline (operational test: "Did the + discipline-overhead this arc produce observable + downstream throughput improvement?"). + +**Composes with**: + +- The Goodhart Risk section above — dual constraint; + both must be in force. +- B-0060 (human-lineage external-anchor backfill) — Six + Sigma + Kanban are explicit anchors per Aaron's + stop-mythology directive. + +**What this is NOT**: not a license to drop bead-audit +guardrails; not a substitute for measurable factory output +metrics (PRs landed, cycle-time trends, alignment-score +trajectory) — without those, "amortization" is +unfalsifiable. ## Class Validation Beads — accounting mechanism (Amara 2026-04-28T20:48Z) diff --git a/memory/feedback_rerere_conflict_resolution_cache_dividend_amara_2026_04_28.md b/memory/feedback_rerere_conflict_resolution_cache_dividend_amara_2026_04_28.md new file mode 100644 index 000000000..7d1fbc32d --- /dev/null +++ b/memory/feedback_rerere_conflict_resolution_cache_dividend_amara_2026_04_28.md @@ -0,0 +1,316 @@ +--- +name: Rerere Conflict-Resolution Cache Dividend — recurring conflict pattern becomes cheaper after recorded resolution (Amara naming, 2026-04-28) +description: Amara 2026-04-28T20:55Z named the cache-mechanism class after observing that recurring MEMORY.md sibling-DIRTY conflicts during this arc resolved automatically via Git's rerere on later rebases. Definition — a repeated conflict pattern becomes cheaper after Git records a prior manual resolution and reuses it during later merges/rebases. Critical correction (Amara 2026-04-28T21:00Z tighter phrasing): recorded rerere resolutions persist as cache entries; `git rebase --abort` clears only the active rebase/merge resolution state, NOT the recorded-resolution cache. +type: feedback +--- + +# Rerere Conflict-Resolution Cache Dividend + +## Prerequisite — rerere must be explicitly enabled + +Git's rerere does NOT run by default. The `.git/rr-cache/` +directory existing is not sufficient — rerere only fires when +`rerere.enabled` is set to true in Git config: + +```bash +git config --global rerere.enabled true +``` + +Without this config, recorded resolutions never replay and +this entire class's "cache dividend" doesn't materialize. +Verify per-clone with `git config --get rerere.enabled`. If +the cache dividend is being relied on across multiple +contributors, document the enablement in CONTRIBUTING.md or +the install script. + +## Class name (Amara 2026-04-28T20:55Z) + +**Rerere Conflict-Resolution Cache Dividend** — Amara named +the cache-mechanism class after observing recurring MEMORY.md +sibling-DIRTY conflicts during this arc resolved automatically +via Git's `rerere` on later rebases. + +## Definition (Amara verbatim) + +> A repeated conflict pattern becomes cheaper after Git +> records a prior manual resolution and reuses it during +> later merges/rebases. + +## Critical correction — abort vs cache boundary (Amara 2026-04-28T21:00Z) + +This is the **precise phrasing** for canonical use: + +> *"Recorded rerere resolutions persist as cache entries; +> abort clears the active rebase/merge resolution state."* + +**NOT** "persistent cache survives abort" — that overclaims +the boundary. The exact mechanics: + +- **Recorded resolutions** (saved to `.git/rr-cache//` + after a successful conflict resolution + commit) persist + as cache entries. +- `git rebase --abort` clears the **active** in-progress + rebase/merge resolution state (the `.git/MERGE_*` files, + the rebase todo list, the temporary index), but NOT the + `.git/rr-cache/` directory's recorded entries from prior + successful resolutions. +- Therefore: an abort doesn't "destroy what rerere knew"; + it just resets what rerere was currently doing. Earlier + resolutions remain available for future merges that hit + the same conflict pattern. + +The wrong framing: "previous abort taught rerere." +Aborts don't teach rerere — they clear in-progress state. +The correct framing: "previous **completed** resolution +taught rerere; that recorded entry survives subsequent +abort/restart cycles." + +## Concrete incident (Otto 2026-04-28T20:56Z) + +- **Setup**: Multiple MEMORY.md sibling-DIRTY rebases + earlier this arc (PRs #688, #690, #692, #693), each + resolving the same conflict-shape: `<<<<<<< HEAD ... ======= + ... >>>>>>>` on the paired-edit marker line. +- **Successful resolutions during earlier rebases** wrote + recorded entries to `.git/rr-cache/`. +- **Aaron's 20:53Z stop** + Otto's `git rebase --abort` + cleared the in-progress merge state but left the + recorded-resolution cache intact. +- **Max-mode restart** (20:56Z): `git rebase main` on PR + #693's branch hit the same conflict shape. Output: + > Resolved 'memory/MEMORY.md' using previous resolution. +- **Result**: rebase proceeded with the pre-recorded + resolution; manual editing was only needed for the + second commit's conflict (which had a slightly different + shape than the first commit's recorded resolution). + +## The control (Amara prescribed) + +For recurring MEMORY.md sibling-DIRTY conflicts: + +1. **Keep rerere enabled** — Git enables it by default + when `rerere.enabled=true` (or, since Git 2.x, just by + the existence of `.git/rr-cache/`). +2. **Resolve once carefully** — your first resolution + becomes the cached resolution for all future occurrences + of the same conflict shape. Take the extra minute to + get it right. +3. **Inspect rerere-applied resolutions before continuing** + — the message "Resolved X using previous resolution" + means rerere fired. Read the result before `git add` + ing. +4. **Use `git rerere forget `** if the cached + resolution is stale or wrong for the current conflict. + Then re-resolve manually; the new resolution overwrites + the old cache entry. +5. **Continue rebase only after verifying the file's + semantic invariant** — for MEMORY.md, that means: the + index format is preserved (each entry is a one-liner + under ~150 chars per CLAUDE.md), no duplicate entries, + chronological/topical ordering preserved. + +## Worked-example trace (this session) + +The MEMORY.md sibling-DIRTY conflict pattern this arc: + +```text +<<<<<<< HEAD +**📌 Fast path: ... ... (CURRENT-aaron.md refreshed ... sections 26-N — ...) +======= +**📌 Fast path: ... ... (CURRENT-aaron.md refreshed ... sections 26-M — ...) +>>>>>>> commit-sha +``` + +Resolution: keep the FROM-branch's marker (the new PR adds +its own substrate) AND the most-recent description text +(usually the higher section number). Rerere recorded this +shape as a hash → resolution mapping. + +When the same conflict shape appeared in subsequent rebases, +rerere's `Resolved 'memory/MEMORY.md' using previous +resolution` message indicated the cache hit. Manual +verification still needed (the SECOND conflict on a +multi-commit rebase often has a slightly different shape +because the prior commit modified the same area). + +## Bead audit + +### Bead-audit rule (Amara 2026-04-28T21:10Z) + +> *Count only `Resolved '' using previous resolution` +> as a rerere cache-hit bead. `Recorded preimage` and +> `Recorded resolution` are cache-write events: they create +> pending bead opportunities but do not themselves validate +> reuse.* + +This rule was added after Otto over-attributed beads on the +restart sequence: the original tick-narration claimed +"3 cache-hit observations across PR #693, #690, #694 +rebases" based on conflating activity logs (cache writes) +with validation logs (cache hits). Amara caught the +conflation with the operational distinction: + +- **`Resolved '' using previous resolution`** — + rerere applied a prior recorded resolution. **CACHE HIT.** + Earns one Rerere Cache Dividend bead per occurrence. +- **`Recorded preimage for ''`** — rerere noted the + conflict shape pre-resolution (saving it to the cache). + **CACHE WRITE.** Pending future bead; not yet validated. +- **`Recorded resolution for ''`** — rerere saved the + user's manual resolution to the cache. **CACHE WRITE.** + Same: pending future bead, not validated. + +Apply this rule rigorously in any future bead audit on this +class. Counting cache-writes as cache-hits is the +**Mechanism-Activity Validation Drift** failure mode +(noted as observation-level only — class promotion deferred +until a second independent example outside rerere). It +generalizes: any class whose validation depends on +mechanism-emitted log signals must distinguish +activity-logs from validation-logs in its bead audit. + +### Verified beads + +This class earns: + +- **1 bead via cache hit**: this session's max-mode restart + hit `Resolved 'memory/MEMORY.md' using previous + resolution` on PR #693's first conflict, validating that + recorded resolutions survived the prior abort. This is + the **only** cache-hit observed in the restart sequence. + +### Pending beads (cache writes; not yet validated) + +The restart sequence produced 3 cache-write events whose +validation is still pending: + +- PR #693 commit 2 (c795e40): `Recorded preimage` — + pending. Earns a bead when a future rebase hits this + recorded shape. +- PR #690 (b1fa17a): `Recorded preimage` + `Recorded + resolution` — pending. Earns a bead when a future rebase + hits this recorded shape. +- PR #694 (a8165bb): `Recorded preimage` — pending. Earns + a bead when a future rebase hits this recorded shape. + +Pending beads can convert to earned beads only when the +specific cache entry is reused by a future rebase, with +the `Resolved '' using previous resolution` log +line as the witness. + +Future bead-earning opportunities: + +- **Wrong cache hit caught**: rerere applies a stale + resolution; operator catches it via `git rerere status` + inspection; uses `git rerere forget`. That would earn + the class another bead via control-application. +- **Cross-session cache survival**: rerere cache survives + `.git/` operations short of a clone. If a fresh clone or + cache-clear loses the recordings, that's a falsifier + observation. +- **Falsifier**: would fail if rerere didn't actually + reduce conflict-resolution cost across repeated rebases. + Hasn't happened; class still holds. + +## When NOT to rely on rerere + +- **Conflict shape is genuinely different each time** — + rerere matches by content hash, not semantic equivalence. + Different content = different cache entry needed. +- **Recorded resolution was wrong** — rerere will + faithfully reapply a wrong resolution. `git rerere + forget` if you spot it. +- **Multi-line context drift** — rerere uses surrounding + context; if the file shape evolves significantly, the + cache miss rate increases. + +## What `--force-with-lease` and rerere together buy + +The combination makes recurring sibling-DIRTY rebase chains +operationally cheap: + +- `git rebase main` triggers rerere → most conflicts + auto-resolve. +- Manual fixup for any non-cached conflicts (typically + fewer per round). +- `git push --force-with-lease` (per Post-Abort class + tiny-blade) safely updates the remote. +- Auto-merge re-arms; CI re-runs. + +Net per-round cost: ~30 seconds for a single-conflict +chain, vs ~3 minutes without rerere. Compounds across the +4-5 sibling-DIRTY rounds this arc. + +## Composes with + +- `memory/feedback_post_abort_dirty_branch_resumption_amara_2026_04_28.md` + — companion class. Post-Abort is the operational + checklist; this class is the cache mechanism that makes + step 4 (rebase) of the checklist fast. +- `memory/feedback_destructive_git_op_5_pre_flight_disciplines_codex_gemini_2026_04_28.md` + — adjacent. The 5 disciplines guard against destructive + ops; rerere is non-destructive (cache-only) but worth + inspecting after auto-application. +- `memory/feedback_prediction_bearing_class_reuse_amara_2026_04_28.md` + — this class is at 1 bead via cache-hit; adding more + beads requires worked examples of `git rerere forget`, + cross-session survival, or falsifier-event. (Class + Validation Beads framework lives in that file.) + +## What this is NOT + +- **NOT a directive to silently trust rerere.** Always + verify the semantic invariant of the resolved file. + Rerere matches by hash, not by meaning. +- **NOT a substitute for the underlying conflict + prevention.** If the same conflict keeps recurring, the + upstream cause may need fixing (e.g., for MEMORY.md + contention, the structural fix is per B-0088 — make the + paired-edit lint required, force serialization at the + gate level). +- **NOT a license for plain `--force`.** Rerere makes + rebase cheaper; that's no reason to skip + `--force-with-lease` on the push. + +## External lineage + +- **Git rerere documentation**: `man git-rerere` defines it + as "reuse recorded resolution" — records conflicted + automerge results plus the corresponding manual + resolutions, then reapplies those resolutions when the + same conflict appears again. +- **Long-lived branches** are explicitly the canonical use + case in the Git docs; sibling-DIRTY chains are an + instance. + +## Pickup notes for future-Otto + +When you see "Resolved 'X' using previous resolution" during +a rebase or merge: + +1. Don't blindly continue. Read the resolved file and + verify it makes semantic sense. +2. If correct: `git add X` + `git rebase --continue`. +3. If wrong: `git rerere forget X` + manually resolve + + `git add X` + `git rebase --continue`. The new + resolution overwrites the old cache entry. + +When a recurring conflict pattern keeps reappearing +(like MEMORY.md sibling-DIRTY): + +1. The class earns its keep — rerere is doing the work + that would otherwise be repeated manual editing. +2. But also consider whether the upstream cause needs + fixing (per the structural-fix discipline). Cache + dividends are operational; structural fixes are + strategic. + +When `git rebase --abort` happens: + +1. The active in-progress rebase state is cleared. +2. The recorded-resolution cache (`.git/rr-cache/`) is + NOT cleared — those entries survive. +3. On restart, rerere can fire on the same conflicts + based on the surviving recorded entries. +4. Don't say "abort taught rerere." The completed prior + resolutions taught rerere; abort just didn't unteach it.