fix(pm): render hour-scale durations in hours, so --report's calendar figures need no division - #12951
Conversation
… figures need no division
`human_s` had a minute branch and nothing above it, so every duration past an
hour printed in minutes. On the live `--report` that meant a span of `504m05s`
and a floor age of `514m01s` -- 8h24m and 8h34m, on the two figures a reader
compares against a DATE ("does this population cover my hold from the 26th?").
The report is otherwise careful to hand over arithmetic rather than leave it
on the page; the arrival-depth block spells out `waiters already ahead = this
minus 1` for exactly that reason. This makes the duration formatter match that
standard.
Presentation only. The exact second count is still printed first in every
branch, so no reading here is the only copy of the number.
The threshold is 3600 and the sub-hour text is untouched, which keeps the
long-hold warning at `900s (15m00s)` -- it reads correctly at minute scale and
pulling the hour branch below an hour would make it worse. That is pinned.
Self-test: 186 -> 195 cases, all passing; no pre-existing pin moved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CPrUz21stTFhJRUirdc4yw
|
ACCEPT — armed ( Reviewed against the diff and GitHub, ⛔ not against the report. Entry qualification: every check, not the required subset. 32 check runs at Arithmetic re-derived independently rather than read off the pins. Bash
All eight agree. The two card figures also reconcile against the old rendering: 30245/60 → The measurement that inverted the card's own premise is the best thing in this PR. Both the card and its triage grading asserted the change "changes the text of several existing outputs, so the pin tests that quote them need re-reading". Measured: zero self-test pins quote a literal Ablation has the shape a real one needs: the mutation was confirmed on disk before the run, the direction and the count were predicted before observing (5 cases), and the load-bearing case is the one that separates "an Two further things handled correctly rather than quietly:
Generated by Claude Code |
Fixes #12829
human_shad a minute branch and nothing above it, so every duration past an hour rendered in minutes. On the two--reportfigures that are calendar-scale — the population's width and its floor — that produced504m05sand514m01sfor 8h24m and 8h34m, on exactly the numbers a reader compares against a date ("does this population cover my 19-minute hold from the 26th?").The report elsewhere refuses to leave arithmetic on the page — the arrival-depth block spells out
waiters already ahead = this minus 1for precisely this reason. This makes the duration formatter meet that same standard.Presentation only. No behaviour, no thresholds, no filter, no ledger change. The exact second count is still printed first in every branch, so no reading here is ever the only copy of the number.
Shape chosen, argued from measured blast radius
The card offered two shapes and the triage grading picked shape 1. I measured before accepting it, as dispatched:
NmNNsstringhuman_sgit grep human_soutside the script: no hits)--self-testonlyThe measurement inverts the cost the card and the grading both assumed ("it changes the text of several existing outputs, so the pin tests that quote them need re-reading"). No pin quotes a duration: the report fixture builds a ledger seconds wide, and every report pin greps prose headings. So shape 1's blast radius on pins is empirically zero, while shape 2 would still have cost two duration formats in one report. Shape 1 on the evidence, not merely on the ruling.
Threshold
3600s, and the sub-hour text is deliberately untouched — which keeps the long-hold warning reading
900s (15m00s), correct at minute scale. A future "unification" pulling the hour branch below an hour would make that warning worse, so that is now pinned as a case that must not move.The bash 3.2 floor is respected: plain arithmetic and
printfonly.check:bash32-floorcertifies it — "22 tracked shell file(s) ... name no bash 4+ construct outside a comment ... floor bash 3.2."Verification
Self-test 186 to 195 cases, all passing, union run at
7bc8f190a:Live
--reportagainst the real ledger, after the change:Those two read
246m42sand253m33sbefore this change.Ablation — the instrument is falsified, not assumed. Committed first, then mutated the minute term to the natural typo
s / 60(the mutation was confirmed on disk by literal grep counts: correct-code-term 1 to 0, typo-code-term to 1, and the blob hash differing from HEAD). Predicted direction: red, 5 cases. Observed: exactly 5, including the load-bearing one:Restore leg proven by
git diff HEADempty and the worktree blob matching the HEAD blob. No build leg applies: this is a bash script executed from source, so nodistresolution stands between the edit and the run.Gates re-derived from the actual diff with
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack(the first derivation reported a STALE TREE, so the branch was synced withmainand the answer re-derived). All 10 derived families pluscheck:nul-bytespass, each exit code captured before any pipe.Changeset: none, by receipt
⛔ Not inherited — derived. The five most recent PRs touching this file (
e5f66214a,4a7e1b07e,5ced18ac0,7d587ac19,347a7b39c) carried zero.changeset/files.scripts/pm/os-verify-lock.shis internal agent tooling and publishes nothing user-visible, soskip-changesetapplies.Scope
Card #12795 also targets this file and is not dispatched; gate routing through the lock is untouched here. Card #12823 landed separately as
4a7e1b07ebefore this dispatch, so the grading's co-dispatch instruction could not be met — noted, not silently dropped.Generated by Claude Code