Public: anyone can read this; the crew can change it.

Sentinel: red:01m23vygyffx5hg2f5vm8r74sr was degraded 96 minutes today: trevato/forge: main is red at 931899b — "a private repository is linked only to who may read it" fails; 3 pull checks w… #6643

opened this

Merged 39d 0h ago, live in production

I raised the timeout on the flaky migrate test from 30 s to 90 s. I never saw the red failure, so I haven't confirmed that the timeout was the cause. What I found Both failing tests pass when run alone.

Notes

opened this

I raised the timeout on the flaky migrate test from 30 s to 90 s. I never saw the red failure, so I haven't confirmed that the timeout was the cause.

What I found

  • Both failing tests pass when run alone. test/migrate.test.ts and test/apps-door.test.ts together came out 37 for 37, and migrate.test.ts on its own 25 for 25 after the change.
  • The latest commit on main already says b83077d's check failed migrate.test.ts under load and that it passes alone.
  • The test "the app's branch: the person's newest beats the source's default…" runs a git setup, three migrations and a fake GitHub round trip. That makes a timeout the likely failure under load.
  • The earlier red, "a private repository is linked only to who may read it" in apps-door.test.ts, no longer fails. Its test already pins a running run to stop the preview deploy racing it, and I made no change there.

What changed

  • One line in test/migrate.test.ts (line 1061): the timeout on the "the app's branch…" test goes from 30 s to 90 s. Nothing else changed.

What I chose not to do

  • I left the test's body alone, so it still runs three migrations. Splitting it would cut the load, but that is a bigger change than this issue needs.
  • If main goes red on this test again with a message other than a timeout, the cause is something else, and the log from that check is the place to start.

How to try it

  • Run bun test test/migrate.test.ts.
  • The sentinel's red:01m23vygyffx5hg2f5vm8r74sr should stay out of the degraded list once main's check is green again.

Closes #6614

Show 7 earlier items

7 earlier comments
commented

One more rule this needs, seen 2026-10-27 03:15–03:31Z: the prefix #6582,#6590 came back red (4 failed, 369 s), then the longer prefix #6582,#6590,#6592 came back green (696 s). A longer prefix green means the shorter red was a flake. The queue didn't land the green prefix; it gated #6582 alone as a suspect (625 s, green) and landed only that. About 20 gate-minutes were lost, and 1 landing in that hour instead of 3.

Add:

  • When a longer stacked prefix is green, land it, including every pull in it, even if a shorter prefix was red. Record the shorter red as a flake (test names onto the flake list).
  • A suspect that has ridden in a green prefix is cleared.
  • Test: prefixes [a,b] red and [a,b,c] green give a, b and c landing in one step, with no solo gate.
commented

This push covers @juniper's first point and @trevato's longer-prefix rule. I did not do the 3+ flakes alert or the migration pin. The type check and the merge-queue, flake, vitals, health and dashboard tests pass here. I did not run the full suite, and the forge's check runs on this push.

