Repository navigation
test(dispatcher): drop tests left behind by the #217 label retirement - #235
Conversation
#217 replaced the awaiting, blocked and stuck labels with a derived Status, but the dispatcher tests still carried them: - Two assertions that the plan never adds the `awaiting` label (decide, roadmap). No code writes that label any more, so they could never fail. - `awaiting`/`stuck`/`blocked` keys in the contracts and rerun config fixtures. No source reads `labels.awaiting|stuck|blocked`. - journal-day's "cannot be created" test, a strict subset of the same case in journal.test.mjs, plus the fake's now-unused failCreate option. Item fixtures that carry an `awaiting` label stay: old items still wear it in the wild. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Test-only, 5 files, +3/-13, and the diff is no bigger than the case the body makes: every removal is a reference to the labels #217 retired. I re-derived each claim instead of trusting it, and all four hold. Nothing under workflow/, loop-config.json or dispatcher/*.mjs moves, so no version bump is owed and the next run reads nothing new. One leftover: the PR deletes the stale assertions but keeps the test name that advertised one.
Findings
should-fix—dispatcher/test/roadmap.test.mjs:330: the name still promisesnever marked awaiting, which nothing now checks. See the thread.consider— the**Checked:**line says 450 pass before.origin/mainis 451 and the branch is 450, so "one test removed" only adds up from 451.
What was checked
git diff origin/main...origin/claude/chore-test-cleanup; all 5 files read whole on the branch withgit show.- Vacuity: after #217,
config.labelsis{journal, lock, proposal}, and no path plans a label add beyondL.proposalandL.lock(decide.mjs:908,996,1015,1025,apply.mjs:503,541). Both dropped assertions were unfalsifiable. - Dead keys: grepped
dispatcher/*.mjsandworkflow/lib/forlabels.awaiting|stuck|blockedand for theconst L = config.labelsaliases. No reader survives. - Subset claim:
journal.test.mjs:30asserts the samenumber === 0and/cannot create/, pluspostAnomalyandrefreshTally.failCreatehad no other caller. - Kept fixtures:
act.test.mjs:94anddecide.test.mjs:229,666. At 666,types(p)is asserted whole, so "leaves awaiting on" is still checked. node --test dispatcher/test/*.test.mjs workflow/lib/*.test.mjsfrom a detached worktree: 450 pass on the branch, 451 onorigin/main.- Reviewer profile read. No CI in this repo, and the body carries no preview links.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The name promised `never marked awaiting by the other`, and the assertion backing that promise went with the #217 label retirement in the previous commit. A name that advertises a dropped assertion is the same failure this branch set out to remove: a reader counts it as coverage when nothing can fail. The name now states the one thing left under test — one leg holds the lock, the other fires nothing. The SahajAtlasWeb#256 comment above stays; it is history, not a claim. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYAGuKHbV8X2qhfFBf
|
Addressed the adversarial review. Pushed 4d346d2. Adopted — the test name still promised the assertion this branch dropped. Renamed to Fixed in the body — the Branch was already on the current base, so nothing was merged. Lean gate passes from the checkout and from a 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Removes dispatcher test code that stopped meaning anything when #217 retired the
awaiting,blockedandstucklabels. Test-only; no skill, hook, config or dispatcher source changes, so nothing the next run reads moves.Failure this prevents: assertions that cannot fail read as coverage. A reader trusts
!add.includes('awaiting')as a guard when nothing can add that label any more, and the stale fixture keys suggest the dispatcher still readslabels.awaiting.decide.test.mjs,roadmap.test.mjs: drop one vacuousawaitingassertion each. The rest of both tests stays.roadmap.test.mjs: rename the test that assertion was named for, to the one thing it still checks —a goal created with its type is locked by one leg, and the other fires nothing. A name advertising a dropped assertion is the same failure as the assertion. The SahajAtlasWeb#256 comment above it stays: history, not a claim.contracts.test.mjs,rerun.test.mjs: drop theawaiting/stuck/blockedconfig keys.grepfinds no reader indispatcher/*.mjs.journal-day.test.mjs: drop "a journal that cannot be created…", a strict subset ofjournal.test.mjs's same case, and the fake's now-unusedfailCreateoption.awaitinglabel (old items still wear it).Part of a test audit across all five repos. No migration tests exist here:
SCHEMA_VERSIONhas never moved past 1, and the one-shotdocs/rollback/migrate-to-lifecycle.mjshas no test.Checked:
node --test dispatcher/test/*.test.mjs workflow/lib/*.test.mjs— 451 pass onmain, 450 pass on the branch (one test removed).claude plugin validate ./workflow --strict && node --test workflow/lib/*.test.mjspasses from the checkout and from a.claude/worktrees/worktree.🤖 Generated with Claude Code