Public: anyone can read this; the crew can change it.

The maintenance board shows each worker's last run time and result as one row #13313

opened this

Merged 20d 4h ago, live in production

Each worker's row on the maintenance board now shows its last run time, a result word (ok, failed or parked) and how long that run took. I ran bun x tsc --noEmit, bun scripts/gate.ts --fix, bun scripts/design-lint.ts, and test/maintain-week-line.test.ts, test/maintenance-week-doors.test.ts and test/mcp-size.test.ts.

Notes

opened this

Each worker's row on the maintenance board now shows its last run time, a result word (ok, failed or parked) and how long that run took.

I ran bun x tsc --noEmit, bun scripts/gate.ts --fix, bun scripts/design-lint.ts, and test/maintain-week-line.test.ts, test/maintenance-week-doors.test.ts and test/mcp-size.test.ts. All passed. I did not run the full suite, and I did not start the app to look at the page.

  • What the words mean:
    • parked means the worker's duty is switched off (paused by a person or after three errors in a row), and it wins over the other two.
    • Otherwise failed means the last real run did not come out ok. A budget stop does not count as a run.
    • A worker that never ran still reads not yet run.
  • Where it shows: the "Maintenance, last 7 days" section of /system, server-rendered inside the same row, so the layout and row height are unchanged. The result is also on the row as data-result. The terminal screen says the same words, as ok in 4.2 s or parked.
  • MCP: system with kind: "maintenance" now returns result, ms and says per worker. The tool's description is unchanged, so the size ceilings are untouched.
  • Tests: test/maintain-week-line.test.ts has a new test that covers each word and the duration formatting. I also updated its existing expectations and the doors test for the new fields.

I took "/forge/boards maintenance" to mean this section of /system, since there is no board by that name. If you meant a different page, say which.

I did not add a separate page, per-run history or a trend. Durations come from the stored start and finish times.

To try it: sign in as an admin, open /system, and unfold "Maintenance, last 7 days". Over MCP, call system {kind:"maintenance"}.

Closes #13302

2 earlier comments
commented

Each worker's row on the maintenance board now shows its last run time, a result word (ok, failed or parked) and how long that run took.

I ran bun x tsc --noEmit, bun scripts/gate.ts --fix, bun scripts/design-lint.ts, and test/maintain-week-line.test.ts, test/maintenance-week-doors.test.ts and test/mcp-size.test.ts. All passed. I did not run the full suite, and I did not start the app to look at the page.

  • What the words mean:
    • parked means the worker's duty is switched off (paused by a person or after three errors in a row), and it wins over the other two.
    • Otherwise failed means the last real run did not come out ok. A budget stop does not count as a run.
    • A worker that never ran still reads not yet run.
  • Where it shows: the "Maintenance, last 7 days" section of /system, server-rendered inside the same row, so the layout and row height are unchanged. The result is also on the row as data-result. The terminal screen says the same words, as ok in 4.2 s or parked.
  • MCP: system with kind: "maintenance" now returns result, ms and says per worker. The tool's description is unchanged, so the size ceilings are untouched.
  • Tests: test/maintain-week-line.test.ts has a new test that covers each word and the duration formatting. I also updated its existing expectations and the doors test for the new fields.

I took "/forge/boards maintenance" to mean this section of /system, since there is no board by that name. If you meant a different page, say which.

I did not add a separate page, per-run history or a trend. Durations come from the stored start and finish times.

To try it: sign in as an admin, open /system, and unfold "Maintenance, last 7 days". Over MCP, call system {kind:"maintenance"}.

commented

The maintenance board on /system now shows each worker's last result (ok, failed, parked) and its duration beside the last run. I haven't re-run the gate or the tests after this push, so the forge's check on the pull is the first confirmation the gate failure is fixed.

The failed check was the gate's commit-message rules, not the code, so I added one empty commit that satisfies both:

  • Looks: Looks: /system names the page the forge takes before/after pictures of, light and dark.
  • Door: No door: … says the terminal screen (src/tui/screens/maintenanceweek.ts) and the MCP system tool (src/http/mcp/tools/system.ts) already show the same result and duration, and this pull edits both. So I skipped a new docs/features/ how-to.

To try it, open /system as an admin and unfold Maintenance for the last 7 days. Each worker's result and duration sit beside its last run. The same line appears on the terminal's maintenance-week screen and in the MCP system tool.

commented

I updated docs/features/maintenance-week.md to match what this pull adds, and pushed it. The change is docs only. I did not re-run the gate output or the tests, and the forge's check on the push is the first run.

  • The three words:
    • ok means the last run finished without an error.
    • failed means it ended in an error.
    • parked means the worker's switch is off. Parked wins over the other two, and a parked row shows no duration.
  • Budget stops: a run stopped by its budget is not a run, so it never becomes the last result or the duration. A worker that never ran and isn't parked still reads "not yet run".
  • Where they show:
    • Page: /system, with data-result on the row.
    • Terminal: the maintenance-week screen.
    • MCP: the system tool with kind: "maintenance", which answers { name, found, acted, last, result, ms, says }.
  • Duration format: 340 ms, 4.2 s or 3 min.

I left the optional point on the two correlated subqueries in src/maintain/week_line.ts alone. At this size it costs nothing noticeable, and changing the grouped statement would put the already-reviewed query at risk for no behaviour change. It's a fair follow-up if the table grows.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs