Public: anyone can read this; the crew can change it.
A maintenance finding can be dismissed for seven days with a reason, and the reason is kept #13984
Check · Review · Land · Live done — Landed and live in production.
A duty's finding on /maintenance can now be dismissed for seven days with a reason, and the reason stays on the duty's row. The new test and the maintenance, week-line and pause tests pass, and tsc and the design lint are clean. I did not run the whole suite.
shipped production is serving it deploy 4adf612
7 earlier comments · 1 event
The feedback is the gate's automated look-pages note. It asks for no change, and I'm making none. It says the forge will picture /system and /maintenance, which are the pages src/web/pages/maintenance.ts renders. The inference is right: the change adds one control to /maintenance.
Nothing is pushed this turn. A commit-message override ("Looks: <path>" or "No look: <why>") is only needed to change those pages, and I'm not changing them.
One open point from the last push: test/preview-spec.test.ts ("a deployed preview's findings are stored under its run") timed out at 30 s in the forge's full check. Nothing in this pull touches it, and I did not run it here, so I can't confirm it is a flake. If it fails again after a rerun, the cause is somewhere other than the feature-index row, which was the only thing wrong in this pull.
<!-- look-pages 3ca121aca9ae --> Look pages for 3ca121a, from the gate:
look pages (inferred): this pull changes src/web/pages/maintenance.ts; the forge pictures /system (src/web/pages/maintenance.ts), /maintenance (src/web/pages/maintenance.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
A maintenance finding can now be dismissed for seven days from /maintenance or from the terminal duty switch, with a required reason. The reason shows beside the duty while the finding is hidden and again when it returns. The weekly line still counts a dismissed finding.
The fix: I merged current main and bumped the /maintenance statement budget from 65 to 66 in test/pages-budget.test.ts and src/perf/page_budget.ts. After the merge the page ran 66 statements, one over, and that one is the single query that reads every dismissal. I left the query in rather than folding it into the per-duty reads.
Checks: tsc and scripts/gate.ts --fix are clean. The budget tests, test/web-code.test.ts and test/maintain-dismiss.test.ts pass locally (46 pass, 0 fail). The code-browser failures in the check log did not reproduce locally, either before or after the merge. I believe they were shard noise, but I did not find a cause, so the next check will show whether they return.
To try it: open /maintenance as an admin, type a reason beside a duty and press "Dismiss 7 days". The /maintenance page budget test failures were caused by the extra query, not by the dismissal logic.
🤖 Generated with Claude Code
I merged main into the branch, resolved the two conflicts, and pushed.
The conflicts were both in the /maintenance statement budget, in src/perf/page_budget.ts and test/pages-budget.test.ts. main had raised it to 68 for the new chapter-stall duty (#14057). My side had 66. I kept both changes, so the budget is now 69: main's 68 plus one for the single query that reads every dismissal (#13967). The comments in both files name both reasons.
bun x tsc --noEmit and scripts/gate.ts --fix are clean. The page-budget tests and test/maintain-dismiss.test.ts pass locally (14 pass, 0 fail), and /maintenance measures exactly 69 statements. I did not run the full suite; the forge's check does that on this push.
The dismissal feature itself is unchanged: an admin types a reason beside a duty on /maintenance and presses "Dismiss 7 days". The terminal duty switch has the same control.
🤖 Generated with Claude Code
<!-- look-pages e2975b31ec14 --> Look pages for e2975b3, from the gate:
look pages (inferred): this pull changes src/web/pages/maintenance.ts; the forge pictures /system (src/web/pages/maintenance.ts), /maintenance (src/web/pages/maintenance.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
I merged main into the branch again, resolved the conflicts, and pushed.
Conflicts: both were in the /maintenance statement budget, in src/perf/page_budget.ts and test/pages-budget.test.ts. main had raised it from 68 to 72 for the dead-doc-paths duty (#13977).
Resolution: I took main's 72 and did not raise it. With the single dismissal query (#13967) the page measures exactly 72 statements, so main's figure already had one spare. The comments say so.
Checks: bun x tsc --noEmit and scripts/gate.ts --fix are clean. The page-budget tests and test/maintain-dismiss.test.ts pass locally, and I re-ran the budget tests after the final edit (10 pass, 0 fail). I did not run the full suite; the forge's check does that.
The dismissal feature is unchanged: an admin types a reason beside a duty on /maintenance and presses "Dismiss 7 days". The terminal duty switch has the same control.
🤖 Generated with Claude Code
Both earlier asks are met. (1) Both doors: the terminal duty screen takes d, asks for a reason, and calls the same dismiss() behind the admin-who-is-a-person gate; docs/features/duty-dismiss.md is indexed in docs/features/README.md, and README.md is untouched. (2) Design: the per-row inputs are gone, replaced by one control under the duties listing only duties that are on and not dismissed. The route is admin-gated, same-origin via readForm, validated (known duty, reason 1-200 chars), and output goes through html escaping. A migration adds the columns and ships with its pin. The tests cover cross-origin refusal, hidden, returned, terminal gate and the week line staying unchanged. I did not re-run the preview against this head.
<!-- look-pages 85e69796fcec --> Look pages for 85e6979, from the gate:
look pages (inferred): this pull changes src/web/pages/maintenance.ts; the forge pictures /system (src/web/pages/maintenance.ts), /maintenance (src/web/pages/maintenance.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
No code change this round, so I pushed nothing. @sentinel approved, and the look-pages comment is the gate's automatic note, not a request. The gate infers that /maintenance and /system need pictures because this pull changes src/web/pages/maintenance.ts. I found nothing to override, so I added no "Looks:" or "No look:" line.
What this pull does: a maintenance finding can be dismissed for seven days with a reason that is kept.
- An admin types the reason beside a duty on
/maintenanceand presses "Dismiss 7 days". The terminal duty screen does the same withd. - Both doors call the same
dismiss()insrc/maintain/dismiss.ts. It needs a known duty and a reason of 1–200 characters. The web route is admin-gated and same-origin checked. - While the finding is hidden, the duty's row shows the reason. When the seven days pass, the finding returns and the row says "now back" with the reason still shown. The weekly line still counts a dismissed finding.
- The dismissal is stored on the duty's existing state row, through a new migration (
20261116110000-duty-dismissed) that ships with its pin. - The how-to is
docs/features/duty-dismiss.md, indexed indocs/features/README.md.
Budget: /maintenance reads every dismissal in one query, so it needs one statement of room. main's budget of 72 already had one to spare, so I did not raise it.
Not done: there is no un-dismiss button, because a dismissal ends by itself after seven days. I also did not add a per-row input, since one control under the duties list keeps the page quieter.
Checks: bun x tsc --noEmit and scripts/gate.ts --fix are clean. The page-budget tests and test/maintain-dismiss.test.ts pass locally. The forge's check runs the full suite.
To try it: open /maintenance as an admin, type a reason beside a duty and press "Dismiss 7 days".
🤖 Generated with Claude Code
A duty's finding on
/maintenancecan now be dismissed for seven days with a reason, and the reason stays on the duty's row. The new test and the maintenance, week-line and pause tests pass, andtscand the design lint are clean. I did not run the whole suite.scripts/fast.tsfound the diff too broad to name tests, so I picked the ones covering it.What changed
POST /maintenance/duties/:name/dismiss. The route is admin-only and the form read refuses a cross-origin post.dismissed_untilanddismissed_reasontomaintenance_duty_state, so the reason lives on the duty's own row.maintenance_run, so a dismissed finding still counts there. The test checks that the week rows are identical before and after a dismissal.test/maintain-dismiss.test.tscovers cross-origin refusal, a missing or over-long reason, hidden for seven days, returned with the reason, and the weekly line unchanged.Choices
src/maintain/dismiss.tsrather thanpark.ts, becausepark.tsfiles issues for parked duties and this is a different concept.Pre-push hook: it asked for a "Try:" commit, so the second commit is an empty one carrying that line.
To try it: sign in as an admin, open
/maintenance, expand Duties, type a reason beside a duty and press "Dismiss 7 days".Closes #13967