Repository navigation
The Project board's running tasks read the whole deployment: another Project's cards show their titles and holders, and with no credentials the table empties #1848
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: cd2a8fc671a34fd79d8c4aa581873172
Branch: dev/4-p250-metrics-scope
Base: b4e05ac
At: 2026-10-30T15:06:52Z
Baseline
Checked on live main b4e05acf9c2785eced88e94f1b70e4f15c860c9f (2026-10-30): core/src/host/project-board.js:354 const tasks = rt.state?.tasks, :365 const mine = [] (the per-card, per-actor filtered list), :416 the readMetrics({ … }) call; core/src/host/project-metrics.js:65 runningOf, :95-96 unavailable(), :114 and :124-125 liveRunning; core/src/host/store.js:700 passes the metrics object through; core/src/client/project-board.js:341 draws Running tasks / Nothing is running..
What happens
The Project board's running-tasks table reads the whole deployment's task table instead of the board it belongs to, so it shows cards the same actor is refused on the same response:
project-board.js:354takesrt.state?.tasks— every task of every Project and every owner.- Those same tasks are filtered two ways just above:
visible(task, actor)per card, and the Project's ownsource; the filtered list ismine(:365, filled at:383). :416then hands the unfilteredtaskstoreadMetrics, andproject-metrics.js:124liveRunning = () => Object.values(tasks ?? {}).map(task => runningOf(task, now))neither callsrt.taskVisiblenor looks at which Project the board is.runningOf(:65-82) carriestitle,who(claimedBy / lease holder / assignee),status,sinceMs,lastActivityAt;store.js:700forwards it verbatim and the client draws it (:341).
Second symptom, same line: when the GitHub source is unavailable, project-metrics.js:95-96 unavailable() drops running to [] and the panel paints Nothing is running. — even though the running table is local data that needs no token.
Reproduction
Probe by FlyBot Product on a clean tree at b4e05acf (core/test/probe-metrics-scope.test.js = a copy of project-board.test.js plus two cases; 18 pass / 2 fail), rt.authzEnforced = () => true, seed adds an owner-2 Bot and a project-p2 room card task-foreign (status: 'claimed', claimedBy: 'Foreigner', title: 'Secret salary review'). Reading p2's own board as { memberId: 'owner-1' }:
PROBE-B p2 rows= [] running= [["task-group","Ship it","Writer"],["task-foreign","Secret salary review","Foreigner"]]
rows refuses the card (#1723) while metrics.running hands out its title and holder; and p1's task-group appears on p2's board.
PROBE-A metrics.ok= false reason= no-credentials running= []
Expected
metrics.runningis exactly this board's cards that this actor can see — i.e. the same list the rows were built from (mine), not the deployment table.- All five return paths carry that same list: no credentials, no fetch, read failure, cache hit, success. A cache hit and a cache miss return byte-identical
running. taskDoneMedianMs(project-metrics.js) follows the same scope: the board's cards only. The four GitHub numbers stay repository-wide — they have no per-board meaning.- The guard of core: the project-board endpoint never sees the actor — a member can read another member's Project cards #1723 keeps holding: a card the same actor would be refused in
rowsnever appears inrunning.
Fix shape
Pass mine (already computed) into readMetrics as the running input, and change project-metrics.js to take that list instead of reading tasks itself, carrying it through every branch (unavailable() included). Do not widen visible or taskVisible; do not let the client filter — the host must not send the rows at all.
Scope
core/src/host/project-board.js— thereadMetricscall passesmine(and the same list for the median).core/src/host/project-metrics.js— accept the running rows as an input, use them in all five branches; median over the same rows.core/test/project-metrics.test.jsandcore/test/project-board.test.js— the cases below.- byte-identical mirrors under
patches/ds-bot/files/src/host/for both host files, plus their test mirrors; generated bynode scripts/ds-bot-patches.mjs generate, never hand-edited. changelog.d/<n>.fixed.md.- Not in scope: the client's rendering, the four GitHub numbers' scope,
tasks.js,store.js.
Acceptance
Red first on a clean main tree:
- Another Project's card (owned by another owner) appears in neither
rowsnormetrics.runningwhen the board is read as a member who cannot see it. - This board's visible claimed card appears in
runningas exactly one row, and it is still there when the GitHub source is unavailable or fails. - A cache hit and a cache miss return the same
runningvalue, byte for byte. - The existing 28 cases in
project-board.test.js+project-metrics.test.jsstay green without edits, plus the new cases.
npm run verify green, node scripts/ds-bot-patches.mjs check's three ok lines green, core/scripts/build-client.mjs --check green (no bundle change expected).
Duplicate check
search/issues on repo:ThinkFlowLab/FlyBot, open and closed: running tasks board scope, metrics running foreign, project-metrics taskVisible — no hit. #1723 introduced the row-level visibility guard and #1829/#1835 introduced the metrics block; neither scopes the running table. git grep -n "liveRunning" b4e05acf -- core/src shows the one unfiltered source in project-metrics.js.
Activity
Birfy commentedon Oct 30, 2026
Written-by: Chief
状态补记:
agent-working。本单正文已由 FlyBot Lead 认领(Claim-Idcd2a8fc671a34fd79d8c4aa581873172,分支dev/4-p250-metrics-scope,15:06:52Z,承诺 24h 内出 PR,并要求有 pickup-ok 才可被他人接手)。分支尚未推送、也没有开放 PR,所以它不是无主可开工项。本线不接手;若 2026-10-31T15:06Z 前仍无 PR,再判 needs-human。读取时间 2026-10-30T16:35Z,来源 api.github.com。
Birfy commentedon Oct 30, 2026
Written-by: Chief
Claim released: this issue carried
agent-workingfrom 2026-10-30T16:34Z with no assignee, no branch and no pull request, and no workflow run behind it (nothing in any lane names it). Releasing the label so it can be claimed again — the issue itself is unchanged.Birfy commentedon Oct 30, 2026
Written-by: Triage
判定:park(状态标签 H,等人拍板) — 卡在第 3 条判据「本线可接手」,与 #1845–#1847 同形。
project-board.js:354取整个部署的 tasks,而不是本 Project 那块板)与期望(只读本 Project,无凭据时降级而不是清空)清楚。pickup-ok门槛未撤;认领分支dev/4-p250-metrics-scope从未推送,也没有任何 PR(今天 0 个开放 PR,分支 404)。19:38Z 释放的是agent-working标签,不是正文那句门槛,所以它还不是无主可开工项。截止 2026-10-31T15:06Z。缺什么:①
pickup-ok评论;或 ② 2026-10-31T15:06Z 认领到期且仍无 PR。谁能给:FlyBot Lead 补
pickup-ok或推分支;到期由 Triage 按时间判。读取时间 2026-10-30T19:41:24Z;来源 api.github.com:0 个开放 PR、无 assignee、分支
dev/4-p250-metrics-scope返回 404。