MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-2773

`COMPRESSION.conserve.py` cannot express a rule ADDITION — its per-pack baseline is a fixed historical commit, so any pack that gains a rule after its first compression goes red forever

Done
Description

Repo: motir-meta. One PR. Found by the motir run of MOTIR-2529, which added three trigger widenings to phase-deepen.md and kind-leaf-deepen.md — a legitimate, planned, rule-tier ADDITION — and flipped both packs from [PASS] to [FAIL].

This is the third member of the family MOTIR-2723's context refs already name: "the checker's default is wrong." MOTIR-2711 fixed the baseline that collapsed to the post-compression commit. This is the mirror defect in the same line.

Finding

COMPRESSION.conserve.py asserts invariant C:

baseline  ==  (pack on disk − tag lines)  +  (the spans in fixtures/<pack>.md)

with exit 1 on "a span was lost, or text was re-worded / inserted outside a tag." That is exactly right for the operation it was written for — a COMPRESSION, which must only delete and tag. But it is the only sentence the script can say, and a corpus is also supposed to GROW: CORPUS-MAINTENANCE.md explicitly sanctions the rule-tier change, and prefers "SHARPEN an existing rule before adding a new one" — i.e. an insertion into an already-compressed paragraph, which is precisely the shape that trips it.

And the baseline never moves forward. Per MOTIR-2711 it is derived per pack from the commit that ADDED fixtures/<pack>.md — a fixed point in history, chosen (correctly) because fixtures/<pack>.md accumulates every span ever lifted. So the red is permanent and cumulative: every future sharpening of any compressed pack adds another INSERT the script will report forever, against a baseline that recedes further into the past with each one.

Evidence — measured on this run, origin/main = 686c12d

before MOTIR-2529after
phase-deepen.md[PASS][FAIL] — 2 INSERTs (W1, W3)
kind-leaf-deepen.md[PASS][FAIL] — 1 INSERT (W2)
kind-story.md[FAIL][FAIL] (pre-existing, unrelated)
summary1 pack(s) violate invariant C3 pack(s) violate invariant C

The reported INSERTs are verbatim the new rule text, e.g. ". **⚠️ AND WHEN THE PRECONDITION IS A FACT ABOUT A RUNNING SYSTEM'S STATE YOU *CAN* READ, THE DISCHARGE IS A QUERY AGAINST THAT SYSTEM, NAME…". Nothing was lost and nothing was re-worded — the script's own word-grain comparison confirms it; it simply has no verdict for added.

Why this matters more than a red script. Invariant C is the one guarantee that a compression did not quietly re-word a trigger, and its value is entirely in the signal being trustworthy. A check that is red for a benign reason on three packs and counting is a check nobody reads, which is how an actual re-wording gets through. MOTIR-2711's own card made this argument for the merge-base baseline; the same argument applies to the operation the baseline is compared under.

Acceptance criteria

  1. conserve.py distinguishes an INSERTED span that is new rule text from a re-wording of baseline text, and does not fail on the former. The invariant it enforces becomes: no baseline word was changed or dropped, and every deletion is in fixtures/<pack>.md — additions are reported, not fatal.
  2. The re-wording detection is not weakened: a test (or a worked fixture in COMPRESSION.md) shows that altering a single word of surviving baseline text still exits 1. This is the property the script exists for and the change must be proven not to cost it.
  3. Additions are visible, not silent — the run prints them per pack (a count and the opening words) so a reviewer can see what a PR added to the always-injected set.
  4. COMPRESSION.md § Decision 1 records which operations invariant C is stated over — compression, and now sharpening — so the next reader does not re-derive the exclusive form.
  5. plan-rules/ rule TEXT is not edited; this is tooling and record only.

Context refs

  • prompts/plan-rules/COMPRESSION.conserve.py — the TAG / PTR regexes, the per-pack baseline derivation, the INSERT branch that produces the finding.
  • prompts/plan-rules/CORPUS-MAINTENANCE.mdRULES vs LESSONS, the sanctioned rule-tier change and the SHARPEN-first preference that makes this shape the expected one.
  • MOTIR-2711 — the same script, the baseline half of the defect (done). MOTIR-2723 — the adjacent re-shape of COMPRESSION.measure.py; both are "the checker's default is wrong."
  • MOTIR-2529 — the run that surfaced this; its PR body carries the before/after table.
  • ⚠️ Related but SEPARATE, deliberately not folded in: MOTIR-2529 also moved the worst cell from 1 988 to 2 013 against § Decision 4's 1 975 target, which was already over. That is a budget question for MOTIR-2662 / MOTIR-2723's derived-floor work, not a conserve.py defect.