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

Sentinel: The guard parked 20 runs in a private repository (01m5th8bwh248hrnezwstf9fff) in a day #17325

opened this

Merged 40h 30m ago, live in production

mason/forge:mason/17234-sentinel-the-guard-parked-20-runs-in-a-p → main 0 commits fork

  • Merged. mason/17234-sentinel-the-guard-parked-20-runs-in-a-p was merged into main as 909a51b.

Review

Sign in to review this change.
2 files changed +13 −3
src/crew/guard.ts +10 −2
@@ -42,6 +42,14 @@ export function runCapOf(
4242 : (caps.issueRunCap ?? ISSUE_RUN_CAP);
4343 }
4444
45 /**
46 * Run reasons that are not an agent going round on one issue: a reviewer's run, a
47 * bring-up to a moved main, an answer to a red check, and the two a follow or a
48 * proposal starts at someone's ask (`resolve`, `converge`), which the follow's own
49 * conflict bound holds (#17234).
50 */
51 const NOT_GOING_ROUND = "('review', 'conflict', 'check_failed', 'resolve', 'converge')";
52
4553 /** What a skipped follow-up records, and what its run says when one was already queued. */
4654 export const SKIP_SUMMARY = "skipped: nothing new to act on since the last run";
4755
@@ -159,7 +167,7 @@ export function capReached(
159167 `SELECT COUNT(*) AS n FROM run
160168 WHERE issue_id = ?1 AND kind = 'agent' AND created_at > ?2
161169 AND attempt = 0
162 AND reason NOT IN ('review', 'conflict', 'check_failed')
170 AND reason NOT IN ${NOT_GOING_ROUND}
163171 AND summary NOT LIKE 'interrupted: %'
164172 AND summary NOT LIKE 'skipped: %'`,
165173 )
@@ -611,7 +619,7 @@ export function capReachedFor(
611619 `SELECT issue_id, created_at FROM run INDEXED BY run_agent_issue_latest
612620 WHERE issue_id IN (${marks}) AND kind = 'agent' AND created_at > ?1
613621 AND attempt = 0
614 AND reason NOT IN ('review', 'conflict', 'check_failed')
622 AND reason NOT IN ${NOT_GOING_ROUND}
615623 AND summary NOT LIKE 'interrupted: %'
616624 AND summary NOT LIKE 'skipped: %'`,
617625 )
test/crew-guard-cap.test.ts +3 −1
@@ -138,12 +138,14 @@ describe("capReached", () => {
138138 expect(reached(issue, at(CAP_WINDOW_MS + HOUR))).toBe(false);
139139 });
140140
141 test("a check-failure run, a conflict, a review, a retry, an interrupted and a skipped run are not starts", () => {
141 test("a check-failure run, a conflict, a review, a resolve, a converge, a retry, an interrupted and a skipped run are not starts", () => {
142142 const issue = issueOf();
143143 run(issue, 0);
144144 run(issue, 1, "check_failed");
145145 run(issue, 2, "conflict");
146146 run(issue, 3, "review");
147 run(issue, 6, "resolve");
148 run(issue, 7, "converge");
147149 run(issue, 4, "assigned", "interrupted: restart");
148150 run(issue, 5, "assigned", "skipped: nothing new");
149151 createRun(app.db, {

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

Keyboard shortcuts

Docs