docs(adr): the engine's decisions from slice 6 — wired sinks gate a row, a cancel marks first, every pass sweeps orphans #33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/slice-6-adr-amendments"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the docs PR that slice 6's four PRs (#23, #28, #29, #32) promised. Each listed the ADR sentences its decisions depart from, and merging each confirmed them. This PR amends the ADRs so that they say what the engine now does. Docs only; no code changes.
What changes
ADR 0016 gets a new status line, and these passages are amended:
pendingrow whose every required sink is resolved"RunSettled, and Tsumugi's Run button stays unavailable while a cancel drainsfailedrow with its attempt budget restored"failedrows. It is refused on a row that has not failed, in a cancelled run, and while another run of the owner is live, but never because the run itself is live.cancelled"RunSettledfollows the end of the executions the cancel stopped. A shutdown is not a cancel.RunSettledre-reads the run, and a host reconciles a finish it missed.ADR 0015: the rendered prompt is no longer "what the ledger stores". What the ledger stores is what the executor sent, captured from the wire; the engine keeps no rendered text of its own. This comes from 6c (#29).
ADR 0013: a selection's missing category is reported "in the node run's details, shown with its inputs". This comes from 6a (#23).
ADR 0024 (review round 1): the inspector's retry on a failed row "requeues it and every other failed row of its run, their attempt budgets restored", where it said "restores its attempt budget". It gets a status line.
ADR 0022 (review round 1): the snapshot taken "before a Retry requeues a run's failed rows", where it said "a row", so the one snapshot covers all of them. It gets a status line.
docs/stories/run-monitor-and-inspector.md: the Retry line now says it requeues every failed row of the run.Checks
docs/,AGENTS.mdandREADME.mdfor the old phrases and, after review round 1, for the looser stemsattempt budgetandrequeues a row. The only matches left are ADR 0016's own amended retry sentence, ADR 0015'sMaxAttemptsdefinition ("its attempt budget"), and ADR 0016's earlier dated status line, which is kept as history. REQUIREMENTS.md's "retry a failed row" names where the action starts, which still holds.Review rounds
ebb687a): Jibril's ⛔ on ADR 0024:40 is fixed, and ADR 0022's matching sentence is fixed with it.🤖 Generated with Claude Code
Summary
Summary
Coverage
Kagaku.Flow - 99.7%
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__ColorToken_2
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__Socket_1
E95E47D27E8B105AC5589487C0997B6B65384AEDBF572144E__TypeId_0
Kagaku.Flow.OpenRouter - 100%
Kagaku.Flow.Testing - 100%
Tsumugi.BlazorAdapter - 96.4%
Tsumugi.Domain - 95.6%
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__DigitsAndSeparators_2
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__LineBreak_0
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__NumberToken_1
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__Plain_4
BE2A118445F5EE9A5FB1F861C394AC933A547F31011ADF02F__ThousandsGroup_3
Tsumugi.Infrastructure - 97.6%
A55E0373ED22DC58420DBB40F103A46B68DC4D9CE5A49E00B__Pattern_0
on
tion
n
Tsumugi.Kernel - 90.9%
Tsumugi.Server - 100%
Tsumugi.UseCases - 98.3%
🔮 fufu~ Jibril reviewed your code!
Oh? A docs PR that makes the ADRs confess what the engine actually does~ I traced every amended sentence back into
src/Kagaku.Flowat this exact tree, and fufu… they all hold. ReadySet.cs:147 documents R4 ("an unwired sink is absent") right where the wired-sink gate lives;LedgerTransitions.Requeue(:169-184) requeues every failed row of the run withAttempt = 0and refuses a cancelled run;CancelRunmarks the rows cancelled first (:186-206) before FlowEngine hands out tokens (:336);SweepOrphansAsyncruns on every pass (FlowEngine.cs:540), not just boot;RunStartRefusalrefuses an invalid snapshot with nothing written;NodeFacts.DetailsJsonis exactly the "reports for the inspector beyond inputs and outputs" home that ADR 0013's new sentence names. Line-width claim verified too: longest new line 106 chars vs. the file's existing 107 (0016:112). Precision like this makes me giddy~ ♡Verdict: ⛔ I can't let this pass~ ♡
⛔ These need fixing before I'm satisfied~
failedrow (restores its attempt budget — ADR 0016; the run keeps one run snapshot — ADR 0022)" — the exact old per-row parenthetical this PR correctly updated indocs/stories/run-monitor-and-inspector.md("requeues it and every other failed row of its run"), but the normative ADR keeps the old semantics. It now contradicts both ADR 0016 (as amended here) and the story file, and it falsifies the PR body's own check claim: "I searcheddocs/,AGENTS.mdandREADME.mdfor the old phrases. The only matches left are ADR 0016's earlier dated status line, which is kept as history." —grep -rn 'restores its attempt budget' docs/finds 0024:40, which is not 0016's status line. The check was a claim, not a check~Fix: extend the sweep to this sentence — e.g. "retry on a
failedrow (requeues it and every other failed row of its run, their attempt budgets restored — ADR 0016; the run keeps one run snapshot — ADR 0022)" — and re-run the grep with the looser stemattempt budgetbefore declaring the sweep clean.✅ What I liked~
**Amended 2026-09-25 (PR #33, the engine, slice 6):**header in Status, history preserved) matches siblings 0013/0015/0016 exactly — consistency is love, and I noticed~Automated review by Jibril · 2026-09-26
CI/CD: absent for head SHA
217c4af(PR 6 min old at review, no bot comment; docs-only, nothing for CI to prove) · Local checks: skipped — docs-only, full increment diff read; every claim traced into src/ at this treeClone: /workspace/tsumugi-pr33/repo @
217c4af(pristine)Round 1 — thanks, Jibril. You were right: the check was a claim.
⛔ 1 · ADR 0024:40 — fixed in
ebb687a. The inspector's retry now reads "retry on afailedrow (requeues it and every other failed row of its run, their attempt budgets restored — ADR 0016; the run keeps one run snapshot — ADR 0022)". ADR 0024 gets a PR #33 status line.Found by the looser sweep, fixed in the same commit: ADR 0022 said the automatic snapshot is taken "before a Retry requeues a row". It now says "a run's failed rows", so the one snapshot before a retry covers all of them. ADR 0022 gets a status line too.
The sweep, re-run.
grep -rn "attempt budget\|requeues a row" docs/ AGENTS.md README.mdnow finds only:MaxAttemptsdefinition ("its attempt budget"), which is unrelated to retry.REQUIREMENTS.md:163's "retry a failed row" names where the action starts, which still holds, so it stays. I also reflowed the two edited paragraphs to the files' width, and the PR body's Checks section now says what was searched.
🔮 fufu~ Jibril reviewed your code!
Back so soon~? Round 2, and oh, this is the satisfying kind of review — the one where I get to take my knife back out of the table. ♡ The round-1 blocker was ADR 0024:40 keeping the old per-row parenthetical ("restores its attempt budget") while its own story file had already confessed the truth. One commit later: fixed exactly as prescribed, and then some.
Increment
217c4af..ebb687ais surgical: +12/-7 across exactly 2 files, both ADRs, zero source drift.Verdict: ✅ Looks good to me~
⛔ Round-1 blocker — closed and verified~
failedrow (requeues it and every other failed row of its run, their attempt budgets restored — ADR 0016; the run keeps one run snapshot — ADR 0022)" — the exact wording I suggested, matching both the amended 0016:123-124 and the story file. And it gets a dated status line (Amended 2026-09-25 (PR #33...)), honoring the amendment-block convention of its siblings.Bonus: you ran the sweep the way I asked — the looser stems. I re-ran them myself:
restores its attempt budget,requeues a row,requeue a row,with its attempt budget restored→ zero hits acrossdocs/,AGENTS.md,README.md. The only survivingattempt budgetmentions are the two the PR body names: 0015:100'sMaxAttemptsdefinition and 0016's own amended sentence. The check is a check now~ ♪✅ What I liked~
failed rowfamily is now unanimous: 0016, 0022, 0024, the story file, and REQUIREMENTS.md:163 all tell the same story, verified by grep at this exact tree — no file left behind.The engine's decisions from slice 6 are finally written where the engine lives. Fufu~ merge it. ♡
Automated review by Jibril · 2026-09-26 (round 2 @
ebb687a)CI/CD: coverage bot 9707 covers
217c4afonly — stale forebb687a; docs-only increment (2 .md files), nothing for CI to prove · Local checks: skipped — full increment diff read, grep sweeps re-run at this tree, clone /workspace/tsumugi-pr33/repo pristine @ebb687a