What changed

  • Terminal refresh (@juniper's line comment, src/actions/health.ts:113): forgeFlakes now calls flakeList directly, one query, instead of running all of forgeVitals.
  • Longer green prefix lands (src/checks/queue.ts, judged):
    • In a red candidate's prefix search, the longest green prefix now lands whole, every pull in it, even if a shorter prefix was red.
    • Every pull in it is cleared as a suspect.
    • The shorter red goes to a new onFlake hook. src/crew/autonomy.ts wires it to recordFlakes, so the test names reach the flake list and the 2-in-7-days issue rule applies.
    • Red verdicts now carry the failed test names (tests, from landVerdict).
    • Test in test/merge-queue-search.test.ts: prefixes [a,b] red and [a,b,c] green land a, b and c in one step. The gates are exactly the whole, [a,b] and [a,b,c], with no solo gate, and the red is reported as a flake.
  • Left for the next candidate: in that test the whole was already known red, so d is handed back as the culprit, with no extra gate.

Not done

  • Flakes from the queue: these rows have no file, since the queue only sees test names. They show on the list and board, but a filed issue's "Files:" line is empty.
  • Stacked flights: the rule covers prefixes inside one candidate's search. A red head flight with a green flight stacked behind it is still discarded and re-formed. Landing that green flight needs settleHead changes, so I'd do it as its own pull.
  • 3+ flakes alert (@juniper's second point): not added, so a green main can still hide a repeated flake until someone reads the list.
  • Migration pin for the release agent: not added. I couldn't find what it expects, and I won't guess a schema.
commented

The merge conflict is fixed and pushed. Merging main into the branch conflicted in src/checks/queue.ts, src/checks/tiers.ts and src/crew/autonomy.ts. Main had added a persistent gate store, a gate reason on red verdicts and adopt. I kept both sides in each file and changed none of main's code.

The type check is clean and 160 tests pass across the merge-queue, flake, vitals, health and autonomy suites. I did not run the full suite, and the forge's check runs on this push.

This is still the earlier pull description, plus the merge:

  • Longer green prefix lands whole: a longer green prefix now lands whole over a shorter red one. Every pull in it is cleared as a suspect. The red is recorded as a flake through onFlake, so the test names reach the flake list.
  • Terminal refresh: forgeFlakes now reads the flake list in one query. It no longer recomputes all the vitals.
  • Test: [a,b] red and [a,b,c] green land a, b and c in one step with no solo gate.
  • Not done: the stacked-flight case, where a green flight stacked behind a red head is still discarded and re-formed. The 3+ flakes alert and the release agent's migration pin are also not done.
commented

All of @juniper's requested changes are in and pushed. The type check, the design lint and 328 tests across the check-flake, merge-queue, vitals, health and board suites pass here. I did not run the full suite, and the forge's check runs on this push.

  • Queue flake rows (src/crew/autonomy.ts, src/checks/flake.ts):
    • The onFlake callback now calls a new recordQueueFlakes.
    • The row's commit is the green prefix's tip, and its run id is gate-<tip12>.
    • The file comes from the red verdicts' learn, but only when they name exactly one file. The verdict names tests and files separately, so with several files or none I can't tell which test came from which.
    • With no known file, the flake is still counted and listed but files no issue, so there is no empty Files: line. recordFlakes now skips filing whenever the file is empty.
    • A new test checks what lands in check_flake and the issue body, including the no-issue path.
  • Re-run flag (src/checks/service.ts): the main-check re-run now depends on its own isMain flag instead of fileOrderDependent.
  • Line width: I wrapped the long lines I had added in src/checks/queue.ts and src/checks/flake.ts. In src/crew/autonomy.ts the lines I added are under the width; the long lines already there I left alone.
  • Attention need: a test that flakes 3 or more times in a week now shows in the admin needs list, through flakeNeeds in forgeNeeds. This is not an alert or page card, only a line in that list. A test covers the 2-versus-3 threshold.

Still not done: the stacked-flight case (a green flight stacked behind a red head is still discarded and re-formed) and the release agent's migration pin. I couldn't find what the pin expects and won't guess a schema.

commented

Handed to a person by the crew: this pull is approved, but 2 runs to bring it up to date with main ended without a push, so no more start here. Conflicting files: src/checks/queue.ts. Merge main into it, or say what to try and assign it back to the crew. (The forge posts this under your name; you did not write it.)

commented

This pull now re-runs a failing main check's one or two named tests alone before main counts as red. It is merged up to date with main, and the only conflict was in src/checks/queue.ts. I ran tsc and the flake, merge-queue, TUI-screens and vitals tests, and they pass. I did not run the whole suite, which the forge's check does on push.

  • What the pull does: A main check that fails one or two named tests re-runs them alone before main counts as red. Passing alone keeps main green and records the flake. Failing alone, a build error, a hook or more than two failures stay red.
  • Queue rule: A longer green prefix lands whole over a shorter red one, and the red is recorded as a flake.
  • Where it shows: The flake line is on the home board for an admin only, and in the terminal dashboard.
  • Merge: Main added a tests: GateTests field to the gate verdict, which clashed with the tests: string[] field this pull had added. I dropped mine and read the failing tests from main's field.
  • Follow-up from the review: Each failing test now carries its own file from the verdict. A queue-recorded flake therefore files an issue even when the verdicts name several files. A test covers it in test/check-flake.test.ts. Flakes with no file anywhere are still listed and file no issue.
  • Left out: The stacked-flight case, where a green flight behind a red head is still discarded and re-formed, is for its own pull.
  • Try it: bun test test/check-flake.test.ts test/merge-queue-search.test.ts.
commented

I merged main into the branch and pushed it. The only conflict was in src/checks/queue.ts, in the doc comment above judged. I kept both sides' text: the flake rule (a longer green prefix lands whole over a shorter red one) and main's √n − 1 prefix search with leave-one-out. No code needed changing.

tsc is clean, and the flake and merge-queue tests pass (80 tests). I did not run the whole suite; the forge's check does that on the push.

The rest of the pull is as described before:

  • A main check that fails one or two named tests re-runs them alone before main counts as red.
  • Passing alone keeps main green and records the flake.
  • Failing alone, a build error, a hook or more than two failures stay red.
  • The queue records a flake when a longer green prefix lands over a shorter red one.
  • Each failing test carries its own file, so queue flakes can file issues.
  • The flake line is on the home board for an admin only, and in the terminal dashboard.

Left out: the stacked-flight case, where a green flight behind a red head is still discarded and re-formed, is for its own pull.

commented

I changed nothing and pushed nothing, because the diff this review describes isn't the one on the branch. git diff origin/main...HEAD touches 15 files, and none of them is a flow-panel, idle-pull or CSS file.

  • Flake work is in the diff:
    • The re-run of one or two failed tests alone is in src/checks/flake.ts and src/checks/service.ts.
    • The recorded flakes are in the check_flake migration, with a flake line on the home board and in the terminal dashboard.
    • The queue rule is in src/checks/queue.ts (a longer green prefix lands whole over a shorter red one).
    • The tests are test/check-flake.test.ts, test/merge-queue-search.test.ts, test/board.test.ts, test/vitals.test.ts and test/tui-screens.test.ts.
  • Flow-panel work is not here:
    • test/flow-panel-idle-parked.test.ts doesn't exist in this tree.
    • .flow-row appears nowhere in src, and the branch has no flow-panel.ts, flow.ts or components.ts change.
    • src/flow/idle_pulls.ts is already on main. It is not from this branch (the diff touches no flow file).
  • The three comments: the duplicate import in src/tui/screens/flow.ts, the one-off .flow-row class and the idle-pull lines on /boards all belong to the #6480 idle-pull change, not to this branch. They look like they were written against another pull's diff, so I couldn't act on them.

If a review still sees those files, re-diff it against origin/main at 62ca365c.

On the third point: the flake line is on the home board for an admin only, and in the terminal dashboard. Unlike the idle-pull lines, it is not drawn only on /boards.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs