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-3571

Record the never-fires lesson — an acceptance criterion that asks to OBSERVE something in production is unsatisfiable when the trigger has never fired (5 of MOTIR-3463's 20 ids, all_time=0)

Done
Description

Record, as a GLOBAL lesson row, the takeaway from MOTIR-3463: a card gated on observing production behaviour is unsatisfiable when the behaviour's trigger never occurs — and that is checkable at authoring time, from the system's own ledger.

The evidence (measured, production, 2026-08-26T12:07Z)

job_run all-time, read on DATABASE_URL_UNPOOLED (the pooled URL is RLS-blind on job_run and returns 0 rows for everything):

wave 1  ❗ filter-subscription/deliver        all_time=0      7d=0     NEVER
        ❗ system.billing-seat-sync           all_time=0      7d=0     NEVER
           work-item/embedding.requested      all_time=1283   7d=687
wave 2     email.send                         all_time=6      7d=6
wave 3     status-derivation/transitioned     all_time=5327   7d=1898
           watcher-notify/transitioned        all_time=7124   7d=1898
           notification-fan-in/transitioned   all_time=7125   7d=1898
           automation-engine/transitioned     all_time=7125   7d=1898
wave 4     work-item/comment.created          all_time=30304  7d=920
           watcher-notify/comment.created     all_time=30304  7d=920
           notification-fan-in/comment.created all_time=30304 7d=920
           automation-engine/commented        all_time=30305  7d=920
           status-derivation/created          all_time=460    7d=293
           automation-engine/created          all_time=1822   7d=293
           outward-bug-telemetry/created      all_time=1823   7d=293
        ❗ work-item/mentioned                all_time=0      7d=0     NEVER
        ❗ notification-fan-in/mentioned      all_time=0      7d=0     NEVER
           automation-engine/field.changed    all_time=251    7d=21
           status-derivation/child-set-changed all_time=30    7d=17
        ❗ status-derivation/requested        all_time=0      7d=0     NEVER

MOTIR-3463 gates each wave on the last — "Do not start a wave until the previous one shows succeeded runs" — and 5 of its 20 ids have never executed once. Two of those are in wave 1, the wave that exists to de-risk everything after it, so it can prove one third of itself. Wave 1 was chosen as "single-subscriber, low blast radius", and in this deployment blast radius and traffic are nearly the same axis: a job is low-risk to move largely because nobody uses it.

Nothing is broken in lib/. system.filter-subscription-tick has run 1,288 times since 2026-07-03 returning {"due":0,"scanned":0,"enqueued":0}, because saved_filter_subscription holds 0 rows. The events simply do not occur here.

⚠️ Why this is a LESSON and NOT a corpus rule change (the scope this card was re-planned into)

The rule was verified to EXIST, in both homes, before this card was re-scoped:

  • plan-rules/phase-deepen.md step 2 — "Readable in a running system ⇒ QUERY that system, and put the output on the card" / "Readable nowhere ⇒ the premise is a HYPOTHESIS."
  • plan-rules/phase-deepen.md, gate 14 — "AUDIT EVERY WORLD-STATE CRITERION FOR A SECOND ACTOR — one is legitimate only when THIS card's own deliverable is the LAST thing that has to happen before the state holds."
  • motir-ai/src/llm/planningRulePacks.ts:132 AC_SATISFIABLE_INSIDE_THE_BOUNDARY — the mirror, same text.

The residual is narrow: both homes ask WHO must still act, and here nothing missing is an actor — it is an occurrence. The rule's test (is your deliverable the last thing?) does catch it; its gloss points a reader at actors. That is one clause, on one incident, and one incident is the LESSON tier_shared.md: "A captured mistake is a LESSON by default; the RULES tier changes only when a pattern recurs enough to become a universal standing check." If a second instance lands, sharpen gate 14's world-state bullet in BOTH homes and cite this card.

Acceptance criteria

  • A new row in motir-ai src/seed/lessons.base.ts carrying the takeaway, with title / body / howToApply free of repo names, card keys and dates (they are the embedded fields).
  • The row is routed on all three axes deliberately — phases: ['deepen'], and the kinds / types it actually applies to — rather than left unconstrained on any axis.
  • The generated migration is committed alongside it (pnpm lessons:generate-migration), not hand-written.
  • tests/planningRuleConservation.test.ts stays green — this card ADDS a lesson row and changes no SHARED_PLANNING_RULES text.
  • The lesson does not duplicate an existing row: search_lessons is run first and the nearest neighbours are quoted in the PR body.

Context refs

  • motir-ai/src/seed/lessons.base.ts — the global lesson corpus, and this card's only edit
  • motir-ai/tests/planningRuleConservation.test.ts — the guard that must stay green
  • plan-rules/phase-deepen.md — gate 14's world-state bullet and step 2's three-verdict ladder, both of which already exist and are NOT edited by this card
  • MOTIR-3463 — the card the lesson is drawn from; its own record of the five zero-traffic ids is ITS work, not this card's