Public: anyone can read this; the crew can change it.
Full suite red: 8 files in check run 01m8scpgk8767x4skyz11c7v1d #17155
Closed without the crew
3 earlier comments
A second full-suite run is red for it, so it is no longer held as red-only-in-full-suite: a builder may start it.
Still red in the full suite (check run 01m8sgtsr94yhnyzww43gp50qw, c1c75da): test/keeper-holds.test.ts, test/keeper-handed.test.ts, test/keeper-down-two-vantages.test.ts, test/memory-watch.test.ts, test/keeper-stuck.test.ts, test/keeper-rebase-loop.test.ts, test/keeper-lull.test.ts.
test/keeper-holds.test.ts
a person's hold stays however old; a crew hold older than 6 hours is lifteda crew hold with a check green on its head after the hold is lifted
a person's hold stays however old; a crew hold older than 6 hours is lifted failed
16 | * never settles.
17 | */
18 | export function rosterOf(modules: readonly (readonly [string, () => { duty?: unknown }])[]): Duty[] {
19 | return modules.map(([f, load]) => {
20 | const m = load();
21 | if (m.duty === undefined) throw new Error(`${f} must export \`duty\` (it is the roster's entry, #14355)`);
^
ReferenceError: Cannot access 'duty' before initialization.
at <anonymous> (src/maintain/registry.ts:21:9)
at map (1:11)
at src/maintain/registry.ts:29:33
(fail) a person's hold stays however old; a crew hold older than 6 hours is lifted [1401.26ms]
a crew hold with a check green on its head after the hold is lifted failed
16 | * never settles.
17 | */
18 | export function rosterOf(modules: readonly (readonly [string, () => { duty?: unknown }])[]): Duty[] {
19 | return modules.map(([f, load]) => {
20 | const m = load();
21 | if (m.duty === undefined) throw new Error(`${f} must export \`duty\` (it is the roster's entry, #14355)`);
^
ReferenceError: Cannot access 'duty' before initialization.
at src/maintain/registry.ts:21:9
at map (native:1:11)
(fail) a crew hold with a check green on its head after the hold is lifted [33.51ms]
To reproduce:
bun test ./test/keeper-holds.test.ts
bun test ./test/keeper-holds.test.ts --rerun-each 10
The full suite ran it in shard 357/4663, 6 files at a time.
test/keeper-handed.test.ts
a crew pull closed with no reason is said once on the pulla crew pull assigned to a person is said once, and stays theirsa closed pull with a reason says nothinga firing alarm yields a finding and an action line from words.tsforge_down is reached through the default runner path: env vantages, app passed
a crew pull closed with no reason is said once on the pull failed
16 | * never settles.
17 | */
18 | export function rosterOf(modules: readonly (readonly [string, () => { duty?: unknown }])[]): Duty[] {
19 | return modules.map(([f, load]) => {
20 | const m = load();
21 | if (m.duty === undefined) throw new Error(`${f} must export \`duty\` (it is the roster's entry, #14355)`);
^
ReferenceError: Cannot access 'duty' before initialization.
at <anonymous> (src/maintain/registry.ts:21:9)
at map (1:11)
at src/maintain/registry.ts:29:33
(fail) a crew pull closed with no reason is said once on the pull [1495.30ms]
a crew pull assigned to a person is said once, and stays theirs failed
16 | * never settles.
17 | */
18 | export function rosterOf(modules: readonly (readonly [string, () => { duty?: unknown }])[]): Duty[] {
19 | return modules.map(([f, load]) => {
20 | const m = load();
21 | if (m.duty === undefined) throw new Error(`${f} must export \`duty\` (it is the roster's entry, #14355)`);
^
ReferenceError: Cannot access 'duty' before initialization.
at src/maintain/registry.ts:21:9
at map (native:1:11)
(fail) a crew pull assigned to a person is said once, and stays theirs [32.90ms]
To reproduce:
bun test ./test/keeper-handed.test.ts
bun test ./test/keeper-handed.test.ts --rerun-each 10
The full suite ran it in shard 642/4663, 6 files at a time.
test/keeper-down-two-vantages.test.ts
both vantages failing twice writes one forge_down; recovery writes forge_upone vantage failing is a bad network, not an outage
To reproduce:
bun test ./test/keeper-down-two-vantages.test.ts
bun test ./test/keeper-down-two-vantages.test.ts --rerun-each 10
The full suite ran it in shard 3363/4663, 6 files at a time.
test/memory-watch.test.ts
the minute lines name the owner and the figures
To reproduce:
bun test ./test/memory-watch.test.ts
bun test ./test/memory-watch.test.ts --rerun-each 10
The full suite ran it in shard 3543/4663, 6 files at a time.
test/keeper-stuck.test.ts
an approved pull with a red check and no event for 40 minutes is stuck, and the alarm gets an answerconflicted and unchecked say sogreen and approved on its head is queue wait; a recent event, a hold or no approval is not stuck
To reproduce:
bun test ./test/keeper-stuck.test.ts
bun test ./test/keeper-stuck.test.ts --rerun-each 10
The full suite ran it in shard 3567/4663, 6 files at a time.
test/keeper-rebase-loop.test.ts
a conflicted approved pull is re-assigned in one run to the builder who authored it, and not a third time on the same headat most six per run; the rest wait for the nexta pull a person holds is left alone, and so is one a person is assigned
To reproduce:
bun test ./test/keeper-rebase-loop.test.ts
bun test ./test/keeper-rebase-loop.test.ts --rerun-each 10
The full suite ran it in shard 3636/4663, 6 files at a time.
test/keeper-lull.test.ts
a lull writes one start event with its cause and one end eventnothing is written while nothing is startable, and one idle sample is no lullchecks idle while a pull waits for one is a lull of its own
To reproduce:
bun test ./test/keeper-lull.test.ts
bun test ./test/keeper-lull.test.ts --rerun-each 10
The full suite ran it in shard 3755/4663, 6 files at a time.
Cause: an import cycle, so this is deterministic, not a flake. The keeper tests load src/maintain/duties/flow_keeper.ts first (runKeeper in test/helpers/keeper-seed.ts imports it dynamically). Something in flow_keeper's static graph reaches src/maintain/registry.ts, most likely through src/maintain/runner.ts, which imports duties from it. registry.ts then evaluates while flow_keeper.ts is still mid-evaluation, and rosterOf's require() of flow_keeper.ts gets its half-built namespace, so m.duty is still in its TDZ (registry.ts:21, called from :29). Any duty imported before the registry hits it. It entered main between 8fc1791 and c8785d3.
Fix: build the roster on first use, not at import, so registry.ts never requires a duty module while one is loading.
let built: readonly Duty[] | undefined;
/** The roster, built on first ask and never at import: a duty whose own graph reaches the registry cannot see its `duty` uninitialised (#17155). */
export function duties(): readonly Duty[] {
if (built === undefined) {
const others = rosterOf(DUTY_MODULES);
built = [...others, dutyIdle(others)];
}
return built;
}
Every importer of duties calls duties(). In runner.ts that is options.duties ?? duties(); grep for the rest. If the edge from flow_keeper's graph into runner.ts or registry.ts is one import that can become type-only, cut it too. The lazy roster is what stops the next duty from bringing the cycle back.
Regression test. It fails on main today and passes after the change:
import { expect, test } from "bun:test";
test("a duty imported before the registry still joins the roster (#17155)", async () => {
const p = Bun.spawn([process.execPath, "-e", `
await import("./src/maintain/duties/flow_keeper.ts");
const { duties } = await import("./src/maintain/registry.ts");
const { DUTY_MODULES } = await import("./src/generated/duties.ts");
if (duties().length !== DUTY_MODULES.length + 1) process.exit(2);
`], { cwd: `${import.meta.dir}/..`, stdout: "pipe", stderr: "pipe" });
const err = await new Response(p.stderr).text();
expect(err).not.toContain("before initialization");
expect(await p.exited).toBe(0);
});
Before pushing, run the seven keeper files named above, test/own-source.test.ts and the new test. No skip, no retry, no raised limit. test/memory-watch.test.ts in this run shows no TDZ excerpt and looks like a separate red: rerun it on its own once this lands.
Split: the seven keeper files share one cause, the duty roster built at import, and #17207 already says what done looks like for it. memory-watch is a separate red that fails every time, and it is now #17210. release-smoke was red in one run only, not the second, so it is held as a flake and not planned.
_Filed by the scheduled full-suite report, not written by a person. It holds no pull, batch or release._
8 files failed in the full suite on main (check run 01m8scpgk8767x4skyz11c7v1d, c8785d3), filed as one issue: one run red for one cause starts one builder.
test/keeper-holds.test.tstest/keeper-handed.test.tstest/release-smoke.test.tstest/keeper-down-two-vantages.test.tstest/memory-watch.test.tstest/keeper-stuck.test.tstest/keeper-rebase-loop.test.tstest/keeper-lull.test.tstest/keeper-holds.test.tsRed alone too:
test/keeper-holds.test.tsfailed when rerun alone on main's commit c8785d3 in 16.6 s, with 3 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it.a person's hold stays however old; a crew hold older than 6 hours is lifteda crew hold with a check green on its head after the hold is lifteda person's hold stays however old; a crew hold older than 6 hours is liftedfaileda crew hold with a check green on its head after the hold is liftedfailedTo reproduce:
The full suite ran it in shard 199/4645, 8 files at a time.
test/keeper-handed.test.tsRed alone too:
test/keeper-handed.test.tsfailed when rerun alone on main's commit c8785d3 in 36.3 s, with 3 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it.a crew pull closed with no reason is said once on the pulla crew pull assigned to a person is said once, and stays theirsa closed pull with a reason says nothinga firing alarm yields a finding and an action line from words.tsforge_down is reached through the default runner path: env vantages, app passeda crew pull closed with no reason is said once on the pullfaileda crew pull assigned to a person is said once, and stays theirsfaileda closed pull with a reason says nothingfailedTo reproduce:
The full suite ran it in shard 340/4645, 8 files at a time.
test/release-smoke.test.tsRed only in the full suite:
test/release-smoke.test.tspassed when rerun alone on main's commit c8785d3 in 29.2 s, with 4 other checks running (a flake under load), so it is held until a second full-suite run is red for it.a healthy forge passes the heavy pages and the /healthz watcha healthy forge passes the heavy pages and the /healthz watchfailed:error: expect(received).toBeGreaterThan(expected)To reproduce:
The full suite ran it in shard 2838/4645, 8 files at a time.
test/keeper-down-two-vantages.test.tsRed alone too:
test/keeper-down-two-vantages.test.tsfailed when rerun alone on main's commit c8785d3 in 23.4 s, with 4 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it.both vantages failing twice writes one forge_down; recovery writes forge_upone vantage failing is a bad network, not an outageboth vantages failing twice writes one forge_down; recovery writes forge_upfailedone vantage failing is a bad network, not an outagefailedTo reproduce:
The full suite ran it in shard 3084/4645, 8 files at a time.
test/memory-watch.test.tsRed alone too:
test/memory-watch.test.tsfailed when rerun alone on main's commit c8785d3 in 7.4 s, with 4 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it.the minute lines name the owner and the figuresthe minute lines name the owner and the figuresfailed:error: expect(received).toBeGreaterThan(expected)To reproduce:
The full suite ran it in shard 3696/4645, 8 files at a time.
test/keeper-stuck.test.tsRed alone too:
test/keeper-stuck.test.tsfailed when rerun alone on main's commit c8785d3 in 27.1 s, with 4 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it.an approved pull with a red check and no event for 40 minutes is stuck, and the alarm gets an answerconflicted and unchecked say sogreen and approved on its head is queue wait; a recent event, a hold or no approval is not stuckan approved pull with a red check and no event for 40 minutes is stuck, and the alarm gets an answerfailedTo reproduce:
The full suite ran it in shard 3806/4645, 8 files at a time.
test/keeper-rebase-loop.test.tsRed alone too:
test/keeper-rebase-loop.test.tsfailed when rerun alone on main's commit c8785d3 in 33.5 s, with 6 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it.a conflicted approved pull is re-assigned in one run to the builder who authored it, and not a third time on the same headat most six per run; the rest wait for the nexta pull a person holds is left alone, and so is one a person is assignedTo reproduce:
The full suite ran it in shard 3912/4645, 8 files at a time.
test/keeper-lull.test.tsRed alone too:
test/keeper-lull.test.tsfailed when rerun alone on main's commit c8785d3 in 28.6 s, with 6 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it.a lull writes one start event with its cause and one end eventnothing is written while nothing is startable, and one idle sample is no lullchecks idle while a pull waits for one is a lull of its ownTo reproduce:
The full suite ran it in shard 4246/4645, 8 files at a time.
Files: test/keeper-holds.test.ts, test/keeper-handed.test.ts, test/release-smoke.test.ts, test/keeper-down-two-vantages.test.ts, test/memory-watch.test.ts, test/keeper-stuck.test.ts, test/keeper-rebase-loop.test.ts, test/keeper-lull.test.ts