Skip to content

moooon

Motir

Vibe your whole project. Bring an idea — Motir's three AI layers plan it, track it, and ship it, end to end. You're looking at Motir, built in Motir.

  • Vibe Project
  • Open Source
  • AI Agent
  • AI Loop
1
requests
0
upvotes
145
planned
1,361
shipped

Motir · Work items

MOTIR-2711Done

(motir-meta) `COMPRESSION.conserve.py` goes permanently red on `main` — its `merge-base` baseline collapses to the post-compression commit once the PR merges

Repo: motir-meta. One PR. Found by the motir run MOTIR-2706 that ran it as a smoke check. Invariant C itself is INTACT — this is a defect in the checker, not in the corpus.

What happens

On main today, python3 prompts/plan-rules/COMPRESSION.conserve.py reports:

[FAIL] core.md                baseline  51201c →  48682c  (2519 chars moved to fixtures in 55 spans)
[FAIL] kind-leaf-deepen.md    baseline  33122c →  31344c  (1778 chars moved to fixtures in 22 spans)
[FAIL] phase-deepen.md        baseline  32770c →  31386c  (1384 chars moved to fixtures in 16 spans)
3 pack(s) violate invariant C — a compression must DELETE and TAG, never re-word.

The three failing packs are exactly the three that have been compressed. The corpus is fine. Run against the correct pre-compression baseline (e245e5d, the merge before MOTIR-2659):

[PASS] core.md                baseline  61612c →  48682c  (12930 chars moved to fixtures in 55 spans)
[PASS] kind-leaf-deepen.md    baseline  38116c →  31344c  ( 6772 chars moved to fixtures in 22 spans)
[PASS] phase-deepen.md        baseline  36990c →  31386c  ( 5604 chars moved to fixtures in 16 spans)
WARRANT CONSERVED

The defect

Line 49: MERGE_BASE = git merge-base HEAD origin/main, with base = 'origin/main'.

From inside an unmerged compression PR that resolves to the pre-compression fork point — correct, and it is why MOTIR-2659 / MOTIR-2660 / MOTIR-2661 each proved green. After the PR merges, merge-base(HEAD, origin/main) IS the post-compression commit, so the check compares a compressed pack against itself and then tries to subtract fixture spans that are already gone. It cannot find them, and reports a re-wording that did not happen.

This is the exact failure COMPRESSION.md § Consequences documented for verify.py"pinned to a commit … after any compression it fails, correctly" — recurring in the successor built to not have it. The difference that matters: verify.py's red is honest (its claim really did expire), while this one asserts a live invariant is VIOLATED when it holds.

Why it matters now

Invariant C is the whole safety argument for compressing at all (§ Decision 1: "It can be proved LOSSLESS, which is a different claim and the one that makes attempting it safe"). A checker that is red on main for a correct corpus:

  • cannot be used to re-verify a compression after the fact, or by anyone not sitting on the authoring branch;
  • trains its readers that red means nothing, which is the state in which a real re-wording lands unnoticed;
  • is about to matter: MOTIR-2662 compresses twelve more packs and is the last card that can catch a lost trigger.

Acceptance criteria

  1. COMPRESSION.conserve.py resolves a baseline that stays correct AFTER merge — e.g. per-pack, the last commit that touched fixtures/<pack>.md and its pack together, or an explicit pinned baseline recorded per pack. The mechanism is the implementer's call; the criterion is behavioural.
  2. Run with no arguments on main, with no compression in flight, the check is GREEN for core.md, phase-deepen.md and kind-leaf-deepen.md, and still reports the same per-pack char/span/tag counts it prints today.
  3. A deliberate re-wording is still caught: change one word of a trigger in a compressed pack, re-run, and the check goes RED naming that pack. Demonstrate both directions in the PR body — a green on the true corpus is worthless without the red that proves the check still bites.
  4. --base <ref> keeps working unchanged, and the from-inside-a-PR behaviour that made 2659/2660/2661 green is not regressed.
  5. No plan-rules/ pack, no fixtures/ file, and no COMPRESSION.md rule text is edited — this card fixes the CHECKER. (A § Consequences note recording the fix is allowed and encouraged.)

Context refs

  • prompts/plan-rules/COMPRESSION.conserve.py — line 44 (base = 'origin/main'), line 49 (MERGE_BASE), check().
  • prompts/plan-rules/COMPRESSION.md — § Decision 1 invariant C; § Consequences on verify.py's pinned baseline, the precedent this repeats.
  • Baseline that proves the corpus green: e245e5d (git rev-parse 6d8bf51^).