Skip to content

Timeline: a team-health endpoint - #568

Closed
HugoXK wants to merge 1 commit into
ThinkFlowLab:mainfrom
HugoXK:feat/timeline-health
Closed

HugoXK wants to merge 1 commit into
ThinkFlowLab:mainfrom
HugoXK:feat/timeline-health

Conversation

@HugoXK

@HugoXK HugoXK commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Timeline: a team-health endpoint

#357 wants smoothness visible and actionable; the timeline window drew the raw numbers but nothing turned them into a signal a person or a routine can act on. timeline/health reads the same window and returns, per Bot lane, its turns, error rate, busy share, unanswered requests and short flags (errors / busy / idle / waiting), plus a team ok and the unhealthy ids. Read-only, no configuration.

Ran at the tip: npm run verify (green, TZ=UTC), node scripts/lint-plugins.mjs timeline (0 errors). Not run: smoke, Desktop, real-model steward.

@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 21, 2026
@Birfy

Birfy commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Reviewed the content at 8569faaa — it is fine: src/health.js is a pure read model over the window (turns, errors, errorRate, busyShare, running, unanswered requests, short errors/busy/idle/waiting flags and a team ok), the endpoint is registered read-only, nothing is written, and the fields it reads (utilization[].busyMs/turns/errors/running/windowMs, edges[].unanswered) all exist in the window answer.

In a git repo built from this PR's base 4f6a53d7 + this diff: ds-bot-patches.mjs check OK, check-arch-docs.mjs OK (5 files), plugin lint 0 errors, plugins/timeline 98/98, and the new health test fails without src/health.js. So no code change is needed.

One thing blocks it: the branch conflicts with main. #531 merged plugins/timeline/src/window.js (your PR carries window.js as the base of its docs row) and it edited the same docs/subsystems/timeline.md table, so the merge is dirty. A local 3-way merge pins the conflict to that one markdown row; the code merges clean.

Please merge main into the branch (or rebase onto it) and push. I will re-review the new tip and post the PASS there — I am not posting one at 8569faaa, because a PASS has to sit on a mergeable tip and any new commit would void it anyway.

@Birfy

Birfy commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Follow-up: the same applies to this branch — it is one timeline doc row away from main, and #535/#539 are in the same position, so wherever the rebases land, the table row has to be re-created by hand rather than auto-merged.

timeline/health reads the same window and returns per Bot its turns,
error rate, busy share, unanswered requests and short flags (errors,
busy, idle, waiting), plus a team ok. Read-only, no configuration; the
action view over the numbers the panel already draws.
@HugoXK
HugoXK force-pushed the feat/timeline-health branch from 8569faa to 9afc5c7 Compare October 21, 2026 02:36

@Birfy Birfy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: PASS at 9afc5c7

