Skip to content

timeline: an unanswered handoff row reports an exact total wait of 0 ms - #2420

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-timeline-wait-total
Nov 4, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-timeline-wait-total

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2419

Owner: Dev-1
Written-by: Dev-1
Reviewer: Birfy
Claim-Id: 6da76e0929ab4a47a4084bc9c999de76
Branch: dev/1-timeline-wait-total (head repo HugoXK/FlyBot)
Base: dd9c5a055471fdf268024b721c605a8f00881a16 (live main)
Tip: bc8b1e1fd394f44fcf18b5b8d7c4342b07291b12 — verified commit cf40e64031ce23f645b9a1d3fbb0957d2ca7bfcc (tree f075b54093439b3be24259b0310e4d92c3e80407, single parent dd9c5a055471fdf268024b721c605a8f00881a16); the pushed head was generated from that same tree by the push path
Tree: f075b54093439b3be24259b0310e4d92c3e80407
Diff: 4 files +22/−4 — hand-written 4, generated 0
Tier: T2

What changed

  • plugins/timeline/client.js: waitRows mapped a missing edge.totalWaitMs to 0 (edge.totalWaitMs ?? 0), and the row then printed that zero through fmtDur. The host sends no totalWaitMs for an edge with no answered request (plugins/timeline/src/window.js:291 builds medianMs, maxMs and totalWaitMs only when waits.length), so a handoff that was still waiting read Answered 0 · Not yet 1 · Median – · Slowest – · Total wait 0 ms: two dashes and a measured zero on the same exchange. The row now keeps the value undefined and the cell prints –, the same shape Median and Slowest already used; the sort takes ?? 0 so unanswered rows still come last.
  • plugins/timeline/test/panel.test.js: red-first case — a window with one request and no reply must give a row with totalMs === undefined and a rendered row of ['Chief','Writer','1','0','1','–','–','–'].
  • docs/subsystems/timeline.md (the page that owns plugins/timeline/) and changelog.d/2419-timeline-wait-total.fixed.md: the table prints – wherever a number does not exist yet.
  • Nothing else changed: no core/, no core/client.js, no patches/ (the patch trees are byte-identical; generate writes nothing).

Ran

Red first, on clean dd9c5a05 with only the new test added — cd plugins/timeline && TZ=UTC node --import ./test/resolve.mjs --test test/panel.test.js:

not ok 7 - communication map: a handoff nobody answered yet has no total wait to print, not "0 ms"
  error: 'nothing was answered, so there is no total wait to print'
  actual: 0
# tests 23 / pass 22 / fail 1

With the change: # tests 23 / pass 23 / fail 0.

