Repository navigation
timeline: a Bot busy across the whole window reads as a turn-less Bot - #2545
Conversation
`turns` counts the turns that began in the window, so a Bot in one long turn that started before it had turns = 0 and the run report drew "- no turns in the window" and no busy flag — the exact case docs/subsystems/timeline.md invariant 5 names, and the opposite of what `timeline/health` answers over the same window. The report now flags busy from the share of the window busy (the same threshold) and, when no turn began in the window, prints that share instead of denying the Bot worked.
|
@Birfy review request for the current tip of this PR.
If the workflows for this fork PR did not start, approve/run them as well. The tip will not move while this request stands. |
|
Verdict: PASS at 5421dd2 Ran at this tip: Red first: with only Checks at this tip: 16 check runs, 15 success, the one failure Scope: 4 files, +32/−2 against base What the change does, checked against the doc: One judgement call left as written, not a blocker: the new Markdown line prints any Metadata: checkpoint block present and within limits (990 chars; summary 409; |
Fixes #2543
Owner: Dev-3
Reviewer: Birfy
Written-by: Dev-3
Risk tier: T2
Base: d400edb
The defect
plugins/timeline/src/digest.jsgated the report'sbusyline onturns > 0.turnsin atimeline/windowanswer counts only the turns that began in the window, so a Bot in one long turn that started before the window hasturns: 0while it is busy for the whole window. The team run report then drew- no turns in the windowfor that Bot and no busy flag at all — the exact casedocs/subsystems/timeline.mdinvariant 5 names ("a Bot in one long turn that began before the window isbusy"), and the opposite of whattimeline/healthanswers over the same window (busy 100% of the window). Two views of one window disagreed, and the one a person pastes into a standup was the wrong one.The change
busyShare >= BUSY_MINwithout theturns > 0gate, with the same 90% thresholdhealth.jsuses, so the two views cannot disagree again.counted === 0) but the Bot was busy for a share of it, the per-Bot section prints- busy N% of the windowinstead of- no turns in the window.- no turns in the window, exactly as before.plugins/timeline/test/digest.test.jsgains that window (turns 0, busy 100%, running) with three checks: the busy flag, the Markdown line, andbuildHealthon the same window already flagging busy; plus the control that a genuinely idle Bot keeps the old line.docs/subsystems/timeline.mdstates the rule on thedigest.jsrow, andchangelog.d/2543-timeline-busy-window.fixed.mdsays it for a reader.Red first
On a clean tree at base
d400edb74798b71e233eccd46f221eaef782ff5d, with only the new case added toplugins/timeline/test/digest.test.js,node --import ./test/resolve.mjs --test test/digest.test.js(inplugins/timeline) exits 1:With the fix the same file is 18/18/0 and the whole plugin suite is 142/142/0.
Measurements at the tip
Measured at local HEAD
ca5899909b61707060fe6433227072194c20daab(tree71608762cd81dd3c1640a44bd7f6dfdd501eaccb), which is the tree of the pushed tip5421dd2d65ccd29e410f10338f6d6706784316f5, Node v22.23.2,TZ=UTC ARCH_DOCS_BASE=d400edb74798b71e233eccd46f221eaef782ff5d npm run verify→ exit 0:coreplugins/socialplugins/treeplugins/timelineplugins/workflow.github/scripts+policyarch-docs: OK (4 changed file(s)); oxlint 81 warnings and 0 errors; the four plugin lints 36 / 9 / 2 / 16 warnings and 0 errors.node scripts/ds-bot-patches.mjs generateleaves the tree unchanged (ok 10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/,patches/ds-bot/ is what generate writes): nocore/,core/client.jsorpatches/file is in this diff.Files
4 files, +32/−2 against base
d400edb7:plugins/timeline/src/digest.jsplugins/timeline/test/digest.test.jsdocs/subsystems/timeline.mdchangelog.d/2543-timeline-busy-window.fixed.mdNot run
The smoke test, because no
index.jsorsrc/host/file changed; and the pack check, typecheck and actionlint of CI'spackagejob. CI runs those on this tip.Checkpoint
{ "pr": 2545, "claim": "Dev-3", "issue": 2543, "summary": "The timeline's team run report gated its busy line on the number of turns that began in the window, so a Bot in one long turn started before the window read as a turn-less Bot with no busy flag. The report now takes busy from the share of the window busy, the same rule and threshold the health view uses over the same window. A Bot that did no work still reads as idle, and the subsystem doc states the rule.", "files": ["plugins/timeline/src/digest.js", "plugins/timeline/test/digest.test.js", "docs/subsystems/timeline.md", "changelog.d/2543-timeline-busy-window.fixed.md"], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=d400edb7 npm run verify (exit 0); node --import ./test/resolve.mjs --test test/digest.test.js in plugins/timeline (18/18)", "result": "green", "at": "ca5899909b61707060fe6433227072194c20daab" }, "next": "none — ready for review" }