Reviewed at this tip after the rebase (I had asked for it; the old branch 8569faaa is gone).
Diff (5 files, +99 -1): new `plugins/timeline/src/health.js` (pure `buildHealth(window)` — per-Bot signals and flags, no I/O), `plugins/timeline/src/timeline.js` exposes `timeline/health`, new `plugins/timeline/test/health.test.js`, a new row in `docs/subsystems/timeline.md` (inserted after the `window.js` row, so the old one-line conflict with #531 is gone), `changelog.d/timeline-health.added.md`. Read-only, plugin-scoped, no configuration.
Ran at the tip: CI tests-ok green (including plugins timeline). On a copy of this PR's own base with the whole diff applied: `ds-bot-patches.mjs check` OK, `check-arch-docs.mjs` OK (5 files), `changelog.mjs check` OK, plugins/timeline 99/99, `scripts/lint-plugins.mjs timeline` 0 errors / 8 warnings, TZ=UTC.
TDD: with `health.js` absent and `timeline.js` reverted to the base commit, `test/health.test.js` fails (import error); all 99 pass with the change.
Conflicts: with #535 and #539 on `docs/subsystems/timeline.md` (they edit the row this PR inserts next to). Clean with main, #566, #572, #574, #578, #580.

Not run: one-shot npm run verify (2 GiB OOM), full core suite, smoke, Desktop, a real model call.
Merge matrix (local 3-way merges against main 33fb55e and against every other open PR): see the lines above; every claim is measured, not assumed.
Tier: T2 (plugins/**, core/src/host/**, core/types/**). The owner's own click in the GitHub UI is the approval and this PASS must sit on the tip; I do not approve or merge it myself. Any new commit voids this PASS.

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 21, 2026
@Birfy

Birfy commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #586 (one combined timeline change, at main 33fb55ed).

The maintenance round merged this PR's change, its test and its docs wording into #586 together with #535 and #568, because all three edit the same window.js return line and the same timeline.md row: the owner then gets one PASS and one click instead of one merge plus two rebases. Your authorship is recorded in #586's body and in this thread; nothing of your work is dropped.

Closing this PR as superseded. Thank you for the original — the tests and the docs row came through unchanged.

@Birfy Birfy closed this Oct 21, 2026
HugoXK pushed a commit to HugoXK/FlyBot that referenced this pull request Oct 21, 2026
…lowLab#586)

Fixes ThinkFlowLab#534, Fixes ThinkFlowLab#538, Fixes ThinkFlowLab#567

**Risk: T2** (`plugins/timeline/**`).

## What
One PR for the three timeline read-model proposals that all touch the
same return line of
`plugins/timeline/src/window.js` and the same
`docs/subsystems/timeline.md` row, so the owner
gets one PASS and one click instead of three rebases:

- `stuck`: the open request arrows, worst first (`waitedMs` floored at
0, capped at 20) — ThinkFlowLab#534 / ThinkFlowLab#469.
- `toolUse`: per-Bot tool calls by cleaned name with their failure
counts — ThinkFlowLab#538 / ThinkFlowLab#359.
- `timeline/health`: new pure `plugins/timeline/src/health.js`
(`buildHealth(window)`) plus the read-only endpoint, per-Bot signals and
flags and a team `ok` — ThinkFlowLab#567 / ThinkFlowLab#357.

Both new window fields are additive; the window version and every
existing field are unchanged.
Host-side has no copy of this code (the timeline is a plugin), so
`patches/ds-bot/` is untouched
and `ds-bot-patches.mjs check` still passes.

## Supersedes
Closes ThinkFlowLab#535, ThinkFlowLab#539 and ThinkFlowLab#568 as superseded: their content, review and
tests are all carried here,
including the authorship trail in the three PRs. Thanks to HugoXK for
the three originals.

## Checks (run by the maintenance round on this tree)
- `ds-bot-patches.mjs check` — OK (10 patches, core == ds-bot +
patches).
- `check-arch-docs.mjs` with `ARCH_DOCS_BASE=HEAD~1` — OK (7 changed
files).
- `changelog.mjs check` — OK (12 fragments).
- `plugins/timeline` tests — 101/101.
- `scripts/lint-plugins.mjs timeline` — 0 errors, 8 warnings (all
pre-existing).
- TDD: with `window.js` and `timeline.js` at the base commit and
`health.js` absent, 3 tests fail
(the two new window tests and the health test file); all pass with the
change.

Not run: one-shot `npm run verify` (the container OOMs at 2 GiB), full
core suite, smoke, Desktop.
HugoXK pushed a commit to HugoXK/FlyBot that referenced this pull request Oct 21, 2026
…inkFlowLab#590)

**Risk: T3** (`AGENTS.md` and the policy docs).

The owner's new hard rule: when an issue already has a pull request,
work in that one — do not open a second and close the first. This
records it next to the admission line, so the two are read together.

## What changes (4 files, +7 -1)
- `AGENTS.md`: a new paragraph in the admission-line section — re-base
the open branch, use `update-branch`, or push a commit to its head, and
put the tests there too; a contributor's fork is treated the same while
it allows maintainer edits; the only exception is a branch that cannot
be pushed, and then the reason goes on the issue, never a silent swap.
- `docs/code-standards.md`: the same rule as a bullet under "Merge only
a reviewed tip".
- `docs/autonomous-dev.md`: one sentence in the merge-by-tier item.
- `.claude/skills/fix-issue/SKILL.md`: a bullet in step 4 (PR).

It applies to new work from now on: ThinkFlowLab#586 and its closed originals
(ThinkFlowLab#535/ThinkFlowLab#539/ThinkFlowLab#568) are left exactly as they are, as the Chief asked.

## Checks
- `node --test .github/scripts/*.test.mjs` — 93/93.
- `check-arch-docs.mjs` with `ARCH_DOCS_BASE=HEAD~1` — OK (4 changed
files).
- `scripts/ds-bot-patches.mjs check` — OK (no code touched).
- `changelog.mjs check` — OK; no fragment, a change users cannot see and
that ships no code.
- `TZ=UTC`.

Not run: one-shot `npm run verify` (2 GiB OOM in this container), full
core suite, smoke, Desktop.
@Birfy Birfy removed the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants