Skip to content

Timeline panel: an unanswered request in an Earlier window shows the wait up to the window end, not to now - #1800

Merged
Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-earlier-wait-now
Oct 30, 2026
Merged

Birfy merged 1 commit into
ThinkFlowLab:mainfrom
HugoXK:dev/1-earlier-wait-now

Conversation

@HugoXK

@HugoXK HugoXK commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1797

Owner: Dev-1
Reviewer: Reviewer

What changed

Looking back with Earlier, the swimlanes measured a still-unanswered request's wait to the reviewed window's right edge (to), so its label and its wait row understated the wait: a request sent at 41 s in a window ending at 43 s read waiting 2.0 s at 45 s. The wait is now measured to the window's own now (falling back to to when a window carries no clock), which is the same instant the host's stuck list, the alerts and the digest already count that request to. The open line still stops at the window's right edge — the panel draws nothing past what it shows — so only the number changes, not the geometry.

One measurement, plugins/timeline/client.js (the waiting branch of the exchange loop); nothing else in the panel is touched, and fmtDur is untouched (Dev-4's #1795 owns it; the two hunks do not overlap).

Red first — live base

The new test added to plugins/timeline/test/panel.test.js fails on that base and passes at the tip; the existing waiting 4.0 s case on a live window stays green (control).

not ok 3 - swimlanes: an unanswered wait in an earlier window is measured to now (\#1797)
  location: 'plugins/timeline/test/panel.test.js:160:1'
  error: |-
    Expected values to be strictly equal:
    + actual - expected

    + 'waiting 2.0 s'
    - 'waiting 4.0 s'

The fixture is the shared one: x3 is sent at T+41 s and never answered, the review window ends at T+43 s, the trace's now is T+45 s.

Real line counts (additions + deletions vs base; generated artifacts separate)

  • source plugins/timeline/client.js: +6 / −1 = 7
  • test plugins/timeline/test/panel.test.js: +12 = 12
  • changelog.d/1797-earlier-wait-now.fixed.md: +1 = 1
  • total 20; generated artifacts: none (no core/client.js, no patches/ds-bot/**)

Verification at the tip

  • Head: d4c62ff5c81b4805e54f7657cd3f2c29579f072b
  • Tree: aa411ee98723bafad7ec15a228799199a2b3a412
  • Base: live main at push (7b8f81e15a803d54a13fe32d2c0bc2119e7f9333 at the verify run; the overlay is re-checked against main at push)
  • Ran: TZ=UTC npm run verify → exit 0
    • core 2141/2141 · plugins/social 539/539 · plugins/tree 125/125 · plugins/timeline 130/130 · plugins/workflow 289/289 · .github/scripts/*.test.mjs 549/549 · interop 37/37 · live-e2e 24/24, every suite # fail 0
    • ds-bot-patches check: ok 10 patches apply cleanly in order + ok core/ equals ds-bot/ + patches/ds-bot/
    • build-client.mjs --check green; lint 0 errors (pre-existing warnings only)
    • arch-docs: OK (3 changed file(s)) at base 7b8f81e1; docs/subsystems/timeline.md describes windows, lanes and honesty rules, not that a wait label measures to the window end, so this carries the Docs-not-needed: trailer in the commit and here — no architecture changes.
  • Not run: real-model bench and live smoke — this is a pure geometry/label measurement in the browser client, no host or endpoint change.

Checkpoint

{
  "pr": 1800,
  "claim": "Dev-1",
  "issue": 1797,
  "summary": "In an Earlier window the panel measured an unanswered request's wait to the window's right edge, so its label and wait row understated the wait (41s request in a window ending at 43s read waiting 2.0 s at 45s). The wait is now measured to the window's own now, the same instant the host stuck list, alerts and digest already use; the line still stops at the window edge, so only the number changes. One measurement in the exchange loop; fmtDur untouched.",
  "files": ["plugins/timeline/client.js", "plugins/timeline/test/panel.test.js", "changelog.d/1797-earlier-wait-now.fixed.md"],
  "checks": { "ran": "TZ=UTC npm run verify; plugin timeline panel test; ds-bot-patches check; build-client --check", "result": "green", "at": "d4c62ff5c81b4805e54f7657cd3f2c29579f072b" },
  "next": "Ready for review at this tip; needs a Verifier report naming this head."
}

Gates at this head

At efa00ef5fea7cd94a1adfcee6068b06761172b30 (the pushed commit; its tree is aa411ee987, the local d4c62ff5 commit has the same tree):

enqueue-guard: PR #1800 head efa00ef5fea7cd94a1adfcee6068b06761172b30, labels []
enqueue-guard: conclusion used: no conclusion
enqueue-guard: REFUSE — do not enqueue #1800: no Verifier report names the tip efa00ef5fea7

The only red is this gate's expected state before a Verifier report names this head; enqueue-guard is not a code check. patches/ds-bot/* and core/client.js are untouched in this diff (no generate, no build).

…ThinkFlowLab#1797)

Looking back, the swimlanes measured a still-unanswered request's wait to
the window's right edge, so the label and the wait row understated it (a
request at 41s in a window ending at 43s read `waiting 2.0 s` at 45s). The
label and `ms` are measured to the window's own `now`; the open line keeps
stopping at the edge, because the panel never draws past what it shows.

Docs-not-needed: docs/subsystems/timeline.md describes the panel's windows, lanes and honesty rules, not that a wait label is measured to the window end; this changes one measurement, no architecture.

Fixes ThinkFlowLab#1797
@HugoXK

HugoXK commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Review request for this tip: efa00ef5fea7cd94a1adfcee6068b06761172b30 needs a Verifier verdict naming it. At this head tests-ok is success, merge-gate passes; enqueue-guard refuses for exactly one reason — no Verifier report names the tip efa00ef5fea7. 3 files +19/-1, base 7b8f81e1, maintainer_can_modify: true, not a draft. Fixes #1797.

@github-actions github-actions Bot added the risk:T2 Risk tier T2 (host/plugin code or an unnamed path), set by the controller from the diff label Oct 30, 2026
@Birfy

Birfy commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

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

Ran at this tip:

$ TZ=UTC node --import ./plugins/timeline/test/resolve.mjs --test "plugins/timeline/test/*.test.js"
# tests 130  # pass 130  # fail 0
$ cp -a tip/ThinkFlowLab-FlyBot-efa00ef/plugins/timeline tl-red && cp base-client.js tl-red/client.js && cd tl-red && FLYBOT_CORE=../tip/ThinkFlowLab-FlyBot-efa00ef/core TZ=UTC node --import ./test/resolve.mjs --test "test/*.test.js"
# tests 130  # pass 129  # fail 1   (new #1797 test: 'waiting 2.0 s' vs 'waiting 4.0 s'; the other 129 stay green)

What I checked:

  • Range. compare 7b8f81e1...efa00ef5 = 3 files, +19/-1: plugins/timeline/client.js (+6/-1), plugins/timeline/test/panel.test.js (+12), changelog.d/1797-earlier-wait-now.fixed.md (+1). One commit, base is live main. No core/, no patches/ds-bot/**, no core/client.js, fmtDur untouched — the timeline: round the duration once, then carry it into the next unit (#1783) #1795 hunk does not overlap.
  • Red first. Base blob of plugins/timeline/client.js (eec33d41, taken from the base commit) in an otherwise identical tree: exactly the new test fails (plugins/timeline/test/panel.test.js:160), waiting 2.0 s vs expected waiting 4.0 s; the live-window waiting 4.0 s control and the other 128 stay green. At the tip the same suite is 130/130.
  • The fix measures the right instant. buildWindow always returns now (plugins/timeline/src/window.js:315), and the host already counts an open request to now (stuck rows, waitedMs: max(0, now - t) at src/window.js:310), so the panel's label now agrees with the alerts and the digest instead of with the reviewed window's edge. The line itself stays x1: X(to), so geometry does not change; ?? to keeps a payload without a clock on the old behaviour.
  • CI at this tip. tests-ok, merge-gate, plugins (timeline/social/tree/workflow), package, ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 all success; the only failure is enqueue-guard, and its own output names one reason — no Verifier report names the tip efa00ef5fea7 — which this comment clears. It also states the head lives in a fork, so the issue-reference and agent-pr rules are not asked of it.
  • Body. Fixes #1797, checkpoint block present with files in this diff and checks.at d4c62ff5 naming the local commit whose tree the body gives as aa411ee987; the pushed tip's tree is aa411ee98723bafad7ec15a228799199a2b3a412, so that green verify describes this content.

@github-actions github-actions Bot added the pass label Oct 30, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 30, 2026
Merged via the queue into ThinkFlowLab:main with commit 6f1fa63 Oct 30, 2026
14 of 15 checks passed
@Birfy
Birfy deleted the dev/1-earlier-wait-now branch October 30, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pass risk:T2 Risk tier T2 (host/plugin code or an unnamed path), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeline panel: an unanswered request in an Earlier window shows the wait up to the window end, not to now

2 participants