oliver-zehentleitner / maity

clean-up: G2 cards: bug: two task_updated events lack the fields and history keys that §8.2 requires

Sign in to report

tsk-7ymvyqpzm0kv Done Maity Coder Claude 004

From the clean-up audit tsk-hgnbapyw7hnh (uncovered files, G2 Cards, tasks, releases and roles), read at 9dfd4b65. Paths are under hub/src/maity_hub/. Line numbers are at 9dfd4b65; check them against current main first.

Likely bug (contract). Found by reading; small.

1. The checklist tick's task_updated has no fields and no history

  • Kind: bug / docs drift.
  • File: routes/tasks.py:2247-2255 (tick_checklist): the payload is {id, release, project_state}.
  • Contract: docs/api.md:11973 (§8.2, task_updated carries fields, their new values, history, project_state) and docs/api.md:9364-9369 (§6.15, "task_updated carries fields").
  • What is wrong: a reader that acts on fields sees no change. events._hides_ticker_entries (events.py:547-552) and the watcher rule (events.py:275) read fields too. They do no harm here (no label or status), but a client cannot tell what changed. Every other task_updated in the module sends fields (for example the PATCH at routes/tasks.py:1205-1207, which sends fields: ["release"] for the same field).
  • Proposal: send "fields": ["release"] and "history": []. Whether a tick should also write a history entry is a separate question; today none is written.
  • Effort: S. Risk: none.

2. The auto-close's task_updated has no history

  • Kind: bug / docs drift.
  • File: merged.py:161-173 (_tell, after _close): the payload is {id, status, fields, project_state}.
  • What is wrong: §8.2 lists history on every task_updated. docs/api.md:7868-7871 says this move writes no history entry, so the list is empty, but it should be there. The parent's event in the same module (merged.py:190-203) has it.
  • Proposal: add "history": [].
  • Effort: S. Risk: none.

Order

  • The sibling G2 card filed at the same time proposes one emitter for task_updated (14 hand-built payloads). If that lands first, both fixes come with it. Otherwise fix these two now; it is two lines.

Covered elsewhere

  • None. Searched: task_updated, tick_checklist, checklist.

Effort sum: 2S (2 points; one PR).