Public: anyone can read this; the crew can change it.
A hold placed because a pull was red releases itself when that pull's check is green on the same head #6357
scout/forge:scout/6348-a-hold-placed-because-a-pull-was-red-rel → main 7 commits fork 10 threads · 10 unresolved
docs/MCP.md +1 −1
| @@ -80,7 +80,7 @@ for a tunnel and a forge that sleeps. | ||
| 80 | 80 | | `forges` | an admin's list of the forges sent from here: name, address, whom for, apps, claimed or not, last activity | | |
| 81 | 81 | | `front_page` | `{ pinned?, hidden?, weights?, dryRun? }`: the front page as a stranger sees it, ranked, with numbers; a site admin sets what is pinned (first public one featured), hidden, and what counts (weights of forks, ships, use, fresh, 0 to 10) | yes | |
| 82 | 82 | | `health` | how this forge is: the version and commit it runs, draining or not, the rollout and its incidents | | |
| 83 | | `hold` | `{ app, pull | path, why?, until?, release?, dryRun? }`: hold a pull so no rule reviews or lands it, or let it go; a person who can write, never an agent; or with `path` (no `pull`) hold new work on a file so the picker starts no build whose issue names it, or list the holds and who set each; an admin of the app; plans unless `dryRun: false` | yes | | |
| 83 | | `hold` | `{ app, pull | path, why?, until?, forRed?, release?, dryRun? }`: hold a pull so no rule reviews or lands it, or let it go; `until: "green"` frees it when a check passes on its head; `forRed` frees it on green or in a day; a person who can write, never an agent; or with `path` (no `pull`) hold new work on a file so the picker starts no build whose issue names it, or list the holds and who set each; an admin of the app; plans unless `dryRun: false` | yes | | |
| 84 | 84 | | `hooks` | `{ repo, action, url, secret, kinds, id }`: `list`, `add` (`secret`, 16–200 characters, is required) or `remove` the repository's webhooks, as `…/hooks`; an admin-scope token on a repository you administer, and a secret is never shown | yes | |
| 85 | 85 | | `invites` | `{ action, id? }`: `list` the outstanding invites (state and expiry, never a link) or `revoke` one by `id`; a person admin with an admin token, stricter than the API's list, which an `ro` token may read | yes | |
| 86 | 86 | | `issue` | `{ repo, number }`: one issue's title, state, closeReason, body, labels, assignee, comments (author, authorIsAgent, body, at) and blockedBy/blocks, as `GET …/issues/:number`; a sealed one you cannot see is not found; draws the `ui://forge/issue` card: title, state, assignee, labels and what it waits for, never the body or comments | | |
src/actions/holds.ts +13 −2
| @@ -47,7 +47,9 @@ function requireHolder( | ||
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Hold an open pull, with one line that says why. Holding a held pull |
| 50 | * changes who and why. `dry` checks everything and answers with the hold | |
| 50 | * changes who and why. `forRed` says the hold is for the red on the pull's | |
| 51 | * current head: the tick lets it go when that head is green, or after a | |
| 52 | * day (`crew/hold_sweep.ts`). `dry` checks everything and answers with the hold | |
| 51 | 53 | * that would stand, and writes nothing. |
| 52 | 54 | */ |
| 53 | 55 | export function holdPull( |
| @@ -58,6 +60,7 @@ export function holdPull( | ||
| 58 | 60 | why: string, |
| 59 | 61 | dry = false, |
| 60 | 62 | until?: "green", |
| 63 | forRed = false, | |
| 61 | 64 | ): Result<Hold, HoldError> { |
| 62 | 65 | const holder = requireHolder(app, actor, repo, pull); |
| 63 | 66 | if (!holder.ok) return holder; |
| @@ -72,8 +75,16 @@ export function holdPull( | ||
| 72 | 75 | why: reason.value, |
| 73 | 76 | heldAt: getHold(app.db, pull.id)?.heldAt ?? new Date().toISOString(), |
| 74 | 77 | ...(until ? { until } : {}), |
| 78 | redHead: forRed ? pull.headOid : null, | |
| 75 | 79 | }); |
| 76 | const hold = setHold(app.db, pull.id, holder.value.id, reason.value, until); | |
| 80 | const hold = setHold( | |
| 81 | app.db, | |
| 82 | pull.id, | |
| 83 | holder.value.id, | |
| 84 | reason.value, | |
| 85 | until, | |
| 86 | forRed ? pull.headOid : null, | |
| 87 | ); | |
| 77 | 88 | app.bus.append({ |
| 78 | 89 | kind: "pull.held", |
| 79 | 90 | repoId: repo.id, |
src/core/holds.ts +49 −5
| @@ -28,6 +28,8 @@ export interface Hold { | ||
| 28 | 28 | readonly heldAt: string; |
| 29 | 29 | /** "green": the forge lets it go when a check passes on the pull's head. */ |
| 30 | 30 | readonly until?: "green"; |
| 31 | /** The head a red-placed hold was placed on; null for a person's hold. */ | |
| 32 | readonly redHead: string | null; | |
| 31 | 33 | } |
| 32 | 34 | |
| 33 | 35 | interface Row { |
| @@ -37,6 +39,7 @@ interface Row { | ||
| 37 | 39 | why: string; |
| 38 | 40 | held_at: string; |
| 39 | 41 | until_green: number; |
| 42 | red_head: string | null; | |
| 40 | 43 | } |
| 41 | 44 | |
| 42 | 45 | const fromRow = (row: Row): Hold => ({ |
| @@ -46,10 +49,11 @@ const fromRow = (row: Row): Hold => ({ | ||
| 46 | 49 | why: row.why, |
| 47 | 50 | heldAt: row.held_at, |
| 48 | 51 | ...(row.until_green === 1 ? { until: "green" as const } : {}), |
| 52 | redHead: row.red_head, | |
| 49 | 53 | }); |
| 50 | 54 | |
| 51 | 55 | const STANDING = `SELECT pull_hold.issue_id, pull_hold.held_by, user.username, |
| 52 | pull_hold.why, pull_hold.held_at, pull_hold.until_green | |
| 56 | pull_hold.why, pull_hold.held_at, pull_hold.until_green, pull_hold.red_head | |
| 53 | 57 | FROM pull_hold JOIN user ON user.id = pull_hold.held_by |
| 54 | 58 | WHERE pull_hold.released_at IS NULL`; |
| 55 | 59 | |
| @@ -99,18 +103,19 @@ export function setHold( | ||
| 99 | 103 | by: string, |
| 100 | 104 | why: string, |
| 101 | 105 | until?: "green", |
| 106 | redHead: string | null = null, | |
| 102 | 107 | ): Hold { |
| 103 | 108 | const green = until === "green" ? 1 : 0; |
| 104 | 109 | const changed = db |
| 105 | 110 | .query( |
| 106 | `UPDATE pull_hold SET held_by = ?2, why = ?3, until_green = ?4 | |
| 111 | `UPDATE pull_hold SET held_by = ?2, why = ?3, until_green = ?4, red_head = ?5 | |
| 107 | 112 | WHERE issue_id = ?1 AND released_at IS NULL`, |
| 108 | 113 | ) |
| 109 | .run(pullId, by, why, green).changes; | |
| 114 | .run(pullId, by, why, green, redHead).changes; | |
| 110 | 115 | if (changed === 0) |
| 111 | 116 | db.query( |
| 112 | "INSERT INTO pull_hold (id, issue_id, held_by, why, until_green) VALUES (?1, ?2, ?3, ?4, ?5)", | |
| 113 | ).run(id(), pullId, by, why, green); | |
| 117 | "INSERT INTO pull_hold (id, issue_id, held_by, why, until_green, red_head) VALUES (?1, ?2, ?3, ?4, ?5, ?6)", | |
| 118 | ).run(id(), pullId, by, why, green, redHead); | |
| 114 | 119 | return getHold(db, pullId)!; |
| 115 | 120 | } |
| 116 | 121 | |
| @@ -127,6 +132,45 @@ export function releaseHold(db: Database, pullId: string, by: string): boolean { | ||
| 127 | 132 | ); |
| 128 | 133 | } |
| 129 | 134 | |
| 135 | /** A hold the rules placed because the pull was red: the head it was red on, and since when. */ | |
| 136 | export interface RedHold { | |
| 137 | readonly pullId: string; | |
| 138 | readonly heldBy: string; | |
| 139 | readonly redHead: string; | |
| 140 | readonly heldAt: string; | |
| 141 | } | |
| 142 | ||
| 143 | /** Every standing hold placed for red. A person's hold is never among them. */ | |
| 144 | export function redHolds(db: Database): RedHold[] { | |
| 145 | return db | |
| 146 | .query< | |
| 147 | { issue_id: string; held_by: string; red_head: string; held_at: string }, | |
| 148 | [] | |
| 149 | >( | |
| 150 | `SELECT issue_id, held_by, red_head, held_at FROM pull_hold | |
| 151 | WHERE released_at IS NULL AND red_head IS NOT NULL`, | |
| 152 | ) | |
| 153 | .all() | |
| 154 | .map((r) => ({ | |
| 155 | pullId: r.issue_id, | |
| 156 | heldBy: r.held_by, | |
| 157 | redHead: r.red_head, | |
| 158 | heldAt: r.held_at, | |
| 159 | })); | |
| 160 | } | |
| 161 | ||
| 162 | /** Let a red-placed hold go in the forge's own name: no person released it. False when it no longer stands. */ | |
| 163 | export function releaseRedHold(db: Database, pullId: string): boolean { | |
| 164 | return ( | |
| 165 | db | |
| 166 | .query( | |
| 167 | `UPDATE pull_hold SET released_at = strftime('%Y-%m-%dT%H:%M:%fZ','now') | |
| 168 | WHERE issue_id = ?1 AND released_at IS NULL AND red_head IS NOT NULL`, | |
| 169 | ) | |
| 170 | .run(pullId).changes > 0 | |
| 171 | ); | |
| 172 | } | |
| 173 | ||
| 130 | 174 | /** |
| 131 | 175 | * The forge lets go of a hold set "until green". False when none stands or |
| 132 | 176 | * the hold is a plain one: a green check never lifts those. |
src/core/migration-pins.json +1
| @@ -122,5 +122,6 @@ | ||
| 122 | 122 | "20261019140000-route-timing": "0fd7cfa4e0a50c4b2b36162601f9ddc3318e7fa445559732364b2b52a06de011", |
| 123 | 123 | "20261019150000-page-vitals": "63fe647d95733a5194a99ae955181f2456d5c2e8c9c38d37bbf1bad395b72bdf", |
| 124 | 124 | "20261020120000-app-vitals-five": "6c75f4137e5592bf728ffe05d42d33bc158c9dabab3c666c58bc7b6dceb57576", |
| 125 | "20261026120000-hold-for-red": "77b7d02257e9dd589fb5ad0827d159607f1913caf27e476111dc9450187b1f15", | |
| 125 | 126 | "20261026190000-hold-until-green": "2be50f3a7ee590b05ae1048f3adbe7040452501a9c684d981e2efbaf88256c58" |
| 126 | 127 | } |
src/core/migrations/20261026120000-hold-for-red.ts added +6
| @@ -0,0 +1,6 @@ | ||
| 1 | // A hold the forge's own rules placed because a pull was red (#6348) keeps | |
| 2 | // the head it was red on, so the tick can let it go when that head is | |
| 3 | // green. Null: a person's hold, which only a person lets go. Additive. | |
| 4 | export default ` | |
| 5 | ALTER TABLE pull_hold ADD COLUMN red_head TEXT; | |
| 6 | `; |
src/crew/autonomy.ts +7
| @@ -50,6 +50,7 @@ import { | ||
| 50 | 50 | stopStands, |
| 51 | 51 | } from "../core/decisions.ts"; |
| 52 | 52 | import { getHold } from "../core/holds.ts"; |
| 53 | import { sweepRedHolds } from "./hold_sweep.ts"; | |
| 53 | 54 | import { certain } from "./decide.ts"; |
| 54 | 55 | import { decideAndRecord } from "./ledger.ts"; |
| 55 | 56 | import { sentinelTick } from "./sentinel.ts"; |
| @@ -1362,6 +1363,12 @@ export async function autonomyTick( | ||
| 1362 | 1363 | } catch (error) { |
| 1363 | 1364 | log.error("sentinel failed", { error: String(error) }); |
| 1364 | 1365 | } |
| 1366 | // A hold placed for red lets go on green or after a day (`hold_sweep.ts`). | |
| 1367 | try { | |
| 1368 | sweepRedHolds(app, now.getTime()); | |
| 1369 | } catch (error) { | |
| 1370 | log.error("hold sweep failed", { error: String(error) }); | |
| 1371 | } | |
| 1365 | 1372 | // Review is not autonomy's alone: an agent's green pull is read by the |
| 1366 | 1373 | // crew's reviewer in every repository that has one. |
| 1367 | 1374 | try { |
src/crew/hold_sweep.ts added +42
| @@ -0,0 +1,42 @@ | ||
| 1 | /** | |
| 2 | * A hold placed for red lets itself go (#6348). The tick releases it when | |
| 3 | * the pull's check on its head is green (the red head or a newer one), and after a day | |
Re-wrap this docblock: the parenthetical runs past the line width. |
||
| 4 | * whatever the check says: a hold nobody remembers is not a hold. A | |
| 5 | * person's hold (no `red_head`) is never read here. | |
| 6 | */ | |
| 7 | ||
| 8 | import type { App } from "../app.ts"; | |
| 9 | import { redHolds, releaseRedHold } from "../core/holds.ts"; | |
| 10 | import { getIssueById } from "../core/issues.ts"; | |
| 11 | import { getPull } from "../core/pulls.ts"; | |
| 12 | import { verdictForHead } from "../core/runs.ts"; | |
| 13 | ||
| 14 | /** How long an automatic hold may stand. */ | |
| 15 | export const AUTO_HOLD_MS = 24 * 60 * 60 * 1000; | |
| 16 | ||
| 17 | /** Release every red-placed hold that is green on its head or a day old; how many went. */ | |
| 18 | export function sweepRedHolds(app: App, now: number): number { | |
| 19 | let released = 0; | |
| 20 | for (const hold of redHolds(app.db)) { | |
| 21 | const issue = getIssueById(app.db, hold.pullId); | |
| 22 | if (!issue) continue; | |
| 23 | const pull = getPull(app.db, issue.repoId, issue.number); | |
| 24 | if (!pull) continue; | |
| 25 | const checks = verdictForHead(app.db, pull.id, pull.headOid); | |
| 26 | const green = | |
| 27 | checks.length > 0 && | |
outdated
Low: when the builder pushes a fix and the new head goes green, the hold stays for 24 h. The red it was placed for no longer exists, and the hold now blocks a green pull. That matches the title's "same head" reading, but it is the common case. Consider releasing when the head moved and the new head is green, or explain in the pull why the hold should wait. |
||
| 28 | checks.every((c) => c.state === "ok"); | |
| 29 | const aged = now - Date.parse(hold.heldAt) >= AUTO_HOLD_MS; | |
| 30 | if (!green && !aged) continue; | |
| 31 | if (!releaseRedHold(app.db, hold.pullId)) continue; | |
| 32 | released++; | |
| 33 | // The forge let it go: no person is named, and no comment is signed as | |
| 34 | // the holder. The event is what the live page and the feed read. | |
| 35 | app.bus.append({ | |
| 36 | kind: "pull.released", | |
outdated
High: once this succeeds, append
outdated
High: this event has no actor, and |
||
| 37 | repoId: pull.repoId, | |
| 38 | payload: { number: pull.number, auto: true, reason: green ? (pull.headOid === hold.redHead ? "green" : "moved") : "aged" }, | |
Run this through the formatter; it's well past the line width. Give the nested ternary a name too, e.g. |
||
| 39 | }); | |
| 40 | } | |
| 41 | return released; | |
| 42 | } | |
outdated
High: this posts a comment as the person who placed the hold, saying something they never wrote. Do not author it as |
src/design/activity.ts +7
| @@ -78,6 +78,12 @@ export function eventVerb(event: ForgeEvent): string { | ||
| 78 | 78 | ? `told the crew the top Instagram comment as #${issue}` |
| 79 | 79 | : "told the crew the top Instagram comment"; |
| 80 | 80 | } |
| 81 | if (kind === "pull.released" && payload["auto"] === true) | |
| 82 | return payload["reason"] === "aged" | |
| 83 | ? "released the hold: it stood a day" | |
| 84 | : payload["reason"] === "moved" | |
| 85 | ? "released the hold: the new head is green" | |
| 86 | : "released the hold: green on its head"; | |
| 81 | 87 | return WORDS[kind] ?? "acted on this repository"; |
| 82 | 88 | } |
| 83 | 89 | |
| @@ -88,6 +94,7 @@ export function eventActor( | ||
| 88 | 94 | ): string { |
| 89 | 95 | if (actorName !== undefined) return actorName; |
| 90 | 96 | return event.kind.startsWith("run.") || |
| 97 | (event.kind === "pull.released" && event.payload["auto"] === true) || | |
| 91 | 98 | event.kind.startsWith("app.") || |
| 92 | 99 | event.kind.startsWith("prompt.") || |
| 93 | 100 | (event.kind === "pull.released" && event.actorId === null) |
src/http/api.ts +1
| @@ -1224,6 +1224,7 @@ const holdJson = (hold: Hold) => ({ | ||
| 1224 | 1224 | why: hold.why, |
| 1225 | 1225 | at: hold.heldAt, |
| 1226 | 1226 | ...(hold.until ? { until: hold.until } : {}), |
| 1227 | forRed: hold.redHead !== null, | |
| 1227 | 1228 | }); |
| 1228 | 1229 | |
| 1229 | 1230 | function loadPull(ctx: Ctx): Found<{ pull: Pull }> { |
src/http/mcp/tools/hold.ts +3 −1
| @@ -47,7 +47,7 @@ function fileHold(ctx: Ctx, user: User, repo: Repo, args: Args): Answer { | ||
| 47 | 47 | |
| 48 | 48 | export const tool: Tool = { |
| 49 | 49 | name: "hold", |
| 50 | doc: "`{ app, pull | path, why?, until?, release?, dryRun? }`: hold a pull so no rule reviews or lands it, or let it go; a person who can write, never an agent; or with `path` (no `pull`) hold new work on a file so the picker starts no build whose issue names it, or list the holds and who set each; an admin of the app; plans unless `dryRun: false`", | |
| 50 | doc: "`{ app, pull | path, why?, until?, forRed?, release?, dryRun? }`: hold a pull so no rule reviews or lands it, or let it go; `until: \"green\"` frees it when a check passes on its head; `forRed` frees it on green or in a day; a person who can write, never an agent; or with `path` (no `pull`) hold new work on a file so the picker starts no build whose issue names it, or list the holds and who set each; an admin of the app; plans unless `dryRun: false`", | |
| 51 | 51 | description: |
| 52 | 52 | "Hold a pull (`why`) or `release` it; or `path`: hold new work on a file. Neither: list file holds.", |
| 53 | 53 | inputSchema: { |
| @@ -65,6 +65,7 @@ export const tool: Tool = { | ||
| 65 | 65 | enum: ["green"], |
| 66 | 66 | description: "green: released when a check passes.", |
| 67 | 67 | }, |
| 68 | forRed: { type: "boolean" }, | |
| 68 | 69 | release: { |
| 69 | 70 | type: "boolean", |
| 70 | 71 | }, |
| @@ -115,6 +116,7 @@ export const tool: Tool = { | ||
| 115 | 116 | str(args["why"]), |
| 116 | 117 | dry, |
| 117 | 118 | args["until"] === "green" ? "green" : undefined, |
| 119 | args["forRed"] === true, | |
| 118 | 120 | ); |
| 119 | 121 | if (!held.ok) |
| 120 | 122 | return bad( |
src/web/studio/hold.ts +3 −1
| @@ -47,7 +47,9 @@ export function holdCard( | ||
| 47 | 47 | )} |
| 48 | 48 | <p class="muted small"> |
| 49 | 49 | No rule sends it to review or lands it until it is released. A person |
| 50 | can still ship it. | |
| 50 | can still ship it.${hold.redHead === null | |
| 51 | ? "" | |
| 52 | : " Held for red: it frees when the check is green or in a day."} | |
| 51 | 53 | </p> |
| 52 | 54 | ${when( |
| 53 | 55 | may, |
test/holds.test.ts +64
| @@ -32,6 +32,9 @@ import { claimRun, createRun, finishRun, listRuns } from "../src/core/runs.ts"; | ||
| 32 | 32 | import { createToken } from "../src/core/tokens.ts"; |
| 33 | 33 | import { createUser, getUserByName, type User } from "../src/core/users.ts"; |
| 34 | 34 | import { landIfGreen, parkPull } from "../src/crew/autonomy.ts"; |
| 35 | import { eventActor, eventVerb } from "../src/design/activity.ts"; | |
| 36 | import { AUTO_HOLD_MS, sweepRedHolds } from "../src/crew/hold_sweep.ts"; | |
| 37 | import { listComments } from "../src/core/issues.ts"; | |
| 35 | 38 | import { sendToReview, sweepReviews } from "../src/crew/review.ts"; |
| 36 | 39 | import { serve, type Servers } from "../src/http/server.ts"; |
| 37 | 40 | import { recordAskLedger } from "../src/web/studio/asks.ts"; |
| @@ -902,6 +905,67 @@ describe("a hold, as it is kept", () => { | ||
| 902 | 905 | }); |
| 903 | 906 | }); |
| 904 | 907 | |
| 908 | describe("a hold placed for red lets itself go (#6348)", () => { | |
| 909 | test("green on the same head releases it, with a note; green on a newer head too, a person's hold, and a young red hold stay", async () => { | |
| 910 | const f = await forge("forge-hold-red-", "public"); | |
| 911 | try { | |
| 912 | const now = Date.now(); | |
| 913 | const same = await f.pullOn("same"); | |
| 914 | const moved = await f.pullOn("moved"); | |
| 915 | const hand = await f.pullOn("hand"); | |
| 916 | const waiting = await f.pullOn("waiting"); | |
| 917 | for (const p of [same, moved, hand]) f.passCheck(p); | |
| 918 | expect( | |
| 919 | holdPull(f.app, f.alice, f.repo, same, "red alone, held", false, undefined, true).ok, | |
| 920 | ).toBe(true); | |
| 921 | // Held for red on a head the pull has since left. | |
| 922 | setHold(f.app.db, moved.id, f.alice.id, "red alone, held", undefined, "0".repeat(40)); | |
| 923 | setHold(f.app.db, hand.id, f.alice.id, "wait for the design"); | |
| 924 | holdPull(f.app, f.alice, f.repo, waiting, "red", false, undefined, true); | |
| 925 | ||
| 926 | expect(sweepRedHolds(f.app, now)).toBe(2); | |
| 927 | expect(getHold(f.app.db, same.id)).toBeUndefined(); | |
| 928 | expect(getHold(f.app.db, moved.id)).toBeUndefined(); | |
| 929 | expect(getHold(f.app.db, hand.id)).toBeDefined(); | |
| 930 | expect(getHold(f.app.db, waiting.id)).toBeDefined(); | |
| 931 | expect(lastRelease(f.app.db, same.id)).toBeDefined(); | |
| 932 | // The release is an event with no person behind it, and no comment is | |
| 933 | // signed as the holder. | |
| 934 | const events = f.app.db | |
| 935 | .query<{ actor_id: string | null; payload: string }, [string]>( | |
| 936 | "SELECT actor_id, payload FROM event WHERE kind = 'pull.released' AND repo_id = ?1", | |
| 937 | ) | |
| 938 | .all(f.repo.id); | |
| 939 | expect(events.length).toBe(2); | |
| 940 | expect(events[0]!.actor_id).toBeNull(); | |
| 941 | expect(JSON.parse(events[0]!.payload)).toEqual({ | |
| 942 | number: same.number, | |
| 943 | auto: true, | |
| 944 | reason: "green", | |
| 945 | }); | |
| 946 | expect(JSON.parse(events[1]!.payload).reason).toBe("moved"); | |
| 947 | expect(listComments(f.app.db, same.id)).toEqual([]); | |
| 948 | // The feed names the forge and the reason, not "someone". | |
| 949 | const ev = { kind: "pull.released", payload: JSON.parse(events[0]!.payload) } as never; | |
| 950 | expect(eventActor(ev, undefined)).toBe("the forge"); | |
| 951 | expect(eventVerb(ev)).toBe("released the hold: green on its head"); | |
| 952 | const aged = { kind: "pull.released", payload: { auto: true, reason: "aged" } } as never; | |
| 953 | expect(eventVerb(aged)).toBe("released the hold: it stood a day"); | |
| 954 | const person = { kind: "pull.released", payload: {} } as never; | |
| 955 | expect(eventActor(person, undefined)).toBe("someone"); | |
| 956 | ||
| 957 | // A day on, every red-placed hold goes; the person's never does. | |
| 958 | const later = now + AUTO_HOLD_MS + 60_000; | |
| 959 | expect(sweepRedHolds(f.app, later)).toBe(1); | |
| 960 | expect(getHold(f.app.db, waiting.id)).toBeUndefined(); | |
| 961 | expect(getHold(f.app.db, hand.id)).toBeDefined(); | |
| 962 | expect(sweepRedHolds(f.app, later + AUTO_HOLD_MS * 10)).toBe(0); | |
| 963 | } finally { | |
| 964 | await f.close(); | |
| 965 | } | |
| 966 | }); | |
| 967 | }); | |
| 968 | ||
| 905 | 969 | describe("a hold set until green", () => { |
| 906 | 970 | let f: Awaited<ReturnType<typeof forge>>; |
| 907 | 971 | let app: App; |
Medium:
red_headis written but never shown. The pull page,GET …/hold, the studio and the tty cannot tell an automatic hold from a person's, so nobody can see a hold is due to let itself go. Show it where the hold is read (Hold gainsforRed/redHead, and the pull's hold line says "held for red: frees on green or in a day").