Public: anyone can read this; the crew can change it.
Full suite red: test/requested.test.ts #12865
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/12842-full-suite-red-test-requested-test-ts → main 1 commit fork 1 thread · 1 unresolved
1 file
changed +15
−4
test/requested.test.ts +15 −4
| @@ -274,12 +274,17 @@ describe("a pull with changes requested always moves", () => { | ||
| 274 | 274 | app.db.query("UPDATE issue SET state = 'closed' WHERE id = ?1").run(pull.id); |
| 275 | 275 | }); |
| 276 | 276 | |
| 277 | test("both shapes move within one tick, and /boards tells them apart", async () => { | |
| 277 | describe("both shapes in play at once", () => { | |
| 278 | let stale: Pull; | |
| 279 | let current: Pull; | |
| 280 | beforeAll(async () => { | |
| 278 | 281 | // Every earlier pull is settled: only these two are in play. |
| 279 | 282 | app.db.query("UPDATE issue SET state = 'closed' WHERE repo_id = ?1 AND kind = 'pull'").run(repo.id); |
| 280 | const stale = await staleShape(); | |
| 281 | const current = await currentShape(); | |
| 283 | stale = await staleShape(); | |
| 284 | current = await currentShape(); | |
| 285 | }, 30_000); | |
| 282 | 286 | |
| 287 | test("/boards and the terminal tell them apart", async () => { | |
| 283 | 288 | const waits = requestedWaits(app.db); |
| 284 | 289 | expect(waits.reviewer.map((p) => p.number)).toEqual([stale.number]); |
| 285 | 290 | expect(waits.builder.map((p) => p.number)).toEqual([current.number]); |
| @@ -308,7 +313,9 @@ describe("a pull with changes requested always moves", () => { | ||
| 308 | 313 | const agentDialog = flowLines(app.db, new Date(), undefined, { queues: [] }).join(" "); |
| 309 | 314 | expect(agentDialog).not.toContain("changes requested"); |
| 310 | 315 | |
| 311 | // So does the MCP flow tool. | |
| 316 | }); | |
| 317 | ||
| 318 | test("the MCP flow tool and telemetry say the same", async () => { | |
| 312 | 319 | const res = await fetch(`${servers.url}/mcp`, { |
| 313 | 320 | method: "POST", |
| 314 | 321 | headers: { |
| @@ -335,11 +342,15 @@ describe("a pull with changes requested always moves", () => { | ||
| 335 | 342 | expect([...agentFlow.builder.pulls, ...agentFlow.reviewer.pulls]).toEqual([]); |
| 336 | 343 | expect(agentFlow.builder.says).toBeNull(); |
| 337 | 344 | |
| 345 | }); | |
| 346 | ||
| 347 | test("both move within one tick", async () => { | |
| 338 | 348 | await autonomyTick(app, new Date(), async () => 0); |
| 339 | 349 | expect(runs(stale, "review")).toHaveLength(1); |
| 340 | 350 | expect(runs(current, "feedback")).toHaveLength(1); |
| 341 | 351 | expect(runs(current, "feedback")[0]!.actorId).toBe(builder.id); |
| 342 | 352 | }); |
| 353 | }); | |
| 343 | 354 | |
| 344 | 355 | test("the tally counts moved pulls and groups the rest by reason", async () => { |
| 345 | 356 | app.db.query("UPDATE issue SET state = 'closed' WHERE repo_id = ?1 AND kind = 'pull'").run(repo.id); |
new above
offline
Indent the contents of this nested describe one level (let/beforeAll/tests), and trim the 30_000 timeout to what the setup needs (about 0.5s locally).