Repository navigation
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: 1770031f9b1945de819d70155c476d98
Branch: dev/5-tree-jobtimeout
Base: 5b8d980
At: 2026-11-10T09:23:53Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Bot: FlyBot Dev-5
Problem
plugins/tree declares no way to bound its organizer's host call, and the bound it does have is never read from config.
plugins/tree/src/organize.js:21—DEFAULT_JOB_TIMEOUT_MS = 10 * 60 * 1000.plugins/tree/src/organize.js:33and:316— the only readers ofjobTimeoutMs; an illegal value falls back to the default.plugins/tree/index.js:22—apply()never forwardsctx.config.jobTimeoutMs.plugins/tree/src/tree.js:24— the destructured options omit it, and:87buildscreateOrganizer({ … })without it.
So a config that sets jobTimeoutMs is accepted and silently ignored: a hung bot.create on a queued reorganization is abandoned after 600000 ms (ten minutes) no matter what was configured, and nothing in the log says the value was dropped.
This is the queued path only (create_team → organizer queue). The single-call path is a separate defect and out of scope here.
Reproduction (red first, on live main)
plugins/tree/test/job-timeout-config.test.js on a clean checkout, only the test added, no source change:
$ TZ=UTC node --test test/job-timeout-config.test.js
# tests 2 / # pass 1 / # fail 1 / # cancelled 0
Failing assertion, verbatim from the run:
jobTimeoutMs in the plugin config was ignored; warnings: flybot-tree: reorganization job reorg-1 was abandoned after 600000ms: the host call never settled; later reorganizations continue
The test first asserts the host was really called (hostCalls === 1, from a create_team that builds FlyBot Lead), then asserts /abandoned after 30ms/ on the collected warnings. The 600000 ms in the message is the default, which is the defect: the configured value never reached the organizer.
Note on the harness: the test clamps its own setTimeout to 250 ms, so the default tier fires inside the test instead of stalling the suite for ten minutes. That clamp is in the fixture, not in the plugin — the production default stays ten minutes.
Expected
The plugin's jobTimeoutMs reaches the organizer:
index.js:22passesctx.config.jobTimeoutMs;tree.js:24destructures it and:87forwards it tocreateOrganizer.- Only a finite positive number of milliseconds takes effect:
Number.isFinite(v) && v > 0.0,-5,'30'(string),NaN,Infinityandnullall fall back to the 10-minute default — no crash, no zero-length timeout. - With the value honoured, the same queued job is abandoned after the configured 30 ms and the warning says
30ms, not600000ms.
Scope
plugins/tree/index.js— forward the config value.plugins/tree/src/tree.js— accept it in the options and pass it intocreateOrganizer.plugins/tree/test/job-timeout-config.test.js— new: the queued path, the red-first assertion above, plus a case for the illegal-value fallback.docs/subsystems/tree.md— document the key and its accepted range.changelog.d/<issue>-tree-job-timeout-config.fixed.md— user-visible behaviour change (a config key that finally works).- Not this: the ordinary single
create_child_botpath (separate defect), andplugins/tree/src/organize.js's default itself, which stays at ten minutes.
Acceptance
- Red first: on clean main with only the new test, exactly one assertion fails with the message above (
pass 1 / fail 1); no source file is touched to obtain it. - After the fix:
TZ=UTC node --test test/job-timeout-config.test.js→ 2/2, including the illegal-value fallback. plugins/treefull suite green (145/145 as measured pre-PR) and the neighbourorganize-queue-bound.test.js3/3.TZ=UTC npm run verifygreen for the changed tree (known machine-only exception, reproduced on base:core/test/bench-preflight.test.jsfails withmkdir: not foundwhen the fixture strips a PATH that contains pnpm; that red is identical on the base commit and is not caused by this change).- Lint,
arch-docs,changelogfragment well formed.
Risk tier
T2 by path (plugins/**), so this needs the repository reviewer's Verdict at the tip; no generate and no client bundle, so it does not touch the single-lane artifacts.
Dedup (checked when filed)
Live main 5b8d980f: jobTimeoutMs appears in the whole tree only at plugins/tree/src/organize.js (the reader that nobody feeds) and plugins/tree/test/organize-queue-bound.test.js; no config declares or forwards it. GitHub issue search for jobTimeoutMs returns one item, #2633 (closed, the Bot Social REST fallback's own timeout — different code, different symptom). No open or closed issue describes the tree organizer ignoring this key.
Activity
fix(tree): pass jobTimeoutMs from the plugin config to the organizer (T…