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-2969Done

Planning bug: invariant C's verdict rides the DIFFER'S ALIGNMENT — a run boundary landing on a markdown marker reds a pack no fixture span can fix

Repo: motir-meta. One PR. Surfaced 2026-08-18 by the motir run MOTIR-2966 execution, under notes.html #27 (an out-of-scope defect found mid-card is logged, never absorbed). It also FALSIFIES a premise of MOTIR-2966 — see The falsified premise below.

The defect

COMPRESSION.conserve.py's check() was deliberately made alignment-independent for the FIXTURE SUBTRACTION, and its docstring says so: "This is the invariant stated directly, so it does not depend on how a differ chose to align the edit … and an alignment-based check has to guess." classify() was not. It classifies whatever run difflib.SequenceMatcher happens to emit, and is_addition() then tests that run's two ENDS. So the same edit passes or fails depending on where the differ put the boundary — and in these packs the boundary lands on a markdown marker the house style repeats on nearly every emphasised sentence.

Measured on the MOTIR-2966 worktree, after its fixture spans landed:

kind-story.md    rejected insert (597 chars)
    before='*' after='F' text[0]='T'
    (1) carries a boundary : True
    (2) >= 3 words         : True (103)
    (3) starts_clean=False  ends_clean=True
    head='The complete set — the FOURTEEN settable members, in the canonic'

phase-deepen.md  rejected insert (5453 chars)
    before=' ' after='A' text[0]='T'
    (1) carries a boundary : False
    (2) >= 3 words         : True (913)
    (3) starts_clean=True   ends_clean=True
    tail="base rule is this limb's run-time half. **⚠️"
  • kind-story.md fails ONLY clause (3). The superseded sentence and its replacement both open **, so the differ consumes the shared ** as equal and the run starts at T, mid-marker. before='*'.
  • phase-deepen.md fails ONLY clause (1). The run ends …run-time half. **⚠️ — a terminator IS present, but SENTENCE_END's trailing class is [\s"'*)]]and does not admit⚠️`, the marker this corpus opens warnings with. Nothing in that pack was re-worded at all: its disk text is the baseline plus insertions only.

Neither is a re-wording, and neither is reachable by § Decision 1's remedy. Record the original span in fixtures/<pack>.md works only when the superseded text does NOT share an opening marker with its replacement — which is why it reached [PASS] on core.md (FiveMore) and on kind-leaf-deepen.md, and cannot reach kind-story.md. For phase-deepen.md there is no superseded text to record at all; recording the neighbouring sentence would subtract still-present text from the baseline and permanently blind the check to any future re-wording of it.

Why it matters

The invariant's whole value is that it needs no judgement. A verdict that depends on SequenceMatcher's tie-breaking is a judgement, just one nobody can see or argue with — and it lands on the false side: two packs stay [FAIL] for edits that conserved everything. That is precisely the failure the script's own docstring names as its reason to exist: "A check that is red for a benign reason on three packs and counting is a check nobody reads, which is how a real re-wording gets through."

The falsified premise

MOTIR-2966 states "Every one is the MID-SENTENCE WIDENING" and that "the remedy is decided" for all three packs. Measured per pack, that holds for ONE of the three. kind-leaf-deepen.md is a mid-sentence widening and the remedy landed it green. kind-story.md is a re-ordered enumeration whose recorded span reduced seven violation ops to one but cannot clear the marker collision. phase-deepen.md is not a widening in any sense — it is a whole added block, mis-classified because of its trailing marker. The card generalised one pack's diagnosis to three; the sibling shape check is what was skipped.

Deliberately NOT decided here

WHICH repair. Two are viable and they are not equivalent, and the choice must be made by reading is_addition's three clauses against the corpus rather than by picking the smaller diff:

  • (A) Normalise the RUN before classifying it — extend a rejected insert run outward to the nearest word/sentence boundary using the equal context on both sides, then re-test. Alignment-independent, mirrors what check() already does for spans, and touches neither clause.
  • (B) Widen the two clauses — admit ⚠️ (and the other markers actually on disk, COUNTED not declared, per THE MINIMUM-SPAN RULE's lesson) into SENTENCE_END's trailing class, and admit * as a clean start.

(B) is the more dangerous and is not obviously wrong; say why before choosing it. It relaxes the test that stops a fragment, which is the one property MOTIR-2934 and MOTIR-2773 both refused to spend. Whichever is chosen, the --self-test corpus grows by the two cases measured above — a rejected run whose boundary sits inside a ** marker, and one that ends . **⚠️ — so the next pass cannot re-break them silently.

Acceptance criteria

  1. python3 prompts/plan-rules/COMPRESSION.conserve.py is run and quoted BEFORE any edit, on a pristine origin/main worktree; the quoted verdict names kind-story.md and phase-deepen.md as the survivors and 0 other packs.
  2. The chosen repair is (A) or (B) above, named in COMPRESSION.md § Decision 1 with the reason the OTHER was refused, in the same form the two refused verdicts already there use.
  3. NO rule text in any pack is edited by this card — the diff touches COMPRESSION.conserve.py, COMPRESSION.md, and the escape-hatch paragraph the survivors are named in, and nothing else under prompts/plan-rules/*.md.
  4. python3 prompts/plan-rules/COMPRESSION.conserve.py --self-test reports 11/11 PASS: the nine existing cases unchanged, plus one case per measured shape above, each asserting the run is an ADDITION and each written so that altering a word inside the same run is still a violation.
  5. python3 prompts/plan-rules/COMPRESSION.conserve.py is re-run over every pack afterwards and its verdict quoted: 0 packs violate invariant C.
  6. The escape-hatch naming MOTIR-2966 added to COMPRESSION.md is REMOVED in the same PR, or the PR says why a survivor remains.

Context refs

  • prompts/plan-rules/COMPRESSION.conserve.pyclassify(), is_addition()'s three clauses, SENTENCE_END / SENTENCE_START, and check()'s alignment-independent span subtraction (the model for repair A).
  • prompts/plan-rules/COMPRESSION.md § Decision 1 — the intended-cost sentence, the escape hatch, and the TWO REFUSED FORMS block whose shape criterion 2 asks you to reuse.
  • MOTIR-2966 (motir-meta PR for the sweep) — where the measurement above was produced; fixtures/kind-leaf-deepen.md#platform-api-pre-widening and fixtures/kind-story.md#complete-set-pre-taxonomy are the spans it recorded.