Repository navigation
Commit 7166f5a
authored
Pin every terminal status the board reads in the kanban suite (#2090)
Fixes #2088
Written-by: Dev-3
Owner: Dev-3
Reviewer: Birfy
Claim-Id: 43b662f1ccbe42cdaa7cecd4225ac2f8
Branch: dev/3-kanban-terminal-statuses
Base: fca35af
Tip SHA: fa76ec7
## What happens today
`finishedAt` in `core/src/client/kanban.js` stamps a Done card from the
first entry in `task.actors` whose status is in `TERMINAL_STATUSES`
(`accepted`, `cancelled`, `failed`), and `columnOf` in
`core/src/shared/task-board.js` maps those same three statuses to Done.
The suite only ever exercised `accepted`: narrowing the set to
`['accepted']` on live `main` left `core/test/kanban.test.js` at **21
tests / 21 pass / 0 fail**, three runs identical. A `cancelled` or
`failed` card could lose its finish time — or leave the Done column —
with the file green.
## The change
Two files, **+98 / −0**, the mirror byte-identical to the source test.
No implementation change: the behaviour is correct today, this pins it.
- `core/test/kanban.test.js` (+49): four characterization cases.
- `a cancelled card is terminal: it sits in Done and says when it was
cancelled`
- `a failed card is terminal: it sits in Done and says when it failed`
- `a blocked or result-ready card is not terminal and stays In progress`
- `a non-terminal actor entry does not end a Done card, even when it
comes first`
- `patches/ds-bot/files/test/kanban.test.js` (+49): what `generate`
writes.
No source, doc or changelog change: nothing user-visible changes.
## Red first
On base `fca35af6`, sources unchanged except `TERMINAL_STATUSES`
narrowed to `['accepted']`:
- original 21 cases only → **21 / 21 / 0, exit 0**, three runs identical
— the gap: the set can lose two statuses silently.
- with the four new cases → **25 / 23 / 2**, three runs identical. The
two red cases are #22 (`a cancelled card is terminal…`) and #23 (`a
failed card is terminal…`), each failing `'1 min' !== '2 h'` (the stamp
fell back to `updatedAt`).
- set restored, new cases present → **25 / 25 / 0**, three runs
identical.
Seven mutations, each applied alone on `fca35af6` and reverted to 25/25
before the next:
| mutation | result | case that bites |
| --- | --- | --- |
| `cancelled` out of `TERMINAL_STATUSES` | 25 / 24 / 1 | #22 `a
cancelled card is terminal…` |
| `failed` out of `TERMINAL_STATUSES` | 25 / 24 / 1 | #23 `a failed card
is terminal…` |
| `cancelled` out of `COLUMN_OF` | 25 / 24 / 1 | #22 (`a cancelled card
is drawn in Done`) |
| `failed` out of `COLUMN_OF` | 25 / 24 / 1 | #23 (`a failed card is
drawn in Done`) |
| `blocked` added to `TERMINAL_STATUSES` | 25 / 24 / 1 | #25 `a
non-terminal actor entry does not end…` |
| `result-ready` mapped to Done | 25 / 24 / 1 | #24 `a blocked or
result-ready card is not terminal…` |
| `claimed` added to `TERMINAL_STATUSES` | 25 / 24 / 1 | #25 `a
non-terminal actor entry does not end…` |
## Verified
`TZ=UTC ARCH_DOCS_BASE=fca35af6f29a npm run verify` → **exit 0**: core
**2561**, social 541, tree 127, timeline 135, workflow 336,
`.github/scripts` 575, interop 37, live-e2e 24 (4336 tests, 0 fail);
core lint **73 warnings / 0 errors**; `arch-docs: OK (2 changed
file(s))`; `ok 10 patches apply cleanly in order`; `ok core/ equals
ds-bot/ + patches/ds-bot/`; `build-client.mjs --check` green. `generate`
ran twice and the second run left `git status --porcelain` empty.
## Which tree the checks ran on
One commit, single parent. Local commit
`95a1c56e2b2c5d65610097b0c2efaac1d2bb019a`, tree
`6f1ce5cb955940a7a1898680f4cda9546f59b0fc`, parent
`fca35af6f29a10214f239b78a2087b82845ba4ce`. The pushed head
`fa76ec79a007a8f718810afe5498d552af276813` was rebuilt from that tree by
the push path, so its sha differs while its tree does not; `checks.at`
names the pushed tip, which is what CI reads.
## Not run
The smoke test (nothing under `core/index.js` or `core/src/host/`
changed) and the packaged Desktop install path.
## Checkpoint
<!-- flybot:checkpoint -->
```json
{
"pr": 2090,
"claim": "Dev-3",
"issue": 2088,
"summary": "`finishedAt` stamps a Done card from the first terminal entry in `actors` and `columnOf` maps accepted, cancelled and failed to Done, but the suite only exercised `accepted`: narrowing the set to `['accepted']` left all 21 cases green. Four characterization cases now pin cancelled and failed as terminal (each stamping from its own entry), blocked and result-ready as not terminal (still In progress), and a non-terminal entry sorting earlier as not taking the stamp. Two of them fail when the set loses cancelled or failed, and seven single mutations each red exactly one case.",
"files": [
"core/test/kanban.test.js",
"patches/ds-bot/files/test/kanban.test.js"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=fca35af6f29a npm run verify (core 2561, 0 fail); node --test core/test/kanban.test.js 25/25 x3; 7 mutations each 25/24/1",
"result": "green",
"at": "fa76ec79a007a8f718810afe5498d552af276813"
},
"next": "none — ready for review"
}
```
<!-- /flybot:checkpoint -->1 parent c00fc87 commit 7166f5a
2 files changed
Lines changed: 98 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
0 commit comments