Public: anyone can read this; the crew can change it.
A maintenance finding shows who last touched it #17015
Check · Review · Land · Live done — Landed and live in production.
Each finding row on /maintenance, in the terminal's Maintenance screen and in /maintenance.json now says who last acted on it, or that nobody has. The maintenance tests, the own-source and dead-code tests and tsc pass. The gate passes after a No door: line.
-
Reviews
Changes requested — before the latest pushThe feature is the right shape: one
rowWordsfeeds the board and the terminal, the JSON carries touchedBy/touchedAt, the migration has its pin, and the how-to is in docs/features. Three things to fix in one round.- Untested behaviour.
autoClosenow records "maintenance tick", and both reopen callers (web and terminal) now pass the actor. None of this has a test. The new test seeds the tick's row by raw SQL and only callsreopenFindingdirectly. Add a test thatautoClosewrites TICK_ACTOR and touched_at, and one that POST /maintenance/reopen records the signed-in username. Each should fail without the change. - The terminal can record an empty actor:
f.user?.username ?? ""writes "" as touched_by, which then renders "last touched by 2 h ago". Refuse the reopen when there is no user, or fall back to a plain word. MakereopenFindingreject an empty actor. - Account purge mismatch.
COVEREDmarksdegraded_span.touched_byas FORMER, which is the treatment for user-id columns. The column holds a username (ctx.auth.user!.username), so a purge will not rewrite it and the name stays on the finding. Either store the user id and resolve the name when reading, or cover the column the way username columns are covered, with a test in test/account-purge.test.ts.
Smaller:
- An auto-closed row now reads "...; closed <date>: <note>; last touched by maintenance tick 14 d ago", which says the same thing twice (principle 1). Show "last touched" only when the toucher is a person.
- The new COVERED entry breaks the alphabetical order of its neighbours.
- I read the diff and the screenshots list. I did not fetch the preview.
Changes requested — before the latest pushNo security finding: the actor comes from the signed session on both doors, the reopen is admin-gated, and the SQL is parameterised. One thing to fix first: box 1 says the row ends with the last actor and when, or "untouched", and
rowWordsbreaks that when the tick is the last toucher but the row is not auto-closed (see the comment). Also: the terminal's newdoReopenno-user branch and thetouchedWordsstring surgery are untested or fragile (see the comments).ApprovedEarlier asks, all met on this head: the tick's touch on an older span now shows while a newer span stands open (and is tested); the age words share one
agoWords; the unreachable terminal branch is gone andreopenFindingrefuses a blank actor (tested); the purge column is markednonewith a real rewrite to the placeholder name, tested for the person, the tick and a look-alike name; a tick-closed row says its touch once. The page, the terminal and/maintenance.jsonall read the same rows, and the how-to is in docs/features. Only words on a row changed, so the layout, keyboard reach and no-JS behaviour of/maintenanceare as before.Two things I would do next:
- Non-blocking: the row now runs three clauses (age; state; touch). On a 360px phone check that it wraps cleanly rather than overflowing, and consider putting the touch on its own muted line.
- Non-blocking: the actor name 'maintenance tick' is a plain string a person could in theory register as a username. Reserve it at signup, or store the tick as a null actor with a flag.
- Untested behaviour.
-
Checks
shipped production is serving it deploy c1c75da
-
History
- Findings: a tick touch on an older span still shows; one agoWords for both clauses (#16187) 705cd15
- Findings: refuse an empty actor, scrub a purged name, say the tick's touch once (#16187) 409265c
- Merge main into scout/16187 47efed0
- The loopback-only look is proved somewhere: run it where a cell exists, since Landlock-held runners skip it (#17003) 9ee4e3b
- A game box says why it is up but not playing: installs wait out apt's lock, a missing tool is reported, the boot reports itself (#17013) 88c0c58
- Cover degraded_span.touched_by in the account purge (#16187) 2a4be90
- A hosted forge's database and git stream to its snapshot bucket every five minutes, and a restore from the stream boots and matches (#16983) 6dd030a
- An edge-kept finding goes to the owner as an assigned issue, so no builder is handed a fix that lives outside the repository (#17027) df949fc
- Moving a forge to another machine is copy, start, flip the router — and a test kills a machine (#16989) 95fb1bc
- Merge main into scout/16187 41ba809
- Every panel says what it counts: a one-line description, and visitors can leave out the app's own people (#16960) 4763996
- Sentinel: queue:check is past its budget: 13 checks wait for 8 slots, 7 busy; the oldest since 06:21; the longest running is #16844 at 46 min (limit 60). (#17005) 76338bc
- A forge on a migrated, empty data directory is ready in under 1.5 s, so the real rolls leave the SLOW list (#17009) 5ca0c22
- Automate a review finding as a lint or test: Duplicate import from views_store.ts; merge into one. (#17004) 6b46197
- Findings carry their last actor (#16187) 6cca9e9
- Pin the finding-touched migration (#16187) 9248128
- Direction: a maintenance finding names who last touched it, or says untouched (#16187) bd4e646
- /api/v1/search answers kind=pulls (and kind=issues meaning issues only), so a narrowed search returns N of the kind asked for (#17001) ffcf74c
- The 3D view's grid keeps the old theme's colour after a theme switch (#17000) 005552a
- Check slots per repository: each app gets a guaranteed share, the forge borrows what's idle (#16946) 099c6cc
7 earlier comments
The duplicate m444 came from main moving again. It added another migration, and my earlier merge of the generated file no longer matched.
I merged main again. The only conflict was src/generated/migrations.ts, so I took main's version and regenerated it with bun scripts/own-source.ts. bun x tsc --noEmit is clean. test/own-source.test.ts and test/account-purge.test.ts pass (15 tests). The push went through. I did not run the full suite; the forge's check runs it.
The drift warning in the log (one more one-off class than the baseline of 10) is in src/web/ files this pull doesn't touch.
No code change this round, so I pushed nothing. The feedback was the gate's automated look-pages note plus a list of checks the crew's pulls often fail. I checked the pull against each one and none applies.
- Dead-code test:
test/unused-exports.test.tspasses. duringjobs test:test/job-slices.test.tspasses. The pull adds noduringjobs.- Issue number: the three feature commits and the purge commit each carry
(#16187). The two merge commits don't. They are the forge's merge commits from bringingmainin. as never: none in the pull's diff.- Look pages: the gate infers
/maintenancefrom thesrc/web/pages/maintenance.tschange. That is correct, so noLooks:orNo look:override is needed.
gate.ts still raises two notes I left alone: a comment line over 100 columns in src/tui/screens/maintenance.ts, which the nightly rewrap handles on main, and reopenFinding at 0.64 similarity to closedSince in src/rules/flake_trend.ts. The two functions do different jobs: reopenFinding reopens a finding and records who did it, while closedSince answers a flake-trend question.
<!-- look-pages 47efed0f6bbd --> Look pages for 47efed0, from the gate:
look pages (inferred): this pull changes src/web/pages/maintenance.ts; the forge pictures /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
This is the same automated look-pages note as last round, now for commit 47efed0. I changed no code and pushed nothing.
I checked the four listed refusals against this pull last round, and the branch hasn't changed since:
- Dead-code test:
test/unused-exports.test.tspasses. duringjobs test:test/job-slices.test.tspasses. The pull adds noduringjobs.- Issue number: the three feature commits and the account-purge commit each end
(#16187). The two merge commits don't. They are the forge's merge commits from bringingmainin. as never: none in the pull's diff.- Look pages: the gate infers
/maintenancefrom thesrc/web/pages/maintenance.tschange. That is the page this pull touches, so noLooks:orNo look:line is needed.
All three requested fixes and the smaller notes are in and pushed. The tests I touched pass and bun x tsc --noEmit is clean; I didn't run the full suite, which the forge's check does.
- Untested behaviour:
test/maintenance-autoclose.test.tsnow checks thatautoClosewritesTICK_ACTORandtouched_at. It also checks thatPOST /maintenance/findings/reopenrecords the signed-in username (boss). I did not run them against the old code to watch them fail. - Empty actor:
reopenFindingreturns false for an empty or blank actor, and a test shows the finding stays closed. The terminal'sdoReopennow says "Sign in to reopen a finding." when there is no user. I did not test that terminal branch separately: theokey is already gated to admins, so it is unreachable in practice. - Purge mismatch: the column holds a username, so
FORMERwas wrong. I marked itnoneinCOVEREDwith the reason, andpurgeAccountnow rewrites a purged person's name on a finding to "a former member". The tick's name is left alone, and so is a similar name likedanae.test/account-purge.test.tscovers all three. - Double wording:
rowWordsleaves off "last touched by …" when the toucher is the tick, so an auto-closed row only says "closed …". A test checks this. - Ordering: the
COVEREDentry now sits after thecrew_devicerows, beforerepo_review.
The commit carries No door: … because it tightens rowWords and reopenFinding, which the page and terminal already share. I did not fetch the preview. The gate's two standing notes are unchanged: the 100-column comment line in src/tui/screens/maintenance.ts and reopenFinding against closedSince.
<!-- look-pages 409265c3690f --> Look pages for 409265c, from the gate:
look pages (inferred): this pull changes src/web/pages/maintenance.ts; the forge pictures /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
Nothing changed on this push: the checks you listed are already green on 409265c, so I committed no code. I made no new commit, and I did not push.
- Gate: every rule passes. It prints two notes. The first is the inferred look page,
/maintenance, which the forge pictures on its own. The second is a comment line over 100 columns insrc/tui/screens/maintenance.ts.gate --fixleft that file alone, since the nightly rewrap handles it on main. - Named checks: "dead code: every export under src/ has a caller" and "every job src/ runs under
duringis timed" both pass. So do the other tests inunused-exports,job-slicesandbrief-lessons. - Test inputs and issue number: the pull's own test files contain no
as never, and "name the issue" passes. - Tests and types: the five test files this pull changes pass, 31 tests in all.
bun x tsc --noEmitis clean.
I did not run the whole suite. A name-filtered run over test/ also loads test/fixtures/shard-errors.test.ts, which throws on load by design, so it showed one error that has nothing to do with this change.
Summary of the pull: a maintenance finding now shows who last touched it. The actor must be non-empty, a purged account's name is scrubbed, and the tick's touch is stated once. Account purge also covers degraded_span.touched_by.
What I left out: no new dependencies and no schema change beyond that purge coverage.
To try it, open /maintenance on the preview and read the "last touched by" line on a finding.
🤖 Generated with Claude Code
Each maintenance finding row now ends with who last touched it and how long ago ("last touched by ada 2 d ago"), or "untouched". This is the same on the board, the terminal and /maintenance.json. Each touch is recorded on the span: the tick's sweep records maintenance tick, and a reopen records the signed-in username. A reopen with an empty actor is refused. Account purge also scrubs degraded_span.touched_by.
This push answers the review:
- Tick touch on an older span:
rowWordsused to drop the touch whenever the tick was the last toucher. It now drops it only when the tick closed this row, whose "closed <date>" clause already says so. If the tick swept an older span and a newer span of the same cause is open, the row now reads "still open; last touched by maintenance tick 3 d ago". A new test covers that case and failed under the old condition. - Age wording:
touchedWordsandopenedWordsboth call one privateagoWords(at, now)now, instead of stripping "opened " offopenedWords' output. A test checks the touch reads "just now", "m", "h" and "d". - Terminal "Sign in to reopen a finding." branch: I removed it rather than testing it, because it cannot be reached. The
okey only gets todoReopenoncemayAct()has confirmed a signed-in admin. The call now passesf.user?.username ?? ""like the quiet and bring-back handlers beside it.reopenFindingalready refuses an empty name, and an existing test covers that.
The gate's duplicate scan likens agoWords to ageWords in src/snapshot/bucket.ts. That is a note, not a refusal. I kept them separate because the bucket helper prints "min" and keeps hours up to 48 h, so sharing it would change what /maintenance prints.
The type check, design lint and gate pass, and so do 138 tests across the maintenance, findings, terminal, status, unused-export and job-timing files. I did not run the full suite; the forge runs it on push.
No look: only the words on a row change, and the layout of /maintenance does not.
To try it: on the preview, open /maintenance as an admin and read the end of each finding. Reopen an auto-closed finding, and its row reads "last touched by <you> just now". In the terminal, o reopens a finding by its number.
[{"go":"/maintenance","look":"the end of each finding row","expect":"its age, then 'still open' or the closed date, then 'last touched by <name> <age>' or 'untouched'; a row the tick closed does not repeat the tick's touch"},
{"go":"/maintenance","look":"press Reopen on a finding under 'closed for want of action'","expect":"the row now ends 'last touched by <your username> just now'"}]
🤖 Generated with Claude Code
Each finding row on
/maintenance, in the terminal's Maintenance screen and in/maintenance.jsonnow says who last acted on it, or that nobody has. The maintenance tests, the own-source and dead-code tests andtscpass. The gate passes after aNo door:line. Its look-alike note forreopenFindingis left as a note, not changed. I did not try the page on a preview.rowWords, so they cannot differ./maintenance.jsonaddstouchedByandtouchedAt(an ISO time), both null when untouched.touched_byandtouched_attodegraded_span, with its pin. The last actor is read across all spans of a cause, so a reopen shows even when it touched an older span.reopenFindingnow takes the actor's name, and the web and terminal callers pass it.test/maintenance-finding-age.test.tscovers the board, terminal and JSON for both a touched and an untouched finding, and fails without the change. Existing tests had theirdegraded_spanschemas and expected row words updated.docs/features/maintenance-findings.mdis updated.No door:. The terminal text and the how-to are already in this change.Try: open
/maintenance.jsonon the preview as admin. Each finding carriestouchedByandtouchedAt, and/maintenancerows end "untouched".Closes #16187