At this tree (f075b54093439b3be24259b0310e4d92c3e80407, verified commit cf40e64031ce23f645b9a1d3fbb0957d2ca7bfcc):

  • TZ=UTC ARCH_DOCS_BASE=dd9c5a05 npm run verify — exit 0, 4833/4833 (core 2845, social 570, tree 132, timeline 141, workflow 411, root 671, interop 37, live-e2e 26), fail 0 / cancelled 0; core lint 76 warnings / 0 errors, plugin lint 36/9/2/16 warnings / 0 errors, interop lint 1 warning / 0 errors, live-e2e lint 0/0.
  • ARCH_DOCS_BASE=dd9c5a055471fdf268024b721c605a8f00881a16 npm run arch-docs on the committed tree — arch-docs: OK (4 changed file(s)).
  • node scripts/ds-bot-patches.mjs generate twice — second run no-op, patches/ds-bot/*.patch byte-identical (72a25132…), git status --porcelain empty.
  • node scripts/ds-bot-patches.mjs check — 10 patches apply cleanly in order, core/ equals ds-bot/ + patches/ds-bot/.
  • node scripts/ds-bot-patches.mjs canonical — patches/ds-bot/ is what generate writes (generate is a no-op).
  • node core/scripts/build-client.mjs --check — exit 0 (part of verify).
  • node .github/scripts/changelog.mjs check — 32 fragment(s) in changelog.d/ are well formed.
  • node .github/scripts/check-empty-catch.mjs — exit 0.
  • node .github/scripts/check-mojibake.mjs — 0 occurrences of U+FFFD in 1466 text file(s).
  • risk tier, live main dd9c5a05 rules with each changed file's patch content: risk-tier: T2; basis: plugins/timeline/client.js=T2, plugins/timeline/test/panel.test.js=T2, changelog.d/2419-timeline-wait-total.fixed.md=T1, docs/subsystems/timeline.md=T0; why: [] (no rule matched the patch content); 26 changed lines / 4 non-generated files, no generated patch.

Not run

  • No smoke test: this is one cell of the timeline panel's table — no index.js, no request path, no client bundle.
  • No manual DSH run and no live-E2E beyond the suite's own 26.
  • No host change: the endpoint keeps sending no totalWaitMs for an unanswered edge, which is what the panel now reads correctly.

Tip

Tip bc8b1e1fd394f44fcf18b5b8d7c4342b07291b12 (tree f075b54093439b3be24259b0310e4d92c3e80407, single parent dd9c5a055471fdf268024b721c605a8f00881a16 = live main), 4 files +22/−4:

  • changelog.d/2419-timeline-wait-total.fixed.md +1/−0, docs/subsystems/timeline.md +1/−1, plugins/timeline/client.js +5/−3, plugins/timeline/test/panel.test.js +15/−0;
  • generated files: none (patches/ds-bot/ unchanged, core/client.js untouched).

Files

changelog.d/2419-timeline-wait-total.fixed.md, docs/subsystems/timeline.md, plugins/timeline/client.js, plugins/timeline/test/panel.test.js.

Checkpoint

{
"pr": 2420,
"claim": "Dev-1",
"issue": 2419,
"summary": "The wait table under the timeline's communication map printed Total wait 0 ms for a handoff nobody had answered yet, beside Not yet 1 and two dashes. The host sends no totalWaitMs for an edge without an answer, so the panel turned the missing number into a measured zero. waitRows keeps it missing and the cell prints \u2013, the way Median and Slowest already did, while the sort still puts unanswered rows last.",
"files": [
"plugins/timeline/client.js",
"plugins/timeline/test/panel.test.js",
"docs/subsystems/timeline.md",
"changelog.d/2419-timeline-wait-total.fixed.md"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=dd9c5a05 npm run verify (4833/4833) + arch-docs + patches check/canonical + generate no-op + changelog/empty-catch/mojibake",
"result": "green",
"at": "bc8b1e1fd394f44fcf18b5b8d7c4342b07291b12"
},
"next": "waiting on Test's independent run and Birfy's Verdict: PASS at this tip; then the Lead sends the queue request"
}

The wait table under the communication map printed `fmtDur(edge.totalWaitMs ?? 0)`.
The host sends no `totalWaitMs` for an edge with no answer, so the row read
`Answered 0 / Not yet 1 / Median – / Slowest – / Total wait 0 ms`: a measured
zero beside a request that is still waiting. `waitRows` keeps the missing value
missing (the sort still puts unanswered rows last), and the cell prints `–` the
way Median and Slowest already do.
@Birfy

Birfy commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Verdict: PASS at bc8b1e1
Written-by: Reviewer
Attestation: bc8b1e1 role=Reviewer

Ran at this tip:

$ cd plugins/timeline && TZ=UTC node --import ./test/resolve.mjs --test test/panel.test.js
# tests 23  # pass 23  # fail 0
$ cp base/plugins/timeline/client.js plugins/timeline/client.js && TZ=UTC node --import ./test/resolve.mjs --test test/panel.test.js
# tests 23  # pass 22  # fail 1
$ cp tip/plugins/timeline/client.js plugins/timeline/client.js && TZ=UTC node --import ./test/resolve.mjs --test test/panel.test.js
# tests 23  # pass 23  # fail 0

Reviewed tip bc8b1e1fd394f44fcf18b5b8d7c4342b07291b12 (tree f075b54093439b3be24259b0310e4d92c3e80407), 4 files +22/−4, all in the reviewed change set: plugins/timeline/client.js, plugins/timeline/test/panel.test.js, docs/subsystems/timeline.md, changelog.d/2419-timeline-wait-total.fixed.md. No core/, no core/client.js, no patches/ds-bot/, no generated file.

CI at this tip: tests-ok, Node 24 · DSH 0.2.0-rc.2, plugins (timeline), plugins (tree), plugins (social), plugins (workflow), package, merge-gate, reviewed tip, risk tier all success. The only red is enqueue-guard — no Verifier report names the tip — which this report clears. Tier from the risk-tier job is T2, and the diff matches it.

Red first, one pass: over the tip tarball with plugins/timeline/client.js replaced by its base blob (dd9c5a05), the same command goes 23 / 22 / 1 — not ok 7 - communication map: a handoff nobody answered yet has no total wait to print, not "0 ms", actual: 0 — and back at the tip it is 23 / 23 / 0. The failing assertion is the new one in this diff, so the test is a real gate on this change and not a restatement of it.

What changed is what the issue asked for: waitRows no longer coerces a missing edge.totalWaitMs to 0; the row keeps it undefined and the Total wait cell prints –, the same shape the Median and Slowest cells already used, while the sort keeps ?? 0 so unanswered rows still come last. The host side is untouched and needs nothing: plugins/timeline/src/window.js:291 builds totalWaitMs only when waits.length, so an unanswered edge has no number to send and the panel now says so instead of printing a measured 0 ms beside Not yet 1. The new case asserts both halves — row.totalMs === undefined and the rendered row ['Chief','Writer','1','0','1','–','–','–'].

Docs: docs/subsystems/timeline.md invariant 8 (the page that owns plugins/timeline/) now states that the wait table prints – wherever a number does not exist yet, so the arch-docs ownership rule is satisfied. The changelog fragment is present and in the repo's form.

Not run: npm run verify and the smoke test — this is one cell of one table with no index.js, no host path and no client bundle in the diff, and the changed-directory test file is the whole unit surface it touches. The tip's own CI already carries verify over the whole tree.

Format: plugins/timeline/client.js follows the file around it, the new comment states the constraint (why the value must stay missing) rather than what the line does, no new configuration key, no new dependency, no widening of an interface. Admission line: a reproducible display defect with a test that fails when the source change is reverted — satisfied.

@github-actions github-actions Bot added the pass label Nov 4, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 4, 2026
Merged via the queue into ThinkFlowLab:main with commit 7a7e08d Nov 4, 2026
14 of 15 checks passed
@Birfy
Birfy deleted the dev/1-timeline-wait-total branch November 4, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

timeline: an unanswered handoff row reports an exact total wait of 0 ms

2 participants