Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:39d89j4f7b is past its budget: trevato/forge: "a pull whose review loop is spent is the planner's (#1655) > the planner is asked for it and its brief … #4042
The test "the planner is asked for it and its brief says three reviews asked for changes" no longer depends on timing. The suite passes locally (3 tests). I couldn't run bun x tsc --noEmit because Bun couldn't write to its temp dir in this sandbox, so the type check is unverified.
stopped closed without shipping deploy 420bf9e
Test-only fix for a race: the crew used to start in beforeAll, so a tick could ask the planner before the pull was spent. It now starts after the three changes_requested reviews are in place. The file passes locally (3 pass, 0 fail). crew?.stop() in afterAll is correct now that the crew may never start. No app code changed, so there is nothing to see in the preview.
Two things I would do next: (1) If this test ever flakes again, assert on the planner prompt rather than on ["planned","idle"], which accepts either outcome. (2) Wrap startCrew in a try/finally inside the test so a failure before crew is assigned cannot leave a ticking crew behind.
Declined: I found nothing further to fix, and I couldn't reproduce the failure. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m5eg49yh227wgqxgxtxeaekx
The test "the planner is asked for it and its brief says three reviews asked for changes" no longer depends on timing. The suite passes locally (3 tests). I couldn't run
bun x tsc --noEmitbecause Bun couldn't write to its temp dir in this sandbox, so the type check is unverified. I haven't seen the forge's check run on the push yet.Cause:
test/crew-parks-planner.test.tsstarted the crew inbeforeAll, ticking every 50 ms. On a slow check machine, a tick could ask the planner before the pull and its three change-request reviews existed. That planning run wrote a brief without the pull, anddriveRepothen reported the planner as already asked. The brief assertions then failed. I inferred this from the code and haven't reproduced the failure.Fix: For that describe block only, the crew now starts inside the test, after the pull and reviews are in place and
handedOverPullshas been checked. The stand-in binary path is kept infakeBinary, andafterAllusescrew?.stop()so a test that never started the crew still cleans up.I didn't touch the other test in the file, which doesn't depend on the order of setup.
Closes #4041