Planning bug: the `AgentRun` collision was RECORDED and not removed — the name shipped into the plan anyway, and a year's drift made it three-way
RECORD card — no PR. Captures a planning defect found on 2026-08-29 while re-planning the agent-runs foundation. The corrective plan is already submitted; this exists so the mistake is in the corpus, and because it carries one question the re-plan did not settle.
What was wrong
The defect is not that a name collided. It is that the collision was DIAGNOSED, WRITTEN DOWN, and then adopted.
MOTIR-1801 (done) recorded, on 2026-07-28, that AgentRun named two different tables in two different repositories. It was a correct and careful finding. The remedy it chose was to document the distinction: the story body gained a section on the collision, and the schema card gained a bolded ⚠️ block stating that AgentRun already meant a metering aggregate in motir-ai — followed by a decision to use AgentRun for the motir-core execution record anyway.
Nothing downstream could hold that. Readiness is computed from edges, statuses and fields; a warning paragraph is none of those, so the card was ready, valid and advisory-clean with its own hazard printed inside it.
Then the world moved and the collision became three-way. Between that card and the re-plan, the Inngest retirement (MOTIR-3418) landed motir-core's own Postgres job engine, whose ledger is JobRun, with JobStep, JobEvent, JobRunDlq and JobQueueRun beside it. So the schema card, had it been dispatched, would have added a third run noun to one schema.prisma, beside a fourth of the same name across the open-core boundary.
Cost of the late catch: three models renamed (DispatchRun / DispatchRunCard / DispatchRunEvent), six card bodies rewritten, and every reference to the old name re-verified. The cost at authoring time was one word.
The second defect the same card carried, same shape
The same schema card gave the run record a prUrl column at a moment when pull requests already had an owner in the schema. Motir has since built a whole delivery SET around that owner (MOTIR-3655), published with its CI verdict (MOTIR-3697). A second copy on the run row is a duplicate source of truth for the fact two surfaces render side by side. Also corrected by the re-plan; noted here because it is the same failure — a card that knew what it was doing and did it anyway — on the duplicate-write axis rather than the naming one.
Second occurrence, not third — stated so the count is honest
Under this container, this is the second bug card about the AgentRun name: MOTIR-1801 and this one. Two is a coincidence; three is evidence about the design. The repeat-defect trigger has not fired, and this card does not claim it has — but the two occurrences are not independent, because the second one is the first one's chosen remedy failing, which is worth more than an ordinary second sighting.
The still-open question the re-plan did NOT settle
A tenant lesson was recorded ("Recording a hazard in a card's body is not removing it"). Whether the RULES tier should also gain a limb is open, and it is a real question rather than a formality, because the pattern now has three observed axes:
- the repo axis —
kind-leaf.md's A CARD THAT DECLARES ITS OWN SPLIT IN PROSE HAS NOT SPLIT, already written; - the design axis — the same file's the other card must be OTHER, already written, and which explicitly says "a reader who has met one is owed the other";
- the naming axis — this card, not written anywhere.
The corpus already teaches (1) and (2) and predicted that a third would appear. If the answer is yes, it is a two-homes change and therefore two files, not one: prompts/plan-rules/kind-leaf.md in motir-meta teaches the manual planner, and SHARED_PLANNING_RULES in motir-ai teaches the shipped one — a rule in one home teaches one planner. That is a card, not a paragraph in this record, and filing it is the disposition this bug is asking for.
Acceptance criteria
- This record exists under the planner-bug home,
relates_tothe story it was found in, with the defect, its cost and its second-occurrence count stated. (Satisfied by this card.) - The tenant lesson is recorded and reachable by
search_lessons. (Satisfied — recorded 2026-08-29, sourceRefMOTIR-1789 re-plan 2026-08-29.) - The open question is dispositioned by a decision written HERE, in one of exactly two forms: either (a) a sibling card is filed that adds the naming limb to BOTH rule homes, and its key is cited in this body; or (b) a sentence in this body says the RULES tier is deliberately NOT changed, and why the tenant lesson is sufficient. Silence is not a disposition — this card is not
donewhile the question is open and unanswered.
Context refs
- MOTIR-1801 — the first record of this collision, and the card whose chosen remedy this bug reports as insufficient.
- The agent-runs story — where the defect was found, and the plan that corrects it.
- MOTIR-3418 — the Inngest retirement that landed
JobRunand made the collision three-way. - MOTIR-3655 / MOTIR-3697 — the delivery set, the owner of the pull-request fact the schema card duplicated.
motir-meta/prompts/plan-rules/kind-leaf.md— the two limbs already written (the repo axis and the design axis);motir-aiSHARED_PLANNING_RULES— the second home any rule change owes.
Comments (0)
No comments yet — be the first to weigh in.