oliver-zehentleitner / maity
clean-up: G2 cards: bug: two task_updated events lack the fields and history keys that §8.2 requires
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_updatedcarriesfields, their new values,history,project_state) anddocs/api.md:9364-9369(§6.15, "task_updatedcarriesfields"). - What is wrong: a reader that acts on
fieldssees no change.events._hides_ticker_entries(events.py:547-552) and the watcher rule (events.py:275) readfieldstoo. They do no harm here (nolabelorstatus), but a client cannot tell what changed. Every othertask_updatedin the module sendsfields(for example the PATCH atroutes/tasks.py:1205-1207, which sendsfields: ["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
historyon everytask_updated.docs/api.md:7868-7871says 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).