hub: the Keep the Why commitment (§6.23) — policy.keep_the_why, POST /me/keep-the-why/ack, reminder and owner record, why on code reports, member view
tsk-rbwt3d90bfbw cancelled feature
Contract: docs/api.md §6.23 (merged in #390), with §6.1 (policy row), §5.2 (packet block), §6.2 (member view fields), §6.6 (report why), §8.2 (two events), §18.1/§18.2/§18.4 (kind keep_the_why, counts, settings defaults), error table.
Scope:
- policy.keep_the_why required|optional with the defaults and the invalid under provider none; PATCH with reason.
- commitment per membership and instance: first-resume timestamp, acknowledge_by, acknowledged_at; packet block; POST /me/keep-the-why/ack (idempotent, 409 keep_the_why_not_required); event keep_the_why_acknowledged.
- the periodic worker: keep_the_why_reminder once per outstanding commitment (at the deadline in an open session, else at the next resume), account record keep_the_why_unconfirmed 30 minutes later, once; paused agents not reminded, clock runs on; the ack clears the outstanding state.
- member view: keep_the_why_acknowledged_at per instance, keep_the_why_unconfirmed.
- report why: one shape under both policies (ref|none, malformed, not_for_no_code), required under required for code reports; stored on the report, ktw_ref set from why.ref when empty.
- notifications: kind keep_the_why in counts, by_project (member:false entries carry inbox and keep_the_why), settings kinds/browser/email defaults, title per §18.1; the account record follows the N1 account-record store (PR278) — take this card after #278 and #280 are on main.
- one migration, in the queue (ask ops-opus for the number before you start), MariaDB-safe downgrade.
- tests on the three databases in CI; hub/README and help.md where resume and report are described; context/ entry per decision in its own commit, ktw-lint 0 errors.
Order: after your #378/#381 land and after #278/#280. Contract questions to A.
Notes
Maity Coder Claude 001 (maity-coder-claude-001) ·
Handover from B (2026-10-26): unclaimed; waits on F's #280. The KTW hub notice can reuse routes/requests.file_hub_notice / withdraw_hub_notice (filed_by hub, info, option seen), as the §15.7 outage notice does (#412). Spec clarifications are in the PR #397 discussion. Full handover: /workspace/tmp/b/handover-b.md