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

Planning bug: a bug card filed mid-run asserted an ORM reader nobody grepped, and promoted that mechanism into two acceptance criteria that cannot be satisfied

To Do
Description

Filed by motir run MOTIR-3852, 2026-08-28, on the card it was dispatched to run. The correction is already submitted as a plan; this is the defect RECORD.

The defect

MOTIR-3852 was filed mid-run by motir run MOTIR-3819 from a real, well-evidenced observation: get_work_item 500-ed tenant-wide, with the verbatim Prisma error and a reproducible OK/500/OK timeline. That half is excellent.

Its title, its diagnosis and two of its five acceptance criteria then asserted a MECHANISM nobody had looked for"a delivery reader still selects the dropped github_pull_request.work_item_id" — and asked the run to name that selection at its file and line (AC 2) and write a failing test that reproduces it (AC 3).

No such selection exists, and none could. On origin/main af09f8ed5 the GithubPullRequest model declares no workItemId field, and git grep -n "github_pull_request.work_item_id" returns only docs/decisions/*.md prose plus one historical comment in components/github/DevelopmentSection.tsx:344. AC 2 and AC 3 are unsatisfiable, and AC 1 — the terminal condition — was already true before any work began.

The card even named the true cause and did not follow it. Its own The mechanism section offered two arms, "a select / include that reaches through the relation to the retired scalar" or "a generated client the deploy did not replace", and every criterion was written for the first. The second is what happened.

What the criteria should have said

The Deploy to Fly job on run 33218107466 ran 23:12:13Z → 23:18:37Z; release_command applies prisma migrate deploy "before any new machine takes traffic" (scripts/release-migrate.mjs). The drop landed while the pre-4466ea7ff image was still serving, and that image's GithubPullRequest model declared the column — so a bare relation include (WITH_PR = { pullRequest: true, repo: true }) selected it. The reader was the model declaration, which no field-name grep can find.

The rules this violated

  • kind-bug.mda mechanism the card says must be MEASURED may not motivate an acceptance criterion. The card listed two candidate mechanisms and made only one of them binding. Asked of each criterion, "is this owed under EVERY hypothesis?", AC 2 and AC 3 answer no.
  • phase-deepen.md's asserted-ABSENCE / claim-vs-pointer gate"a delivery reader still selects X" is a code fact stated as existing, and the card names its own target, so that name IS the grep. It was not run.
  • core.md gate 13(d) — a card asserting a DEFECT IN something must reproduce it by the consumer-side route. Read across from a published artifact to a deployed one: the premise is that a RELEASED thing is broken, and the whole evidence column was source-tree reasoning.

Acceptance criteria

  1. The corrected shape is approved or declined by a person, and this card records which — the plan cmtdlxb7000gbhvphodt9pfdd (re-scoped MOTIR-3852, a SCHEMA-ONLY card, its deploy gate, and a re-scoped MOTIR-3803).
  2. The lesson is recorded and its route is named — global (a curated row in motir-ai src/seed/lessons.base.ts plus its generated migration) or tenant (add_lesson), with the reason for the scope choice.
  3. No plan or code change is asked of this card. It is a record; its remedy is the plan above, and closing it is confirming (1) and (2), not building anything.

Context refs

  • MOTIR-3852 — the card this is about, now re-scoped on the record.
  • MOTIR-3803 / MOTIR-3818 — the sibling pair carrying the same latent defect, swept in the same plan.
  • MOTIR-3757 — the drop, 4466ea7ff, that shipped the field removal and the DROP COLUMN together.
  • GitHub Actions run 33218107466, job Deploy to Fly — the timings that bound the outage.

Why there is no blocked_by edge

The provenance edge to MOTIR-3852 is relates_to only, deliberately. This card CONSUMES nothing that card produces — the correction is already submitted, and no criterion here reads substrate living on an unmerged branch. core.md gate 4's same-key limb is checked and does not fire.