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 … #4054
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/4041-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 1 commit fork
1 file
changed +13
−10
test/crew-parks-planner.test.ts +13 −10
| @@ -98,6 +98,7 @@ describe("a pull whose review loop is spent is the planner's (#1655)", () => { | ||
| 98 | 98 | let e: Engine; |
| 99 | 99 | let crew: CrewHandle; |
| 100 | 100 | let promptFile: string; |
| 101 | let fakeBinary: string; | |
| 101 | 102 | |
| 102 | 103 | beforeAll(async () => { |
| 103 | 104 | e = await engine("forge-spent-pull-"); |
| @@ -118,19 +119,11 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"Nothing to | ||
| 118 | 119 | `, |
| 119 | 120 | ); |
| 120 | 121 | chmodSync(fake, 0o755); |
| 121 | crew = await startCrew(e.app, { | |
| 122 | forgeUrl: e.servers.url, | |
| 123 | localUrl: e.servers.url, | |
| 124 | binary: fake, | |
| 125 | concurrency: 1, | |
| 126 | budgetUsd: 1, | |
| 127 | runTimeoutMs: 60_000, | |
| 128 | tickMs: 50, | |
| 129 | }); | |
| 122 | fakeBinary = fake; | |
| 130 | 123 | }, 30_000); |
| 131 | 124 | |
| 132 | 125 | afterAll(async () => { |
| 133 | await crew.stop(); | |
| 126 | await crew?.stop(); | |
| 134 | 127 | await e.close(); |
| 135 | 128 | }); |
| 136 | 129 | |
| @@ -164,6 +157,16 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"Nothing to | ||
| 164 | 157 | commitOid: pull.headOid, |
| 165 | 158 | }); |
| 166 | 159 | expect(handedOverPulls(e.app.db, e.fresh()).map((h) => h.number)).toEqual([pull.number]); |
| 160 | // The crew starts only now: ticking earlier could ask the planner before the pull is spent. | |
| 161 | crew = await startCrew(e.app, { | |
| 162 | forgeUrl: e.servers.url, | |
| 163 | localUrl: e.servers.url, | |
| 164 | binary: fakeBinary, | |
| 165 | concurrency: 1, | |
| 166 | budgetUsd: 1, | |
| 167 | runTimeoutMs: 60_000, | |
| 168 | tickMs: 50, | |
| 169 | }); | |
| 167 | 170 | // The crew's own tick may ask the planner first; either way it is asked once. |
| 168 | 171 | const asked = await driveRepo(e.app, e.fresh()); |
| 169 | 172 | expect(["planned", "idle"]).toContain(asked); |
new above
offline