apps/app/src/mainview/state/controller/failures.test.ts:70:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/failures.test.ts:73:  const originalTimeout = globalThis.setTimeout
apps/app/src/mainview/state/controller/failures.test.ts:74:  const held: Array<ReturnType<typeof setTimeout>> = []
apps/app/src/mainview/state/controller/failures.test.ts:76:  const timers = spyOn(globalThis, "setTimeout").mockImplementation(((callback: (...args: unknown[]) => void, ms?: number, ...args: unknown[]) => {
apps/app/src/mainview/state/controller/failures.test.ts:84:  }) as typeof setTimeout)
apps/app/src/mainview/state/controller/failures.test.ts:223:    store.dispatch({ type: "toast.shown", actor: "system", key: "repeat", title: "Working" })
apps/app/src/mainview/state/controller/failures.test.ts:224:    failures.resolveToast("repeat", { status: "ok", title: "Done", detail: "" })
apps/app/src/mainview/state/controller/failures.test.ts:225:    failures.resolveToast("repeat", { status: "ok", title: "Done", detail: "" })
apps/app/src/mainview/state/controller/failures.test.ts:228:    expect(store.collections.toasts.get("toast-repeat")).toMatchObject({ status: "ok", title: "Done" })
apps/app/src/mainview/state/controller/failures.test.ts:230:    expect(store.collections.toasts.has("toast-repeat")).toBe(false)
apps/app/src/mainview/state/controller/registration.ts:6: * registration per account; a repeated start for the same repository reopens
apps/app/src/mainview/state/controller/registration.ts:85:      await new Promise<void>((resolve) => ctx.unref(setTimeout(resolve, ctx.workflowPollMs)))
apps/app/src/mainview/state/seams/LandingsSeam.ts:160: * Commit status rows repeat contexts across re-runs and arrive created_at
apps/app/src/mainview/state/seams/IntegrationsSeam.test.ts:23:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/IntegrationsSeam.test.ts:26:      timer = setTimeout(() => reject(new Error("Integrations fixture work did not settle")), 3_000)
apps/app/src/mainview/state/seams/IntegrationsSeam.test.ts:478:  { name: "long connection", change: { connection_id: "c".repeat(129) }, words: "connection id" },
apps/app/src/mainview/state/seams/IntegrationsSeam.test.ts:504:  await new Promise<void>(resolve => { setTimeout(resolve, 5) })
apps/app/src/mainview/state/seams/TriggersVerbatim.test.tsx:9:afterAll(async () => { await new Promise(resolve => setTimeout(resolve, 0)); await GlobalRegistrator.unregister() })
apps/app/src/mainview/state/seams/RepoTreeSeam.ts:43: * answer stands. A `failed` box never settles (the settle watch polls only
apps/app/src/mainview/state/seams/StackSeam.ts:104:  readonly timers: Map<string, ReturnType<typeof setTimeout>>
apps/app/src/mainview/state/seams/StackSeam.ts:242:        const timer = setTimeout(() => {
apps/app/src/mainview/state/seams/StackSeam.ts:294:    const timer = setTimeout(done, ms)
apps/app/src/mainview/state/seams/StackSeam.ts:674:    const timer = setTimeout(() => {
apps/app/src/mainview/state/seams/CloudSeam.ts:9: * `openExternal` door opens it in the system browser, and the seam polls the
apps/app/src/mainview/state/seams/CloudSeam.ts:36:  /** The session poll cadence while the login is out in the browser; tests shorten it. */
apps/app/src/mainview/state/seams/CloudSeam.ts:37:  readonly pollMs?: number
apps/app/src/mainview/state/seams/CloudSeam.ts:42:const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms))
apps/app/src/mainview/state/seams/CloudSeam.ts:45:  const pollMs = deps.pollMs ?? 2000
apps/app/src/mainview/state/seams/CloudSeam.ts:115:        await wait(pollMs)
apps/app/src/mainview/state/seams/RepoImportSeam.ts:3: * GET /api/github/import/{jobId} polls it; POST /api/github/import/{jobId}/retry
apps/app/src/mainview/state/seams/RepoImportSeam.ts:10: * src/smithersCloud/githubImport.ts (startImport/pollImport) against plue
apps/app/src/mainview/state/seams/RepoImportSeam.ts:37: * consecutive dropped polls tolerated before the loop stops tracking. The
apps/app/src/mainview/state/seams/RepoImportSeam.ts:48:/** The honest sign-off when polling can no longer see the job. */
apps/app/src/mainview/state/seams/RepoImportSeam.ts:133:const sleep = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms))
apps/app/src/mainview/state/seams/RepoImportSeam.ts:147:/** The card fields a poll or a refusal can touch; unset keys keep their last values. */
apps/app/src/mainview/state/seams/RepoImportSeam.ts:275:     * loop parked in a poll across a re-run can never pass this fence.
apps/app/src/mainview/state/seams/RepoImportSeam.ts:291:        // A dropped poll is retried below; the job keeps running upstream.
apps/app/src/mainview/state/seams/RepoImportSeam.ts:302:         * (review finding 6: every non-OK poll used to read as a lost stream).
apps/app/src/mainview/state/seams/SecretsSeam.ts:113:  /** The wait between device-sign-in polls; tests hold or skip it. */
apps/app/src/mainview/state/seams/SecretsSeam.ts:135:  const sleep = options.sleep ?? ((ms: number) => new Promise<void>(resolve => setTimeout(resolve, ms)))
apps/app/src/mainview/state/seams/SecretsSeam.ts:254:   * The server answers `pending` to an early poll, so a transient refusal
apps/app/src/mainview/state/seams/SecretsSeam.ts:257:  const poll = async (row: Pending, device: NonNullable<Pending["device"]>, current: () => boolean): Promise<true | string | typeof TOAST_SUPERSEDED> => {
apps/app/src/mainview/state/seams/SecretsSeam.ts:318:            return await poll(row, row.device, current)
apps/app/src/mainview/state/seams/SecretsSeam.ts:447:        return await poll(row, device, current)
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:82:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:469:  const body = "large issue body ".repeat(2_000)
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1154:    await new Promise(resolve => setTimeout(resolve, 2_100))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1159:    await new Promise(resolve => setTimeout(resolve, 2_100))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1184:test("chat sends persist and acknowledge before an unresolved POST, dedupe repeated input, and settle the shared toast from completion", async () => {
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1205:    await new Promise(resolve => setTimeout(resolve, 350))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1215:    for (let i = 0; i < 50 && (store.collections.cards.get(card.id) as typeof card).payload.pendingComments?.length; i++) await new Promise(resolve => setTimeout(resolve, 10))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1216:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1256:    for (let i = 0; i < 50 && posts.length === 0; i++) await new Promise(resolve => setTimeout(resolve, 10))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1257:    await new Promise(resolve => setTimeout(resolve, 400))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1281:    await new Promise(resolve => setTimeout(resolve, 50))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1286:    await new Promise(resolve => setTimeout(resolve, 50))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1312:    await new Promise(resolve => setTimeout(resolve, 100))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1330:    await new Promise(resolve => setTimeout(resolve, 350))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1334:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1337:    await new Promise(resolve => setTimeout(resolve, 2_000))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1371:    await new Promise(resolve => setTimeout(resolve, 50))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1378:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1384:test("a delayed poll cannot replace a newer mutation receipt and does not overlap itself", async () => {
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1395:        reading(); await body; stream.enqueue(new TextEncoder().encode(JSON.stringify([wireComment(31, "stale poll")]))); stream.close()
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1406:    await new Promise(resolve => setTimeout(resolve, 2_100))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1411:    await new Promise(resolve => setTimeout(resolve, 40))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1432:    await new Promise(resolve => setTimeout(resolve, 350))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1439:    await new Promise(resolve => setTimeout(resolve, 100))
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1592:  test("a repeated opaque cursor refuses partial success, keeps requests scoped, and a fresh full read recovers", async () => {
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1593:    let repeated = true
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1597:      "GET /api/repos/will/flows/issues/7/comments": request => repeated
apps/app/src/mainview/state/seams/IssuesSeam.test.ts:1612:    repeated = false
apps/app/src/mainview/state/controller/backgroundWork.ts:35:  const pending = new Map<string, ReturnType<typeof setTimeout>>()
apps/app/src/mainview/state/controller/backgroundWork.ts:58:          const timer = setTimeout(() => { void (async () => {
apps/app/src/mainview/state/seams/ContentsPages.test.ts:3:const COMMIT = "a".repeat(40)
apps/app/src/mainview/state/seams/ContentsPages.test.ts:19:  test("refuses a repeated cursor", async () => {
apps/app/src/mainview/state/seams/ContentsPages.test.ts:42:        "X-Contents-Commit": calls === 1 ? COMMIT : "b".repeat(40)
apps/app/src/mainview/state/seams/ContentsPages.test.ts:73:  const revision = "A".repeat(length)
apps/app/src/mainview/state/seams/ContentsPages.test.ts:108:test.each(["", "a".repeat(39), "g".repeat(40), "a".repeat(65)])("refuses an advertised next page without a valid revision: %s", async revision => {
apps/app/src/mainview/state/seams/RepositoriesSeam.ts:205:      if (seen.has(path)) return { error: "Inventory pagination repeated a page.", status: null }
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:16:const tick = () => new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:167:  await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:241:  await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:268:  await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:273:  await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:297:    await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:335:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:338:      timer = setTimeout(() => reject(new Error("Provider fixture work did not settle")), 3000)
apps/app/src/mainview/state/seams/CodingProviderSeam.test.ts:509:const maximumConnectionId = "A0-".repeat(33) + "Z"
apps/app/src/mainview/state/controller/controlFocus.test.ts:15:const tick = (): Promise<void> => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/RepositoryFlowsSeam.ts:23: * avoids repeat reads.
apps/app/src/mainview/state/controller/registration.test.ts:105:test("repeated starts reuse one request; a second repository waits for the first", async () => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:108:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:111:      timer = setTimeout(() => reject(new Error(`Timed out draining ${label}`)), 5_000)
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:168:    // The public seam exposes no poll join/cancel handle. Retired polls wake at
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:170:    if (ownedPollDelay > 0) await new Promise(resolve => setTimeout(resolve, ownedPollDelay))
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:172:    await bounded(drainWork(), "retired poll continuations")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:255:/** Spin until a background poll has landed what the assertion needs, or give up loudly. */
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:259:    await new Promise((resolve) => setTimeout(resolve, 2))
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:492:    /* An answer that names no run id is tracked as nothing: no mirror card, no poll. */
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:497:  test("reconcile renders the run its 202 names and polls it to settled (plue#502)", async () => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:507:         * the first poll.
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:539:      /* The 202 already named the run's state, so the card states it before polling. */
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:637:  test("the run poll renders one row per ref and stops when the run settles", async () => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:642:      let polls = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:648:          polls += 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:649:          if (polls < 2) return json(200, mirrorRun("running"))()
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:797:  test("a run read the server refuses lands its words on the card and stops the poll", async () => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:857:      let polls = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:867:          polls += 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:868:          return polls === 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:912:      let polls = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:921:          polls += 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:922:          return polls === 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:967:        await new Promise(resolve => setTimeout(resolve, 10))
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1003: * The two fences the mirror poll runs behind: the epoch that retires a
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1007:describe("the mirror run poll's fences", () => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1008:  /** A route that answers only when the test releases it, so a poll can be parked. */
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1015:  test("a poll parked across two newer runs never writes the run the card stopped tracking", async () => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1018:     * the third run was handed epoch 1 again and the first run's parked poll
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1036:      /* Run 88's first poll parks; run 89 settles and retires its epoch; run 90 takes the card. */
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1038:      await waitUntil(() => requests.includes(`GET ${MIRROR_PATH}/88`), "run 88's poll to be in flight")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1144:      let polls = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1149:          polls += 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1150:          if (polls === 1) throw new Error("socket hung up")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1170:      let polls = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1175:          polls += 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1176:          if (polls === 1) return json(200, mirrorRun("running", []))()
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1192:      expect(polls).toBe(1 + mirrorSyncPolling.networkRetries + 1)
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1383:  ] as const)("poll %s stops honestly and a new run recovers", async (_label, bad) => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1396:    await waitUntil(() => mirrorPayloadOf(store)?.error !== undefined, "the malformed poll refusal")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1397:    await bounded(drainWork(), "malformed poll response")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1406:    await bounded(drainWork(), "successor poll response")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1419:    let polls = 0, repoReads = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1424:        polls += 1
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1425:        if (polls === 1 || polls === 3 || polls === 4) throw new Error("controlled socket drop")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1426:        return json(200, mirrorRun(polls === 2 ? "running" : "succeeded", []))()
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1433:    expect(polls).toBe(5)
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1449:    let polls = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1453:      [`${MIRROR_PATH}/88`]: () => { polls += 1; return json(200, mirrorRun("running", [
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1458:    await waitUntil(() => polls === 3, "the third allowed read")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1462:    // not a public poll-join receipt or an execution-speed assertion.
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1463:    await new Promise(resolve => setTimeout(resolve, 2))
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1465:    expect(polls).toBe(3)
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1488: * its poll route accepts only positive IDs (git_mirror_sync.go215-222). */
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1500:    let runId = 88, polls = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1504:      [`${MIRROR_PATH}/88`]: () => ++polls === 1 ? json(200, mirrorRun("running", [
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1512:    await waitUntil(() => polls === 2, "the second poll to enter after the persisted running receipt")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1559:    let polls = 0, repoReads = 0
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1563:      [`${MIRROR_PATH}/88`]: () => ++polls === 1 ? json(200, mirrorRun("running", [
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1568:    await waitUntil(() => polls === 2, "the held terminal read")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1582:  test.each([0, -1])("accepted sync POST with run_id %s cannot admit a nonexistent polling URL", async runId => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1596:    await new Promise(resolve => setTimeout(resolve, 1))
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1597:    await bounded(drainWork(), "the next real polling cadence")
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1618:  test("positive run_id 1 admits its exact polling URL and real completion", async () => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1642:  test.each([0, -1, 1])("retry run_id %s preserves accepted POST truth and admits only valid polling", async runId => {
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1657:    await new Promise(resolve => setTimeout(resolve, 1))
apps/app/src/mainview/state/seams/GitHubSeam.test.ts:1696:    await new Promise(resolve => setTimeout(resolve, 1))
apps/app/src/mainview/state/controller/httpTurns.ts:33:  const timers = new Map<string, ReturnType<typeof setTimeout>>()
apps/app/src/mainview/state/controller/httpTurns.ts:69:    const timer = setTimeout(() => {
apps/app/src/mainview/state/seams/RepoTreeSeam.test.ts:76:const PAGE_COMMIT = "a".repeat(40)
apps/app/src/mainview/state/seams/BillingState.test.ts:41:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/BillingState.test.ts:44:      timer = setTimeout(() => reject(new Error("Billing fixture work did not settle")), 3000)
apps/app/src/mainview/state/controller/explain.ts:92:    let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/controller/explain.ts:93:    let replayTimer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/controller/explain.ts:267:        replayTimer = setTimeout(() => { void catchUp().finally(scheduleReplay) }, 1_000)
apps/app/src/mainview/state/controller/explain.ts:272:    timer = setTimeout(() => {
apps/app/src/mainview/state/seams/CommitsSeam.ts:121: * (rows repeat across re-runs), then failure over pending over success.
apps/app/src/mainview/state/seams/BookmarksSeam.test.ts:56:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:159:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:162:      timer = setTimeout(() => reject(new Error("Workspace operation did not settle")), 3_000)
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:295:    seam: createWorkspaceSeam(ctx, { pollMs: 1, desktopWaitMs: options.desktopWaitMs ?? 0 }),
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:349:const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms))
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:549:    let polls = 0
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:556:        polls += 1
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:557:        return json(200, polls < 2 ? { ...WS_RUNNING, status: "starting" } : WS_RUNNING)
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:581:    // The card never lags the collection, whichever landed last — the act's answer or the watch's first poll.
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:597:   * poll had settled the row, and the final render wrote the create's
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:600:  test("a poll that settles before the auxiliaries load wins: card, tree, and collection agree and no watch remains", async () => {
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:618:    const polls = requests.filter((key) => key === "GET api/repos/will/smithers/workspaces/ws-1").length
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:620:    expect(requests.filter((key) => key === "GET api/repos/will/smithers/workspaces/ws-1").length).toBe(polls)
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:623:  test("view renders the collection's status when a poll advanced it during the auxiliaries", async () => {
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:774:    let polls = 0
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:778:        polls += 1
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:779:        return json(200, { id: "sess-1", status: polls < 2 ? "pending" : "running", workspace_id: "ws-1", created_at: null })
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:786:    expect(polls).toBeGreaterThanOrEqual(2)
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:1044:    const polls = requests.filter((key) => key === "GET api/repos/will/smithers/workspaces/ws-1").length
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:1046:    expect(requests.filter((key) => key === "GET api/repos/will/smithers/workspaces/ws-1").length).toBe(polls)
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:1299:          : { content: "a".repeat(20_000), encoding: "utf-8" })
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:1895:  test("human and agent views share one settling workspace poll", async () => {
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:1905:        // The first view starts a held poll; the second view only rereads its DTO.
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:1912:    const user = actors.pair(ctx, (context) => createWorkspaceSeam(context, { pollMs: 60_000 }))
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:2392:        const seam = createWorkspaceSeam(ctx, { pollMs: 60_000 })
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:2513:      /* A box already running needs no readiness poll: the DTO said ready. */
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:2716:      await new Promise(resolve => setTimeout(resolve, 2_100))
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:2731:  test("a later open owns the one toast and a superseded poll cannot change it", async () => {
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:2735:    const pollEntered = new Promise<void>(resolve => { entered = resolve })
apps/app/src/mainview/state/seams/WorkspaceSeam.test.ts:2747:      await pollEntered
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:141:  while (!holds() && Date.now() < deadline) await new Promise((resolve) => setTimeout(resolve, 1))
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:572:    await new Promise((resolve) => setTimeout(resolve, 10))
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:584:    await new Promise((resolve) => setTimeout(resolve, 10))
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:600:    await new Promise((resolve) => setTimeout(resolve, 10))
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:798:    await new Promise<void>(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:854:    await new Promise(resolve => setTimeout(resolve, 35))
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:862:  const realTimeout = globalThis.setTimeout
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:863:  const timer = spyOn(globalThis, "setTimeout").mockImplementation(((...args: Parameters<typeof setTimeout>) => {
apps/app/src/mainview/state/seams/AgentSessionSeam.test.ts:866:  }) as typeof setTimeout)
apps/app/src/mainview/state/seams/RunEpochs.ts:4: * The fence a run-tracking poll loop shares with the starts that supersede
apps/app/src/mainview/state/seams/RunEpochs.ts:14: * epoch 1 again: a loop from an earlier start, parked inside its poll when
apps/app/src/mainview/state/controller/flowDurations.ts:7: * inside the pump loop — a prediction that re-read on every poll would cost
apps/app/src/mainview/state/seams/GitHubSeam.ts:22: *        card takes it and the same poll follows it. An answer that names no
apps/app/src/mainview/state/seams/GitHubSeam.ts:58: * The mirror run poll: one read every `delayMs`, at most `maxAttempts`
apps/app/src/mainview/state/seams/GitHubSeam.ts:70: * The honest sign-off when polling can no longer read the run: the header
apps/app/src/mainview/state/seams/GitHubSeam.ts:122:const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms))
apps/app/src/mainview/state/seams/GitHubSeam.ts:647:   * The run poll: `{ state, refs[] }` in, the header word and the card's
apps/app/src/mainview/state/seams/GitHubSeam.ts:663:         * A dropped poll is retried; plue's run keeps pushing refs for up to
apps/app/src/mainview/state/seams/GitHubSeam.ts:708:   * A named run lands on the mirror card and the poll takes it from there.
apps/app/src/mainview/state/seams/GitHubSeam.ts:711:   * `{ run_id }`); the card states whatever the answer stated, and the poll
apps/app/src/mainview/state/seams/GitHubSeam.ts:745:   * 202 `{ run_id }` and are tracked by the same poll, so they share this.
apps/app/src/mainview/state/seams/ProviderAccountsOwnership.test.ts:33:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/ProviderAccountsOwnership.test.ts:36:      timer = setTimeout(() => reject(new Error("Provider fixture work did not settle")), 3000)
apps/app/src/mainview/state/seams/SearchSeamHotPath.test.ts:52:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/IssuesResolution.test.ts:18:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/IssuesResolution.test.ts:21:      timer = setTimeout(() => reject(new Error("Resolution fixture work did not settle")), 5_000)
apps/app/src/mainview/state/seams/TriggersSeam.ts:156:   * button twice repeats one plan and preparing the schedule again — with a
apps/app/src/mainview/state/seams/TriggersSeam.ts:956:    // A second press of Schedule joins the registration the first one made: its approval is re-applied, and the launch path dedups on the request.
apps/app/src/mainview/state/seams/TriggersSeam.ts:1032:  /** Persist the intent before any network work; repeat input joins the pending request. */
apps/app/src/mainview/state/seams/BillingCapabilities.test.ts:35:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/BillingCapabilities.test.ts:38:      timer = setTimeout(() => reject(new Error("Billing fixture work did not settle")), 3000)
apps/app/src/mainview/state/seams/IssuesSeam.ts:870:  // the same read path; a poll is only a projection refresh, never a chat store.
apps/app/src/mainview/state/seams/IssuesSeam.ts:923:        let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/IssuesSeam.ts:928:        const poll = async () => {
apps/app/src/mainview/state/seams/IssuesSeam.ts:947:          if (valid()) timer = setTimeout(() => { void poll() }, 2_000)
apps/app/src/mainview/state/seams/IssuesSeam.ts:949:        timer = setTimeout(() => { void poll() }, 2_000)
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:5:import { Effect, Exit, Fiber, FiberMap, Layer, ManagedRuntime, Schedule, Scope } from "effect"
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:42: * starting) is polled until it settles or is gone; a 404 mid-watch refreshes
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:112:  pollMs: 2_000
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:217:  /** Stop owned reads, polls and waits, and drop any minted desktop credential. */
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:226:  /** The watch and session-settle poll interval; tests inject ~0. */
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:227:  readonly pollMs?: number
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:228:  /** The one-command open's readiness poll interval; tests inject 0. */
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:631:  const pollMs = deps.pollMs ?? 5_000
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:632:  const desktopWaitMs = deps.desktopWaitMs ?? desktopBoxWait.pollMs
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:821:   * poll never blanks the snapshots the open loaded.
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:829:     * it renders, and a settle poll that landed while an act's auxiliaries
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:863:       * polls that land mid-wait — so unlike a refusal it carries forward,
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:1033:   * gone). A failed poll is not a fact — the watch simply tries again; a 404
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:1036:  const poll = (workspaceId: string, current: () => boolean) => Effect.gen(function*() {
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:1055:    Effect.repeat({ times: MAX_WATCH_POLLS - 1, while: (pending) => pending, schedule: Schedule.spaced(pollMs) }),
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:1061:    runtime.runFork(FiberMap.run(watching, workspaceId, poll(workspaceId, currentOperation(workspaceId)), { onlyIfMissing: true }))
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:1835:    const heartbeat = setInterval(() => {
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:1838:    }, desktopBoxWait.pollMs)
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:1889:            Math.round((desktopBoxWait.maxAttempts * desktopBoxWait.pollMs) / 1_000)
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:2052:     * A fresh session may still be pending: poll it until it runs, or the
apps/app/src/mainview/state/seams/WorkspaceSeam.ts:2058:      if (!await sleep(pollMs, workspace.id) || !current()) return
apps/app/src/mainview/state/seams/IssuesSeam.chat.test.ts:34:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/IssuesSeam.chat.test.ts:37:      timer = setTimeout(() => reject(new Error("Issues fixture work did not settle")), 5_000)
apps/app/src/mainview/state/seams/AgentSessionSeam.ts:483:      const timer = setTimeout(finish, retryDelay)
apps/app/src/mainview/state/seams/AgentSessionSeam.ts:679:     * — a guessed provider is a lie the header would repeat.
apps/app/src/mainview/state/seams/CloudSeam.test.ts:24: * URL through the injected openExternal door, and polls until the callback
apps/app/src/mainview/state/seams/CloudSeam.test.ts:62:    pollMs: 5,
apps/app/src/mainview/state/seams/CloudSeam.test.ts:152:    test(`sign-in stops at its deadline when session polls fail (${failure})`, async () => {
apps/app/src/mainview/state/seams/BillingSeam.test.ts:53:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/BillingSeam.test.ts:56:      timer = setTimeout(() => reject(new Error("Billing fixture work did not settle")), 3000)
apps/app/src/mainview/state/seams/SearchSeam.test.ts:55:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/SearchSeam.test.ts:378:  test("palette.recent answers the ledger as data, most recent first, and the ledger counts repeats", async () => {
apps/app/src/mainview/state/seams/SecretsSeam.test.ts:39:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/SecretsSeam.test.ts:314:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/seams/SecretsSeam.test.ts:317:      timer = setTimeout(() => reject(new Error("Secret fixture did not settle")), 3_000)
apps/app/src/mainview/state/controller/ConversationSweep.test.ts:38:    "oversized title": ndjson(delta({ notes: [{ ...note, title: "x".repeat(161) }] }), done),
apps/app/src/mainview/state/controller/ConversationSweep.test.ts:39:    "oversized body": ndjson(delta({ notes: [{ ...note, body: "x".repeat(16_385) }] }), done),
apps/app/src/mainview/state/controller/ConversationSweep.test.ts:60:      [{ role: "user", content: "😀".repeat(MAX_SWEEP_REQUEST_BYTES / 4) }],
apps/app/src/mainview/state/controller/health-status.ts:6:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/controller/health-status.ts:22:    timer = setTimeout(() => {
apps/app/src/mainview/state/seams/CommitsSeam.test.ts:56:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/workflows.ts:139:      const timer = setTimeout(resolve, ms)
apps/app/src/mainview/state/controller/workflows.ts:234:    // poll that body to a bounded deadline, never stampede. Any non-2xx is a failure.
apps/app/src/mainview/state/controller/workflows.ts:314:    if (request.input.operation === "resume" && row.enabled) return { code: "trigger_already_enabled", message: `Schedule "${row.slug}" is already enabled.` }
apps/app/src/mainview/state/controller/workflows.ts:402:   * One card per (repo, flow, input), so a repeated ask moves the card it
apps/app/src/mainview/state/controller/workflows.ts:637:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/flowAuthoring.test.ts:51:const attempt = { runId: "author", stepKeyDigest: "a".repeat(64), attempt: 1, bundleIdentity: "bundle-1" }
apps/app/src/mainview/state/controller/flowAuthoring.test.ts:75:            digest: "d".repeat(64),
apps/app/src/mainview/state/controller/flowAuthoring.test.ts:82:              key: `key1_${"0".repeat(64)}`,
apps/app/src/mainview/state/controller/flowAuthoring.test.ts:95:              target: { _tag: "Plan", planId: `plan-${flowId}`, digest: "d".repeat(64), envelope: { capabilities: [], flows: [], budget: {} } },
apps/app/src/mainview/state/seams/CodeIntelSeam.test.ts:67:    for (let i = 0; i < 100 && calls[method] < count; i++) await new Promise(resolve => setTimeout(resolve, 1))
apps/app/src/mainview/state/seams/CodeIntelSeam.test.ts:165:  await new Promise(resolve => setTimeout(resolve, 60))
apps/app/src/mainview/state/seams/CodeIntelSeam.test.ts:248:    await new Promise(resolve => setTimeout(resolve, 40))
apps/app/src/mainview/state/seams/CodeIntelSeam.test.ts:345:        await new Promise(resolve => setTimeout(resolve, 25))
apps/app/src/mainview/state/seams/CodeIntelSeam.ts:241:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:48:    await new Promise((resolve) => setTimeout(resolve, 10))
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:595:      public: [{ id: 1, slug: "home", title: "Home", path: "Home.md", revision: 3, updated_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, created_at: "2026-09-26T00:00:00Z", visibility: "public", content_digest: "a".repeat(64), metadata: { frontmatter: null, aliases: [], tags: ["guide"], headings: ["Home"], links: [{ target: "Guides/Start", embed: false, page_id: 2 }, { target: "Nowhere", embed: false }] }, backlinks: [{ page_id: 2, path: "Guides/Start.md", embed: false }] },
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:596:        { id: 2, slug: "start", title: "Start", path: "Guides/Start.md", revision: 1, updated_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, created_at: "2026-09-26T00:00:00Z", visibility: "public", content_digest: "b".repeat(64), metadata: { frontmatter: null, aliases: [], tags: [], headings: ["Start"], links: [] }, backlinks: [] },
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:597:        { id: 3, slug: "logo", title: "logo.png", path: "assets/logo.png", revision: 1, updated_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, created_at: "2026-09-26T00:00:00Z", visibility: "public", content_digest: "c".repeat(64), attachment: { digest: "c".repeat(64), media_type: "image/png", size: 3 }, metadata: { frontmatter: null, aliases: [], tags: [], headings: [], links: [] }, backlinks: [] }],
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:598:      private: [{ id: 9, slug: "home", title: "Home", path: "Home.md", revision: 1, updated_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, created_at: "2026-09-26T00:00:00Z", visibility: "private", content_digest: "d".repeat(64), metadata: { frontmatter: null, aliases: [], tags: ["secret"], headings: ["Home"], links: [] }, backlinks: [] }]
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:611:          { page_id: 1, revision: 3, path: "Home.md", title: "Home", content_digest: "a".repeat(64), deleted: false, author: { id: 1, login: "will" }, updated_at: "2026-09-26T03:00:00Z" },
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:612:          { page_id: 1, revision: 2, path: "Old/Home.md", title: "Home", content_digest: "e".repeat(64), deleted: false, author: { id: 2, login: "ada" }, updated_at: "2026-09-26T02:00:00Z" }
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:616:          const created = { id: 20, slug: "notes", title: body.title, path: "Notes.md", revision: 1, updated_at: "2026-09-26T00:00:00Z", created_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, visibility: at, content_digest: "f".repeat(64), metadata: { frontmatter: null, aliases: [], tags: [], headings: [], links: [] }, backlinks: [] }
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:621:          ? Response.json({ id: 1, slug: "home", title: "Home", path: JSON.parse(String(init.body)).path, revision: 4, updated_at: "2026-09-26T00:00:00Z", created_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, visibility: at, content_digest: "a".repeat(64) })
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:624:        if (init?.method === "PUT") return Response.json({ id: 30, slug: "home-diagram-png", title: "diagram.png", path: "assets/diagram.png", revision: 1, updated_at: "2026-09-26T00:00:00Z", created_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, visibility: at, content_digest: "9".repeat(64), attachment: { digest: "9".repeat(64), media_type: "image/png", size: 3 } })
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:744:    await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/cloud-wiki.test.ts:758:        if (method === "PUT") return Response.json({ id: 30, slug: "diagram", title: "diagram.png", path: "assets/diagram.png", revision: 1, updated_at: "2026-09-26T00:00:00Z", created_at: "2026-09-26T00:00:00Z", author: { id: 1, login: "will" }, visibility: "public", content_digest: "9".repeat(64), attachment: { digest: "9".repeat(64), media_type: "image/png", size: bytes.length } })
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:15: * polls GET /api/github/import/{jobId} to a terminal phase. Failures answer
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:39:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:41:/** Spin until the predicate holds — the poll loop runs on real (1ms) timers. */
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:46:    await new Promise((resolve) => setTimeout(resolve, 5))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:53:  poll?: () => Response | Promise<Response>,
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:66:      if (poll === undefined) return json(404, { message: `no poll stub for ${path}` })
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:67:      return poll()
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:73:/** Answers each poll in order, repeating the last answer once exhausted. */
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:74:const pollSequence = (answers: ReadonlyArray<() => Response>) => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:157:  // The loop is setTimeout-driven; a 1ms cadence keeps the suite honest AND fast.
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:170:        pollSequence([
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:203:  test("a poll's stage surfaces as the card's human detail", async () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:207:        pollSequence([
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:247:    const poll = new Promise<Response>(resolve => { release = resolve })
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:251:    }), () => poll))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:262:  test("the poll budget outlives a large clone: thirty minutes at the production cadence", () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:313:        pollSequence([() => json(200, jobBody("failed", "cloning_github", "clone timed out"))])
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:324:  test("a poll the server refuses says what failed and whose fault it was, with Retry — never the lost-stream detail", async () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:325:    /* Review finding 6: any non-OK poll counted as a drop and, after three, read as a lost stream. */
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:345:  test("a structured 429 during polling lands the rate-limit facts and whose fault it was on the card", async () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:367:  test("persistent poll failures give up honestly with the lost-stream detail", async () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:372:          throw new Error("poll dropped")
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:407:        pollSequence([() => json(200, doneBody)])
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:450:        pollSequence([
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:491:    const poll = new Promise<Response>((resolve) => { releasePoll = resolve })
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:498:        if (path.endsWith("/github/import/job-1")) return poll
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:527:    let polls = 0
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:533:        if (path.endsWith("/github/import/job-1")) { polls += 1; return json(200, jobBody("ready")) }
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:539:    expect(polls).toBe(1)
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:542:  test("reload observes an unresolved retry before deciding whether to repeat it", async () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:585:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:617:      pollSequence([() => json(200, jobBody("failed", null, "clone failed")), () => json(200, jobBody("ready"))]),
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:679:      await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:715:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:752:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:780:  test("an account switch while polling cannot mutate the prior owner's card", async () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:782:    const poll = new Promise<Response>(resolve => { releasePoll = resolve })
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:783:    const { store, controller } = await readyStore(importBackend(() => json(202, jobBody("cloning")), () => poll))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:790:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:806:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:846:      await new Promise(resolve => setTimeout(resolve, 350))
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:875:  test("retrying an unavailable poll reconnects the existing job without restarting it", async () => {
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:877:    let polls = 0
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:881:      () => ++polls === 1 ? json(503, { message: "temporarily unavailable" }) : json(200, jobBody("ready")),
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:886:      await until(() => importCard(store)?.payload.phase === "failed", "poll refusal")
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:892:      expect(polls).toBe(2)
apps/app/src/mainview/state/seams/RepoImportSeam.test.ts:911:  test("a held poll cannot restore the previous owner's progress after sign-out", async () => {
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:75:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:269:  digest: "c".repeat(64), source_revision: "b".repeat(40), next_fire_at: "2026-09-18T09:00:00Z"
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:275:  job: "flow:nightly", plan_id: "plan-1", plan_digest: "d".repeat(64), flow_id: "nightly-lint", approved_by: 1, approved_at: approvedAt
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:285:const PLAN_DIGEST = "d".repeat(64)
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:291:  executionDigest: "e".repeat(64),
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:398:        ? `plan-fire-${(payload.input as { requestId: string }).requestId}` : "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) }),
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:567:    await new Promise(resolve => setTimeout(resolve, 20))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:615:  test("Schedule with only a flow: nightly, the owner's approval applied on preparation, no Approve prompt, and the registration's toast settles with the run", async () => {
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:714:      expect(await Promise.race([command, new Promise(resolve => setTimeout(() => resolve("blocked"), 100))])).toEqual({ value: "Preparation requested for nightly on will/flows." })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1024:              : okFrame({ ...PLAN, planId: "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1049:          : okFrame({ ...PLAN, planId: "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1079:            : okFrame({ ...PLAN, planId: "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1103:          : okFrame({ ...PLAN, planId: "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1150:          : okFrame({ ...PLAN, planId: "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1383:  test("a workspace that repeats its flow cursor ends the walk instead of looping", async () => {
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1454:    /* Was: a second press repeated the whole attempt. It now reconnects to the run this attempt already started. */
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1467:    const moduleRefusal = '"nightly-lint" is a flow.ts. Schedules run flow.mdx.'
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1538:              : okFrame({ ...PLAN, planId: "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1569:              : okFrame({ ...PLAN, planId: "plan-registrar", digest: "f".repeat(64), flowId: String(payload.flowId) })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1595:        [RPC]: relayRoute(calls, workspaceAnswers({ Plan: () => okFrame({ ...PLAN, digest: changed ? "a".repeat(64) : PLAN_DIGEST }) }))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1675:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1761:      await new Promise(resolve => setTimeout(resolve, 100))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:1874:    /* Reload resumes the saved request; repeated approval joins that same launch. */
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2019:   * was the form repeating it back.
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2021:  test("a refusal the door already said in the transcript is not repeated on its form card", async () => {
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2054:      expect((await Promise.race([command, new Promise(resolve => setTimeout(() => resolve("blocked"), 100))]))).toMatchObject({ status: "executed" })
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2234:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2254:      await new Promise(resolve => setTimeout(resolve, 100))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2288:        new Promise<never>((_, reject) => setTimeout(() => reject(new Error("Resume waited for lookup")), 100))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2326:      await new Promise(resolve => setTimeout(resolve, 100))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2391:      await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2457:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2479:      await new Promise(resolve => setTimeout(resolve, 100))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2494:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/seams/TriggersSeam.test.ts:2506:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/seams/RepositoriesSeam.test.ts:192:  test("a repeated cursor stops pagination and preserves a previously loaded head", async () => {
apps/app/src/mainview/state/seams/RepositoriesSeam.test.ts:373:      await new Promise((resolve) => setTimeout(resolve, 1))
apps/app/src/mainview/state/controller/promptQueueAdmission.test.ts:42:test("an unresolved persistence barrier blocks admission and coalesces repeated resume and session notifications", async () => {
apps/app/src/mainview/state/seams/LandingsSeam.test.ts:58:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/LandingsSeam.test.ts:215:          // created_at DESC with a context repeated across re-runs: the
apps/app/src/mainview/state/seams/LandingsSeam.test.ts:707:  const body = "large PR body ".repeat(2_000)
apps/app/src/mainview/state/controller/flowAuthoring.ts:45:  // Subscription waits on persisted collection state, not a second polling loop.
apps/app/src/mainview/state/controller/workflow-pump.ts:83:   * and polling it until the tab closes is neither honest nor kind to the
apps/app/src/mainview/state/controller/workflow-pump.ts:122:      // it repeatedly and falsely report conflicting history.
apps/app/src/mainview/state/controller/workflow-pump.ts:151:      const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/workflow-pump.ts:252:    /** The last summary read, so a repeated answer does not read as movement. */
apps/app/src/mainview/state/controller/workflow-pump.ts:506:          // old `journalPending || ...` condition kept polling forever when a
apps/app/src/mainview/state/controller/workflow-pump.ts:522:        // transport response by itself. Unchanged polling cannot postpone quiet.
apps/app/src/mainview/state/seams/SeamContext.test.ts:53:    const long = "x".repeat(1000)
apps/app/src/mainview/state/controller/workflow-launch.test.ts:59:    for (let i = 0; i < 100 && pumps === 0; i++) await new Promise(resolve => setTimeout(resolve, 10))
apps/app/src/mainview/state/controller/workflow-launch.test.ts:63:    for (let i = 0; i < 100 && store.collections.toasts.size === 0; i++) await new Promise(resolve => setTimeout(resolve, 10))
apps/app/src/mainview/state/controller/workflow-launch.test.ts:71:    for (let i = 0; i < 100 && [...store.collections.toasts.values()].some(toast => toast.status === "running"); i++) await new Promise(resolve => setTimeout(resolve, 10))
apps/app/src/mainview/state/controller/workflow-launch.test.ts:80:  let timer: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/controller/workflow-launch.test.ts:82:    return await Promise.race([work, new Promise<"blocked">(resolve => { timer = setTimeout(() => resolve("blocked"), 2_000) })])
apps/app/src/mainview/state/controller/models.test.ts:60:const tick = (ms = 15) => new Promise((resolve) => setTimeout(resolve, ms))
apps/app/src/mainview/state/controller/models.test.ts:105:test("a repeated launch is one call, and the settled test can be launched again", async () => {
apps/app/src/mainview/state/seams/NotificationsSeam.test.ts:38:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/graph.test.ts:33:const REVISION = "b".repeat(40)
apps/app/src/mainview/state/controller/graph.test.ts:42:const planNode = (id: string, action: string, dependsOn: ReadonlyArray<string> = [], key = "0".repeat(64)) => ({
apps/app/src/mainview/state/controller/graph.test.ts:57:const NODES = [planNode("gate", "graph/Gate"), planNode("steady", "graph/Steady", ["gate"], "1".repeat(64))]
apps/app/src/mainview/state/controller/graph.test.ts:123:            digest: "d".repeat(64),
apps/app/src/mainview/state/controller/graph.test.ts:134:              target: { _tag: "Plan", planId: "plan-1", digest: "d".repeat(64), envelope: { capabilities: [], flows: [], budget: {} } },
apps/app/src/mainview/state/controller/graph.test.ts:771:        ? { ...previous, payload: { ...previous.payload, view: { ...previous.payload.view, codeError }, graph: { ...previous.payload.graph!, sourceRevision: "c".repeat(40) } } }
apps/app/src/mainview/state/controller/graph.test.ts:772:        : { ...previous, payload: { ...previous.payload, graph: { ...previous.payload.graph, codeError }, plan: { ...previous.payload.plan!, graph: { ...previous.payload.plan!.graph!, sourceRevision: "c".repeat(40) } } } }
apps/app/src/mainview/state/controller/graph.test.ts:837:      plan: { planId: "plan-1", digest: "d".repeat(64), nodes: [
apps/app/src/mainview/state/controller/graph.test.ts:838:        { id: "gate", kind: "step", key: "key1_" + "0".repeat(64), dependsOn: [], tier: "sealed", status: "run" },
apps/app/src/mainview/state/controller/graph.test.ts:839:        { id: "steady", kind: "step", key: "key1_" + "1".repeat(64), dependsOn: ["gate"], tier: "sealed", status: "run" },
apps/app/src/mainview/state/controller/workflows.test.ts:97:test("repeated failed runs of the same work keep one retryable failure notice", async () => {
apps/app/src/mainview/state/controller/workflows.test.ts:121:  const result = await Promise.race([t.controller.commands.run("flow.run", `review ${repo} {"args":"inspect"}`), new Promise(resolve => setTimeout(() => resolve("blocked"), 100))])
apps/app/src/mainview/state/controller/workflows.test.ts:140:  const result = await Promise.race([t.controller.commands.run("flow.run", `review ${repo}`), new Promise(resolve => setTimeout(() => resolve("blocked"), 100))])
apps/app/src/mainview/state/controller/workflow-catalog.ts:110:    const timer = setTimeout(() => {
apps/app/src/mainview/state/seams/ChangeSeam.ts:558: * Status rows repeat contexts across re-runs and arrive created_at DESC, so
apps/app/src/mainview/state/controller/promptQueueErrors.test.ts:106:test("pending admission deduplicates repeated resume and state changes without blocking draft edits", async () => {
apps/app/src/mainview/state/seams/EnvironmentSeam.test.ts:42:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/context.ts:69:  readonly unref: (timer: ReturnType<typeof setTimeout>) => void
apps/app/src/mainview/state/controller/context.ts:77:  /** Release in reverse order, awaiting each resource; repeated calls share the completion/failure. */
apps/app/src/mainview/state/controller/context.ts:187:  const unref = (timer: ReturnType<typeof setTimeout>): void => {
apps/app/src/mainview/state/controller/onboarding.test.ts:46:  for (let tick = 0; tick < ticks; tick += 1) await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/FilesSeam.test.ts:12:const PAGE_COMMIT = "a".repeat(40)
apps/app/src/mainview/state/seams/FilesSeam.test.ts:46:const settled = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/FilesSeam.test.ts:53:const BIG_TEXT = "x".repeat(16 * 1024 + 100)
apps/app/src/mainview/state/seams/FilesSeam.test.ts:55:const WORD_LIST = "apple\nberry\n".repeat(25)
apps/app/src/mainview/state/seams/FilesSeam.test.ts:56:const SHA256SUMS = Array.from({ length: 8 }, (_, index) => `${String(index).repeat(64)}\n`).join("")
apps/app/src/mainview/state/seams/FilesSeam.test.ts:133:        content: `# Smithers\n\n${"Smithers keeps what it learns in world notes. ".repeat(40)}`,
apps/app/src/mainview/state/seams/FilesSeam.test.ts:673:const REVISION = "b".repeat(40)
apps/app/src/mainview/state/controller/workflow-launch.ts:64:    const timer = setTimeout(done, Math.max(1, ms))
apps/app/src/mainview/state/controller/runs.ts:368:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/runs.ts:516:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/runs.ts:801:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/runs.ts:1221:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/explain.test.ts:87:  const timers: ReturnType<typeof setTimeout>[] = []
apps/app/src/mainview/state/controller/explain.test.ts:261:    const initial = { version: 1, runId: posted.runId, legId: access.legId, batch: 0, position: 0, hash: "0".repeat(64) }
apps/app/src/mainview/state/controller/explain.test.ts:263:      previousHash: initial.hash, hash: "1".repeat(64), frames: [
apps/app/src/mainview/state/controller/explain.test.ts:275:    for (let i = 0; i < 10; i++) await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/explain.test.ts:311:      legId: request!.journal!.legId, batch: 0, position: 0, hash: "0".repeat(64) } })
apps/app/src/mainview/state/controller/explain.test.ts:323:  const initial = (runId: string, legId: string) => ({ version: 1 as const, runId, legId, batch: 0, position: 0, hash: "0".repeat(64) })
apps/app/src/mainview/state/controller/explain.test.ts:327:      hash: "1".repeat(64), frames: [{ runId, type: "delta" as const, kind: "text" as const, text: "A" }] }
apps/app/src/mainview/state/controller/explain.test.ts:361:  // The polling read starts from the accepted cursor. Hold its card commit,
apps/app/src/mainview/state/controller/explain.test.ts:364:    await new Promise(resolve => setTimeout(resolve, 10))
apps/app/src/mainview/state/controller/explain.test.ts:372:  await deliver!({ ...changed, batch: { ...changed.batch, hash: "2".repeat(64) }, cursor: { ...changed.cursor, hash: "2".repeat(64) } })
apps/app/src/mainview/state/controller/explain.test.ts:405:  const accepted = { version: 1 as const, runId, legId, batch: 0, position: 0, hash: "0".repeat(64) }
apps/app/src/mainview/state/controller/explain.test.ts:407:  const batch = { version: 1 as const, runId, legId, batch: 1, from: 1, previousHash: accepted.hash, hash: "1".repeat(64),
apps/app/src/mainview/state/controller/gateway.test.ts:500:  key: `key1_${"0".repeat(64)}`,
apps/app/src/mainview/state/controller/gateway.test.ts:517:    digest: "d".repeat(64),
apps/app/src/mainview/state/controller/gateway.test.ts:523:      target: { _tag: "Plan", planId: "plan-1", digest: "d".repeat(64), envelope: { capabilities: [], flows: [], budget: {} } },
apps/app/src/mainview/state/controller/gateway.test.ts:538:    expect(planned.value.digest).toBe("d".repeat(64))
apps/app/src/mainview/state/seams/IntegrationsSeam.ts:133:     * repeat of a submit still in flight writes nothing.
apps/app/src/mainview/state/controller/signup.test.ts:15:  test("the account step needs a name and a valid account, then opens the poll", async () => {
apps/app/src/mainview/state/controller/signup.test.ts:24:    expect(store.session().signup).toMatchObject({ stage: "poll", name: "Ada Park", account: "adapark", question: 0 })
apps/app/src/mainview/state/controller/signup.test.ts:30:    controller.signupChange({ stage: "poll", question: 0 })
apps/app/src/mainview/state/controller/recommend.ts:93:  let debounce: ReturnType<typeof setTimeout> | undefined
apps/app/src/mainview/state/controller/recommend.ts:224:    debounce = setTimeout(() => {
apps/app/src/mainview/state/controller/forms.apps.test.ts:131:  test("triggers.register is one input, the flow, and one button, Schedule; it offers the repository's declared flows and still takes one it does not list", () => {
apps/app/src/mainview/state/controller/forms.apps.test.ts:135:    expect(app.card(cardId).payload.submitLabel).toBe("Schedule")
apps/app/src/mainview/state/controller/repositorySetup.ts:253:    pending: new Map<string, Promise<unknown>>(), sleepers: new Map<ReturnType<typeof setTimeout>, () => void>(),
apps/app/src/mainview/state/controller/repositorySetup.ts:257:    scheduleTimers: new Map<string, { timer: ReturnType<typeof setTimeout>; at: number; login: string | null; accountEpoch: number; registrationId: string }>(),
apps/app/src/mainview/state/controller/repositorySetup.ts:258:    expiredSchedules: new Map<string, { login: string | null; accountEpoch: number }>(), disposed: false
apps/app/src/mainview/state/controller/repositorySetup.ts:265:    shared.scheduleTimers.clear(); shared.expiredSchedules.clear()
apps/app/src/mainview/state/controller/repositorySetup.ts:389:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/repositorySetup.ts:403:        if (["requested", "running"].includes(get(card.id)?.payload.request?.state ?? "")) shared.expiredSchedules.set(card.id, { login, accountEpoch })
apps/app/src/mainview/state/controller/repositorySetup.ts:417:  /** A repeated running receipt is an observation: write it only when the visible or committed card differs. */
apps/app/src/mainview/state/controller/repositorySetup.ts:427:   * Message.spoken}): the surfaces that would otherwise repeat the sentence —
apps/app/src/mainview/state/controller/repositorySetup.ts:470:    const timer = setTimeout(() => { shared.sleepers.delete(timer); resolve() }, ctx.workflowPollMs)
apps/app/src/mainview/state/controller/repositorySetup.ts:701:            const expired = shared.expiredSchedules.get(id)
apps/app/src/mainview/state/controller/repositorySetup.ts:703:              shared.expiredSchedules.delete(id)
apps/app/src/mainview/state/controller/repositorySetup.ts:905:    // gets a new attempt; repeatedly POSTing the same id must never rerun work.
apps/app/src/mainview/state/controller/repositorySetup.ts:1103:      for (const [id, observed] of shared.expiredSchedules) {
apps/app/src/mainview/state/controller/repositorySetup.ts:1104:        if (observed.login !== owner() || observed.accountEpoch !== epoch()) shared.expiredSchedules.delete(id)
apps/app/src/mainview/state/controller/modelCall.test.ts:78:const tick = (ms = 15) => new Promise((resolve) => setTimeout(resolve, ms))
apps/app/src/mainview/state/controller/modelCall.test.ts:318:  const long = "x".repeat(MODEL_CALL_TEXT_MAX + 1)
apps/app/src/mainview/state/controller/modelCall.test.ts:321:  expect(await t.composer.setModelPrompt({ id: "writer", temperature: "9".repeat(33) })).toBe("invalid · temperature · 32")
apps/app/src/mainview/state/controller/modelCall.test.ts:325:  expect(await t.composer.setModelOption({ id: "judge", question: "q1", option: "y".repeat(MODEL_CALL_NAME_MAX + 1) })).toBe("invalid · option · 128")
apps/app/src/mainview/state/controller/modelCall.test.ts:327:  expect(await t.composer.setModelField({ id: "judge", key: "text", value: "v".repeat(MODEL_CALL_STATE_MAX_BYTES * 4 + 1) })).toBe("invalid · value · 128 KiB")
apps/app/src/mainview/state/controller/modelCall.test.ts:332:  expect(await t.composer.setModelOption({ id: "judge", question: "q1", option: "y".repeat(MODEL_CALL_NAME_MAX) })).toBeUndefined()
apps/app/src/mainview/state/controller/modelCall.test.ts:353:  expect(await t.composer.setModelField({ id: "judge", key: "__proto__", kind: "json", value: "{\"polluted\":1}" })).toBe("invalid · key")
apps/app/src/mainview/state/controller/world.ts:312:        await new Promise(resolve => setTimeout(resolve, 25))
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:20:const tick = () => new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:120:  const polls = [device("pending"), device("connected", { connection: POOL[4] })]
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:123:    if (call.path.endsWith(`/codex/device/${DEVICE_ID}`)) return Response.json(polls.shift())
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:146:test("a pending Codex sign-in shows its code on the card until the poll settles", async () => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:200:test("a refused start fails without polling, and a transient poll refusal waits for the next interval", async () => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:234:test("reload resumes polling a persisted Codex sign-in without starting another", async () => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:248:test("a reload that lost the start request fails honestly rather than polling nothing", async () => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:334:test("a held accounts read never hides the Codex code or stalls polling", async () => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:349:test("reload puts a persisted Codex code back on the card while it polls", async () => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:519:test.each(invalidStarts)("Codex $label start fails without admitting a code or polling", async ({ body }) => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:534:  { label: "body reader failure", response: () => new Response(new ReadableStream<Uint8Array>({ start: controller => controller.error(new Error("controlled poll read failure")) })) }
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:536:test.each(invalidPolls)("Codex $label poll cannot complete sign-in and clears its pending code", async ({ response }) => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:550:test("a rate-limited Codex poll waits again and only a matching connected reply completes it", async () => {
apps/app/src/mainview/state/seams/ProviderAccountsSeam.test.ts:561:test.each(["owner change", "retirement"])("%s while Codex is waiting prevents any poll or terminal publication", async change => {
apps/app/src/mainview/state/controller/workflow-pump.test.ts:28:const poll = async (cycles: Cycle[], options: {
apps/app/src/mainview/state/controller/workflow-pump.test.ts:132:    unref: (timer: ReturnType<typeof setTimeout>) => {
apps/app/src/mainview/state/controller/workflow-pump.test.ts:154:  const result = await poll([{ events, revision: 1 }, { events, revision: 1 }, { events, revision: 1 }],
apps/app/src/mainview/state/controller/workflow-pump.test.ts:167:  const result = await poll(cycles.map((cycle) => ({ ...cycle, events: [...cycle.events] })),
apps/app/src/mainview/state/controller/workflow-pump.test.ts:179:  const result = await poll([waiting, waiting, waiting],
apps/app/src/mainview/state/controller/workflow-pump.test.ts:195:  const result = await poll([{ events: [], revision: 1, status: "waiting-approval", approvals: [forged] }, { events: [], revision: 1 }])
apps/app/src/mainview/state/controller/workflow-pump.test.ts:204:  const result = await poll([{ events: [], status: "failed", verdict: raw }])
apps/app/src/mainview/state/controller/workflow-pump.test.ts:212:  const result = await poll([{ events: [], status: "failed", verdict: "failed — transport: socket closed", stamp }])
apps/app/src/mainview/state/controller/workflow-pump.test.ts:221:  const result = await poll([{ events: [failed(1, cause)], revision: 1, status: "failed", verdict }], { flowId: "repository/trigger" })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:230:  const result = await poll([{ events: [failed(1, cause)], revision: 1, status: "failed", verdict }], { flowId: "repository/setup" })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:237:  const result = await poll([{ events: [failed(1, verdict.slice("failed — ".length))], revision: 1, status: "failed", verdict }], { flowId: "coding/request" })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:244:  const result = await poll(Array.from({ length: 4 }, () => ({ events, revision: 20_000 })))
apps/app/src/mainview/state/controller/workflow-pump.test.ts:255:  const result = await poll(Array.from({ length: 2 }, () => ({ events, revision: 17_000, status: "completed", verdict: "done" })),
apps/app/src/mainview/state/controller/workflow-pump.test.ts:267:  const result = await poll(Array.from({ length: 3 }, () => ({ events, revision: 17_000, status: "completed", verdict: "done" })),
apps/app/src/mainview/state/controller/workflow-pump.test.ts:278:  const first = await poll([{ events, revision: 17_000, status: "completed", verdict: "done" }],
apps/app/src/mainview/state/controller/workflow-pump.test.ts:282:  const resumed = await poll([{ events, revision: 17_000, status: "completed", verdict: "done" }],
apps/app/src/mainview/state/controller/workflow-pump.test.ts:292:  const result = await poll([
apps/app/src/mainview/state/controller/workflow-pump.test.ts:303:test("without revisions polling still requests only the suffix and skips unchanged dispatches", async () => {
apps/app/src/mainview/state/controller/workflow-pump.test.ts:305:  const result = await poll(Array.from({ length: 4 }, () => ({ events })))
apps/app/src/mainview/state/controller/workflow-pump.test.ts:312:  const result = await poll([{ events }, { events }], { pageSize: 256 })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:322:  const result = await poll([{ events }, { events }], { pageSize: 256 })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:333:  const result = await poll([
apps/app/src/mainview/state/controller/workflow-pump.test.ts:343:  const result = await poll([
apps/app/src/mainview/state/controller/workflow-pump.test.ts:356:  const result = await poll([{ events, revision: 1 }], { initialEvents })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:366:  const result = await poll([{ events, revision: 2 }, { events, revision: 2 }], { initialEvents, inspectAt: 0 })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:373:  const result = await poll(Array.from({ length: 4 }, () => ({ events, revision: 1 })), { cloneStored: true })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:380:  const result = await poll([{ events: [], revision: 0 }, { events, revision: 0 }, { events, revision: 0 }])
apps/app/src/mainview/state/controller/workflow-pump.test.ts:392:  const expired = await poll([{ events: [], revision: 1, statusRollup }])
apps/app/src/mainview/state/controller/workflow-pump.test.ts:395:  expect((await poll([{ events: [], statusRollup: { ...statusRollup, subjectId: "run:other" } }])).card.payload.statusRollup).toBeUndefined()
apps/app/src/mainview/state/controller/workflow-pump.test.ts:396:  expect((await poll([{ events: [], statusRollup: { ...statusRollup, state: "completed" } }])).card.payload.statusRollup).toBeUndefined()
apps/app/src/mainview/state/controller/workflow-pump.test.ts:397:  const terminal = await poll([{ events: [], status: "failed", statusRollup: { ...statusRollup, state: "failed", health: "failing" } }])
apps/app/src/mainview/state/controller/workflow-pump.test.ts:435:  const first = await poll([{ events: scheduled, revision: scheduled.at(-1)!.sequence }], { flowId: FLOW })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:438:  const second = await poll([
apps/app/src/mainview/state/controller/workflow-pump.test.ts:447:test("a page that repeats rows the card already holds changes no node's state", async () => {
apps/app/src/mainview/state/controller/workflow-pump.test.ts:449:  const once = await poll([{ events: settled, revision: settled.at(-1)!.sequence }], { flowId: FLOW })
apps/app/src/mainview/state/controller/workflow-pump.test.ts:450:  const twice = await poll([
apps/app/src/mainview/state/controller/workflow-pump.test.ts:462:    const result = await poll([], { boxless: phase, initialEvents: [started], resumeOnBoot: true })
apps/app/src/mainview/state/controller/changeRequest.test.ts:67:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/controller/changeRequest.test.ts:122:    await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/controller/changeRequest.test.ts:135:test("change.request returns before an unresolved launch, keeps Chat usable, dedupes a repeat, and holds its toast", async () => {
apps/app/src/mainview/state/controller/changeRequest.test.ts:157:    const result = await Promise.race([controller.commands.run("change.request", `Fix the README typo ${repo}`), new Promise(resolve => setTimeout(() => resolve("blocked"), 100))])
apps/app/src/mainview/state/controller/changeRequest.test.ts:175:const sourceBase = { commitId: "c".repeat(40), ref: `refs/smithers/workspaces/${workspaceId}/sources/${"c".repeat(40)}` }
apps/app/src/mainview/state/controller/changeRequest.test.ts:204:    const result = await Promise.race([controller.commands.run("change.request", `Fix the README from: the notes from:spike ${repo}`), new Promise(resolve => setTimeout(() => resolve("blocked"), 100))])
apps/app/src/mainview/state/controller/turnsContextCards.test.ts:65:    const title = "x".repeat(length)
apps/app/src/mainview/state/controller/turnsContextCards.test.ts:69:      { id: "title", kind: "file", title: "x".repeat(Math.min(length, 250)), status: "active", maximized: false }
apps/app/src/mainview/state/controller/turns.ts:188:   * so repeating it would say the same thing twice. A front-door route
apps/app/src/mainview/state/controller/turns.ts:502:         * repeated `flow-run@<repo>@<workspace>@run-N` line is worth less than
apps/app/src/mainview/state/controller/failures.ts:93:  const timers = new Set<ReturnType<typeof setTimeout>>()
apps/app/src/mainview/state/controller/failures.ts:94:  const dismissals = new Map<string, { timer: ReturnType<typeof setTimeout>; snapshot: string }>()
apps/app/src/mainview/state/controller/failures.ts:109:  const later = (work: () => void, delay: number): ReturnType<typeof setTimeout> => {
apps/app/src/mainview/state/controller/failures.ts:110:    const timer = setTimeout(() => {
apps/app/src/mainview/state/controller/failures.ts:217:    // A repeated quiet failure is an observation, not a new fact: skip it when
apps/app/src/mainview/state/controller/failures.ts:406:     * repeats a line rather than swallowing one.
apps/app/src/mainview/state/seams/CloudClient.test.ts:69:    expect(await cloudFailure(Response.json({ error: { message: "x".repeat(300) } }, { status: 409 }), "fallback"))
apps/app/src/mainview/state/seams/CloudClient.test.ts:71:        error: "x".repeat(240),
apps/app/src/mainview/state/seams/CloudClient.test.ts:79:          message: "x".repeat(240),
apps/app/src/mainview/state/seams/CloudClient.test.ts:163:        const timeout = setTimeout(() => resolve(Response.json({ saved: true })), 100)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:31:  for (let attempt = 0; attempt < 100 && !predicate(); attempt++) await new Promise(resolve => setTimeout(resolve, 5))
apps/app/src/mainview/state/controller/repositorySetup.test.ts:95:    const result = await Promise.race([t.setup.runRepositorySetup("setup", "evaluate"), new Promise(resolve => setTimeout(() => resolve("blocked"), 100))])
apps/app/src/mainview/state/controller/repositorySetup.test.ts:213:  const longPrompt = `  First line\n${"a".repeat(100)}  `
apps/app/src/mainview/state/controller/repositorySetup.test.ts:218:  expect(issueSummary.steps[0]?.prompt).toBe(`First line ${"a".repeat(69)}…`)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:528:  let polls = 0
apps/app/src/mainview/state/controller/repositorySetup.test.ts:536:    if (polls++ === 0) return response(body, "running")
apps/app/src/mainview/state/controller/repositorySetup.test.ts:809:    const acknowledgment = await Promise.race([t.setup.runRepositorySetup("setup", "apply"), new Promise(resolve => setTimeout(() => resolve("blocked"), 100))])
apps/app/src/mainview/state/controller/repositorySetup.test.ts:849:  const originalTimeout = globalThis.setTimeout, scheduled: Array<() => void> = []
apps/app/src/mainview/state/controller/repositorySetup.test.ts:850:  const timers = spyOn(globalThis, "setTimeout").mockImplementation(((callback: (...args: unknown[]) => void, delay?: number, ...args: unknown[]) => {
apps/app/src/mainview/state/controller/repositorySetup.test.ts:853:  }) as typeof setTimeout)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:893:  const originalTimeout = globalThis.setTimeout, scheduled: Array<() => void> = []
apps/app/src/mainview/state/controller/repositorySetup.test.ts:894:  const timers = spyOn(globalThis, "setTimeout").mockImplementation(((callback: (...args: unknown[]) => void, delay?: number, ...args: unknown[]) => {
apps/app/src/mainview/state/controller/repositorySetup.test.ts:897:  }) as typeof setTimeout)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:933:  const originalTimeout = globalThis.setTimeout, scheduled: Array<() => void> = []
apps/app/src/mainview/state/controller/repositorySetup.test.ts:934:  const timers = spyOn(globalThis, "setTimeout").mockImplementation(((callback: (...args: unknown[]) => void, delay?: number, ...args: unknown[]) => {
apps/app/src/mainview/state/controller/repositorySetup.test.ts:937:  }) as typeof setTimeout)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:969:  const originalTimeout = globalThis.setTimeout, scheduled: Array<() => void> = []
apps/app/src/mainview/state/controller/repositorySetup.test.ts:970:  const timers = spyOn(globalThis, "setTimeout").mockImplementation(((callback: (...args: unknown[]) => void, delay?: number, ...args: unknown[]) => {
apps/app/src/mainview/state/controller/repositorySetup.test.ts:973:  }) as typeof setTimeout)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1003:  const originalTimeout = globalThis.setTimeout, scheduled: Array<() => void> = []
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1004:  const timers = spyOn(globalThis, "setTimeout").mockImplementation(((callback: (...args: unknown[]) => void, delay?: number, ...args: unknown[]) => {
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1007:  }) as typeof setTimeout)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1017:  const t = await fixture(async () => { throw Error("Schedule refresh must not launch work") }, storage)
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1270:    const acknowledged = await Promise.race([t.setup.openRepositorySetup("issues", "example/repo"), new Promise(resolve => setTimeout(() => resolve("blocked"), 150))])
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1354:test("discovery archives a completed local pause before an older apply replaces it, including repeated reopen", async () => {
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1459:  let polls = 0
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1462:    if (polls++ === 0) { const queued = await response(body, "queued").json(); delete queued.receipt.runId; return Response.json(queued) }
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1463:    return response(body, polls === 2 ? "running" : "completed")
apps/app/src/mainview/state/controller/repositorySetup.test.ts:1985:    // The refusal says this one is spent, so a third attempt must not repeat it.
apps/app/src/mainview/state/controller/backgroundWork.test.ts:27:for (const kind of ["run-trace", "agent"] as const) test(`a recovered ${kind} failure toast follows corrected details without repeating unchanged observations`, async () => {
apps/app/src/mainview/state/controller/backgroundWork.test.ts:122:  await new Promise(resolve => setTimeout(resolve, 320))
apps/app/src/mainview/state/controller/backgroundWork.test.ts:159:  await new Promise(resolve => setTimeout(resolve, 30))
apps/app/src/mainview/state/controller/RepositorySetupQuestion.test.ts:137:    expect(await t.controller.answerRepositorySetupQuestion("setup", "issues.steps.automatic", 5, "0".repeat(64), "approved")).toBeTypeOf("string")
apps/app/src/mainview/state/controller/repositoryReadiness.test.ts:12:const pause = (ms = 0) => new Promise(resolve => setTimeout(resolve, ms))
apps/app/src/mainview/state/controller/signup.ts:36:    change({ stage: "poll", name, account, question: 0 })
apps/app/src/mainview/state/controller/signup.ts:44:    if (signup.stage !== "poll" || question === undefined) return "No question is open."
apps/app/src/mainview/state/controller/signup.ts:64:    if (signup.stage !== "poll" || question === undefined) return "No question is open."
apps/app/src/mainview/state/controller/signup.ts:73:    if (signup.stage === "poll" && signup.question > 0) change({ question: signup.question - 1 })
apps/app/src/mainview/state/controller/forms.ts:447:     * three words into Flow, Name and Schedule and then quotes the grammar at
apps/app/src/mainview/state/controller/forms.ts:567:      // Persist the claim before any command can launch. A reload or second click cannot repeat it.
apps/app/src/mainview/state/controller/frames.test.ts:63:const settle = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/explain.privacy.test.ts:81:  const accepted = { version: 1 as const, runId, legId: journal.legId, batch: 0, position: 0, hash: "0".repeat(64) }
apps/app/src/mainview/state/controller/explain.privacy.test.ts:83:    previousHash: accepted.hash, hash: "1".repeat(64), frames: [
apps/app/src/mainview/state/controller/explain.privacy.test.ts:253:      await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/graph.ts:9: * lose on the next poll.
apps/app/src/mainview/state/controller/ConversationClear.test.ts:210:    await store.dispatch({ type: "message.appended", actor: "system", text: "x".repeat(800_000) }).isPersisted.promise
apps/app/src/mainview/state/controller/ConversationClear.test.ts:225:      await store.dispatch({ type: "message.appended", actor: "system", text: "x".repeat(1_100_000) }).isPersisted
apps/app/src/mainview/state/controller/auth-billing.test.ts:114:  await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:210:    await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:219:      await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:229:      await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:246:      await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:307:  const tick = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:358:        if (path.endsWith("/start")) return json({ handoffId: "handoff-1", pollSecret: "secret-1" })
apps/app/src/mainview/state/controller/auth-billing.test.ts:404:      h.response.resolve(json({ handoffId: "handoff-1", pollSecret: "secret-1" }))
apps/app/src/mainview/state/controller/auth-billing.test.ts:416:    await new Promise((resolve) => setTimeout(resolve, 60))
apps/app/src/mainview/state/controller/auth-billing.test.ts:432:        ? { handoffId: "handoff-1", pollSecret: "secret-1" }
apps/app/src/mainview/state/controller/auth-billing.test.ts:458:    { name: "malformed", response: json({ handoffId: 5, pollSecret: null }),
apps/app/src/mainview/state/controller/auth-billing.test.ts:497:      h.response.resolve(json({ handoffId: "handoff-1", pollSecret: "secret-1" }))
apps/app/src/mainview/state/controller/auth-billing.test.ts:543:    await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:560:    await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:582:    await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:620:        await new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:652:  const tick = () => new Promise((resolve) => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:808:      for (let attempt = 0; attempt < 100 && !ready(); attempt += 1) await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:894:      for (let attempt = 0; attempt < 100 && !ready(); attempt += 1) await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:933:        await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:950:      await new Promise(resolve => setTimeout(resolve, 0))
apps/app/src/mainview/state/controller/auth-billing.test.ts:1315:      if (path.endsWith("/auth/native/start")) return Response.json({ handoffId: "handoff", pollSecret: "secret" })
apps/app/src/mainview/state/controller/auth-billing.ts:319:   * bound to it, and the page polls the claim same-origin until the session
apps/app/src/mainview/state/controller/auth-billing.ts:327:   * completed, polled for its full five minutes, and then wrote "Sign-in
apps/app/src/mainview/state/controller/auth-billing.ts:370:    let polling: Promise<void> | undefined
apps/app/src/mainview/state/controller/auth-billing.ts:391:      await polling
apps/app/src/mainview/state/controller/auth-billing.ts:395:    let start: { handoffId?: unknown; pollSecret?: unknown } | undefined
apps/app/src/mainview/state/controller/auth-billing.ts:409:    if (typeof start?.handoffId !== "string" || typeof start.pollSecret !== "string") {
apps/app/src/mainview/state/controller/auth-billing.ts:423:    // is a separately observed session outcome. Keep the poll owned and joined
apps/app/src/mainview/state/controller/auth-billing.ts:425:    const poll = async (): Promise<void> => {
apps/app/src/mainview/state/controller/auth-billing.ts:430:          const timer = setTimeout(() => wake?.(), handoffPollMs)
apps/app/src/mainview/state/controller/auth-billing.ts:451:            body: JSON.stringify({ handoffId: start.handoffId, pollSecret: start.pollSecret })
apps/app/src/mainview/state/controller/auth-billing.ts:454:          continue // A dropped poll is not a failed sign-in.
apps/app/src/mainview/state/controller/auth-billing.ts:467:           * An erroring claim used to read as "pending" and poll for the full
apps/app/src/mainview/state/controller/auth-billing.ts:493:              "Your browser finished the GitHub sign-in, but this app didn't receive the session — the sign-in cookie never reached it. Try again; if it repeats, that is a bug to report."
apps/app/src/mainview/state/controller/auth-billing.ts:507:    polling = poll()
apps/app/src/mainview/state/controller/auth-billing.ts:508:    void polling.catch(() => {})
apps/app/src/mainview/state/controller/gateway.ts:220:        await new Promise<void>(resolve => setTimeout(resolve, 2_000))
apps/app/src/mainview/state/controller/gateway.ts:458:     * repeat lands one effect and two deliberate clicks land two even inside
