Skip to content

kanban: the terminal-status set (cancelled/failed) has no test that bites #2088

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 43b662f1ccbe42cdaa7cecd4225ac2f8
Branch: dev/3-kanban-terminal-statuses
Base: fca35af
At: 2026-11-02T00:49:41Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment.

Written-by: FlyBot Lead

What happens today

core/src/client/kanban.js decides when a Done card finished from a set of terminal actor statuses:

  • :123 const TERMINAL_STATUSES = new Set(['accepted', 'cancelled', 'failed'])
  • :125-126 const terminal = (task?.actors ?? []).find(entry => TERMINAL_STATUSES.has(entry?.status)) → terminal.at is the stamp

Nothing in core/test/kanban.test.js pins that set. The only stamping case (:671, a Done card says when it finished, from the first terminal actor entry) uses an accepted entry, so a card that was cancelled or failed can lose its finish time while the file stays green.

Measured on live main fca35af6f29a10214f239b78a2087b82845ba4ce, sources unchanged except the set:

const TERMINAL_STATUSES = new Set(['accepted']);

→ core/test/kanban.test.js 21 tests / 21 pass / 0 fail, exit 0, three runs identical. The cancelled/failed halves of the set can be deleted with a fully green file.

Reproduction

  1. Check out live main fca35af6.
  2. Narrow TERMINAL_STATUSES to ['accepted'] (or remove cancelled, then failed, one at a time) and run node --test core/test/kanban.test.js — all 21 original cases stay green.
  3. Remove cancelled from COLUMN_OF instead: the card is not drawn in Done at all and no case notices.
  4. Add blocked to TERMINAL_STATUSES: a card still in progress is stamped with a "finished" time and no case notices.

With the new cases present, the same mutations are bitten (25 / 23 / 2 for the shrink, 25 / 24 / 1 for each single-status mutation), so the case is the fix.

Expected behaviour

  • A cancelled card in Done says when it was cancelled (its own terminal actor entry), not updatedAt.
  • A failed card in Done says when it failed, likewise.
  • blocked and result-ready are not terminal: the card stays In progress and gets no finish stamp.
  • A non-terminal actor entry that sorts earlier does not take the stamp from the terminal one.

Scope

  • core/test/kanban.test.js (new characterization cases only) and its generated mirror patches/ds-bot/files/test/kanban.test.js, kept byte-identical to each other.
  • core/src/client/kanban.js and core/src/client/task-board.js are not changed: the behaviour is correct today, this issue adds the cases that bite when it regresses.
  • No changelog fragment and no subsystem doc: nothing user-visible changes.
  • The rail/counts region of the same test file is out of scope (#2086 / PR Test that the board rail counts the list the board draws #2087 adds its case around :435); this adds cases elsewhere in the file, no source file is shared.

Gates

  • Red-first on the PR base, three identical runs: the shrink reds the new cases; the unmutated file is fully green.
  • Per-mutation arms for cancelled, failed (both the set and COLUMN_OF), blocked, result-ready, claimed.
  • TZ=UTC ARCH_DOCS_BASE=<base> npm run verify exit 0, > ok 10 patches apply cleanly in order, > ok core/ equals ds-bot/ + patches/ds-bot/, > build-client --check green, generate idempotent.
  • Tier T1, effort XS (test-only, two mirrored files).

Duplicates

Searched live main and the issue tracker: TERMINAL_STATUSES appears only in #2077 (merged; the change that introduced the set) and #2066 (the original missing-stamp defect, closed). Closed-match also #1289. No open issue or PR covers the cancelled/failed coverage gap; the rail-counts gap next door is #2086.

Activity

  1. HugoXK commented on Nov 2, 2026

    @HugoXK
    ContributorAuthor

    Release

    Written-by: FlyBot Lead
    Released: 43b662f1ccbe42cdaa7cecd4225ac2f8
    Reason: Work merged; issue closed.
    At: 2026-11-02T02:14:58Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions