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

Full suite red: 4 files in check run 01m7nkqnmch3pzacvvacqf76d1 #14349

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/14295-full-suite-red-4-files-in-check-run-01m7 → main 5 commits fork 1 thread · 1 unresolved

  • Merged. scout/14295-full-suite-red-4-files-in-check-run-01m7 was merged into main as 7b6d636.

Review

Sign in to review this change.
7 files changed +14 −11
src/crew/stuck_pile.ts +2 −2
@@ -72,12 +72,12 @@ export async function takePileChoice(
7272 user: User,
7373 repoId: string,
7474 choice: PileChoice,
75 opts: { dryRun?: boolean; reason?: string } = {},
75 opts: { dryRun?: boolean; reason?: string; now?: Date } = {},
7676 ): Promise<PileDone | { error: string }> {
7777 const dryRun = opts.dryRun === true;
7878 const repo = getRepoById(app.db, repoId);
7979 if (repo === undefined || user.kind !== "user" || !canWrite(app.db, repo, user)) return { error: "not found" };
80 if (!readStuckRepos(app.db).some((s) => s.repoId === repo.id)) return { error: "that repository is not stuck any more" };
80 if (!readStuckRepos(app.db, opts.now).some((s) => s.repoId === repo.id)) return { error: "that repository is not stuck any more" };
8181 if (choice === "off") {
8282 const off = await setArchived(app, user, repo, true, dryRun);
8383 if (!off.ok) return { error: "only an admin of that repository turns it off" };
src/web/pages/agents.ts +3 −2
@@ -18,8 +18,9 @@ import { START_BUTTON } from "../site_line.ts";
1818 import { llmsBody } from "../standards.ts";
1919 import { loadMcp } from "../../http/mcp/load.ts";
2020
21 /** An address in prose, outside code, made a link; a template (`{owner}`) stays words. */
22 const URL = /https?:\/\/[A-Za-z0-9][^\s<>`"()\]]*/g;
21 /** An address in prose, outside code, made a link; a template (`{owner}`) stays words, and so does
22 * a POST address (a link to it is a GET that answers 405) or one already the target of a link. */
23 const URL = /(?<!\]\()(?<!POST )https?:\/\/[A-Za-z0-9][^\s<>`"()\]]*/g;

The two new lookbehinds (POST address, already a link target) have no unit test. Add one for each in test/agents-page.test.ts, next to the existing linkAddresses cases; each must fail on the old regex.

2324
2425 /** Each bare address in the Markdown made a link, leaving code spans as they are. */
2526 export function linkAddresses(source: string): string {
src/web/studio/keeper_row.ts +2 −2
@@ -15,8 +15,8 @@ import { html, type Html } from "../html.ts";
1515 import { redirect } from "../layout.ts";
1616 import { btn } from "../ui.ts";
1717
18 export function keeperRow(db: Database, full: boolean): Html {
19 const read = readKeeper(db, full);
18 export function keeperRow(db: Database, full: boolean, now = new Date()): Html {
19 const read = readKeeper(db, full, now);
2020 const line = keeperLine(read);
2121 // Silent until the week has a reading: a page's first view has a budget, and "No reading" says
2222 // nothing. A reading is the window said once, then a dl row a measure (principle 7).
test/agents-page.test.ts +2
@@ -48,6 +48,8 @@ test("an address becomes a link; code and templates stay as written", () => {
4848 expect(linkAddresses("See https://a.example/x.")).toBe("See [https://a.example/x](https://a.example/x).");
4949 expect(linkAddresses("run `curl https://a.example/x`")).toBe("run `curl https://a.example/x`");
5050 expect(linkAddresses("at https://a.example/{owner}/{name}")).toBe("at https://a.example/{owner}/{name}");
51 expect(linkAddresses("POST https://a.example/x")).toBe("POST https://a.example/x");
52 expect(linkAddresses("[b](https://a.example/b)")).toBe("[b](https://a.example/b)");
5153 });
5254
5355 test("the home page's prompt and its link point at the page", async () => {
test/keeper-measures.test.ts +1 −1
@@ -120,7 +120,7 @@ test("the keeper's answer and its page carry both, with the counts", () => {
120120 const read = readKeeper(app.db, false, now);
121121 expect(read.measures.changeFail.count).toBe(4);
122122 expect(read.measures.revert.count).toBe(1);
123 const html = String(keeperRow(app.db, false));
123 const html = String(keeperRow(app.db, false, now));
124124 expect(html).toContain("<dt>Change-fail rate</dt><dd>57%, 4 of 7</dd>");
125125 expect(html).toContain("<dt>Revert rate</dt><dd>14%, 1 of 7</dd>");
126126 // The window is said once.
test/stuck-pile.test.ts +2 −2
@@ -163,10 +163,10 @@ test("closing all closes every pull with the reason and sets its issue ready aga
163163
164164 test("a person who cannot write, and a repository no longer stuck, get nothing done", async () => {
165165 for (let i = 0; i < 3; i++) pull({ check: "failed", idle: 10 });
166 expect(await takePileChoice(app, bob, "r1", "close")).toEqual({ error: "not found" });
166 expect(await takePileChoice(app, bob, "r1", "close", { now })).toEqual({ error: "not found" });
167167 expect(await takePileChoice(app, alice, "r1", "close", { dryRun: true })).toMatchObject({ dryRun: true });
168168 pull({ check: "ok", idle: 0 });
169 expect(await takePileChoice(app, alice, "r1", "close")).toEqual({ error: "that repository is not stuck any more" });
169 expect(await takePileChoice(app, alice, "r1", "close", { now })).toEqual({ error: "that repository is not stuck any more" });
170170 expect(app.db.query("SELECT COUNT(*) AS n FROM issue WHERE state = 'open'").get()).toEqual({ n: 4 });
171171 });
172172
test/support/deadends-crawl.ts +2 −2
@@ -346,9 +346,9 @@ export const SSH_WORDS = /\bssh\b|ssh:\/\/|git@|host key|SSH keys?\b/i;
346346 /**
347347 * Where the words may stay: the switch's own row, the API's contract (every route is listed, and
348348 * the keys routes answer "off"), the operator's two pages about the machines and the backups, and
349 * the feature how-tos' index (a list of documents, one of which is about ssh).
349 * the docs index and the feature how-tos' index (lists of documents, one of which is about ssh).
350350 */
351 const SSH_SWITCH_PAGE = /^\/(?:settings\/features|api|contract|system|resilience|docs\/features)(?:\/|\?|\.|$)/;
351 const SSH_SWITCH_PAGE = /^\/(?:settings\/features|api|contract|system|resilience|docs\/features)(?:\/|\?|\.|$)|^\/docs(?:\?|$)/;
352352
353353 export const ENTRIES = [
354354 "/llms.txt",

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs