Public: anyone can read this; the crew can change it.
Red after landing: three tests fail on main (mcp-doc-names-every-argument, thread-window, capacity) and are in every pull's failures #13363
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/13243-red-after-landing-three-tests-fail-on-ma → main 3 commits fork
2 files
changed +15
−8
src/http/mcp/tools/explore.ts +1 −1
| @@ -4,7 +4,7 @@ import { exploreRun } from "../reads.ts"; | ||
| 4 | 4 | |
| 5 | 5 | export const tool: Tool = { |
| 6 | 6 | name: "explore", |
| 7 | doc: "`{ kind: tree, app }`: `{ app, upstream, forks, truncated }`, rows `{ repo, follows, standing, updatedAt }` for the app, the chain above it (nearest first) and its direct forks, in the words of the forks page, only what you may read, drawn on the `ui://forge/explore` card as upstream, this and fork rows; else `{ q?, cursor? }` (`query` is the same, `q` wins): the apps and people you can see, ranked, with `total` and `line` (how many the filter leaves, in the page's words) and, when filtered, `clear` (the call that drops it), with their numbers and `why` (a short line on the ranking, absent when none); `kind:` `sort:` `updated:` `owner:` `archived:` `forks:N` `ships:N` `live:yes` and words in one line; each also as its own argument (`since` = `updated`); page on with `cursor`", | |
| 7 | doc: "`{ kind: tree, app }`: `{ app, upstream, forks, truncated }`, rows `{ repo, follows, standing, updatedAt }` for the app, the chain above it (nearest first) and its direct forks, in the words of the forks page, only what you may read, drawn on the `ui://forge/explore` card as upstream, this and fork rows; else `{ q?, cursor? }` (`query` is the same, `q` wins): the apps and people you can see, ranked, with `total` and `line` (how many the filter leaves, in the page's words) and, when filtered, `clear` (the call that drops it), with their numbers and `why` (a short line on the ranking, absent when none); `kind:` `sort:` `updated:` `owner:` `archived:` `forks:N` `ships:N` `live:yes` `mine:yes` (your own apps) and words in one line; each also as its own argument (`since` = `updated`); page on with `cursor`", | |
| 8 | 8 | description: |
| 9 | 9 | "The apps, people (and, for an admin, forges) you can see, ranked.", |
| 10 | 10 | inputSchema: { |
test/capacity.test.ts +14 −7
| @@ -638,7 +638,8 @@ describe("the next check honours a concurrency the admin lowered, and gets the s | ||
| 638 | 638 | }); |
| 639 | 639 | |
| 640 | 640 | test("lowered to one, three repositories' checks run one at a time; each sees FORGE_CHECK_SHARDS", async () => { |
| 641 | // Invariant: a checks.concurrency lowered below the boot's three admits one check at a time, and checks.shards reaches each check's env. | |
| 641 | // Invariant: a checks.concurrency lowered below the boot's three admits one check at a time, | |
| 642 | // and checks.shards reaches each check's env. | |
| 642 | 643 | expect(changeCapacity(app, alice, "checks.concurrency", "1").ok).toBe(true); |
| 643 | 644 | expect(changeCapacity(app, alice, "checks.shards", "2").ok).toBe(true); |
| 644 | 645 | const repos: Repo[] = []; |
| @@ -685,7 +686,8 @@ describe("the next check honours a concurrency the admin lowered, and gets the s | ||
| 685 | 686 | } |
| 686 | 687 | expect(done.map((r) => r.state)).toEqual(["ok", "ok", "ok"]); |
| 687 | 688 | expect(most).toBe(1); |
| 688 | // The scheduler resized the gate itself (not only the admission reads): booted at three, it now holds one. | |
| 689 | // The scheduler resized the gate itself (not only the admission reads): booted at three, it now | |
| 690 | // holds one. | |
| 689 | 691 | expect(checks.lane.limit).toBe(1); |
| 690 | 692 | for (const run of done) |
| 691 | 693 | expect(readRunLog(dataDir, run.id).lines).toContain("shards=2"); |
| @@ -768,7 +770,8 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"ok","total | ||
| 768 | 770 | }); |
| 769 | 771 | |
| 770 | 772 | test("raised from one to two at boot's one, two agents run at once; each shell is told the shards", async () => { |
| 771 | // Invariant: crew.concurrency raised above the boot's one lets the next pick run two agents at once, and checks.shards reaches each agent's env. | |
| 773 | // Invariant: crew.concurrency raised above the boot's one lets the next pick run two agents at | |
| 774 | // once, and checks.shards reaches each agent's env. | |
| 772 | 775 | expect(changeCapacity(app, alice, "crew.concurrency", "2").ok).toBe(true); |
| 773 | 776 | expect(changeCapacity(app, alice, "checks.shards", "4").ok).toBe(true); |
| 774 | 777 | for (const agent of agents) { |
| @@ -798,14 +801,18 @@ echo '{"type":"result","subtype":"success","is_error":false,"result":"ok","total | ||
| 798 | 801 | const running = runs.filter((r) => r.state === "running").length; |
| 799 | 802 | most = Math.max(most, running); |
| 800 | 803 | if (running === 1) alone += 1; |
| 801 | if (most === 2 || alone >= 3) writeFileSync(join(dataDir, "release"), ""); | |
| 804 | if (most === 2 || alone >= 100) writeFileSync(join(dataDir, "release"), ""); | |
| 802 | 805 | if (most === 2 && told() === 2) break; |
| 803 | if (runs.length === 2 && runs.every((r) => r.state !== "running" && r.state !== "queued")) break; | |
| 804 | 806 | await Bun.sleep(20); |
| 805 | 807 | } |
| 806 | 808 | writeFileSync(join(dataDir, "release"), ""); |
| 807 | expect(most).toBe(2); | |
| 808 | expect(told()).toBe(2); | |
| 809 | // A run that ended early (a slow machine's clone, a requeue) is not a | |
| 810 | // verdict: the loop waits for both agents' logs to say the shards, or | |
| 811 | // the deadline, and the failure names what each run did. | |
| 812 | const seen = listRuns(app.db, repo.id, { kind: "agent" }).map( | |
| 813 | (r) => `${r.state}: ${readRunLog(dataDir, r.id).lines.slice(-6).join(" | ")}`, | |
| 814 | ); | |
| 815 | expect({ most, told: told(), seen }).toMatchObject({ most: 2, told: 2 }); | |
| 809 | 816 | }, 60_000); |
| 810 | 817 | }); |
| 811 | 818 |
new above
offline