Skip to content

feat(bus): add --blocked-by to update-task for post-creation blockers - #141

Open
asachs01 wants to merge 1 commit into
mainfrom
feat/update-task-blocked-by
Open

feat(bus): add --blocked-by to update-task for post-creation blockers#141
asachs01 wants to merge 1 commit into
mainfrom
feat/update-task-blocked-by

Conversation

@asachs01

@asachs01 asachs01 commented Aug 21, 2026

Copy link
Copy Markdown

Summary

  • task_1786923653812_76952898 / task_1786773702893_68177835 (two independent filings of the same gap, grower + boss): update-task only accepted --assignee/--project — there was no way to attach a blocked_by edge to a task after creation, even though a task normally transitions to blocked status after it already exists (that's what triggers the transition in the first place). The only workaround was an unstructured log-event ... --meta blocked_by:... note that no tooling reads.
  • Concrete evidence cited in the filings: check-stale-blockers scanning 100+ blocked tasks a night and finding almost none of them checkable, because they carry no blocked_by field at all — this is also what motivated fix(bus): add coverage denominator to checkStaleBlockers summary #140 (coverage denominator), merged/pending ahead of this one per the filing's own ordering argument.
  • Adds --blocked-by <ids> to update-task (comma-separated), and a matching blockedBy?: string[] option on updateTask(). Semantics: additive (appends to the existing list, never replaces it — dedupes ids already present), cycle-checked the same way create-task is (rejects before any write, so a rejected cycle leaves zero partial state), and writes the same symmetric blocks edge on the peer task that create-task does.

Test plan

  • npx vitest run tests/unit/bus/task.test.ts — 71/71 passing, including 8 new tests: basic add, additive-not-replace, dedup, cycle rejection (both a general loop and self-reference), the zero-partial-state regression shape (mirroring the existing createTask cycle regression test), audit log entry, and the exact motivating scenario end-to-end (blocked task with no blocked_by → attach after the fact → checkTaskDependencies can now evaluate it)
  • Updated 2 pre-existing tests whose exact error-message strings changed (task.test.ts, bus-task-error-handling-cli.test.ts)
  • npx tsc --noEmit — clean
  • Full suite regression check — 6 pre-existing failures, all in phase5-performance.test.ts / cron-scheduler.test.ts (timing/timeout under load), matching this repo's documented flaky-under-load pattern; none touch src/bus/task.ts or src/cli/bus.ts

View with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is enabled.

@asachs01
asachs01 force-pushed the feat/update-task-blocked-by branch 4 times, most recently from 94cb751 to 27a5328 Compare August 22, 2026 06:29
blocked_by was only settable at create-task time; a task that transitions
to blocked AFTER creation (the normal case) had no structured way to
record what blocks it, beyond an unstructured event-meta note the
tooling can't read. check-stale-blockers was scanning 100+ blocked tasks
a night and finding almost none of them checkable for exactly this
reason.

Additive (never replaces the existing list), deduped, cycle-checked the
same way create-task is (rejecting before any write), and writes the
same symmetric blocks edge on the peer that create-task does.

Closes task_1786923653812_76952898, task_1786773702893_68177835.
@asachs01
asachs01 force-pushed the feat/update-task-blocked-by branch from 27a5328 to f1a88a7 Compare August 22, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant