diff --git a/.github/actions/setup-ci-dependencies/action.yml b/.github/actions/setup-ci-dependencies/action.yml
index e219d04a70a..244cf65c10c 100644
--- a/.github/actions/setup-ci-dependencies/action.yml
+++ b/.github/actions/setup-ci-dependencies/action.yml
@@ -70,8 +70,12 @@ runs:
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
- pnpm -r --if-present run postinstall
- pnpm run postinstall
+ if [ -f scripts/replay-workspace-postinstall.mjs ]; then
+ node scripts/replay-workspace-postinstall.mjs
+ else
+ pnpm -r --if-present run postinstall
+ pnpm run postinstall
+ fi
- name: Restore certified shared build outputs (read only)
if: inputs.restore-cache == 'true' && steps.inputs.outputs.cacheable == 'true'
diff --git a/.github/ci-task-matrix.json b/.github/ci-task-matrix.json
index c63e7423cee..3d483e9270b 100644
--- a/.github/ci-task-matrix.json
+++ b/.github/ci-task-matrix.json
@@ -343,55 +343,100 @@
"e2e_shards": [
{
"shard_index": 0,
- "shard_count": 8,
- "shard_label": "1/8",
+ "shard_count": 12,
+ "shard_label": "1/12",
"task": "ci:e2e"
},
{
"shard_index": 1,
- "shard_count": 8,
- "shard_label": "2/8",
+ "shard_count": 12,
+ "shard_label": "2/12",
"task": "ci:e2e"
},
{
"shard_index": 2,
- "shard_count": 8,
- "shard_label": "3/8",
+ "shard_count": 12,
+ "shard_label": "3/12",
"task": "ci:e2e"
},
{
"shard_index": 3,
- "shard_count": 8,
- "shard_label": "4/8",
+ "shard_count": 12,
+ "shard_label": "4/12",
"task": "ci:e2e"
},
{
"shard_index": 4,
- "shard_count": 8,
- "shard_label": "5/8",
+ "shard_count": 12,
+ "shard_label": "5/12",
"task": "ci:e2e"
},
{
"shard_index": 5,
- "shard_count": 8,
- "shard_label": "6/8",
+ "shard_count": 12,
+ "shard_label": "6/12",
"task": "ci:e2e"
},
{
"shard_index": 6,
- "shard_count": 8,
- "shard_label": "7/8",
+ "shard_count": 12,
+ "shard_label": "7/12",
"task": "ci:e2e"
},
{
"shard_index": 7,
- "shard_count": 8,
- "shard_label": "8/8",
+ "shard_count": 12,
+ "shard_label": "8/12",
+ "task": "ci:e2e"
+ },
+ {
+ "shard_index": 8,
+ "shard_count": 12,
+ "shard_label": "9/12",
+ "task": "ci:e2e"
+ },
+ {
+ "shard_index": 9,
+ "shard_count": 12,
+ "shard_label": "10/12",
+ "task": "ci:e2e"
+ },
+ {
+ "shard_index": 10,
+ "shard_count": 12,
+ "shard_label": "11/12",
+ "task": "ci:e2e"
+ },
+ {
+ "shard_index": 11,
+ "shard_count": 12,
+ "shard_label": "12/12",
"task": "ci:e2e"
}
],
"verify_runner_e2e_support": [
{
+ "shard_index": 0,
+ "shard_count": 4,
+ "shard_label": "1/4",
+ "task": "ci:runner-e2e-support"
+ },
+ {
+ "shard_index": 1,
+ "shard_count": 4,
+ "shard_label": "2/4",
+ "task": "ci:runner-e2e-support"
+ },
+ {
+ "shard_index": 2,
+ "shard_count": 4,
+ "shard_label": "3/4",
+ "task": "ci:runner-e2e-support"
+ },
+ {
+ "shard_index": 3,
+ "shard_count": 4,
+ "shard_label": "4/4",
"task": "ci:runner-e2e-support"
}
]
diff --git a/.github/scripts/ci-inputs.mjs b/.github/scripts/ci-inputs.mjs
index ad17a8acdc5..5908129bcb7 100644
--- a/.github/scripts/ci-inputs.mjs
+++ b/.github/scripts/ci-inputs.mjs
@@ -1,9 +1,34 @@
// Audited prose inputs, shared by routing, Vitest selection and task hashing.
-// Do not broaden this to all Markdown: docs/api and bundled skills are runtime inputs.
+// Do not broaden this to all Markdown: docs/api, bundled skills, maps, and
+// non-Markdown fixtures (e.g. doc/connections/*.json) are runtime/test inputs.
+const AUDITED_ROOT_GUIDANCE_DOCS = new Set([
+ "doc/CLI.md",
+ "doc/DATABASE.md",
+ "doc/DEVELOPING.md",
+ "doc/GOAL.md",
+ "doc/PRODUCT.md",
+ "doc/PUBLISHING.md",
+ "doc/RELEASING.md",
+]);
+
+const AUDITED_DOC_GUIDANCE_DIR =
+ /^doc\/(?:architecture|connections|design|experimental|memory|performance|plugins|pr|spec|testing)\/(?:[^/]+\/)*[^/]+\.md$/;
+
+const AUDITED_DOCS_GUIDANCE_DIR =
+ /^docs\/(?:adapters|cli|companies|deploy|guides|performance|plans|specs|start)\/(?:[^/]+\/)*[^/]+\.md$/;
+
+const AUDITED_HISTORICAL_DOC = /^doc\/(?:plans|logs)\/(?:[^/]+\/)*[^/]+\.md$/;
+
export function documentationInput(file) {
- if (file === "doc/DEVELOPING.md" || file === "doc/DATABASE.md") return "guidance";
- if (/^doc\/plans\/(?:[^/]+\/)*[^/]+\.md$/.test(file)
- && !file.split("/").includes("..")) return "historical";
+ if (typeof file !== "string" || file.split("/").includes("..")) return null;
+ if (AUDITED_HISTORICAL_DOC.test(file)) return "historical";
+ if (
+ AUDITED_ROOT_GUIDANCE_DOCS.has(file)
+ || AUDITED_DOC_GUIDANCE_DIR.test(file)
+ || AUDITED_DOCS_GUIDANCE_DIR.test(file)
+ ) {
+ return "guidance";
+ }
return null;
}
diff --git a/.github/scripts/tests/ci-dependency-cache.test.mjs b/.github/scripts/tests/ci-dependency-cache.test.mjs
index 36195ad32e9..2826d6b5003 100644
--- a/.github/scripts/tests/ci-dependency-cache.test.mjs
+++ b/.github/scripts/tests/ci-dependency-cache.test.mjs
@@ -1,7 +1,10 @@
import assert from "node:assert/strict";
import test from "node:test";
-import { readFileSync } from "node:fs";
+import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
+import os from "node:os";
+import path from "node:path";
import { cachePlan } from "../../../scripts/ci-dependency-cache.mjs";
+import { findWorkspacePostinstallScripts, replayWorkspacePostinstalls } from "../../../scripts/replay-workspace-postinstall.mjs";
const entries = {
"package.json": '{"scripts":{"postinstall":"node scripts/link-plugin-dev-sdk.mjs"}}',
@@ -97,10 +100,54 @@ test('known Copilot hooks permit caching, track their helpers, and still run on
const action = readFileSync(new URL('../../actions/setup-ci-dependencies/action.yml', import.meta.url), 'utf8');
const replay = action.split(' - name: Replay workspace install hooks after restore')[1].split(' - name:')[0];
assert.match(replay, /if: steps\.installed\.outputs\.cache-hit == 'true'/);
+ assert.match(replay, /node scripts\/replay-workspace-postinstall\.mjs/);
assert.match(replay, /pnpm -r --if-present run postinstall\s+pnpm run postinstall/);
assert.ok(action.indexOf('Replay workspace install hooks') < action.indexOf('Validate workspace links'));
});
+test('replay-workspace-postinstall discovers repo hooks, runs workspace hooks before root, and fails closed', async () => {
+ const discovered = findWorkspacePostinstallScripts();
+ assert.deepEqual(
+ discovered.workspaceHooks.map((hook) => hook.relDir),
+ ['packages/paperclip-runner', 'server'],
+ );
+ assert.equal(discovered.rootHook?.relDir, '.');
+
+ const tmp = mkdtempSync(path.join(os.tmpdir(), 'replay-postinstall-'));
+ try {
+ const orderFile = path.join(tmp, 'order.log');
+ mkdirSync(path.join(tmp, 'packages/alpha'), { recursive: true });
+ mkdirSync(path.join(tmp, 'server'), { recursive: true });
+ writeFileSync(path.join(tmp, 'package.json'), JSON.stringify({
+ name: 'root',
+ scripts: { postinstall: "node -e \"require('node:fs').appendFileSync(process.env.ORDER_FILE, 'root\\n')\"" },
+ }));
+ writeFileSync(path.join(tmp, 'packages/alpha/package.json'), JSON.stringify({
+ name: '@test/alpha',
+ scripts: { postinstall: "node -e \"require('node:fs').appendFileSync(process.env.ORDER_FILE, 'alpha\\n')\"" },
+ }));
+ writeFileSync(path.join(tmp, 'server/package.json'), JSON.stringify({
+ name: '@test/server',
+ scripts: { postinstall: "node -e \"require('node:fs').appendFileSync(process.env.ORDER_FILE, 'server\\n')\"" },
+ }));
+
+ const result = await replayWorkspacePostinstalls(tmp, { ...process.env, ORDER_FILE: orderFile });
+ assert.deepEqual(result, { workspaceCount: 2, ranRoot: true });
+ const lines = readFileSync(orderFile, 'utf8').trim().split('\n');
+ assert.equal(lines.length, 3);
+ assert.equal(lines[2], 'root', 'root postinstall must run after workspace postinstall hooks');
+ assert.deepEqual(lines.slice(0, 2).sort(), ['alpha', 'server']);
+
+ writeFileSync(path.join(tmp, 'server/package.json'), JSON.stringify({
+ name: '@test/server',
+ scripts: { postinstall: 'node -e "process.exit(3)"' },
+ }));
+ await assert.rejects(() => replayWorkspacePostinstalls(tmp, { ...process.env, ORDER_FILE: orderFile }), /postinstall in server exited with 3/);
+ } finally {
+ rmSync(tmp, { recursive: true, force: true });
+ }
+});
+
test('cache restores are exact and only a frozen canonical master push can publish entries', () => {
const action = readFileSync(new URL('../../actions/setup-ci-dependencies/action.yml', import.meta.url), 'utf8');
const installed = action.slice(action.indexOf(' - name: Restore installed'), action.indexOf(' - name: Locate pnpm'));
diff --git a/.github/scripts/tests/ci-plan.test.mjs b/.github/scripts/tests/ci-plan.test.mjs
index b8563b0d3ba..8236ebba3b8 100644
--- a/.github/scripts/tests/ci-plan.test.mjs
+++ b/.github/scripts/tests/ci-plan.test.mjs
@@ -100,7 +100,12 @@ test("PR workflow keeps Build fast and passes PR-mode context to typecheck and V
assert.ok(!build.includes("node scripts/verify-grok-npm-install.mjs"), "PR Build must not run the 4-min public npm install verifier");
assert.ok(!build.includes("warm-public-install-npm-cache.mjs"), "PR Build must not warm the unused public npm install cache");
assert.ok(build.includes("pnpm --filter @paperclipai/server build:runtime"), "PR Build still verifies production runtime bundle");
+ assert.match(build, /PAPERCLIP_TSC_EMIT_ONLY: \$\{\{ !\(contains\(github\.event\.pull_request\.labels\.\*\.name, 'full-ci'\) \|\| vars\.CI_INCREMENTAL_MODE == 'full'\) && '1' \|\| '' \}\}\n\s+run: pnpm build/, "ordinary PR Build should use emit-only server compile while full-ci and CI_INCREMENTAL_MODE=full clear PAPERCLIP_TSC_EMIT_ONLY");
assert.match(build, /if \[ "\$\{PAPERCLIP_CI_FULL:-\}" = "1" \]; then\n\s+scripts\/server-boot-smoke\.sh/);
+ const runnerSupport = workflow.split("\n verify_runner_e2e_support:\n")[1].split("\n verify:\n")[0];
+ assert.match(runnerSupport, /--shard-index \$\{\{ matrix\.shard_index \}\} --shard-count \$\{\{ matrix\.shard_count \}\}/);
+ assert.equal(lanes.verify_runner_e2e_support.length, 4, "Runner support suite should be 4-way sharded");
+ assert.equal(lanes.e2e_shards.length, 12, "E2E should be 12-way sharded");
const typecheck = workflow.split("\n typecheck_release_registry:\n")[1].split("\n general_tests:\n")[0];
assert.match(typecheck, /fetch-depth: 2/);
assert.match(typecheck, /CI_PLAN: \$\{\{ needs\.gate\.outputs\.plan \}\}/);
@@ -120,6 +125,19 @@ test("PR workflow keeps Build fast and passes PR-mode context to typecheck and V
assert.equal(prKey, releaseKey, "E2E UI dist reader and writer keys must match exactly");
assert.doesNotMatch(e2e.split("Restore prebuilt UI assets")[1].split("Run e2e tests")[0], /restore-keys:/);
assert.match(e2e, /PAPERCLIP_E2E_SKIP_UI_BUILD: \$\{\{ steps\.e2e_ui_dist\.outputs\.cache-hit == 'true' && '1' \|\| '' \}\}/);
+
+ // Exact reader/writer key parity for prebuilt Runner dist and incremental typecheck caches.
+ const prRunnerDistKey = typecheck.match(/key: (runner-dist-v1-.+)/)?.[1];
+ const releaseRunnerDistKey = releaseBuild.match(/key: (runner-dist-v1-.+)/)?.[1];
+ assert.ok(prRunnerDistKey && releaseRunnerDistKey, "both pr-trusted.yml and release-verify.yml must define runner-dist-v1 cache key");
+ assert.equal(prRunnerDistKey, releaseRunnerDistKey, "runner-dist-v1 reader and writer keys must match exactly");
+ assert.doesNotMatch(typecheck.split("Restore prebuilt Runner dist")[1].split("Restore incremental typecheck")[0], /restore-keys:/);
+
+ const prIncPrefix = typecheck.match(/key: (typecheck-incremental-v1-.+)-\$\{\{ github\.event\.pull_request\.base\.sha \}\}/)?.[1];
+ const releaseIncPrefix = releaseBuild.match(/key: (typecheck-incremental-v1-.+)-\$\{\{ github\.sha \}\}/)?.[1];
+ assert.ok(prIncPrefix && releaseIncPrefix, "both pr-trusted.yml and release-verify.yml must define typecheck-incremental-v1 prefix");
+ assert.equal(prIncPrefix, releaseIncPrefix, "typecheck-incremental-v1 reader and writer prefixes must match exactly");
+ assert.doesNotMatch(workflow, /actions\/cache\/save@/, "pr-trusted.yml must never save caches");
});
test("source inspected across package boundaries selects its consumers", () => {
@@ -386,18 +404,36 @@ else process.exit(3);
test("audited prose does not widen source selection, but guidance still runs its uncached guard", () => {
const source = "ui/src/components/Sidebar.tsx";
const sourcePlan = plan([source]);
- for (const doc of ["doc/DEVELOPING.md", "doc/DATABASE.md", "doc/plans/2026-10-30-example.md"]) {
+ for (const doc of [
+ "doc/DEVELOPING.md",
+ "doc/DATABASE.md",
+ "doc/connections/GOOGLE-WORKSPACE.md",
+ "docs/guides/board-operator/importing-and-exporting.md",
+ "doc/plans/2026-10-30-example.md",
+ "doc/logs/2026-11-01-verify.md",
+ ]) {
const mixed = plan([source, doc]);
- assert.equal(mixed.forceReason, null);
- assert.deepEqual(mixed.jobs, sourcePlan.jobs);
- assert.deepEqual(mixed.documentation, [doc]);
+ assert.equal(mixed.forceReason, null, doc);
+ assert.deepEqual(mixed.jobs, sourcePlan.jobs, doc);
+ assert.deepEqual(mixed.documentation, [doc], doc);
}
const guidance = plan(["doc/DEVELOPING.md"]);
assert.deepEqual([...selectedTasks(guidance)], ["ci:typecheck"]);
assert.equal(config.tasks["//#ci:typecheck"].cache, false);
+ assert.deepEqual([...selectedTasks(plan(["doc/connections/GOOGLE-WORKSPACE.md"]))], ["ci:typecheck"]);
+ assert.equal(selected(plan(["doc/connections/GOOGLE-WORKSPACE.md"]), "canary_dry_run"), false);
+ assert.equal(selected(plan(["doc/connections/GOOGLE-WORKSPACE.md"]), "verify_paperclip_runner"), false);
assert.deepEqual([...selectedTasks(plan(["doc/plans/2026-10-30-example.md"]))], []);
- for (const file of ["docs/api/issues.md", "doc/unknown.md", "doc/plans/tool.sh", "skills/paperclip/SKILL.md",
- "server/src/onboarding-assets/default/AGENTS.md", "tests/fixtures/example.md"]) {
+ assert.deepEqual([...selectedTasks(plan(["doc/logs/2026-11-01-verify.md"]))], []);
+ for (const file of [
+ "docs/api/issues.md",
+ "doc/connections/tool-method-permission-reviews.json",
+ "doc/unknown.md",
+ "doc/plans/tool.sh",
+ "skills/paperclip/SKILL.md",
+ "server/src/onboarding-assets/default/AGENTS.md",
+ "tests/fixtures/example.md",
+ ]) {
assert.ok(selectedTasks(plan([source, file])).has("ci:server"), file);
}
});
diff --git a/.github/scripts/tests/ci-routing.test.mjs b/.github/scripts/tests/ci-routing.test.mjs
index f16eb651352..a87e416234f 100644
--- a/.github/scripts/tests/ci-routing.test.mjs
+++ b/.github/scripts/tests/ci-routing.test.mjs
@@ -435,7 +435,7 @@ for (const [name, vars, github, expected = "ubuntu-latest"] of reviewPlacementCa
test("GitHub-hosted PR runs queue at most four jobs per matrix", () => {
const trusted = readFileSync(new URL("../../workflows/pr-trusted.yml", import.meta.url), "utf8");
const strategies = trusted.match(/^ {4}strategy:\n(?: {6}.*\n)+/gm) ?? [];
- assert.equal(strategies.length, 4);
+ assert.equal(strategies.length, 5);
for (const strategy of strategies) {
const expression = strategy.match(/^ {6}max-parallel: \$\{\{ (.+) \}\}$/m)?.[1];
assert.ok(expression, "every PR matrix must bound its GitHub-hosted fan-out");
diff --git a/.github/workflows/pr-trusted.yml b/.github/workflows/pr-trusted.yml
index 685848b978b..e97033a7141 100644
--- a/.github/workflows/pr-trusted.yml
+++ b/.github/workflows/pr-trusted.yml
@@ -499,6 +499,33 @@ jobs:
if: ${{ steps.runner_release_crate.outputs.cache-hit == 'true' }}
run: node scripts/runner-release-crate-cache.mjs mark-current
+ # Exact-key master cache for prebuilt Runner dist (read-only restore;
+ # prepare-runner-vendor.mjs self-validates the SHA-256 input digest and
+ # every output size, rebuilding on any mismatch).
+ - name: Restore prebuilt Runner dist (read only)
+ id: runner_dist
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ packages/paperclip-runner/dist
+ packages/paperclip-runner/node_modules/.cache/paperclip-runner-build-inputs.json
+ packages/paperclip-eval-kernel/dist
+ key: runner-dist-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'tsconfig.base.json', 'patches/**', 'packages/shared/src/**', 'packages/adapter-utils/src/**', 'packages/plugins/sdk/src/**', 'packages/paperclip-runner/package.json', 'packages/paperclip-runner/tsconfig*.json', 'packages/paperclip-runner/rust-toolchain.toml', 'packages/paperclip-runner/acpx-profiles.json', 'packages/paperclip-runner/antigravity-distributions.json', 'packages/paperclip-runner/cursor-*.json', 'packages/paperclip-runner/src/**', 'packages/paperclip-runner/scripts/**', 'packages/paperclip-runner/protocol/**', 'packages/paperclip-runner/spec/**', 'packages/paperclip-runner/runner/Cargo.toml', 'packages/paperclip-runner/runner/Cargo.lock', 'packages/paperclip-runner/runner/crates/**', 'packages/paperclip-runner/test-fixtures/**', 'packages/paperclip-runner/test/fixtures/**', 'packages/paperclip-eval-kernel/package.json', 'packages/paperclip-eval-kernel/tsconfig*.json', 'packages/paperclip-eval-kernel/src/**') }}
+
+ # Prefix-keyed master cache for TS 7 incremental .tsbuildinfo + dts outputs
+ # (read-only restore). TypeScript 7 hashes file contents so changed PR files
+ # always re-check cleanly while unchanged layers finish 10-18x faster.
+ - name: Restore incremental typecheck cache (read only)
+ id: typecheck_incremental
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ server/node_modules/.cache/paperclip-typecheck
+ ui/node_modules/.cache/paperclip-ui.tsbuildinfo
+ key: typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-${{ github.event.pull_request.base.sha }}
+ restore-keys: |
+ typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-
+
- name: Typecheck, CLI guidance safety and release registry tests
if: ${{ hashFiles('scripts/ci-typecheck-lane.mjs') != '' }}
run: node scripts/ci-typecheck-lane.mjs
@@ -772,15 +799,19 @@ jobs:
retention-days: 14
verify_runner_e2e_support:
- name: Runner support suite
+ name: Runner support suite (${{ matrix.shard_label }})
needs: [gate]
if: ${{ needs.gate.outputs.full_ci == 'true' && (needs.gate.outputs.plan == '' || fromJSON(needs.gate.outputs.plan).jobs.verify_runner_e2e_support.run) }}
runs-on: ${{ needs.gate.outputs.runner }}
timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ max-parallel: ${{ needs.gate.outputs.runner == 'ubuntu-latest' && 4 || 256 }}
+ matrix: ${{ fromJSON(needs.gate.outputs.plan != '' && toJSON(fromJSON(needs.gate.outputs.plan).jobs.verify_runner_e2e_support.matrix) || '{"include":[{"shard_index":0,"shard_count":4,"shard_label":"1/4","task":"ci:runner-e2e-support"},{"shard_index":1,"shard_count":4,"shard_label":"2/4","task":"ci:runner-e2e-support"},{"shard_index":2,"shard_count":4,"shard_label":"3/4","task":"ci:runner-e2e-support"},{"shard_index":3,"shard_count":4,"shard_label":"4/4","task":"ci:runner-e2e-support"}]}') }}
env:
PAPERCLIP_CI_PROFILE: ${{ needs.gate.outputs.profile_ci }}
- PAPERCLIP_CI_PROFILE_JOB: Runner support suite
+ PAPERCLIP_CI_PROFILE_JOB: Runner support suite (${{ matrix.shard_label }})
PAPERCLIP_CI_PR_AUTHOR: ${{ github.event.pull_request.user.login }}
# The paid Runner workflows depend on this suite: workflow security
@@ -820,7 +851,14 @@ jobs:
# Builds the plugin SDK first, then runs Vitest and the node:test files.
- name: Run the Runner support suite
- run: pnpm test:e2e:runner:unit
+ run: |
+ if grep -q 'shard-index' tests/runner-e2e/run-unit.mjs; then
+ node tests/runner-e2e/run-unit.mjs --shard-index ${{ matrix.shard_index }} --shard-count ${{ matrix.shard_count }}
+ elif [ "${{ matrix.shard_index }}" = "0" ]; then
+ pnpm test:e2e:runner:unit
+ else
+ echo "Checkout predates sharded run-unit.mjs; shard 0 covers full suite."
+ fi
- name: Upload CI profile timings
continue-on-error: true
@@ -1293,7 +1331,12 @@ jobs:
- name: Build Runner Evalbook viewer
run: pnpm --filter @paperclipai/paperclip-runner build:issue-thread
+ # On ordinary PRs, Typecheck + Release Registry checks every server type in
+ # parallel, so server build only needs JS emit (`PAPERCLIP_TSC_EMIT_ONLY=1`).
+ # Full-CI / release builds emit full declarations and re-check types.
- name: Build
+ env:
+ PAPERCLIP_TSC_EMIT_ONLY: ${{ !(contains(github.event.pull_request.labels.*.name, 'full-ci') || vars.CI_INCREMENTAL_MODE == 'full') && '1' || '' }}
run: pnpm build
# Always verify the production runtime bundle builds cleanly (~4s).
@@ -1658,7 +1701,7 @@ jobs:
strategy:
fail-fast: false
max-parallel: ${{ needs.gate.outputs.runner == 'ubuntu-latest' && 4 || 256 }}
- matrix: ${{ fromJSON(needs.gate.outputs.plan != '' && toJSON(fromJSON(needs.gate.outputs.plan).jobs.e2e_shards.matrix) || '{"include":[{"shard_index":0,"shard_count":8,"shard_label":"1/8","task":"ci:e2e"},{"shard_index":1,"shard_count":8,"shard_label":"2/8","task":"ci:e2e"},{"shard_index":2,"shard_count":8,"shard_label":"3/8","task":"ci:e2e"},{"shard_index":3,"shard_count":8,"shard_label":"4/8","task":"ci:e2e"},{"shard_index":4,"shard_count":8,"shard_label":"5/8","task":"ci:e2e"},{"shard_index":5,"shard_count":8,"shard_label":"6/8","task":"ci:e2e"},{"shard_index":6,"shard_count":8,"shard_label":"7/8","task":"ci:e2e"},{"shard_index":7,"shard_count":8,"shard_label":"8/8","task":"ci:e2e"}]}') }}
+ matrix: ${{ fromJSON(needs.gate.outputs.plan != '' && toJSON(fromJSON(needs.gate.outputs.plan).jobs.e2e_shards.matrix) || '{"include":[{"shard_index":0,"shard_count":12,"shard_label":"1/12","task":"ci:e2e"},{"shard_index":1,"shard_count":12,"shard_label":"2/12","task":"ci:e2e"},{"shard_index":2,"shard_count":12,"shard_label":"3/12","task":"ci:e2e"},{"shard_index":3,"shard_count":12,"shard_label":"4/12","task":"ci:e2e"},{"shard_index":4,"shard_count":12,"shard_label":"5/12","task":"ci:e2e"},{"shard_index":5,"shard_count":12,"shard_label":"6/12","task":"ci:e2e"},{"shard_index":6,"shard_count":12,"shard_label":"7/12","task":"ci:e2e"},{"shard_index":7,"shard_count":12,"shard_label":"8/12","task":"ci:e2e"},{"shard_index":8,"shard_count":12,"shard_label":"9/12","task":"ci:e2e"},{"shard_index":9,"shard_count":12,"shard_label":"10/12","task":"ci:e2e"},{"shard_index":10,"shard_count":12,"shard_label":"11/12","task":"ci:e2e"},{"shard_index":11,"shard_count":12,"shard_label":"12/12","task":"ci:e2e"}]}') }}
env:
PAPERCLIP_CI_PROFILE: ${{ needs.gate.outputs.profile_ci }}
diff --git a/.github/workflows/release-verify.yml b/.github/workflows/release-verify.yml
index e7513ffa0c7..ccd075ad9f3 100644
--- a/.github/workflows/release-verify.yml
+++ b/.github/workflows/release-verify.yml
@@ -586,6 +586,59 @@ jobs:
path: server/ui-dist
key: e2e-ui-dist-v2-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig*.json', 'ui/package.json', 'ui/index.html', 'ui/vite.config.*', 'ui/tsconfig*.json', 'ui/src/**', 'ui/public/**', 'packages/shared/package.json', 'packages/shared/src/**', 'packages/adapter-utils/package.json', 'packages/adapter-utils/src/**', 'packages/adapters/*/package.json', 'packages/adapters/*/src/**', 'packages/plugins/sdk/package.json', 'packages/plugins/sdk/src/**', 'announcements/examples/animated/**') }}
+ # Exact-key master cache for prebuilt Runner dist (read-only restore in
+ # pr-trusted.yml typecheck_release_registry). Only canonical master pushes write.
+ - name: Check for prebuilt Runner dist cache
+ id: runner_dist
+ if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha }}
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ lookup-only: true
+ path: |
+ packages/paperclip-runner/dist
+ packages/paperclip-runner/node_modules/.cache/paperclip-runner-build-inputs.json
+ packages/paperclip-eval-kernel/dist
+ key: runner-dist-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'tsconfig.base.json', 'patches/**', 'packages/shared/src/**', 'packages/adapter-utils/src/**', 'packages/plugins/sdk/src/**', 'packages/paperclip-runner/package.json', 'packages/paperclip-runner/tsconfig*.json', 'packages/paperclip-runner/rust-toolchain.toml', 'packages/paperclip-runner/acpx-profiles.json', 'packages/paperclip-runner/antigravity-distributions.json', 'packages/paperclip-runner/cursor-*.json', 'packages/paperclip-runner/src/**', 'packages/paperclip-runner/scripts/**', 'packages/paperclip-runner/protocol/**', 'packages/paperclip-runner/spec/**', 'packages/paperclip-runner/runner/Cargo.toml', 'packages/paperclip-runner/runner/Cargo.lock', 'packages/paperclip-runner/runner/crates/**', 'packages/paperclip-runner/test-fixtures/**', 'packages/paperclip-runner/test/fixtures/**', 'packages/paperclip-eval-kernel/package.json', 'packages/paperclip-eval-kernel/tsconfig*.json', 'packages/paperclip-eval-kernel/src/**') }}
+
+ - name: Save prebuilt Runner dist for PR typecheck
+ if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha && steps.runner_dist.outputs.cache-hit != 'true' }}
+ uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ packages/paperclip-runner/dist
+ packages/paperclip-runner/node_modules/.cache/paperclip-runner-build-inputs.json
+ packages/paperclip-eval-kernel/dist
+ key: runner-dist-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('package.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml', 'tsconfig.base.json', 'patches/**', 'packages/shared/src/**', 'packages/adapter-utils/src/**', 'packages/plugins/sdk/src/**', 'packages/paperclip-runner/package.json', 'packages/paperclip-runner/tsconfig*.json', 'packages/paperclip-runner/rust-toolchain.toml', 'packages/paperclip-runner/acpx-profiles.json', 'packages/paperclip-runner/antigravity-distributions.json', 'packages/paperclip-runner/cursor-*.json', 'packages/paperclip-runner/src/**', 'packages/paperclip-runner/scripts/**', 'packages/paperclip-runner/protocol/**', 'packages/paperclip-runner/spec/**', 'packages/paperclip-runner/runner/Cargo.toml', 'packages/paperclip-runner/runner/Cargo.lock', 'packages/paperclip-runner/runner/crates/**', 'packages/paperclip-runner/test-fixtures/**', 'packages/paperclip-runner/test/fixtures/**', 'packages/paperclip-eval-kernel/package.json', 'packages/paperclip-eval-kernel/tsconfig*.json', 'packages/paperclip-eval-kernel/src/**') }}
+
+ # Incremental TS 7 .tsbuildinfo + server dts cache for PR typecheck
+ # (read-only prefix restore in pr-trusted.yml). Only canonical master pushes write.
+ - name: Check for incremental typecheck cache
+ id: typecheck_incremental
+ if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha }}
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ lookup-only: true
+ path: |
+ server/node_modules/.cache/paperclip-typecheck
+ ui/node_modules/.cache/paperclip-ui.tsbuildinfo
+ key: typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-${{ github.sha }}
+
+ - name: Warm incremental typecheck cache
+ if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha && steps.typecheck_incremental.outputs.cache-hit != 'true' }}
+ run: |
+ node server/scripts/typecheck-layers.mjs --checkers 4
+ node scripts/storybook-catalog.mjs
+ node scripts/run-tsc.mjs -p ui/tsconfig.json --incremental --tsBuildInfoFile ui/node_modules/.cache/paperclip-ui.tsbuildinfo
+
+ - name: Save incremental typecheck cache for PR typecheck
+ if: ${{ github.repository == 'paperclipai/paperclip' && github.event_name == 'push' && github.ref == 'refs/heads/master' && inputs.ref == github.sha && steps.typecheck_incremental.outputs.cache-hit != 'true' }}
+ uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+ with:
+ path: |
+ server/node_modules/.cache/paperclip-typecheck
+ ui/node_modules/.cache/paperclip-ui.tsbuildinfo
+ key: typecheck-incremental-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml', 'tsconfig.base.json', 'server/tsconfig.json', 'server/src/__tests__/tsconfig.json', 'server/scripts/typecheck-layers.mjs', 'ui/tsconfig.json') }}-${{ github.sha }}
+
runner_binary_targets:
if: inputs.runner_binaries_only
name: Read exact-source daemon targets
diff --git a/doc/PRODUCT.md b/doc/PRODUCT.md
index ff6a11815ff..f1c7c3ff82f 100644
--- a/doc/PRODUCT.md
+++ b/doc/PRODUCT.md
@@ -114,13 +114,16 @@ marker. Tasks archived from the viewer’s inbox leave Recents. Canceled and
completed tasks remain eligible. Opening a recent task moves its row to the top
of Recents.
-Standard Recents also shows recent chats and projects as individual links.
+Standard Recents also shows recent chats and projects.
Coordinator Recents lets you pin tasks, agent chats, and projects above More.
The pin button appears on the current row or when a row is hovered or focused
with the keyboard. Shortcuts share the saved order with pinned pages and stay
available as Recents changes.
-Project links in Recents and pinned navigation open the project's Tasks tab.
-Both locations have a chevron that shows up to 12 recently updated project tasks.
+In **More → Projects**, each project row also lets you pin or unpin its sidebar
+shortcut without opening the project. Project star and join/leave controls appear
+only in the Classic workspace.
+In Recents and pinned navigation, clicking a project row opens or closes its
+folder to show up to 12 recently updated tasks. Each task links to its detail page.
The task list loads when expanded and keeps the task status and unread markers.
Agent-owned tasks show **In Progress** only while a task-linked run is queued
diff --git a/doc/connections/GOOGLE-WORKSPACE.md b/doc/connections/GOOGLE-WORKSPACE.md
index 251b02b534a..692104c28cd 100644
--- a/doc/connections/GOOGLE-WORKSPACE.md
+++ b/doc/connections/GOOGLE-WORKSPACE.md
@@ -58,8 +58,12 @@ supported. They are not automatically merged, upgraded or reauthorized. The Shee
robot-account method remains separate because it uses explicitly shared files,
not the user's Google OAuth identity.
-Google's hosted Workspace MCP servers are Developer Preview services. The app
-endpoints remain separate. Paperclip namespaces actions by service and routes them
+Google made its hosted Workspace MCP servers generally available on
+2026-11-24. Its Workspace AI Tools Addendum
+() requires a tool that is, or is
+driven by, an AI agent to use them instead of the REST APIs, and Google's MCP
+servers reject an OAuth client that is not marked "Use this client for an
+AI-powered agent" in the Google Console. The app endpoints remain separate. Paperclip namespaces actions by service and routes them
to a closed endpoint registry using the combined grant. It does not create child
connections or send provider tokens through Paperclip ID.
@@ -68,10 +72,19 @@ Each service has a tool transport, set in `GOOGLE_WORKSPACE_TOOL_TRANSPORT`
to Google's hosted MCP server for that service. `paperclip_rest` runs Paperclip's
own tools over Google's REST APIs, in the server process
(`server/src/google-workspace-rest-tools/`), with the same tool names, inputs
-and results. Gmail, Drive, Docs, Sheets, Slides and Calendar run on
-`paperclip_rest` (since 2026-11-23), so the combined connection lists all 36
-allowlisted actions for a full read and write grant. Chat, People and Search,
-which new setup does not offer, stay on `google_mcp`. A service can move to
+and results. Every service runs on `google_mcp` (since 2026-11-24; Gmail,
+Drive, Docs, Sheets, Slides and Calendar ran on `paperclip_rest` from
+2026-11-23 to 2026-11-24). `paperclip_rest` stays as the fallback. The
+combined connection lists the allowlisted actions that Google's servers list
+and the grant covers, at most 36 for a full read and write grant. Before a call
+goes to Google's MCP server, the gateway applies the REST tools' argument checks
+that need no request to Google: unknown arguments, one file ID per argument,
+the closed list of Docs and Slides edit kinds, and, for a Calendar delete, a
+read of the event that refuses a whole recurring series. A confirmation question
+from Google's server goes to a person on the task's question card. When a
+connection saved on `paperclip_rest` is refreshed on `google_mcp`, Google's
+definitions replace Paperclip's without holding any action for review, and Off
+and Ask first stay. A service can move to
`paperclip_rest` only when Paperclip implements every tool on its allowlist; a
test enforces that. Actions of a service on `paperclip_rest` are Paperclip's
own definitions. Agents receive them at once, also for a connection saved
diff --git a/doc/memory/google-connector-memory.md b/doc/memory/google-connector-memory.md
index 546bd7e9a09..53b283f7bd5 100644
--- a/doc/memory/google-connector-memory.md
+++ b/doc/memory/google-connector-memory.md
@@ -12,14 +12,14 @@ Related: [production checklist](../plans/2026-11-17-google-workspace-production-
[code-fix plan](../plans/2026-11-17-google-workspace-code-fixes.md),
[connector doc](../connections/GOOGLE-WORKSPACE.md).
-Last updated: November 23, 2026 (evening).
+Last updated: November 24, 2026.
## Decisions
| Date | Decision | Detail |
| --- | --- | --- |
| Nov 17 | **Owner for everything is Dotta** | Submission, security, privacy and release. |
-| Nov 17 | **Launch on our own tools over Google's REST APIs** | Google's hosted Workspace MCP servers are still Developer Preview and cannot be offered to the public. We build our own tool set for agents that have this connector. |
+| Nov 17 | **Launch on our own tools over Google's REST APIs** | Replaced on Nov 24 (see below). Google's hosted Workspace MCP servers were still Developer Preview and could not be offered to the public. We built our own tool set for agents that have this connector. |
| Nov 17 | **The REST tool set must be swappable for Google's MCP later** | Same tool names, inputs and results as Google's MCP tools, so switching back is a change of endpoint, not a rewrite. |
| Nov 17 | **The REST tool set lives in its own folder** | Nothing Google-REST-specific leaks into shared code; removing it later means deleting the folder and flipping one registration. Follow the boundary-discipline principle and `rules/module-boundaries.mdc`. |
| Nov 17 | **No new npm packages** | The REST tool set is a folder inside the server, `server/src/google-workspace-rest-tools/`, not a new package. The server is published, so a new package in its dependencies would also have to be published. |
@@ -40,7 +40,7 @@ Last updated: November 23, 2026 (evening).
| Nov 17 | **Deleting a whole recurring series is refused** | Same rule as the `delete_event` decision above. |
| Nov 17 | **A service is switched to REST only after a live test on the staging tester** | One service at a time. |
| Nov 17 | **The gateway sets the REST result size limit** | The REST tools enforce the number the gateway passes: the gateway's MCP response limit less framing, 999,885 bytes. A result Google's MCP server could deliver is also delivered over REST. See the folder README's "Result size". |
-| Nov 23 | **All six launch services switched to REST now** | Gmail, Drive, Docs, Sheets, Slides and Calendar are `paperclip_rest`. This replaces the Nov 17 "one service at a time after a live test" rule: live testing happens on the staging tester right after the switch deploys, and problems are fixed forward. Chat, People and Search stay on `google_mcp`. |
+| Nov 23 | **All six launch services switched to REST now** | Replaced on Nov 24 (see below). Gmail, Drive, Docs, Sheets, Slides and Calendar were `paperclip_rest`. This replaces the Nov 17 "one service at a time after a live test" rule: live testing happens on the staging tester right after the switch deploys, and problems are fixed forward. Chat, People and Search stay on `google_mcp`. |
| Nov 23 | **Write actions default to "Allowed"** | No approval step by default, including actions labelled destructive. Operators can still set Ask first per action. |
| Nov 23 | **Images by public web address are allowed in Docs and Slides** | `insertInlineImage`, `replaceImage`, `createImage` and `replaceAllShapesWithImage` may use any public link. Links to Drive or Docs files stay refused (Nov 17 rule). Accepted risk: Google, not Paperclip, fetches the address, and Paperclip's own requests still go only to the allowed Google hosts. What remains is that an agent could put data in the address it chooses. Owner decision; do not restrict it. |
| Nov 23 | **Unconfirmed Google revocation is retried by the app, not Cloud** | When access must end and Google cannot be reached or confirm, the app keeps the token in `google_pending_revocations` and retries (1 minute up to 6 hours backoff, 30-day hard stop). Cloud still never stores provider tokens. Company deletion and a Cloud-removed instance queue the same way. The broker lets a removed instance sign a Google revoke (Cloud broker change, November 23). See [connector doc](../connections/GOOGLE-WORKSPACE.md), "Pending revocation". |
@@ -49,6 +49,9 @@ Last updated: November 23, 2026 (evening).
| Nov 23 | **Security lab: TAC Security (recommended, not yet engaged)** | Google's discounted Tier 2 partner. Plan about $2,000 for year one including a retest. Confirm with a quote; Google assigns the tier. |
| Nov 23 | **A tool refuses an argument it does not know** | All 36 tools fail before any request to Google and name the accepted arguments. Found live: `list_threads` ignored a filter and returned unfiltered mail. |
| Nov 23 | **A cancelled or abandoned first sign-in leaves no connection** | Cancel removes the draft; a closed tab leaves a hidden draft that the next attempt reuses. Applies to every sign-in connector. |
+| Nov 24 | **Back to Google's MCP servers for all six services, before the demo video and the submission** | Gmail, Drive, Docs, Sheets, Slides and Calendar are `google_mcp` again. Reason: Google's Workspace AI Tools Addendum (published Nov 24, see "Google AI Tools Addendum") says a tool that is, or is driven by, an AI agent must use a Google MCP and not the REST APIs, and forbids hiding that classification. Google made its Workspace MCP servers generally available the same day. |
+| Nov 24 | **The REST tool set stays as the fallback** | `server/src/google-workspace-rest-tools/` and the `GOOGLE_WORKSPACE_TOOL_TRANSPORT` switch stay in the code. Do not delete them. The REST argument checks that need no request to Google also run before each call to Google's MCP servers. |
+| Nov 24 | **Every OAuth client that calls Google's MCP servers is an agent client** | Google's MCP servers reject an OAuth client that is not marked "Use this client for an AI-powered agent" in the Google Console. The coordinator changes the Console setting; there is no code for it. |
| Nov 24 | **The service picker shows no explanatory text, only the privacy policy link** | Owner decision. This removes the in-product data-use disclosure added on Nov 17 ([#21998](https://github.com/paperclipai/paperclip/pull/21998)). Risk noted by the coordinator: Google's user data policy may expect an in-product disclosure before consent; if a reviewer asks, restore a short statement above the link. |
## What has shipped
@@ -68,26 +71,64 @@ Last updated: November 23, 2026 (evening).
| [#22027](https://github.com/paperclipai/paperclip/pull/22027) | Six Sheets tools in the REST tool set (Sheets 6 of 6). | `c366a606b1` |
| [#22029](https://github.com/paperclipai/paperclip/pull/22029) | Docs and Slides tools in the REST tool set (Docs 2 of 2, Slides 2 of 2). Also marks Calendar `update_event` destructive. | `f61b919701` |
| [#22028](https://github.com/paperclipai/paperclip/pull/22028) | Eight Drive tools in the REST tool set (Drive 8 of 8). Also limits the Gmail host to its API path prefix (before, any path was accepted there) and requires a path prefix for every allowed host. | `ceaf574421` |
+| [#22815](https://github.com/paperclipai/paperclip/pull/22815) | All six services back on Google's MCP servers (Nov 24). The REST argument checks that need no request to Google run before each MCP call. A refresh that replaces saved REST definitions holds nothing for review. REST tools stay as the fallback. | Squash merge of this PR |
-The REST tool set covers all 36 actions, and all six services are switched to it.
+The REST tool set covers all 36 actions. All six services ran on it from Nov 23 to Nov 24 and are back on Google's MCP servers since Nov 24; the REST tool set is the fallback.
### REST tools status
| Service | Implemented | Switched on |
| --- | --- | --- |
-| Gmail | 9 of 9 | Yes (Nov 23) |
-| Calendar | 9 of 9 | Yes (Nov 23) |
-| Drive | 8 of 8 | Yes (Nov 23) |
-| Docs | 2 of 2 | Yes (Nov 23) |
-| Sheets | 6 of 6 | Yes (Nov 23) |
-| Slides | 2 of 2 | Yes (Nov 23) |
+| Gmail | 9 of 9 | No. On REST Nov 23 to Nov 24 |
+| Calendar | 9 of 9 | No. On REST Nov 23 to Nov 24 |
+| Drive | 8 of 8 | No. On REST Nov 23 to Nov 24 |
+| Docs | 2 of 2 | No. On REST Nov 23 to Nov 24 |
+| Sheets | 6 of 6 | No. On REST Nov 23 to Nov 24 |
+| Slides | 2 of 2 | No. On REST Nov 23 to Nov 24 |
"Switched on" means the service is `paperclip_rest` in
-`GOOGLE_WORKSPACE_TOOL_TRANSPORT`. Chat, People and Search stay `google_mcp`.
+`GOOGLE_WORKSPACE_TOOL_TRANSPORT`. Since Nov 24 every service is
+`google_mcp`.
+
+### On Google's MCP servers (since Nov 24)
+
+What Paperclip still does before it sends a call to Google's MCP server:
+
+- Offers only the actions on the allowlist (`toolScopes` in
+ `packages/shared/src/google-workspace-connectors.ts`) that the grant
+ covers. A tool that Google's server lists and the allowlist does not (Gmail
+ send, Drive delete or sharing, Gmail archive, Chat, People, Search) never
+ reaches an agent.
+- Refuses an argument that the action's saved schema does not list (top
+ level always; inside an object only when the schema closes that object).
+- Requires one file ID (no link, no list) in `fileId`, `parentId`,
+ `documentId`, `spreadsheetId` and `presentationId`.
+- Docs and Slides edits: the closed list of request kinds, including the
+ refusal of kinds that read another file and of images from Drive or Docs
+ links.
+- `delete_event`: reads the event first with Google's `get_event` and refuses
+ a whole recurring series. If that read does not return the event, nothing
+ is deleted.
+- Off, Ask first, approval, readable action names, audit, invocation records
+ and prompt-injection screening run as on REST.
+- A confirmation question from Google (MCP elicitation) goes on the task's
+ question card for a person. Skipping it sends "decline"; until it is
+ answered, the call stops again and nothing is changed.
+
+What only the REST tools did, and does not happen on MCP:
+
+- `requiredRevisionId` being mandatory for Docs and Slides edits.
+- A connection whose catalog was saved on REST keeps the REST definitions
+ for agents until its next catalog refresh. The refresh saves Google's
+ definitions and does not hold those actions for review. Gmail
+ `get_draft`, `list_threads` and `search_messages` are not in Google's
+ published reference; if Google's server does not list them, the refresh
+ removes them.
### Known differences from Google's tools
From the folder README (`server/src/google-workspace-rest-tools/README.md`).
+They apply only while a service is on the REST fallback.
| Service | Difference |
| --- | --- |
@@ -106,8 +147,12 @@ From the folder README (`server/src/google-workspace-rest-tools/README.md`).
reviewers and nobody has signed in with it yet. Only the owner holds it.
This test also decides whether the reviewer's `member` role can add a
Google connection or must be raised.
-- **Disconnect and "Delete data" on the REST build.** Verified on the
- earlier build only.
+- **Live test on Google's MCP servers.** The switch back (Nov 24) is tested
+ with fakes only. On the staging tester: mark the client as an agent client,
+ enable the six MCP APIs, then run all 36 actions, one Google confirmation
+ answered and one declined, disconnect and "Delete data".
+- **Retention after disconnect (owner decision).** See "Google AI Tools
+ Addendum".
- **Company deletion race.** A late activity entry can fail a company
delete with a foreign-key error (seen once in CI on Nov 23). A fix is in
review.
@@ -137,16 +182,18 @@ From the folder README (`server/src/google-workspace-rest-tools/README.md`).
## Next steps
-1. Owner signs in as the reviewer on the staging tester; then test connect,
+1. Mark the OAuth clients as agent clients in the Google Console and test
+ the MCP build live on the staging tester (see "Still open").
+2. Owner signs in as the reviewer on the staging tester; then test connect,
an agent task, disconnect and "Delete data" as the reviewer.
-2. Deploy to production on the owner's go: app first, then broker. The
+3. Deploy to production on the owner's go: app first, then broker. The
production GitHub Environment already has the reviewer login switch set
to on (November 23), so no action is needed there. Without that switch,
a production deploy would turn the production tester's reviewer login
off.
-3. Get a quote from the security lab.
-4. Record the demo video and prepare the reply to Google.
-5. Update the Console declaration to the 14 when submitting.
+4. Get a quote from the security lab.
+5. Record the demo video and prepare the reply to Google.
+6. Update the Console declaration to the 14 when submitting.
## Environments
@@ -168,7 +215,8 @@ Staging tester state (November 23):
releases, which is why its build changed without a deploy.
- **On the separate Google app.** That app is External, In Production, with
the six REST APIs enabled and the staging broker callback on its one web
- client. The consent screen names the app by its domain and shows one
+ client. For the MCP build it also needs the six Workspace MCP APIs enabled
+ and its client marked as an agent client (not done as of Nov 24). The consent screen names the app by its domain and shows one
unticked box per permission. The staging environment lists the tester's
stack for the alternate client, for the Workspace group only.
- Never set the alternate stack list before its client secret exists: the
@@ -179,7 +227,8 @@ Staging tester state (November 23):
wrong review code is refused. Sign-in with the real review code is not
tested (see "Still open").
-Passed live on the tester, on REST against real Google (November 23):
+Passed live on the tester, on the REST build against real Google (November 23;
+the MCP build is not tested live yet):
- All 36 actions: Gmail (search, read, labels, drafts, list with a filter,
create and read a draft), Drive (create, search, metadata, read, copy,
@@ -197,7 +246,8 @@ Passed live on the tester, on REST against real Google (November 23):
- Cancelling a sign-in leaves one connection and nothing needing attention.
- Review, Permissions and Activity show readable action names and no ids.
-Checked on the build before the REST switch only (test again on REST):
+Checked on the MCP build before the REST switch only (test again on the
+current MCP build):
- Disconnect ends access at Google (the account's linked-apps list lost the
entry), and reconnect works.
@@ -229,8 +279,30 @@ the reviewers only through the review channel.
separate-project request.
- Verification is of the original production app; the new app only gives
reviewers a way in.
-- With the REST transport, each project needs the Gmail, Drive, Docs, Sheets,
- Slides and Calendar APIs enabled, not the MCP APIs.
+- On Google's MCP servers (since Nov 24), each project needs the Gmail,
+ Drive, Docs, Sheets, Slides and Calendar MCP APIs enabled, and each OAuth
+ client that calls them marked "Use this client for an AI-powered agent".
+ Keep the REST APIs enabled too, for the fallback.
+
+## Google AI Tools Addendum
+
+Published November 24, 2026 with the general availability of Google's
+Workspace MCP servers: .
+
+- A tool that is, or is driven by, an AI agent must use a Google MCP, not the
+ REST APIs. Hiding that classification is forbidden. This is why all six
+ services are back on Google's MCP servers.
+- Google's MCP servers reject an OAuth client that is not marked "Use this
+ client for an AI-powered agent".
+- **February 1, 2027:** technical enforcement starts.
+- **April 1, 2027:** paid tier for the Gmail, Drive and Calendar MCP servers,
+ billed from the first request.
+- **Free tier:** 5,000 requests per day per project per product.
+- **Open, owner decision needed:** the addendum forbids keeping Google user
+ data after the user disconnects. Paperclip keeps task and run content
+ (see "Where Google content is kept") until the user runs "Delete data" or
+ deletes the task or company. Disconnect alone does not delete it. Do not
+ change this until the owner decides.
## Scopes
diff --git a/doc/plans/2026-11-17-google-workspace-production-checklist.md b/doc/plans/2026-11-17-google-workspace-production-checklist.md
index 9fed8d06fc2..36d0e491758 100644
--- a/doc/plans/2026-11-17-google-workspace-production-checklist.md
+++ b/doc/plans/2026-11-17-google-workspace-production-checklist.md
@@ -31,8 +31,11 @@ demo.
Decisions and the details behind them are kept in the
[working memory](../memory/google-connector-memory.md).
-- [x] **Launch transport** (Nov 17): our own tools over Google's REST APIs,
- built so we can switch to Google's MCP servers later.
+- [x] **Launch transport** (Nov 24): Google's hosted MCP servers for Gmail,
+ Drive, Docs, Sheets, Slides and Calendar, because Google's Workspace AI
+ Tools Addendum requires a Google MCP for a tool that is or is driven by
+ an AI agent. Paperclip's REST tool set stays in the code as the
+ fallback. This replaces the Nov 17 decision to launch on REST.
- [x] **Owner** (Nov 17): Dotta owns submission, security, privacy and release.
- [x] **Engineering test instance** (Nov 17): create
`googletester.staging.paperclip.app`.
@@ -41,15 +44,20 @@ Decisions and the details behind them are kept in the
- [ ] Privacy policy edits approved.
- [ ] Security lab and budget. (Nov 23: TAC Security recommended; quote and
budget not confirmed)
-- [ ] Email the Developer Preview team asking for permission to offer the MCP
- integration publicly (optional now, still cheap).
+- [x] Permission to offer the MCP integration publicly: not needed. Google
+ made the Workspace MCP servers generally available on November 24.
## 1. Baseline (needs the Google project owner's sign-in)
- [ ] Verification Center: is the case pending, waiting on us, or closed?
- [ ] Record the scopes declared in the Console and compare with the 14.
-- [ ] Every OAuth client that calls Workspace MCP is marked as an AI-agent
- client; note any that missed the November cutoff and need replacing.
+- [ ] Every OAuth client that calls Workspace MCP is marked "Use this client
+ for an AI-powered agent" in the Google Console (Google's MCP servers
+ reject other clients). Note any that missed the November cutoff and need
+ replacing. Required before the switch back to MCP works on the staging
+ tester and in production.
+- [ ] The six Workspace MCP APIs are enabled in each Google project that
+ calls them (the REST APIs stay enabled for the fallback).
- [ ] Separate QA project is External and In Production, with user count noted.
- [ ] Reviewer callback URL is registered on the QA client.
- [ ] Branding preflight: homepage, privacy policy on the app domain and on the
@@ -78,8 +86,9 @@ Decisions and the details behind them are kept in the
- [x] Prompt-injection screening confirmed on every Google tool result
(Nov 17, [#21999](https://github.com/paperclipai/paperclip/pull/21999)).
- [ ] Disconnecting the last Google connection revokes the grant at Google.
- Seen at Google on November 23 on the build before the REST switch.
- Test it again on the REST build before this is ticked.
+ Seen at Google on November 23 on the MCP build before the REST switch.
+ Revocation does not depend on the transport; test it again on the
+ current MCP build before this is ticked.
- [x] Retention and deletion of Google content in tasks, runs and files audited
(Nov 17, [#22010](https://github.com/paperclipai/paperclip/pull/22010)
store inventory; summary in the working memory's "Where Google content
@@ -103,6 +112,16 @@ Decisions and the details behind them are kept in the
passed against Google after two fixes
([#22706](https://github.com/paperclipai/paperclip/pull/22706),
[#22714](https://github.com/paperclipai/paperclip/pull/22714)).
+- [x] All six services switched back to Google's MCP servers (Nov 24), with
+ the REST argument checks that need no request to Google applied before
+ each MCP call, and Google's confirmation questions routed to the task's
+ question card. Tested with fakes only.
+- [ ] The six services tested live on Google's MCP servers on the staging
+ tester: all 36 actions, the agent-client OAuth setting, and one
+ confirmation question from Google answered and one declined.
+- [ ] Owner decision: the AI Tools Addendum forbids keeping Google user data
+ after the user disconnects. Paperclip keeps task and run content until
+ "Delete data". See the working memory's "Google AI Tools Addendum".
- [ ] Scopes identical in the picker, the server, the Cloud broker and the
Google Console.
- [x] `googletester.staging.paperclip.app` created (Nov 18).
diff --git a/doc/plans/2026-11-24-antigravity-swarm-events.md b/doc/plans/2026-11-24-antigravity-swarm-events.md
new file mode 100644
index 00000000000..f03812e305f
--- /dev/null
+++ b/doc/plans/2026-11-24-antigravity-swarm-events.md
@@ -0,0 +1,58 @@
+# Antigravity swarm events: what Paperclip can show
+
+Date: 2026-11-24. Evidence:
+
+- Seven recorded swarm turns against `agy acp` 1.5.15, in auto, accept-edits and default modes, including a stop mid-run and a reload. One of them, a 4-helper run with a verifier and the CLI stall monitor, used an isolated `--gemini-dir` exactly like the driver. Its redacted events are the Storybook fixture `ui/storybook/fixtures/antigravity-swarm.sample.json`.
+- That run finished in 3 min. The coordinator turn totalled 179,931 tokens; the six helpers used about 123k input and 16k output tokens more. Google shows no price.
+- The CLI's built-in skills `native_swarm`, `swarm_pane`, `swarm_narrator` and `swarm_monitor` are unpacked under `/antigravity-cli/builtin/skills/`. They describe what Google's own Swarm UI is built from.
+- Stories: Storybook "Design proposals/Patterns/Antigravity swarm activity".
+
+## Short answer
+
+**Partly.** Over ACP Paperclip gets everything the **coordinator** does: the swarm title, each helper's name and brief, its own board posts, a goal/task/thread plan, its text and one usage total. Paperclip gets **nothing the helpers do**. The outputs of `swarm status` and `read_board` are never forwarded: `tool_call_update` arrives with `status: completed` and no `rawOutput` or `content`. All updates carry the one coordinator `sessionId`, and no `session/request_permission` ever arrives for a helper.
+
+The data behind Google's reference UI does exist as **structured files** in the CLI's private `--gemini-dir`. Paperclip already creates and owns that directory per run.
+
+| File | What it holds |
+| --- | --- |
+| `swarm/board.jsonl` | Every board post: seq, author, time, text, `kind: brief` |
+| `swarm/members.json` | The roster: role, `wake_mode` working/waiting, model, killed, read cursor |
+| `swarm/plan.json` | Goal, per-helper task, threads |
+| `/logs/transcript.jsonl` | Each helper's tool calls with a `toolSummary`, plus per-step model and token counts |
+
+So nearly the whole reference UI is **derivable** by reading these files. They are undocumented internal files, so a reader must be pinned to the CLI version and tested against fixtures.
+
+**Bug found along the way (real, not fixed here).** The coordinator writes `/antigravity-cli/brain//.system_generated/swarm/plan.json` with `write_file`, because the `swarm_pane` skill tells it to. The shipped driver's `antigravityOutsideChange` treats that as an outside write and **halts the swarm**. This was confirmed by running `antigravityOutsideChange` from `antigravity-swarm-paths.ts` over the recorded run; it returns the `plan.json` path. This happened in 3 of 7 recorded swarm turns; the other coordinators did not load `swarm_pane`. No current driver code allows this path. Fix: exempt `/antigravity-cli/brain//.system_generated/swarm/` and add a red/green test with this transcript.
+
+## Inventory
+
+Legend: **ACP** = AVAILABLE NOW over ACP (structured). **FILES** = DERIVABLE by reading the CLI's private state dir (structured JSON; risk: undocumented, can change with any CLI release). **TEXT** = DERIVABLE by parsing coordinator prose (fragile). **NO** = NOT AVAILABLE.
+
+| Reference UI element | Class | Where exactly | Sample (redacted) | When |
+| --- | --- | --- | --- | --- |
+| Goal | ACP | User request (Paperclip has it). `swarm{action:"title"}` → `tool_call_update.rawInput.title`. `plan.json` → `write_file` `rawInput.Content` (also a `diff` content block) with `goal.title` and `goal.line`. `session_info_update.title`. | `{"action":"title","title":"Static unit-converter page"}`; `"goal":{"title":"Build tiny static unit-converter web page","line":"Write HTML, CSS, JS, and README, then verify everything."}` | Title in the first ~70 s. Plan right after the adds. The plan is only written when the coordinator loads `swarm_pane` (3 of 7 runs). |
+| Member roster + brief | ACP | `tool_call`/`tool_call_update` `name:"swarm"`, `rawInput.action:"add"`, `name`, `brief`, `workspace`, optional `model`. | `{"action":"add","name":"logic-writer","brief":"You own convert.js in the current workspace folder ONLY…","workspace":"inherit"}` | Live, when each helper is added. |
+| Member role | ACP (verifier/monitor by name) / FILES | Name convention (`verifier`, `monitor`, `narrator`). `members.json` `role` is only `coordinator`/`worker`. `subagents/.json` `role:"Swarm Worker (css-writer)"`. | `"role":"worker"` | Live. |
+| Per-helper task line | ACP when plan is written; else TEXT (first sentence of brief) | `plan.json` `tasks{name: text}` | `"logic-writer":"Write convert.js functions and wiring"` | After the adds. |
+| Threads / workstreams | ACP when plan is written | `plan.json` `threads[{id,title,goal,tasks[]}]`. No status or "Now" line: the skill says status comes from the board. | `{"id":"t-verify","title":"Verification and swarm health","tasks":["verifier","monitor"]}` | After the adds. Rewritten if work moves. |
+| Member state (working / waiting / killed) | FILES | `members.json` `wake_mode` (`working` while in a turn, `mentions` while asleep on the board), `killed`, `phase`. The coordinator's `swarm status` result has the same data but is **not forwarded** over ACP. | `"logic-writer":{"wake_mode":"working","killed":false}` | Whenever the file is rewritten (seen mid-run). Poll it. |
+| Member's current action | FILES (NO over ACP) | `/antigravity-cli/brain//.system_generated/logs/transcript.jsonl`: last `PLANNER_RESPONSE.tool_calls[]` (`name`, `args.toolSummary`, path args). | `run_command` · "Verify convert.js syntax, math, and DOM wiring"; `write_file` `/index.html` | Per step, live. Higher risk: the helper transcript format is internal. |
+| Board messages (#seq, author, text) | Coordinator's own: ACP. Helpers': FILES (NO over ACP). | ACP: `post_message` `rawInput.text`. The briefs are posted as `@name `, `kind:"brief"`. FILES: `board.jsonl` `{seq,agent,text,time,kind}`. `read_board{since:N}` / `swarm_wait{since:N}` inputs expose the board's head seq over ACP, but not the messages. | `{"seq":10,"agent":"logic-writer","text":"@verifier [done] convert.js created — defines … kmToMiles … celsiusToFahrenheit"}` | Live in the file. Over ACP only the seq cursor, when the coordinator polls. |
+| Task done / In review | FILES (board convention) | A `[done]` post addressed to `@verifier` means "in review". A verifier's `@coordinator [done]` means verified. `[stall]` comes from the monitor. The narrator's `view.json` (`state: review`) would be structured, but the narrator is not added under ACP: the coordinator reported `swarm_narrator` "is not available". | seq 7–10 `@verifier [done] …`, seq 11 `@coordinator [done] Verified all deliverables from #7-#10` | Live in the file. Helpers can misreport (one recorded run: `[done]` after a failed write), so Paperclip's own folder snapshot stays the source of truth for files. |
+| Progress ("x of y done · n in review · threads open") | FILES | Computed from `plan.json` tasks/threads + `board.jsonl` `[done]` posts. | 4 of 4 writers in review at seq 10, verified at seq 11 | Live. |
+| Helper blocked by the workspace boundary | TEXT (+ FILES) | Not forwarded as a permission request: a helper's prompt times out after 60 s inside the CLI. It reaches Paperclip only as coordinator prose ("permission prompts timed out after 60s waiting for user approval"; this does **not** match the driver's `BLOCKED_TEXT` regex) or in the helper transcript and board. | Helper error: `permission check failed for write_file "/c.txt" … timed out waiting for user response after 60s` | After a 60 s delay. |
+| Verifier result | FILES / TEXT | The verifier's `[done]` post in `board.jsonl`, or the coordinator's final prose. | seq 11 above | Live. |
+| Finished | ACP | `session/prompt` result `stopReason:"end_turn"`. The coordinator's `post_message "[done] …"`. In the recorded run, the coordinator was woken inside the **same** prompt; the turn closed 9 s after the verifier's post. | `"[done] Static unit-converter page built and verified (…)"` | End of turn. Helpers stay alive (`SUBAGENT_STATE_ALIVE`, waiting). |
+| Stopped (Stop) | ACP | `session/cancel` → prompt result `stopReason:"cancelled"` with usage (the recorded stop). | `{"stopReason":"cancelled","usage":{"totalTokens":29718,…}}` | Immediately (7 ms). |
+| Per-member model | FILES | `members.json` `applied_model`/`desired_model`; helper transcript `model`. Not over ACP unless `add` passed `model`. | `"applied_model":"gemini-4-neon-high"` | Live. |
+| Usage | ACP (one total) / FILES (per helper) | ACP: `usage_update {used,size}` (coordinator context only) and prompt result `usage` (coordinator total). FILES: helper transcripts carry `input_tokens`/`output_tokens`/`cache_read_tokens` per step, so per-helper usage is derivable. The driver's note "Google does not report it per helper" is true only of ACP. | prompt `usage.totalTokens:179931`; verifier steps sum to 34,265 input / 4,017 output | End of turn (ACP); per step (files). |
+| Graph / dependencies | NO (partial FILES) | No dependency graph exists. Only thread grouping (plan) and who-mentions-whom edges from `@name` in `board.jsonl` exist. | — | — |
+| Screenshot timeline / reel | NO in practice | `swarm_pane` asks helpers to post `Screenshot: \| caption` for visual work. Not seen in any run. | — | — |
+| Narrator Overview (`view.json`: headline, attention, workstreams with state, `now` per member) | NO under ACP | The narrator is only added when `swarm_narrator` is in the coordinator's skill list, and it was not in any ACP run. If Google enabled it, `/brain//swarm_view/view.json` would be the closest match to the reference UI. | — | — |
+| `available_commands` | ACP | `available_commands_update` lists `swarm` ("(Preview & Quota Heavy) Run a swarm…") with goal, compact, schedule and others. Useful to detect "swarm not available here". | — | Session start. |
+
+## Practical routes, best first
+
+1. **Read the state-dir files (FILES).** Add a driver-owned watcher on `/antigravity-cli/brain//.system_generated/swarm/{plan.json,members.json,board.jsonl}`, plus the helpers' `logs/transcript.jsonl` for "current action". Emit normalized Paperclip run events: helper added/state/action, board post, plan. Pin the parser to CLI 1.5.15 fixtures, and fall back to today's ACP-only steps when a file is missing or unparseable. Never read anything else in the dir; it also holds credentials.
+2. **ACP-only (today plus plan).** Roster, briefs, plan/threads, coordinator posts, board seq cursor, finish/stop and usage total. No helper state or actions.
+3. **Ask the coordinator.** Prompting it to `read_board` does not help, because the result is not forwarded. It could be told to `post_message` summaries, but that costs tokens and is still prose.
diff --git a/docs/api/issues.md b/docs/api/issues.md
index bfbc5318d31..19c0df9b8db 100644
--- a/docs/api/issues.md
+++ b/docs/api/issues.md
@@ -224,6 +224,22 @@ Saves a Retry request for the task's latest stopped run. The same `idempotencyKe
Every answer includes `presentation`, the task's current interruption state.
+## Check Now
+
+```
+POST /api/issues/{issueId}/monitor/check-now
+```
+
+Starts the task's next check now. This is the "Check now" button on the task banner.
+
+- When the task has a scheduled monitor, the monitor check starts. The answer is `200` with `{ "ok": true }`.
+- When the task has no monitor but its run waits in a scheduled retry (for example, a wait for provider usage), the retry starts now. Before any work, the retry checks again whether the agent's current AI account has usage. If that account is still limited, the run waits again with a plain message. The caller must be a board user who can read the task and has `issue:mutate` access to it, the same access as Retry now. The answer is `200` with `{ "ok": true, "outcome": "promoted" | "already_promoted" | "waiting", "message": "..." }`.
+
+Refusals:
+
+- `403` or `404`: the caller cannot start work on this task. A private task that the caller cannot see answers `404`.
+- `409` with `details.code: "issue_monitor_check_deferred"`: the check did not start. `error` gives the reason in plain words, for example that nothing waits to be checked anymore or that the task changed. Refresh the task.
+
## Comments
### List Comments
diff --git a/packages/adapter-utils/src/server-utils.ts b/packages/adapter-utils/src/server-utils.ts
index 752094ad6fa..19a729b4e8a 100644
--- a/packages/adapter-utils/src/server-utils.ts
+++ b/packages/adapter-utils/src/server-utils.ts
@@ -4288,12 +4288,12 @@ export function readPaperclipSkillSyncPreference(
};
}
-function canonicalizeDesiredPaperclipSkillReference(
+export function resolvePaperclipSkillReference(
reference: string,
- availableEntries: Array<{ key: string; runtimeName?: string | null }>,
-): string {
- const normalizedReference = reference.trim().toLowerCase();
- if (!normalizedReference) return "";
+ availableEntries: ReadonlyArray<{ key: string; runtimeName?: string | null }>,
+): string | null {
+ const normalizedReference = reference.trim().toLowerCase().replace(/^\//, "");
+ if (!normalizedReference) return null;
const exactKey = availableEntries.find(
(entry) => entry.key.trim().toLowerCase() === normalizedReference,
@@ -4313,7 +4313,15 @@ function canonicalizeDesiredPaperclipSkillReference(
);
if (slugMatches.length === 1) return slugMatches[0]!.key;
- return normalizedReference;
+ return null;
+}
+
+function canonicalizeDesiredPaperclipSkillReference(
+ reference: string,
+ availableEntries: Array<{ key: string; runtimeName?: string | null }>,
+): string {
+ return resolvePaperclipSkillReference(reference, availableEntries)
+ ?? reference.trim().toLowerCase();
}
export function resolvePaperclipDesiredSkillNames(
diff --git a/packages/db/src/client.ts b/packages/db/src/client.ts
index 17ab8ba4a45..a94414df070 100644
--- a/packages/db/src/client.ts
+++ b/packages/db/src/client.ts
@@ -920,6 +920,7 @@ const MIGRATIONS_WITH_TOP_LEVEL_STATEMENTS = new Set([
"0384_funny_adam_warlock.sql",
"0383_tool_review_company_expiry.sql",
+ "0505_nice_rawhide_kid.sql",
]);
async function applyPendingMigrationsManually(
diff --git a/packages/db/src/migrations/0505_nice_rawhide_kid.sql b/packages/db/src/migrations/0505_nice_rawhide_kid.sql
new file mode 100644
index 00000000000..31b4dfbe93e
--- /dev/null
+++ b/packages/db/src/migrations/0505_nice_rawhide_kid.sql
@@ -0,0 +1,2 @@
+-- paperclip:migration-compat online_compatible: a new partial index built concurrently; no lock held long and the previous release ignores it
+CREATE INDEX CONCURRENTLY IF NOT EXISTS "chat_actions_github_task_publications_idx" ON "chat_actions" USING btree ("company_id","endpoint_id",("payload"->'session'->>'issueId'),"updated_at") WHERE "chat_actions"."kind" = 'github_review_publication' and "chat_actions"."status" = 'processed';
\ No newline at end of file
diff --git a/packages/db/src/migrations/meta/0500_snapshot.json b/packages/db/src/migrations/meta/0505_snapshot.json
similarity index 99%
rename from packages/db/src/migrations/meta/0500_snapshot.json
rename to packages/db/src/migrations/meta/0505_snapshot.json
index c63960459a8..c2723b7dd0e 100644
--- a/packages/db/src/migrations/meta/0500_snapshot.json
+++ b/packages/db/src/migrations/meta/0505_snapshot.json
@@ -1,6 +1,6 @@
{
- "id": "51525362-c4bc-44be-b4a7-95cb4aae7748",
- "prevId": "a80ac568-accd-4c40-b63a-82b870052e0a",
+ "id": "001ed6d5-4cc4-4f05-91ec-f3031c94bc98",
+ "prevId": "5d1d8cc7-e7f6-40ce-94c5-dc84dd4210b9",
"version": "7",
"dialect": "postgresql",
"tables": {
@@ -3313,6 +3313,153 @@
"checkConstraints": {},
"isRLSEnabled": false
},
+ "public.agent_setup_progress": {
+ "name": "agent_setup_progress",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "purpose": {
+ "name": "purpose",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "subject_id": {
+ "name": "subject_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'waiting'"
+ },
+ "items": {
+ "name": "items",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "update_count": {
+ "name": "update_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "agent_setup_progress_company_idx": {
+ "name": "agent_setup_progress_company_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "agent_setup_progress_expires_idx": {
+ "name": "agent_setup_progress_expires_idx",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "agent_setup_progress_company_id_companies_id_fk": {
+ "name": "agent_setup_progress_company_id_companies_id_fk",
+ "tableFrom": "agent_setup_progress",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "agent_setup_progress_status_check": {
+ "name": "agent_setup_progress_status_check",
+ "value": "\"agent_setup_progress\".\"status\" in ('waiting', 'in_progress', 'done', 'failed')"
+ }
+ },
+ "isRLSEnabled": false
+ },
"public.agent_session_goal_actions": {
"name": "agent_session_goal_actions",
"schema": "",
@@ -10448,6 +10595,40 @@
"method": "btree",
"with": {}
},
+ "chat_actions_github_task_publications_idx": {
+ "name": "chat_actions_github_task_publications_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "endpoint_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "(\"payload\"->'session'->>'issueId')",
+ "asc": true,
+ "isExpression": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"chat_actions\".\"kind\" = 'github_review_publication' and \"chat_actions\".\"status\" = 'processed'",
+ "concurrently": true,
+ "method": "btree",
+ "with": {}
+ },
"chat_actions_github_terminal_work_idx": {
"name": "chat_actions_github_terminal_work_idx",
"columns": [
@@ -34245,6 +34426,163 @@
"checkConstraints": {},
"isRLSEnabled": false
},
+ "public.google_pending_revocations": {
+ "name": "google_pending_revocations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_id": {
+ "name": "connection_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "grant_id": {
+ "name": "grant_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source_secret_id": {
+ "name": "source_secret_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "subject": {
+ "name": "subject",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile": {
+ "name": "profile",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_material": {
+ "name": "token_material",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_sha256": {
+ "name": "token_sha256",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_outcome": {
+ "name": "last_outcome",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_attempt_at": {
+ "name": "next_attempt_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "give_up_at": {
+ "name": "give_up_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "google_pending_revocations_due_idx": {
+ "name": "google_pending_revocations_due_idx",
+ "columns": [
+ {
+ "expression": "next_attempt_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "google_pending_revocations_token_idx": {
+ "name": "google_pending_revocations_token_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "token_sha256",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
"public.grok_bot_dispatches": {
"name": "grok_bot_dispatches",
"schema": "",
@@ -39070,6 +39408,169 @@
"checkConstraints": {},
"isRLSEnabled": false
},
+ "public.issue_connection_content_deletions": {
+ "name": "issue_connection_content_deletions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "issue_id": {
+ "name": "issue_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "scope": {
+ "name": "scope",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "requested_by_actor_type": {
+ "name": "requested_by_actor_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "requested_by_actor_id": {
+ "name": "requested_by_actor_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "requested_at": {
+ "name": "requested_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "progress": {
+ "name": "progress",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'::jsonb"
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "not_before": {
+ "name": "not_before",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "completed_at": {
+ "name": "completed_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "issue_connection_content_deletions_issue_idx": {
+ "name": "issue_connection_content_deletions_issue_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "issue_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "issue_connection_content_deletions_pending_idx": {
+ "name": "issue_connection_content_deletions_pending_idx",
+ "columns": [
+ {
+ "expression": "not_before",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\"issue_connection_content_deletions\".\"status\" = 'pending'",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "issue_connection_content_deletions_company_id_companies_id_fk": {
+ "name": "issue_connection_content_deletions_company_id_companies_id_fk",
+ "tableFrom": "issue_connection_content_deletions",
+ "tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
"public.issue_create_idempotency_keys": {
"name": "issue_create_idempotency_keys",
"schema": "",
@@ -57788,6 +58289,114 @@
"checkConstraints": {},
"isRLSEnabled": false
},
+ "public.stored_object_deletions": {
+ "name": "stored_object_deletions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true,
+ "default": "gen_random_uuid()"
+ },
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "log_store": {
+ "name": "log_store",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "object_key": {
+ "name": "object_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "attempts": {
+ "name": "attempts",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_error": {
+ "name": "last_error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "not_before": {
+ "name": "not_before",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {
+ "stored_object_deletions_due_idx": {
+ "name": "stored_object_deletions_due_idx",
+ "columns": [
+ {
+ "expression": "not_before",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "stored_object_deletions_company_idx": {
+ "name": "stored_object_deletions_company_idx",
+ "columns": [
+ {
+ "expression": "company_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
"public.summary_slots": {
"name": "summary_slots",
"schema": "",
@@ -61329,6 +61938,12 @@
"primaryKey": false,
"notNull": false
},
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
"token_hash": {
"name": "token_hash",
"type": "text",
@@ -63773,6 +64388,12 @@
"primaryKey": false,
"notNull": false
},
+ "created_by_user_id": {
+ "name": "created_by_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
"identity_context_id": {
"name": "identity_context_id",
"type": "uuid",
diff --git a/packages/db/src/migrations/meta/_journal.json b/packages/db/src/migrations/meta/_journal.json
index 2a863e13abf..39824040b7a 100644
--- a/packages/db/src/migrations/meta/_journal.json
+++ b/packages/db/src/migrations/meta/_journal.json
@@ -3522,6 +3522,13 @@
"when": 1795469468402,
"tag": "0504_lucky_pepper_potts",
"breakpoints": true
+ },
+ {
+ "idx": 505,
+ "version": "7",
+ "when": 1795544784796,
+ "tag": "0505_nice_rawhide_kid",
+ "breakpoints": true
}
]
}
\ No newline at end of file
diff --git a/packages/db/src/schema/chat_channels.ts b/packages/db/src/schema/chat_channels.ts
index 49ecc309ea2..4e6015851e9 100644
--- a/packages/db/src/schema/chat_channels.ts
+++ b/packages/db/src/schema/chat_channels.ts
@@ -711,6 +711,10 @@ export const chatActions = pgTable(
and ${table.status} = 'cancelled' and ${table.result}->>'code' = 'stale_head'`),
index("chat_actions_github_check_work_idx").on(table.id).where(sql`${table.kind} = 'github_review_check'
and (${table.status} = 'received' or (${table.status} = 'failed' and ${table.result}->>'retryable' = 'true'))`),
+ index("chat_actions_github_task_publications_idx")
+ .on(table.companyId, table.endpointId, sql`(${table.payload}->'session'->>'issueId')`, table.updatedAt)
+ .where(sql`${table.kind} = 'github_review_publication' and ${table.status} = 'processed'`)
+ .concurrently(),
index("chat_actions_github_terminal_work_idx").on(table.id).where(sql`${table.kind} = 'github_response_comment'
and ${table.status} = 'processed' and ${table.deliveryId} is not null
and coalesce(${table.result}->>'final', 'false') <> 'true'`),
diff --git a/packages/paperclip-runner/scripts/vitest-lane-durations.json b/packages/paperclip-runner/scripts/vitest-lane-durations.json
index f4cdc8ef912..e84ad2e46a3 100644
--- a/packages/paperclip-runner/scripts/vitest-lane-durations.json
+++ b/packages/paperclip-runner/scripts/vitest-lane-durations.json
@@ -1,138 +1,176 @@
{
- "$comment": "Per-file Paperclip Runner package Vitest weights that packages/paperclip-runner/scripts/run-pr-vitest-lane.mjs --package-lane=K/N uses to balance the PR package lanes. Same schema as scripts/general-server-shard-durations.json. Seeded from the test/hook durations of PR job 128144114326 (collection and setup excluded). Files missing here receive the partitioner's median weight. Timing changes only partition work; they never authorize skipping a test.",
+ "$comment": "Per-file Paperclip Runner package Vitest weights that packages/paperclip-runner/scripts/run-pr-vitest-lane.mjs --package-lane=K/N uses to balance the PR package lanes. Same schema as scripts/general-server-shard-durations.json. Refreshed from all 6 PR #22729 package lane logs (run 45440355579). Files missing here receive the partitioner's median weight. Timing changes only partition work; they never authorize skipping a test.",
"unit": "ms",
"sources": [
{
- "run": 42290920882,
+ "pull": 22729,
+ "run": 45440355579,
"attempt": 1,
- "sha": "d07c48a2bbe8ed5f5db73fd6d0707194183fd1eb",
- "url": "https://github.com/paperclipai/paperclip/actions/runs/42290920882"
+ "sha": "6ca7a27481e1af45c60069a563632f2b00a008a7",
+ "url": "https://github.com/paperclipai/paperclip/actions/runs/45440355579"
}
],
"coverage": {
- "measured": 310,
+ "measured": 394,
"withSetup": 0,
- "inventory": 311
+ "inventory": 398
},
"durations": {
- "packages/paperclip-runner/devtools/browser/src/live/transcript-model.test.ts": 366,
+ "packages/paperclip-runner/devtools/browser/src/live/transcript-model.test.ts": 365,
"packages/paperclip-runner/devtools/browser/src/live/use-live-console.test.ts": 100,
"packages/paperclip-runner/devtools/issue-thread/src/EvidencePanel.test.ts": 100,
"packages/paperclip-runner/devtools/issue-thread/src/route.test.ts": 100,
- "packages/paperclip-runner/examples/scenario-explorer/src/chat.test.tsx": 190,
- "packages/paperclip-runner/examples/scenario-explorer/src/explorer.test.tsx": 164,
+ "packages/paperclip-runner/examples/scenario-explorer/src/chat.test.tsx": 130,
+ "packages/paperclip-runner/examples/scenario-explorer/src/explorer.test.tsx": 127,
"packages/paperclip-runner/examples/scenario-explorer/src/route.test.ts": 100,
- "packages/paperclip-runner/scripts/live-console-browser-server.test.mjs": 159,
+ "packages/paperclip-runner/scripts/live-console-browser-server.test.mjs": 177,
"packages/paperclip-runner/scripts/local-runner-browser-server.test.mjs": 100,
"packages/paperclip-runner/scripts/vitest-sequencer.test.mjs": 100,
"packages/paperclip-runner/src/agent-identity-environment.test.ts": 100,
"packages/paperclip-runner/src/backends/harness-driver-backend.test.ts": 100,
"packages/paperclip-runner/src/backends/native-backend-factory.test.ts": 100,
- "packages/paperclip-runner/src/backends/native-instruction-measurement.test.ts": 13816,
- "packages/paperclip-runner/src/backends/runtime-context.test.ts": 100,
+ "packages/paperclip-runner/src/backends/native-instruction-measurement.test.ts": 1859,
+ "packages/paperclip-runner/src/backends/runtime-context.test.ts": 456,
"packages/paperclip-runner/src/browser/client.test.ts": 100,
- "packages/paperclip-runner/src/browser/transcript-model.test.ts": 431,
+ "packages/paperclip-runner/src/browser/transcript-model.test.ts": 424,
"packages/paperclip-runner/src/catalog/catalog-docs.test.ts": 100,
"packages/paperclip-runner/src/catalog/operation-groups-doc.test.ts": 100,
- "packages/paperclip-runner/src/catalog/protocol-action-contracts.test.ts": 301,
+ "packages/paperclip-runner/src/catalog/protocol-action-contracts.test.ts": 270,
"packages/paperclip-runner/src/catalog/reconciliation.test.ts": 100,
- "packages/paperclip-runner/src/catalog/semantic-action-catalog.test.ts": 334,
+ "packages/paperclip-runner/src/catalog/semantic-action-catalog.test.ts": 286,
"packages/paperclip-runner/src/claude-subagent-lineage.test.ts": 100,
- "packages/paperclip-runner/src/cli/acpx-runtime-sidecar.test.ts": 18684,
+ "packages/paperclip-runner/src/cli/acpx-runtime-sidecar.provider-turn.test.ts": 34077,
+ "packages/paperclip-runner/src/cli/acpx-runtime-sidecar.test.ts": 36921,
"packages/paperclip-runner/src/cli/acpx-sidecar-input.test.ts": 100,
"packages/paperclip-runner/src/cli/acpx-sidecar-locations.test.ts": 100,
+ "packages/paperclip-runner/src/cli/acpx-sidecar-shutdown.test.ts": 100,
"packages/paperclip-runner/src/cli/acpx-tool-detail-redaction.test.ts": 100,
"packages/paperclip-runner/src/cli/eval-failure-diagnostics.test.ts": 100,
"packages/paperclip-runner/src/cli/eval-gateway-runtime.test.ts": 100,
"packages/paperclip-runner/src/cli/eval-provider-runtime.test.ts": 100,
- "packages/paperclip-runner/src/cli/eval-session-contract.test.ts": 123,
- "packages/paperclip-runner/src/cli/eval-session-entrypoint.test.ts": 1800,
+ "packages/paperclip-runner/src/cli/eval-session-contract.test.ts": 100,
+ "packages/paperclip-runner/src/cli/eval-session-entrypoint.test.ts": 1922,
"packages/paperclip-runner/src/cli/opencode-app-server-proxy.test.ts": 100,
+ "packages/paperclip-runner/src/cli/opencode-proxy-abandoned-tool-call.test.ts": 3484,
"packages/paperclip-runner/src/cli/opencode-proxy-collaboration-mode.test.ts": 100,
"packages/paperclip-runner/src/cli/opencode-proxy-completion.test.ts": 100,
"packages/paperclip-runner/src/cli/opencode-proxy-events.test.ts": 100,
- "packages/paperclip-runner/src/cli/opencode-proxy-input.test.ts": 5018,
+ "packages/paperclip-runner/src/cli/opencode-proxy-finish-diagnostics.test.ts": 150,
+ "packages/paperclip-runner/src/cli/opencode-proxy-input.test.ts": 5101,
"packages/paperclip-runner/src/cli/opencode-proxy-output.test.ts": 100,
"packages/paperclip-runner/src/cli/opencode-proxy-permission-mode.test.ts": 100,
- "packages/paperclip-runner/src/cli/opencode-proxy-thread-read.test.ts": 1898,
+ "packages/paperclip-runner/src/cli/opencode-proxy-thread-read.test.ts": 3787,
"packages/paperclip-runner/src/cli/opencode-proxy-usage.test.ts": 100,
"packages/paperclip-runner/src/compatibility.test.ts": 100,
"packages/paperclip-runner/src/configured-environment.test.ts": 100,
"packages/paperclip-runner/src/conformance/capability-eval-suite.test.ts": 100,
- "packages/paperclip-runner/src/conformance/capability-semantic-conformance.test.ts": 726,
+ "packages/paperclip-runner/src/conformance/capability-semantic-conformance.test.ts": 724,
"packages/paperclip-runner/src/conformance/control-plane-port.test.ts": 100,
"packages/paperclip-runner/src/conformance/harness-driver.test.ts": 100,
- "packages/paperclip-runner/src/conformance/local-provider-fault-matrix.test.ts": 116,
+ "packages/paperclip-runner/src/conformance/local-provider-fault-matrix.test.ts": 102,
"packages/paperclip-runner/src/conformance/semantic-conformance.test.ts": 100,
- "packages/paperclip-runner/src/contracts/completion-result.test.ts": 380,
+ "packages/paperclip-runner/src/contracts/completion-result.test.ts": 336,
"packages/paperclip-runner/src/contracts/native-execution.test.ts": 100,
+ "packages/paperclip-runner/src/contracts/provider-tool-schema-shape.test.ts": 100,
"packages/paperclip-runner/src/contracts/provider-trace-file-sink.test.ts": 100,
"packages/paperclip-runner/src/contracts/question-adapter-conformance.test.ts": 100,
"packages/paperclip-runner/src/contracts/question-set.test.ts": 100,
"packages/paperclip-runner/src/contracts/registered-asset-instructions.test.ts": 100,
+ "packages/paperclip-runner/src/contracts/runner-version.test.ts": 100,
"packages/paperclip-runner/src/contracts/runtime-context.test.ts": 100,
- "packages/paperclip-runner/src/control-plane/acpx-controller-recovery.test.ts": 81950,
- "packages/paperclip-runner/src/control-plane/cursor-cloud-runner-launch.test.ts": 106659,
- "packages/paperclip-runner/src/control-plane/durable-prp-control-plane.test.ts": 9141,
- "packages/paperclip-runner/src/control-plane/runner-recovery-fixture.test.ts": 8919,
+ "packages/paperclip-runner/src/contracts/tool-input-variants.test.ts": 166,
+ "packages/paperclip-runner/src/control-plane/acpx-controller-recovery.test.ts": 96282,
+ "packages/paperclip-runner/src/control-plane/cursor-cloud-runner-launch.test.ts": 104673,
+ "packages/paperclip-runner/src/control-plane/durable-prp-checkpoint-records.test.ts": 439,
+ "packages/paperclip-runner/src/control-plane/durable-prp-control-plane.test.ts": 32565,
+ "packages/paperclip-runner/src/control-plane/relaunched-runner.test.ts": 144,
+ "packages/paperclip-runner/src/control-plane/runner-recovery-fixture.test.ts": 9144,
"packages/paperclip-runner/src/devtools/index.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/abandoned-bootstrap-record.test.ts": 2199,
"packages/paperclip-runner/src/drivers/acpx/acp-permission-adapter.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/acp-question-adapter.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/acp-session-update-event.test.ts": 1571,
+ "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.claude-background-tasks.test.ts": 4247,
+ "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.claude-login-text.test.ts": 1988,
+ "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.claude-overlapping-shells.test.ts": 4393,
+ "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.claude-provider-turn.test.ts": 4324,
+ "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.claude-session-update-events.test.ts": 5263,
+ "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.claude-tool-use.test.ts": 3433,
+ "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.test.ts": 3311,
"packages/paperclip-runner/src/drivers/acpx/agent-files-binding.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/antigravity-acpx-runtime.test.ts": 6563,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-acpx-runtime.test.ts": 13069,
"packages/paperclip-runner/src/drivers/acpx/antigravity-admission.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/antigravity-auth-stream-order.test.ts": 696,
- "packages/paperclip-runner/src/drivers/acpx/antigravity-auth.test.ts": 2324,
- "packages/paperclip-runner/src/drivers/acpx/antigravity-credentials.test.ts": 166,
- "packages/paperclip-runner/src/drivers/acpx/antigravity-models.test.ts": 32227,
- "packages/paperclip-runner/src/drivers/acpx/antigravity-probe-retirement.test.ts": 1047,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-auth-stream-order.test.ts": 690,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-auth.test.ts": 2305,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-cli-installation.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-cli-pins.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-credentials.test.ts": 138,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-model-catalog.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-models.test.ts": 32170,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-native-commands.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-plan-mode.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-probe-retirement.test.ts": 1044,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-guard.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-paths.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-presentation.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-route.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-runtime.test.ts": 5231,
+ "packages/paperclip-runner/src/drivers/acpx/antigravity-turn-failure.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/candidate-admission.antigravity-release.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/candidate-admission.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/claude-effort.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/capability-profiles.antigravity-release.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/claude-background-tasks.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/claude-effort.test.ts": 2088,
+ "packages/paperclip-runner/src/drivers/acpx/claude-provider-turn-tasks.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/claude-provider-turns.test.ts": 590,
+ "packages/paperclip-runner/src/drivers/acpx/claude-scheduling-tools.claude-acp.test.ts": 1232,
"packages/paperclip-runner/src/drivers/acpx/claude-status-banners.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/codex-acpx-driver.test.ts": 893,
- "packages/paperclip-runner/src/drivers/acpx/codex-credentials.test.ts": 6558,
- "packages/paperclip-runner/src/drivers/acpx/acpx-runtime-adapter.test.ts": 2923,
+ "packages/paperclip-runner/src/drivers/acpx/claude-tool-use-admission.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/codex-acpx-driver.test.ts": 906,
+ "packages/paperclip-runner/src/drivers/acpx/codex-credentials.test.ts": 6409,
"packages/paperclip-runner/src/drivers/acpx/command-lease-owner.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/copilot-events.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/copilot-evidence.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/copilot-extension-adapter.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/copilot-installation.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/copilot-message-identity.test.ts": 6310,
+ "packages/paperclip-runner/src/drivers/acpx/copilot-message-identity.test.ts": 6747,
"packages/paperclip-runner/src/drivers/acpx/copilot-policy.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/copilot-profile.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/copilot-protocol-guard.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/copilot-registry.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/copilot-runtime-host.test.ts": 188,
- "packages/paperclip-runner/src/drivers/acpx/copilot-tool-evidence.test.ts": 125,
+ "packages/paperclip-runner/src/drivers/acpx/copilot-runtime-host.test.ts": 175,
+ "packages/paperclip-runner/src/drivers/acpx/copilot-tool-evidence.test.ts": 102,
"packages/paperclip-runner/src/drivers/acpx/cursor-cloud-candidate-profiles.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/cursor-extensions.test.ts": 978,
+ "packages/paperclip-runner/src/drivers/acpx/cursor-extensions.test.ts": 913,
"packages/paperclip-runner/src/drivers/acpx/cursor-installation.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/cursor-instructions.test.ts": 3211,
+ "packages/paperclip-runner/src/drivers/acpx/cursor-instructions.test.ts": 7613,
"packages/paperclip-runner/src/drivers/acpx/cursor-launch-policy.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/cursor-mode.test.ts": 3463,
- "packages/paperclip-runner/src/drivers/acpx/cursor-permission-identity.test.ts": 2748,
+ "packages/paperclip-runner/src/drivers/acpx/cursor-mode.test.ts": 9180,
+ "packages/paperclip-runner/src/drivers/acpx/cursor-permission-identity.test.ts": 3191,
"packages/paperclip-runner/src/drivers/acpx/cursor-runtime-cache.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/cursor-sdk-interactions.test.ts": 181,
+ "packages/paperclip-runner/src/drivers/acpx/cursor-sdk-interactions.test.ts": 819,
"packages/paperclip-runner/src/drivers/acpx/cursor-tool-evidence.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/driver-profile.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/environment.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/executable-digest-cache.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/generated-sidecar-contract.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/github-launcher.test.ts": 2628,
- "packages/paperclip-runner/src/drivers/acpx/grok-credentials.test.ts": 137,
+ "packages/paperclip-runner/src/drivers/acpx/github-launcher.test.ts": 2642,
+ "packages/paperclip-runner/src/drivers/acpx/grok-credentials.test.ts": 135,
"packages/paperclip-runner/src/drivers/acpx/grok-effort.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/grok-native-session-options.test.ts": 2680,
+ "packages/paperclip-runner/src/drivers/acpx/grok-native-session-options.test.ts": 4721,
"packages/paperclip-runner/src/drivers/acpx/grok-usage.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/grok-web-search.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts": 2894,
+ "packages/paperclip-runner/src/drivers/acpx/installation-integrity.test.ts": 2668,
"packages/paperclip-runner/src/drivers/acpx/installed-provider-authority.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/interaction-delivery.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/kimi-installation.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/kimi-instructions.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/kimi-message-boundary.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/kimi-metadata-probe.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/kimi-models.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/model-verification.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/native-distribution-integrity.test.ts": 7792,
+ "packages/paperclip-runner/src/drivers/acpx/native-distribution-integrity.store.test.ts": 1545,
+ "packages/paperclip-runner/src/drivers/acpx/native-distribution-integrity.test.ts": 10628,
"packages/paperclip-runner/src/drivers/acpx/native-skill-prompt.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/permission-policy.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/pi-acp-runtime.test.ts": 100,
@@ -143,96 +181,113 @@
"packages/paperclip-runner/src/drivers/acpx/pi-provider-config.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/pi-provision.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/pi-rpc-deltas.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/pi-runtime-extension.test.ts": 267,
- "packages/paperclip-runner/src/drivers/acpx/pi-thinking.test.ts": 1331,
- "packages/paperclip-runner/src/drivers/acpx/pi-verified-runtime.test.ts": 289,
+ "packages/paperclip-runner/src/drivers/acpx/pi-runtime-extension.test.ts": 258,
+ "packages/paperclip-runner/src/drivers/acpx/pi-thinking.test.ts": 2109,
+ "packages/paperclip-runner/src/drivers/acpx/pi-verified-runtime.test.ts": 288,
"packages/paperclip-runner/src/drivers/acpx/private-snapshot.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/profile-compatibility.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/profile-extensions.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/profile-installation.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/prompt-receipts.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/provider-assets-root.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/provider-mode.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/qualified-profiles.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/recovery-identity.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/response-delivery.test.ts": 100,
- "packages/paperclip-runner/src/drivers/acpx/runtime-host.test.ts": 7721,
- "packages/paperclip-runner/src/drivers/acpx/runtime-sandbox.test.ts": 1485,
+ "packages/paperclip-runner/src/drivers/acpx/runtime-host.test.ts": 11276,
+ "packages/paperclip-runner/src/drivers/acpx/runtime-sandbox.test.ts": 1156,
"packages/paperclip-runner/src/drivers/acpx/session-goals.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/sidecar-protocol.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/single-read-evidence.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/turn-cancellation.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/turn-controls.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/acpx/turn-dispatch-journal.test.ts": 1764,
"packages/paperclip-runner/src/drivers/acpx/usage-accounting.test.ts": 100,
"packages/paperclip-runner/src/drivers/acpx/verified-runtime-executable.test.ts": 100,
"packages/paperclip-runner/src/drivers/agent-observability.test.ts": 100,
- "packages/paperclip-runner/src/drivers/codex/app-server-transport.test.ts": 491,
+ "packages/paperclip-runner/src/drivers/codex/app-server-transport.test.ts": 494,
+ "packages/paperclip-runner/src/drivers/codex/codex-api-key-image-tools.test.ts": 449,
"packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.candidate-continuation.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.conformance.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.context-control.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.events.test.ts": 100,
- "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.lifecycle.test.ts": 114,
- "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.recovery.test.ts": 100,
- "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.runtime-requests.test.ts": 177,
+ "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.lifecycle.test.ts": 101,
+ "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.provider-turn.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.recovery.test.ts": 172,
+ "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.runtime-requests.test.ts": 160,
"packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.semantic-results.test.ts": 100,
- "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.terminal-replay.test.ts": 233,
+ "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.stale-generation.test.ts": 1797,
+ "packages/paperclip-runner/src/drivers/codex/codex-app-server-driver.terminal-replay.test.ts": 276,
"packages/paperclip-runner/src/drivers/codex/codex-boundaries.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-history.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-notification-identity.test.ts": 100,
- "packages/paperclip-runner/src/drivers/codex/codex-protocol-cleanup.test.ts": 802,
- "packages/paperclip-runner/src/drivers/codex/codex-protocol-integrity.test.ts": 3903,
+ "packages/paperclip-runner/src/drivers/codex/codex-protocol-cleanup.test.ts": 877,
+ "packages/paperclip-runner/src/drivers/codex/codex-protocol-integrity.test.ts": 3942,
"packages/paperclip-runner/src/drivers/codex/codex-question-adapter.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-resume-usage.test.ts": 100,
- "packages/paperclip-runner/src/drivers/codex/codex-security-config.test.ts": 605,
- "packages/paperclip-runner/src/drivers/codex/codex-startup-trust.test.ts": 270,
+ "packages/paperclip-runner/src/drivers/codex/codex-security-config.test.ts": 506,
+ "packages/paperclip-runner/src/drivers/codex/codex-shell-certificate-trust.test.ts": 417,
+ "packages/paperclip-runner/src/drivers/codex/codex-startup-trust.test.ts": 213,
"packages/paperclip-runner/src/drivers/codex/codex-thread-normalization.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-turn-diff.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/codex-usage-baseline.test.ts": 100,
"packages/paperclip-runner/src/drivers/codex/prepared-context-transport.test.ts": 100,
"packages/paperclip-runner/src/drivers/completion-continuation.test.ts": 100,
- "packages/paperclip-runner/src/drivers/copilot-metadata-probe.test.ts": 5107,
- "packages/paperclip-runner/src/drivers/cursor-cloud/app-server-proxy.test.ts": 1419,
- "packages/paperclip-runner/src/drivers/cursor-cloud/artifact-delivery.test.ts": 4831,
- "packages/paperclip-runner/src/drivers/cursor-cloud/artifact-staging-budget.test.ts": 1520,
- "packages/paperclip-runner/src/drivers/cursor-cloud/checkpoint-archive.test.ts": 1065,
- "packages/paperclip-runner/src/drivers/cursor-cloud/cloud-client.test.ts": 191,
- "packages/paperclip-runner/src/drivers/cursor-cloud/cursor-cloud-driver.test.ts": 15764,
+ "packages/paperclip-runner/src/drivers/copilot-metadata-probe.test.ts": 5088,
+ "packages/paperclip-runner/src/drivers/cursor-cloud/app-server-proxy.test.ts": 1852,
+ "packages/paperclip-runner/src/drivers/cursor-cloud/artifact-delivery.test.ts": 3974,
+ "packages/paperclip-runner/src/drivers/cursor-cloud/artifact-staging-budget.test.ts": 1372,
+ "packages/paperclip-runner/src/drivers/cursor-cloud/checkpoint-archive.test.ts": 1102,
+ "packages/paperclip-runner/src/drivers/cursor-cloud/cloud-client.test.ts": 165,
+ "packages/paperclip-runner/src/drivers/cursor-cloud/cursor-cloud-driver.test.ts": 11659,
"packages/paperclip-runner/src/drivers/cursor-cloud/inline-assets.test.ts": 100,
- "packages/paperclip-runner/src/drivers/cursor-cloud/observation-continuity.test.ts": 1948,
+ "packages/paperclip-runner/src/drivers/cursor-cloud/observation-continuity.test.ts": 1865,
"packages/paperclip-runner/src/drivers/dot/dot-harness-driver.test.ts": 100,
- "packages/paperclip-runner/src/drivers/dot/runnerd-dot-driver.test.ts": 11738,
- "packages/paperclip-runner/src/drivers/muse/runnerd-muse-driver.test.ts": 16068,
- "packages/paperclip-runner/src/drivers/opencode/company-observability.test.ts": 3033,
- "packages/paperclip-runner/src/drivers/opencode/empty-response.test.ts": 1857,
- "packages/paperclip-runner/src/drivers/opencode/interrupt-empty-response.test.ts": 1401,
- "packages/paperclip-runner/src/drivers/opencode/interrupt-pending-tool-call.test.ts": 1010,
- "packages/paperclip-runner/src/drivers/opencode/mcp-bridge-diagnostics.test.ts": 187,
- "packages/paperclip-runner/src/drivers/opencode/mcp-bridge.test.ts": 4223,
+ "packages/paperclip-runner/src/drivers/dot/runnerd-dot-driver.test.ts": 12443,
+ "packages/paperclip-runner/src/drivers/muse/runnerd-muse-driver.test.ts": 15009,
+ "packages/paperclip-runner/src/drivers/opencode/company-observability.test.ts": 3046,
+ "packages/paperclip-runner/src/drivers/opencode/empty-response.test.ts": 4618,
+ "packages/paperclip-runner/src/drivers/opencode/interrupt-empty-response.test.ts": 1444,
+ "packages/paperclip-runner/src/drivers/opencode/interrupt-pending-tool-call.test.ts": 1156,
+ "packages/paperclip-runner/src/drivers/opencode/mcp-bridge-delivery.test.ts": 338,
+ "packages/paperclip-runner/src/drivers/opencode/mcp-bridge-diagnostics.test.ts": 201,
+ "packages/paperclip-runner/src/drivers/opencode/mcp-bridge.test.ts": 8140,
"packages/paperclip-runner/src/drivers/opencode/opencode-command.test.ts": 100,
"packages/paperclip-runner/src/drivers/opencode/opencode-question-normalization.test.ts": 100,
- "packages/paperclip-runner/src/drivers/opencode/opencode-server-driver.test.ts": 96360,
- "packages/paperclip-runner/src/drivers/opencode/output-limit.test.ts": 532,
+ "packages/paperclip-runner/src/drivers/opencode/opencode-server-driver.test.ts": 24306,
+ "packages/paperclip-runner/src/drivers/opencode/output-custody.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/opencode/output-limit.test.ts": 767,
+ "packages/paperclip-runner/src/drivers/opencode/paperclip-tools-startup.test.ts": 2158,
"packages/paperclip-runner/src/drivers/opencode/performance-diagnostics.test.ts": 100,
- "packages/paperclip-runner/src/drivers/opencode/prepared-context-transport.test.ts": 2644,
- "packages/paperclip-runner/src/drivers/opencode/reasoning-mode.test.ts": 2562,
- "packages/paperclip-runner/src/drivers/opencode/sse-frames.test.ts": 884,
+ "packages/paperclip-runner/src/drivers/opencode/prepared-context-transport.test.ts": 517,
+ "packages/paperclip-runner/src/drivers/opencode/reasoning-mode.test.ts": 587,
+ "packages/paperclip-runner/src/drivers/opencode/sse-frames.test.ts": 891,
+ "packages/paperclip-runner/src/drivers/opencode/tool-call-markup.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/opencode/tool-media-attribution.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/opencode/upstream-served.test.ts": 100,
"packages/paperclip-runner/src/drivers/provider-failure.test.ts": 100,
"packages/paperclip-runner/src/drivers/provider-notices.test.ts": 100,
"packages/paperclip-runner/src/drivers/provider-rate-limits.test.ts": 100,
- "packages/paperclip-runner/src/drivers/runner-tool-bridge.claude-schema.test.ts": 3441,
- "packages/paperclip-runner/src/drivers/runner-tool-bridge.test.ts": 4224,
- "packages/paperclip-runner/src/drivers/runtime-context-materializer.test.ts": 103,
+ "packages/paperclip-runner/src/drivers/runner-tool-bridge.claude-schema.test.ts": 3424,
+ "packages/paperclip-runner/src/drivers/runner-tool-bridge.claude-tool-use.test.ts": 3625,
+ "packages/paperclip-runner/src/drivers/runner-tool-bridge.continuation.test.ts": 107,
+ "packages/paperclip-runner/src/drivers/runner-tool-bridge.schemas.test.ts": 199,
+ "packages/paperclip-runner/src/drivers/runner-tool-bridge.test.ts": 4531,
+ "packages/paperclip-runner/src/drivers/runtime-context-materializer.test.ts": 100,
"packages/paperclip-runner/src/drivers/semantic-tool-receipt.test.ts": 100,
"packages/paperclip-runner/src/drivers/stdio-mcp.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/tool-input-error.test.ts": 100,
+ "packages/paperclip-runner/src/drivers/tool-input-schema.test.ts": 173,
"packages/paperclip-runner/src/eval/eval-bundle.test.ts": 100,
- "packages/paperclip-runner/src/eval/eval-execution.test.ts": 1075,
+ "packages/paperclip-runner/src/eval/eval-execution.test.ts": 915,
"packages/paperclip-runner/src/eval/eval-scoring.test.ts": 100,
"packages/paperclip-runner/src/eval/eval-slice.test.ts": 100,
"packages/paperclip-runner/src/eval/live-workflow-executor.test.ts": 100,
- "packages/paperclip-runner/src/eval/workflow-evals.test.ts": 132,
+ "packages/paperclip-runner/src/eval/workflow-evals.test.ts": 138,
"packages/paperclip-runner/src/evals/attempt-journal.test.ts": 100,
"packages/paperclip-runner/src/evals/compatibility.test.ts": 100,
"packages/paperclip-runner/src/evals/model-pricing.test.ts": 100,
- "packages/paperclip-runner/src/evals/native-execution.test.ts": 2001,
+ "packages/paperclip-runner/src/evals/native-execution.test.ts": 2116,
"packages/paperclip-runner/src/evals/runnerd-artifact.test.ts": 100,
"packages/paperclip-runner/src/governance-events.test.ts": 100,
"packages/paperclip-runner/src/issue-thread/issue-thread.test.ts": 100,
@@ -240,67 +295,96 @@
"packages/paperclip-runner/src/live/acpx-request-recovery.test.ts": 100,
"packages/paperclip-runner/src/live/antigravity-candidate-startup.test.ts": 100,
"packages/paperclip-runner/src/live/bundled-remote-provider-pack.test.ts": 100,
- "packages/paperclip-runner/src/live/clean-room-server.test.ts": 25279,
+ "packages/paperclip-runner/src/live/clean-room-server.test.ts": 25551,
"packages/paperclip-runner/src/live/clean-room.test.ts": 100,
"packages/paperclip-runner/src/live/kimi-candidate-startup.test.ts": 100,
- "packages/paperclip-runner/src/live/linux-process-start.test.ts": 1114,
- "packages/paperclip-runner/src/live/live-session.test.ts": 51829,
+ "packages/paperclip-runner/src/live/linux-process-start.test.ts": 1112,
+ "packages/paperclip-runner/src/live/live-session.test.ts": 51795,
"packages/paperclip-runner/src/live/local-integrity-boundary-golden.test.ts": 100,
- "packages/paperclip-runner/src/live/native-probe-cleanup.test.ts": 13509,
+ "packages/paperclip-runner/src/live/native-probe-cleanup.test.ts": 13499,
+ "packages/paperclip-runner/src/live/private-host-control-wrapper.test.ts": 338,
+ "packages/paperclip-runner/src/live/provider-turn-tool-order.test.ts": 100,
"packages/paperclip-runner/src/live/run-result-feedback.test.ts": 100,
"packages/paperclip-runner/src/live/runner-binary.test.ts": 100,
"packages/paperclip-runner/src/live/runner-launch-preparation-store.test.ts": 100,
"packages/paperclip-runner/src/live/runner-launch-preparation.test.ts": 100,
- "packages/paperclip-runner/src/live/runner-prepared-launch-workspace.test.ts": 3935,
+ "packages/paperclip-runner/src/live/runner-lineage-reap.test.ts": 100,
+ "packages/paperclip-runner/src/live/runner-prepared-launch-workspace.test.ts": 4209,
"packages/paperclip-runner/src/live/runner-provider-launch.test.ts": 100,
"packages/paperclip-runner/src/live/runner-tool-capacity.test.ts": 100,
+ "packages/paperclip-runner/src/live/runnerd-abandoned-turn-start-reattach.test.ts": 7623,
"packages/paperclip-runner/src/live/runnerd-acpx-permission-forwarding.test.ts": 100,
- "packages/paperclip-runner/src/live/runnerd-acpx-permission-ordering.test.ts": 237,
+ "packages/paperclip-runner/src/live/runnerd-acpx-permission-ordering.test.ts": 205,
"packages/paperclip-runner/src/live/runnerd-acpx-permissions.test.ts": 100,
+ "packages/paperclip-runner/src/live/runnerd-acpx-provider-turn-wait.test.ts": 25947,
+ "packages/paperclip-runner/src/live/runnerd-acpx-provider-turn.test.ts": 83307,
"packages/paperclip-runner/src/live/runnerd-acpx-questions.test.ts": 100,
- "packages/paperclip-runner/src/live/runnerd-acpx-source-reconciliation.test.ts": 27202,
- "packages/paperclip-runner/src/live/runnerd-codex-transport-adoption.test.ts": 51111,
- "packages/paperclip-runner/src/live/runnerd-codex-transport-attachment-recovery.test.ts": 44665,
- "packages/paperclip-runner/src/live/runnerd-codex-transport-cold-restore.test.ts": 3362,
- "packages/paperclip-runner/src/live/runnerd-codex-transport-deadlines.test.ts": 101360,
- "packages/paperclip-runner/src/live/runnerd-codex-transport-settlement.test.ts": 120438,
- "packages/paperclip-runner/src/live/runnerd-codex-transport-suspension.test.ts": 13354,
- "packages/paperclip-runner/src/live/runnerd-codex-transport-warm-attachment.test.ts": 50422,
- "packages/paperclip-runner/src/live/runnerd-codex-transport.test.ts": 126679,
+ "packages/paperclip-runner/src/live/runnerd-acpx-source-reconciliation.test.ts": 21459,
+ "packages/paperclip-runner/src/live/runnerd-bootstrap-ticket-refresh.test.ts": 544,
+ "packages/paperclip-runner/src/live/runnerd-codex-pre-turn-usage.test.ts": 784,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-adoption.test.ts": 56744,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-antigravity-release.test.ts": 100,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-attachment-recovery.test.ts": 45838,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-carried-suspend.test.ts": 1978,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-close-proof.test.ts": 51374,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-cold-restore.test.ts": 2974,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-cut-attach.test.ts": 2753,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-cut-turn-start.test.ts": 3485,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-deadlines.test.ts": 182185,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-orphaned-tool-at-attach.test.ts": 6276,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-pump.test.ts": 8418,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-reattach-carried-commands.test.ts": 17419,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-release-resume.test.ts": 31877,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-remote-retention.test.ts": 54091,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-settlement.test.ts": 119696,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-stall.test.ts": 1131,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-startup-steps.test.ts": 4251,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-suspend-route.test.ts": 2150,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-suspension.test.ts": 16364,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport-warm-attachment.test.ts": 55475,
+ "packages/paperclip-runner/src/live/runnerd-codex-transport.test.ts": 198488,
"packages/paperclip-runner/src/live/runnerd-contract-types.test.ts": 100,
- "packages/paperclip-runner/src/live/runnerd-controller-outage.test.ts": 5960,
- "packages/paperclip-runner/src/live/runnerd-credential-updates.test.ts": 4475,
- "packages/paperclip-runner/src/live/runnerd-detach-durability.test.ts": 5556,
- "packages/paperclip-runner/src/live/runnerd-opencode-assigned-tools.test.ts": 8593,
- "packages/paperclip-runner/src/live/runnerd-opencode-streaming-tools.test.ts": 52166,
- "packages/paperclip-runner/src/live/runnerd-restart-continuation.test.ts": 12270,
- "packages/paperclip-runner/src/live/runnerd-runtime-activity.test.ts": 2946,
- "packages/paperclip-runner/src/live/runnerd-saved-continuation.test.ts": 5314,
- "packages/paperclip-runner/src/live/runnerd-semantic-handler-readiness.test.ts": 3841,
- "packages/paperclip-runner/src/live/runnerd-source-reconciliation.test.ts": 39739,
- "packages/paperclip-runner/src/live/runnerd-staged-handoff.test.ts": 40641,
+ "packages/paperclip-runner/src/live/runnerd-controller-outage.test.ts": 4719,
+ "packages/paperclip-runner/src/live/runnerd-credential-updates.test.ts": 2618,
+ "packages/paperclip-runner/src/live/runnerd-detach-durability.test.ts": 4370,
+ "packages/paperclip-runner/src/live/runnerd-governed-wait.test.ts": 50867,
+ "packages/paperclip-runner/src/live/runnerd-opencode-assigned-tools.test.ts": 5645,
+ "packages/paperclip-runner/src/live/runnerd-opencode-streaming-tools.test.ts": 57180,
+ "packages/paperclip-runner/src/live/runnerd-pending-turn-start-failure.test.ts": 100,
+ "packages/paperclip-runner/src/live/runnerd-restart-continuation.test.ts": 16507,
+ "packages/paperclip-runner/src/live/runnerd-runtime-activity.test.ts": 2266,
+ "packages/paperclip-runner/src/live/runnerd-saved-continuation.test.ts": 3333,
+ "packages/paperclip-runner/src/live/runnerd-semantic-handler-readiness.test.ts": 1909,
+ "packages/paperclip-runner/src/live/runnerd-source-reconciliation.test.ts": 29108,
+ "packages/paperclip-runner/src/live/runnerd-staged-handoff.test.ts": 27582,
+ "packages/paperclip-runner/src/live/runnerd-stale-controller-journal.test.ts": 1646,
+ "packages/paperclip-runner/src/live/runnerd-startup-rejection-exit.test.ts": 3357,
"packages/paperclip-runner/src/live/runnerd-tool-response.test.ts": 100,
- "packages/paperclip-runner/src/live/runnerd-trace-frame-index.test.ts": 219,
- "packages/paperclip-runner/src/live/runnerd-welcome.integration.test.ts": 4594,
- "packages/paperclip-runner/src/live/scenario-chat-demo-server.test.ts": 280,
+ "packages/paperclip-runner/src/live/runnerd-trace-frame-index.test.ts": 171,
+ "packages/paperclip-runner/src/live/runnerd-turn-start-timeout-retention.test.ts": 31540,
+ "packages/paperclip-runner/src/live/runnerd-warm-idle-orphan.test.ts": 3425,
+ "packages/paperclip-runner/src/live/runnerd-welcome.integration.test.ts": 3697,
+ "packages/paperclip-runner/src/live/scenario-chat-demo-server.test.ts": 317,
"packages/paperclip-runner/src/live/scenario-chat-proxy-config.test.ts": 100,
"packages/paperclip-runner/src/live/tailnet-gateway.test.ts": 100,
- "packages/paperclip-runner/src/live/turn-stream.test.ts": 1517,
+ "packages/paperclip-runner/src/live/terminal-call-freshness.test.ts": 102,
+ "packages/paperclip-runner/src/live/turn-stream.test.ts": 1539,
"packages/paperclip-runner/src/live/warm-attachment-readiness.test.ts": 100,
"packages/paperclip-runner/src/live/workspace-diff.test.ts": 100,
"packages/paperclip-runner/src/live/workspace-file-reference.test.ts": 100,
"packages/paperclip-runner/src/mock-core/capability-mock-control-plane-adapter.test.ts": 100,
"packages/paperclip-runner/src/mock-core/codex-runner.test.ts": 100,
- "packages/paperclip-runner/src/mock-core/live-console-demo-server.test.ts": 4421,
- "packages/paperclip-runner/src/mock-core/live-console-scripted-driver.test.ts": 155,
- "packages/paperclip-runner/src/mock-core/local-runner.test.ts": 150,
+ "packages/paperclip-runner/src/mock-core/live-console-demo-server.test.ts": 4353,
+ "packages/paperclip-runner/src/mock-core/live-console-scripted-driver.test.ts": 149,
+ "packages/paperclip-runner/src/mock-core/local-runner.test.ts": 164,
"packages/paperclip-runner/src/mock-core/mock-control-plane-adapter.test.ts": 100,
"packages/paperclip-runner/src/mock-core/task-creation-backlog.test.ts": 100,
"packages/paperclip-runner/src/mock-core/task-reassignment.test.ts": 100,
- "packages/paperclip-runner/src/native-session-runtime.test.ts": 3455,
+ "packages/paperclip-runner/src/native-session-runtime.provider-turn.test.ts": 5877,
+ "packages/paperclip-runner/src/native-session-runtime.test.ts": 5422,
"packages/paperclip-runner/src/protocol-actions/case-data.test.ts": 100,
- "packages/paperclip-runner/src/protocol-actions/collaboration-contracts.test.ts": 113,
- "packages/paperclip-runner/src/protocol-actions/core-contracts.test.ts": 138,
+ "packages/paperclip-runner/src/protocol-actions/collaboration-contracts.test.ts": 100,
+ "packages/paperclip-runner/src/protocol-actions/core-contracts.test.ts": 168,
"packages/paperclip-runner/src/protocol/auth-credentials.test.ts": 100,
"packages/paperclip-runner/src/protocol/conformance-fixture.test.ts": 100,
"packages/paperclip-runner/src/protocol/permission-request.test.ts": 100,
@@ -314,15 +398,16 @@
"packages/paperclip-runner/src/provider-events.test.ts": 100,
"packages/paperclip-runner/src/react/public-contract.test.tsx": 100,
"packages/paperclip-runner/src/reducer/session-reducer.test.ts": 100,
- "packages/paperclip-runner/src/scenarios/chat-session.test.ts": 643,
- "packages/paperclip-runner/src/scenarios/scenario-explorer.test.ts": 855,
- "packages/paperclip-runner/src/semantic-tools/paperclip-semantic-tools.test.ts": 838,
+ "packages/paperclip-runner/src/scenarios/chat-session.test.ts": 518,
+ "packages/paperclip-runner/src/scenarios/scenario-explorer.test.ts": 736,
+ "packages/paperclip-runner/src/semantic-tools/paperclip-semantic-tools.test.ts": 877,
"packages/paperclip-runner/src/semantic-tools/runner-authorized-tools.test.ts": 100,
- "packages/paperclip-runner/src/semantic-tools/semantic-tools.test.ts": 1386,
+ "packages/paperclip-runner/src/semantic-tools/semantic-tools.test.ts": 1564,
"packages/paperclip-runner/src/standalone/standalone-demo.test.ts": 100,
- "packages/paperclip-runner/src/test-support/owned-node-runtime.test.ts": 407,
+ "packages/paperclip-runner/src/steering-delivery.test.ts": 100,
+ "packages/paperclip-runner/src/test-support/owned-node-runtime.test.ts": 435,
"packages/paperclip-runner/src/tool-file-changes.test.ts": 100,
- "packages/paperclip-runner/src/tools/capability-semantic-tools.test.ts": 114,
+ "packages/paperclip-runner/src/tools/capability-semantic-tools.test.ts": 106,
"packages/paperclip-runner/src/tracer/conformance-runner.test.ts": 100,
"packages/paperclip-runner/src/tracer/replay.test.ts": 100
}
diff --git a/packages/paperclip-runner/scripts/vitest-sequencer.mjs b/packages/paperclip-runner/scripts/vitest-sequencer.mjs
index c8069693070..ac80ce5db8e 100644
--- a/packages/paperclip-runner/scripts/vitest-sequencer.mjs
+++ b/packages/paperclip-runner/scripts/vitest-sequencer.mjs
@@ -7,10 +7,13 @@ const slowFiles = [
"runnerd-codex-transport-deadlines.test.ts",
"opencode-server-driver.test.ts",
"acpx-controller-recovery.test.ts",
+ "runnerd-acpx-provider-turn.test.ts",
"runnerd-codex-transport-warm-attachment.test.ts",
"runnerd-opencode-streaming-tools.test.ts",
"live-session.test.ts",
"runnerd-codex-transport-adoption.test.ts",
+ "runnerd-codex-transport-remote-retention.test.ts",
+ "runnerd-codex-transport-close-proof.test.ts",
];
const priority = (file) => {
diff --git a/packages/paperclip-runner/vitest.config.ts b/packages/paperclip-runner/vitest.config.ts
index 247bc650336..de7e2567b02 100644
--- a/packages/paperclip-runner/vitest.config.ts
+++ b/packages/paperclip-runner/vitest.config.ts
@@ -16,6 +16,18 @@ const ciReporters = [
// without the root wrapper); see scripts/ci/vitest-retry.mjs.
const retry = vitestRetryCount();
+function resolveRunnerCiMaxWorkers() {
+ const override = process.env.PAPERCLIP_RUNNER_VITEST_MAX_WORKERS?.trim();
+ if (override) {
+ const parsed = Number(override);
+ if (Number.isInteger(parsed) && parsed >= 1) return parsed;
+ }
+ const cpus = Math.max(1, availableParallelism());
+ // Hermetic files launch Runner and sidecar child processes; reserve 1 core
+ // on 4-core runners (3 workers) and 2 cores on 8-core runners (6 workers).
+ return cpus <= 4 ? Math.min(3, Math.max(1, cpus - 1)) : Math.min(6, cpus - 2);
+}
+
export default defineConfig({
resolve: {
alias: [
@@ -27,10 +39,8 @@ export default defineConfig({
...(ciReporters.length > 0 ? { reporters: [...configDefaults.reporters, ...ciReporters] } : {}),
...(retry > 0 ? { retry } : {}),
environment: "node",
- // Hermetic files also launch Runner and sidecar processes. Reserve CPU
- // capacity for their startup within the original readiness deadlines.
...(process.env.GITHUB_ACTIONS === "true"
- ? { maxWorkers: Math.min(4, Math.max(1, Math.floor(availableParallelism() / 2))) }
+ ? { maxWorkers: resolveRunnerCiMaxWorkers() }
: {}),
sequence: { sequencer: RunnerSequencer },
include: [
diff --git a/packages/shared/src/google-workspace-connectors.test.ts b/packages/shared/src/google-workspace-connectors.test.ts
index 26316900a50..b9948b508bc 100644
--- a/packages/shared/src/google-workspace-connectors.test.ts
+++ b/packages/shared/src/google-workspace-connectors.test.ts
@@ -172,13 +172,13 @@ describe("combined Google Workspace consent", () => {
expect(isGoogleWorkspaceToolGranted("gmail__send_message", profiles["workspace.all"].scopes)).toBe(false);
});
- it("runs the six launch services on Paperclip's REST tools, keeps the others on Google's MCP servers, and reports the transport on each target", () => {
+ it("runs every service on Google's MCP servers, as the AI Tools Addendum requires, and reports the transport on each target", () => {
expect(Object.keys(GOOGLE_WORKSPACE_TOOL_TRANSPORT).sort()).toEqual(Object.keys(GOOGLE_WORKSPACE_SERVICES).sort());
expect(GOOGLE_WORKSPACE_TOOL_TRANSPORT).toEqual({
- gmail: "paperclip_rest", drive: "paperclip_rest", docs: "paperclip_rest", sheets: "paperclip_rest",
- slides: "paperclip_rest", calendar: "paperclip_rest", chat: "google_mcp", people: "google_mcp", search: "google_mcp",
+ gmail: "google_mcp", drive: "google_mcp", docs: "google_mcp", sheets: "google_mcp",
+ slides: "google_mcp", calendar: "google_mcp", chat: "google_mcp", people: "google_mcp", search: "google_mcp",
});
- expect(googleWorkspaceToolTarget("gmail__get_message")?.transport).toBe("paperclip_rest");
+ expect(googleWorkspaceToolTarget("gmail__get_message")?.transport).toBe("google_mcp");
expect(googleWorkspaceToolTarget("chat__list_messages")?.transport).toBe("google_mcp");
expect(googleWorkspaceServiceToolNames("docs")).toEqual(["read_doc", "update_doc"]);
});
diff --git a/packages/shared/src/google-workspace-connectors.ts b/packages/shared/src/google-workspace-connectors.ts
index 88d942d1e66..270fbd40c0f 100644
--- a/packages/shared/src/google-workspace-connectors.ts
+++ b/packages/shared/src/google-workspace-connectors.ts
@@ -136,8 +136,8 @@ export type GoogleWorkspaceService = keyof typeof GOOGLE_WORKSPACE_SERVICES;
export type GoogleWorkspaceToolTransport = "google_mcp" | "paperclip_rest";
export const GOOGLE_WORKSPACE_TOOL_TRANSPORT: Record = {
- gmail: "paperclip_rest", drive: "paperclip_rest", docs: "paperclip_rest", sheets: "paperclip_rest",
- slides: "paperclip_rest", calendar: "paperclip_rest", chat: "google_mcp",
+ gmail: "google_mcp", drive: "google_mcp", docs: "google_mcp", sheets: "google_mcp",
+ slides: "google_mcp", calendar: "google_mcp", chat: "google_mcp",
people: "google_mcp", search: "google_mcp",
};
diff --git a/scripts/__tests__/ci-typecheck-lane.test.mjs b/scripts/__tests__/ci-typecheck-lane.test.mjs
index 938de3de91a..ca84614330b 100644
--- a/scripts/__tests__/ci-typecheck-lane.test.mjs
+++ b/scripts/__tests__/ci-typecheck-lane.test.mjs
@@ -1,6 +1,7 @@
import assert from "node:assert/strict";
-import { readFileSync } from "node:fs";
-import { getPriority } from "node:os";
+import { mkdtempSync, readFileSync, rmSync } from "node:fs";
+import { getPriority, tmpdir } from "node:os";
+import path from "node:path";
import test from "node:test";
import {
BACKGROUND_PRIORITY,
@@ -14,8 +15,10 @@ import {
selectBuildGapPackages,
SERIAL_BUILD_GAPS,
shouldRunReleaseRegistryTests,
+ shouldRunRunnerRustTypecheck,
+ typecheckUiIncremental,
} from "../ci-typecheck-lane.mjs";
-import { PROJECTS, selectTestProjects } from "../typecheck-test-projects.mjs";
+import { PROJECTS, orderProjectsLpt, selectTestProjects } from "../typecheck-test-projects.mjs";
const plan = () =>
planLane({
@@ -81,12 +84,21 @@ test("every check of the sequential job is planned with exact DAG dependencies",
for (const name of ["paperclipai", "@paperclipai/ui"]) assert.ok(byName.has(`typecheck ${name}`), name);
assert.deepEqual(byName.get("typecheck paperclipai").needs, [PREPARE_RUNNER_VENDOR]);
assert.equal(byName.get("typecheck @paperclipai/ui").needs, undefined);
+ assert.equal(byName.get("typecheck @paperclipai/ui").command, "node");
+ assert.deepEqual(byName.get("typecheck @paperclipai/ui").args, ["scripts/ci-typecheck-lane.mjs", "--typecheck-ui"]);
assert.deepEqual(byName.get("typecheck @paperclipai/ui").env, { GOMAXPROCS: "2" });
assert.deepEqual(byName.get("release registry tests").args, ["run", "test:release-registry"]);
assert.equal(byName.get("release registry tests").needs, undefined);
assert.ok(!byName.has("CLI guidance safety"));
const declarationReaders = tasks.filter((task) => task.needs?.includes("server declarations"));
assert.equal(declarationReaders.length, 2 + PROJECTS.length);
+ // Longest non-incremental project (tests/runner-e2e) is scheduled first among declaration readers.
+ assert.equal(declarationReaders[0].name, "test project tests/runner-e2e");
+ // UI starts ahead of smaller build-gap packages so it overlaps with prepare runner vendor from t=0.
+ assert.ok(
+ tasks.findIndex((t) => t.name === "typecheck @paperclipai/ui") <
+ tasks.findIndex((t) => t.name === "typecheck paperclipai"),
+ );
});
test("computeResourceProfile scales concurrency, checkers, and UI GOMAXPROCS across 2/4/8-core runners", () => {
@@ -106,7 +118,7 @@ test("computeResourceProfile scales concurrency, checkers, and UI GOMAXPROCS acr
serverLayerCheckers: 1,
testProjectCheckers: 1,
uiGomaxprocs: 2,
- testProgramsConcurrency: 2,
+ testProgramsConcurrency: 3,
testProgramsCheckers: 1,
});
// 8-core / 16 GiB (c8i.2xlarge): 4 concurrent tasks so all 4 server layers finish in 1 wave under 16 GiB.
@@ -117,7 +129,7 @@ test("computeResourceProfile scales concurrency, checkers, and UI GOMAXPROCS acr
serverLayerCheckers: 1,
testProjectCheckers: 1,
uiGomaxprocs: 4,
- testProgramsConcurrency: 3,
+ testProgramsConcurrency: 4,
testProgramsCheckers: 1,
});
// 8-core / 32 GiB (m8i.2xlarge): higher checkers and concurrency.
@@ -140,7 +152,7 @@ test("computeResourceProfile scales concurrency, checkers, and UI GOMAXPROCS acr
const byName = new Map(tasks.map((t) => [t.name, t]));
assert.deepEqual(byName.get("server declarations").args.slice(-2), ["--checkers", "3"]);
assert.deepEqual(byName.get("typecheck @paperclipai/ui").env, { GOMAXPROCS: "4" });
- assert.ok(byName.get("typecheck test programs").args.join(" ").includes("--concurrency 3"));
+ assert.ok(byName.get("typecheck test programs").args.join(" ").includes("--concurrency 4"));
});
test("resolveScope uses CI_PLAN in PR mode, honors PAPERCLIP_CI_FULL, and fails closed", () => {
@@ -406,3 +418,83 @@ test("the PR typecheck job runs the lane after the Runner release crate restore"
assert.ok(fallback.includes(command), command);
}
});
+
+test("PR mode skips Runner Rust typecheck when only shared TypeScript packages changed", () => {
+ assert.equal(shouldRunRunnerRustTypecheck(null), true);
+ assert.equal(shouldRunRunnerRustTypecheck(["packages/shared/src/customer-success.ts"]), false);
+ assert.equal(shouldRunRunnerRustTypecheck(["packages/adapter-utils/src/types.ts"]), false);
+ assert.equal(shouldRunRunnerRustTypecheck(["packages/paperclip-runner/runner/crates/runner-core/src/lib.rs"]), true);
+ assert.equal(shouldRunRunnerRustTypecheck(["packages/paperclip-runner/acpx-profiles.json"]), true);
+ assert.equal(shouldRunRunnerRustTypecheck(["rust-toolchain.toml"]), true);
+ assert.equal(shouldRunRunnerRustTypecheck(["tsconfig.base.json"]), true);
+
+ const sharedPr = planLane({
+ buildGapPackages: ["@paperclipai/paperclip-runner"],
+ testLayers: ["tests"],
+ changedFiles: ["packages/shared/src/customer-success.ts"],
+ });
+ const runnerTask = sharedPr.prepare.find((t) => t.name === "typecheck @paperclipai/paperclip-runner");
+ assert.deepEqual(runnerTask.args, ["--filter", "@paperclipai/paperclip-runner", "run", "typecheck:typescript"]);
+
+ const runnerPr = planLane({
+ buildGapPackages: ["@paperclipai/paperclip-runner"],
+ testLayers: ["tests"],
+ changedFiles: ["packages/paperclip-runner/protocol/schemas/result.schema.json"],
+ });
+ const runnerFullTask = runnerPr.prepare.find((t) => t.name === "typecheck @paperclipai/paperclip-runner");
+ assert.deepEqual(runnerFullTask.args, ["--filter", "@paperclipai/paperclip-runner", "typecheck"]);
+});
+
+test("typecheckUiIncremental runs storybook catalog then incremental tsc with a portable tsBuildInfoFile", () => {
+ const tmpRoot = mkdtempSync(path.join(tmpdir(), "ui-typecheck-inc-"));
+ try {
+ const calls = [];
+ const status = typecheckUiIncremental({
+ root: tmpRoot,
+ env: { GOMAXPROCS: "2" },
+ spawnSyncImpl: (cmd, args, opts) => {
+ calls.push({ kind: "spawn", cmd, args, cwd: opts.cwd });
+ return { status: 0 };
+ },
+ runTscImpl: (args, opts) => {
+ calls.push({ kind: "tsc", args, cwd: opts.cwd, env: opts.env });
+ return { status: 0 };
+ },
+ });
+ assert.equal(status, 0);
+ assert.equal(calls.length, 2);
+ assert.equal(calls[0].kind, "spawn");
+ assert.equal(calls[0].args[0], path.join(tmpRoot, "scripts", "storybook-catalog.mjs"));
+ assert.equal(calls[0].cwd, path.join(tmpRoot, "ui"));
+ assert.deepEqual(calls[1].args, [
+ "-p",
+ "tsconfig.json",
+ "--incremental",
+ "--tsBuildInfoFile",
+ "node_modules/.cache/paperclip-ui.tsbuildinfo",
+ ]);
+ assert.equal(calls[1].cwd, path.join(tmpRoot, "ui"));
+ assert.deepEqual(calls[1].env, { GOMAXPROCS: "2" });
+
+ // Catalog failure stops before tsc.
+ const failedCalls = [];
+ const failStatus = typecheckUiIncremental({
+ root: tmpRoot,
+ spawnSyncImpl: () => ({ status: 3 }),
+ runTscImpl: () => {
+ failedCalls.push("tsc");
+ return { status: 0 };
+ },
+ });
+ assert.equal(failStatus, 3);
+ assert.deepEqual(failedCalls, []);
+ } finally {
+ rmSync(tmpRoot, { recursive: true, force: true });
+ }
+});
+
+test("orderProjectsLpt schedules tests/runner-e2e first among test projects", () => {
+ const ordered = orderProjectsLpt(PROJECTS);
+ assert.equal(ordered[0], "tests/runner-e2e");
+ assert.equal(ordered.length, PROJECTS.length);
+});
diff --git a/scripts/__tests__/e2e-shard.test.mjs b/scripts/__tests__/e2e-shard.test.mjs
index f71afb68578..82930302fcc 100644
--- a/scripts/__tests__/e2e-shard.test.mjs
+++ b/scripts/__tests__/e2e-shard.test.mjs
@@ -27,7 +27,9 @@ const trustedPrWorkflowPath = ".github/workflows/pr-trusted.yml";
const trustedPrWorkflow = path.join(repoRoot, trustedPrWorkflowPath);
const routingWorkflow = path.join(repoRoot, ".github", "workflows", "ci-routing.yml");
-const SHARD_COUNT = 8;
+const ciTaskMatrixPath = path.join(repoRoot, ".github", "ci-task-matrix.json");
+const SHARD_COUNT = JSON.parse(readFileSync(ciTaskMatrixPath, "utf8")).e2e_shards.length;
+const TARGET_PHASE3_SHARD_COUNT = 12;
function runShard(args) {
const result = spawnSync(process.execPath, [script, ...args], { cwd: repoRoot, encoding: "utf8" });
@@ -161,6 +163,54 @@ test("playwright.config.ts supports skipping the UI build when PAPERCLIP_E2E_SKI
assert.match(config, /availableParallelism/);
});
+test("start-e2e-server.ts boots disposable embedded Postgres without durable fsync before migrations", () => {
+ const bootstrap = readFileSync(path.join(repoRoot, "tests", "e2e", "start-e2e-server.ts"), "utf8");
+ assert.match(bootstrap, /--no-sync/);
+ assert.match(bootstrap, /fsync = off/);
+ assert.match(bootstrap, /synchronous_commit = off/);
+ assert.match(bootstrap, /full_page_writes = off/);
+ assert.match(bootstrap, /Promise\.all\(/);
+});
+
+test("12-shard partitioning stays complete, segregated, and balanced under 145s estimated wall-clock", () => {
+ const durations = loadShardDurations(durationsManifest);
+ const specs = listE2eSpecs();
+ const fallbackWeight = defaultSuiteWeight(durations);
+ const shards = partitionE2eShards(specs, TARGET_PHASE3_SHARD_COUNT, durations, {
+ parallelWorkers: EFFECTIVE_PARALLEL_SPEEDUP,
+ });
+ assert.equal(shards.length, TARGET_PHASE3_SHARD_COUNT);
+ const combined = shards.flatMap((shard) => shard.files);
+ assert.deepEqual([...combined].sort(), [...specs].sort());
+ for (const shard of shards) {
+ assert.ok(shard.files.length > 0, "no 12-shard bucket may be empty");
+ const serialCount = shard.files.filter(isSerialE2eSpec).length;
+ assert.ok(
+ serialCount === 0 || serialCount === shard.files.length,
+ `12-shard bucket must not mix serial and parallel specs: ${shard.files.join(", ")}`,
+ );
+ }
+ const wallWeights = shards.map((shard) => {
+ const serialSum = shard.files.reduce((sum, file) => sum + (durations[file] ?? fallbackWeight), 0);
+ return shard.mode === "parallel" ? serialSum / EFFECTIVE_PARALLEL_SPEEDUP : serialSum;
+ });
+ const heaviest = Math.max(...wallWeights);
+ const totalWall = wallWeights.reduce((sum, weight) => sum + weight, 0);
+ const largestSerialSpec = Math.max(
+ 0,
+ ...specs.filter(isSerialE2eSpec).map((file) => durations[file] ?? fallbackWeight),
+ );
+ const bound = Math.max((totalWall / TARGET_PHASE3_SHARD_COUNT) * 1.15, largestSerialSpec);
+ assert.ok(
+ heaviest <= bound,
+ `heaviest 12-shard bucket ${Math.round(heaviest)}ms exceeds the balance bound (${Math.round(bound)}ms)`,
+ );
+ assert.ok(
+ heaviest <= 145_000,
+ `heaviest 12-shard bucket ${Math.round(heaviest)}ms exceeds 145s Phase 3 ceiling`,
+ );
+});
+
test("the duration manifest only names specs that still exist", () => {
const durations = loadShardDurations(durationsManifest);
assert.ok(Object.keys(durations).length > 0, "expected a populated duration manifest");
diff --git a/scripts/__tests__/runner-release-crate-cache.test.mjs b/scripts/__tests__/runner-release-crate-cache.test.mjs
index a4019627eae..963b596f48d 100644
--- a/scripts/__tests__/runner-release-crate-cache.test.mjs
+++ b/scripts/__tests__/runner-release-crate-cache.test.mjs
@@ -423,8 +423,9 @@ test("only the master Rust lane writes the crate, after a lookup, with the reade
// The dependency cache's own writer gate is the same expression.
assert.match(body, new RegExp(`save-if: \\$\\{\\{ ${WRITER_GATE.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")} \\}\\}`));
assert.equal((body.match(/actions\/cache\/save@/g) ?? []).length, 2, "release and debug workspace caches have separate guarded writers");
- // The only other cache save in release-verify.yml is the master-guarded E2E UI dist writer in `build`.
- assert.equal((releaseWorkflow.match(/actions\/cache\/save@/g) ?? []).length, 3, "release-verify.yml has guarded writers for release crate, debug crate, and E2E UI dist");
+ // The other cache saves in release-verify.yml are the master-guarded writers in `build`
+ // (E2E UI dist, prebuilt Runner dist, and incremental typecheck cache).
+ assert.equal((releaseWorkflow.match(/actions\/cache\/save@/g) ?? []).length, 5, "release-verify.yml has guarded writers for release crate, debug crate, E2E UI dist, Runner dist, and incremental typecheck");
});
test("the scope names the platform, the compiler and the checkout root, and survives a missing rustc", () => {
diff --git a/scripts/chat-shard-durations.json b/scripts/chat-shard-durations.json
index 14a87c41fff..42dd490f51c 100644
--- a/scripts/chat-shard-durations.json
+++ b/scripts/chat-shard-durations.json
@@ -2,938 +2,947 @@
"$comment": "Generated by node scripts/ci/refresh-chat-shard-durations.mjs from the CI profile test records of the PR chat jobs (profile-ci label). Per collected test entry, keyed by the name that vitest list reports: the summed duration of every case that entry runs, so an it.each line carries all its cases. Median across the given runs. scripts/test-line-shard.mjs uses these weights only to place source lines on chat partitions; they never change which tests run. Missing entries take the median weight.",
"unit": "ms",
"sources": [
- "https://github.com/paperclipai/paperclip/actions/runs/43444854171"
+ "https://github.com/paperclipai/paperclip/actions/runs/45324415100"
],
"coverage": {
- "measured": 926,
- "entries": 928
+ "measured": 935,
+ "entries": 937
},
"durations": {
- "$label": 2632,
- "accepts a manually created GitHub App when /app lists only selectable webhook events": 376,
- "accepts only signed GitHub setup pings before App credentials exist": 174,
- "accepts the Slack invitation mention exactly once (%s)": 1081,
- "acknowledges a denied Slack action before its durable notice completes and deduplicates redelivery": 789,
- "acknowledges a provider question when the board resolves after callback validation": 760,
- "acknowledges a signed URL mention through the real Slack SDK without waiting for an unfurl": 378,
- "acknowledges a Slack mention while %s is blocked": 1508,
- "acknowledges a Slack retry while one durable worker owns the unrecorded command root": 428,
- "acknowledges denied Telegram actions after one durable, payload-free notice": 278,
- "acknowledges durable Slack ingress promptly and never replays paused traffic on resume": 961,
- "acknowledges GitHub lifecycle callbacks without changing a paused endpoint": 384,
- "acknowledges Telegram control $command without a processing receipt (bound=$bound denied=$denied)": 2880,
- "acknowledges Telegram edits while verifying and when processing is suspended": 361,
- "activates Slack only after provider verification and a real test message": 760,
- "admits a separate connected-conversation Retry only after committed original-controller containment: %s": 7416,
- "admits concurrent and retried Slack slash commands only once": 527,
- "admits current GitHub task Retry without replaying obsolete input: %s": 5540,
- "admits only an addressed raw GitHub comment as the first setup repository": 690,
- "admits ordinary chat task Retry with a missing checkpoint only after containment: %s": 3063,
- "admits the exact chat source for ordinary %s failure": 1312,
- "advances failed retry notices past denied history with microsecond timestamps (%s)": 1551,
- "advances native progress past suppressed candidates with microsecond timestamps": 1012,
- "advances pre-run FIFO selection past a suppressed page with microsecond timestamps (%s)": 2286,
- "allows a new exact failed chat retry after an ordinary retry fails, without rearming its ancestors": 518,
- "allows only one concurrent live endpoint to claim a Discord bot across guilds": 251,
- "allows Slack thread replies without mentions while exempting DMs (DM=%s)": 1850,
- "applies Teams installation and Telegram membership resource lifecycle": 972,
- "applies the direct-message toggle to Slack slash commands": 315,
- "applies the Slack Board resume once during %s dispatch": 1465,
- "applies the Teams direct-message reach toggle and starts a new generation after task completion": 564,
- "atomically admits only one first GitHub repository under concurrent root mentions": 740,
- "atomically rejects a Slack DM when reach is revoked after initial admission": 324,
- "atomically rejects a sponsored Telegram guest after the sponsor is suspended": 224,
- "atomically rejects a Telegram DM when reach is revoked at the final task-mutation boundary": 214,
- "atomically rejects Slack task mutation after a linked identity is revoked or loses write membership": 492,
- "atomically rejects Teams messages when DM, group, or channel reach is revoked at the task-mutation boundary": 815,
- "audits Microsoft Teams reactions idempotently without treating them as task instructions": 683,
- "audits reactions on linked messages without treating them as task instructions": 770,
- "audits repeated Discord reaction cycles while deduplicating an exact Gateway replay": 732,
- "audits Telegram reactions on completed DM generations idempotently without comments or runs": 792,
- "authorizes protected channel workspace defaults for the endpoint's assigned agent": 501,
- "automatic Slack registration > acknowledges verification before sending one DM across concurrent callbacks and restart recovery": 638,
- "automatic Slack registration > adds events only after saving signing credentials and answers Slack's update-time challenge before OAuth": 722,
- "automatic Slack registration > claims callbacks once, keeps denied installation resumable, and does not replay ambiguous exchange": 726,
- "automatic Slack registration > creates once under concurrent submissions and resumes after restart without exposing credentials": 295,
- "automatic Slack registration > does not advance avatar state after management access is revoked during upload": 159,
- "automatic Slack registration > does not bind runtime credentials when management access is revoked during provider checks": 323,
- "automatic Slack registration > does not complete setup from %s event evidence": 7684,
- "automatic Slack registration > does not link or welcome an installer after company membership is revoked during lookup": 435,
- "automatic Slack registration > does not repeat uncertain creation until the operator explicitly confirms no app exists": 240,
- "automatic Slack registration > does not replay a verification DM after %s": 1457,
- "automatic Slack registration > does not replay a welcome dispatch interrupted by restart": 683,
- "automatic Slack registration > does not send a pending verification DM after %s": 2415,
- "automatic Slack registration > does not send a pending welcome to a subsequently revoked account link": 716,
- "automatic Slack registration > does not verify or notify for a %s challenge": 3132,
- "automatic Slack registration > keeps installation usable after %s without leaking provider echoes or creating another app": 1451,
- "automatic Slack registration > keeps setup connected after %s and never retries an optional DM": 2017,
- "automatic Slack registration > keeps the saved app installable after local avatar rendering fails": 166,
- "automatic Slack registration > links the OAuth installer, sends one welcome DM, and still requires signed URL verification": 1363,
- "automatic Slack registration > managed Slack > atomically consumes manager state and rejects wrong actors and expired attempts": 163,
- "automatic Slack registration > managed Slack > claims concurrent manager callbacks once": 287,
- "automatic Slack registration > managed Slack > clears a manager reconnect error after renewing the bound grant": 1086,
- "automatic Slack registration > managed Slack > creates and installs once, uploads the avatar and links only the manager grant owner": 1398,
- "automatic Slack registration > managed Slack > does not accept another company's grant or keep authorizations after removal": 265,
- "automatic Slack registration > managed Slack > does not activate a bot when the manager grant is revoked during child OAuth": 639,
- "automatic Slack registration > managed Slack > does not restore a revoked grant when an in-flight refresh returns": 257,
- "automatic Slack registration > managed Slack > installs a second bot using the same grant without new manager consent": 1594,
- "automatic Slack registration > managed Slack > keeps configured Cloud drafts managed when the broker profile disappears": 198,
- "automatic Slack registration > managed Slack > keeps open-source setup independent of the broker": 202,
- "automatic Slack registration > managed Slack > never recreates an uncertain app": 343,
- "automatic Slack registration > managed Slack > preserves configured-app reconnect intent when managed installation fails": 1569,
- "automatic Slack registration > managed Slack > preserves declined manager authorization as a safe recoverable outcome": 215,
- "automatic Slack registration > managed Slack > preserves provider rate-limit backoff across subsequent attempts": 492,
- "automatic Slack registration > managed Slack > reconnects a rejected manager token without losing pending manifest configuration": 1044,
- "automatic Slack registration > managed Slack > reinstalls the configured app on an explicit %s reconnect": 4077,
- "automatic Slack registration > managed Slack > reinstalls the saved app after missing bot scopes without creating another app": 1053,
- "automatic Slack registration > managed Slack > rejects a bot token belonging to a different Slack app before activation": 499,
- "automatic Slack registration > managed Slack > rejects manager identity changes and both callback-origin and ingress-origin drift": 182,
- "automatic Slack registration > managed Slack > rejects missing tool scopes before activating a managed bot": 432,
- "automatic Slack registration > managed Slack > rejects missing, malformed, foreign and other-user manager grants before provisioning": 232,
- "automatic Slack registration > managed Slack > resumes saved installation credentials after inventory failure without creating or reinstalling": 996,
- "automatic Slack registration > managed Slack > retains reinstall intent after a provider failure instead of retrying rejected credentials": 977,
- "automatic Slack registration > managed Slack > reuses the same personal workspace grant for another draft without another authorization": 210,
- "automatic Slack registration > managed Slack > revocation invalidates pending authorization and prevents future provisioning": 229,
- "automatic Slack registration > managed Slack > routes the broker claim_id callback back to the saved wizard without exposing the handoff": 294,
- "automatic Slack registration > managed Slack > serializes refreshes across endpoints and never replays an ambiguous refresh": 234,
- "automatic Slack registration > managed Slack > uses bound OAuth for approval fallback and rejects a different installer": 555,
- "automatic Slack registration > managed Slack > uses the held transaction for grant queries without acquiring another pool connection": 405,
- "automatic Slack registration > maps invalid token and validation echoes without persisting or exposing the supplied token": 253,
- "automatic Slack registration > preserves a saved app when its creation activity fails without exposing the failure": 189,
- "automatic Slack registration > preserves an existing %s account link without a welcome DM": 1056,
- "automatic Slack registration > recovers %s on the same saved app after restart without exposing provider echoes": 3290,
- "automatic Slack registration > reinstalls a revoked bot using the same app and preserves the linked account": 1033,
- "automatic Slack registration > rejects a missing or invalid OAuth installer (%s)": 504,
- "automatic Slack registration > rejects an authorization started before the bot was revoked": 709,
- "automatic Slack registration > rejects an installer lookup %s mismatch without linking": 2093,
- "automatic Slack registration > rejects an OAuth %s mismatch without binding runtime credentials": 1061,
- "automatic Slack registration > rejects changing an established %s during reauthorization": 1306,
- "automatic Slack registration > rejects expiry, wrong actor/session/company, permission revocation, and origin drift before exchange": 287,
- "automatic Slack registration > removes registration secrets and prevents late callbacks after %s removal": 590,
- "automatic Slack registration > respects disabled direct messages when provisioning the welcome": 512,
- "automatic Slack registration > resumes an interrupted avatar upload without repeating creation or requesting another token": 232,
- "automatic Slack registration > retains the token and installer after lookup failure and resumes without exchanging a code": 953,
- "automatic Slack registration > returns expired authorization to the saved wizard without exchanging its code": 220,
- "automatic Slack registration > reuses the saved installer and sends no further DM on reauthorization or restart": 1072,
- "automatic Slack registration > saves advanced app details with the initial draft and rejects them for other providers": 145,
- "automatic Slack registration > shows interrupted creation as uncertain after restart and supports manual recovery on the same draft": 129,
- "automatic Slack registration > Slack test messages > does not downgrade confirmed delivery when activity logging fails": 1050,
- "automatic Slack registration > Slack test messages > does not restore revoked access or take another user's identity": 841,
- "automatic Slack registration > Slack test messages > loads another workspace page instead of truncating account discovery": 950,
- "automatic Slack registration > Slack test messages > redacts provider failures and never retries an ambiguous send": 1229,
- "automatic Slack registration > Slack test messages > rejects wrong-workspace users, disabled DMs, and membership revocation": 898,
- "automatic Slack registration > Slack test messages > requires a private Slack challenge for an unknown account before linking and sending the test": 1019,
- "automatic Slack registration > Slack test messages > sends to the current linked user and reuses a durable result on duplicate requests": 1142,
- "automatic Slack registration > Slack test messages > settles a failed Slack account-link intent without committing identity or sending a test message": 1009,
- "automatic Slack registration > Slack test messages > signals milestone eligibility around the real Slack account link and stays quiet on reconfirmation": 977,
- "automatic Slack registration > uploads a real 512-pixel PNG from the production renderer": 2228,
- "automatic Slack registration > uploads preset bytes after credentials are durable, even with private avatar %s": 446,
- "automatic Slack registration > uses an authenticated message event to complete automatic setup without a URL challenge and notifies once": 889,
- "automatic Slack registration > vaults the bot token before %s and resumes without code exchange": 1542,
- "automatic Slack registration > wakes verification from a signed callback with no maintenance polling": 846,
- "automatically enables native modals for an existing Discord endpoint after %s runtime qualification": 1364,
- "automatically recovers a pre-ingress GitHub failure only through a genuine callback and normal durable workers": 976,
- "binds Slack DM slash controls to the latest task ($control, $status, $state)": 5392,
- "binds Slack tools to the admitted linked request, recovers its provenance and revokes retained access": 4776,
- "blocks a committed native review response and selected files at transport after %s": 2645,
- "Board send terminal attachment rejection > commits one content-free scoped receipt for concurrent rejection and allows only a separately keyed corrected send": 971,
- "Board send terminal attachment rejection > does not classify missing attachments as a safe terminal rejection": 824,
- "Board send terminal attachment rejection > keeps the exact rejected key terminal after normal owner-comment deletion and service reconstruction": 894,
- "Board send terminal attachment rejection > returns the exact HTTP rejection with only the bound subset and replays that receipt unchanged": 808,
- "bounds a held Slack receipt before delivering an already-ready same-endpoint final": 2450,
- "bounds company fixture prefix collision retries without creating a partial fixture": 86,
- "bounds failed retry notice scope discovery with retained candidates (%s)": 2526,
- "bounds inbound notice scope discovery with denied history (%s)": 2739,
- "bounds interaction continuation recovery reads with completed history": 2767,
- "bounds terminal confirmation recovery reads with completed history": 3114,
- "cancels a queued Slack slash start when channel reach is revoked before transport": 315,
- "cancels and redacts GitHub ingress when rotation wins before replay authentication": 823,
- "cancels staged GitHub ingress when a minimal recovery tombstone arrives before processing": 660,
- "cancels staged GitHub ingress when same-secret pause and resume wins at the replay barrier": 662,
- "cannot publish a runtime whose initialization is overtaken by pause": 308,
- "canonicalizes prefixed Chat SDK channel ids onto provider inventory resources": 346,
- "captures initial Slack communication guidance once per task, ignoring forged message configuration": 787,
- "captures signed Slack forwarding protocol with registered owners (%s)": 1698,
- "checks both linked sender and agent assignment grants for protected organizational defaults": 644,
- "checks protected organizational defaults against the assignee locked at creation": 341,
- "classifies publication $label": 5195,
- "cleans only the GitHub final run's receipt and never re-adds it on replay": 830,
- "clears an older multi-line Slack receipt diagnostic on terminal removal with attachment warning %s": 893,
- "coalesces closed native progress on %s fixture %s (%s) without projecting event content": 5344,
- "coalesces concurrent automatic pre-ingress GitHub scans into one provider redelivery": 611,
- "coalesces one Microsoft Teams run into one provider reply": 824,
- "coalesces one Slack run's lifecycle and final response despite an interleaved task control": 874,
- "coalesces one Telegram run into one provider message": 1194,
- "coalesces Telegram status and final output into one run-scoped provider message": 650,
- "composes a parsed Discord question answer with one same-thread continuation publication": 1185,
- "configures a customer-owned GitHub App and only auto-enables the first addressed setup repository": 1100,
- "configures a customer-owned Microsoft Teams bot with the entered credentials": 158,
- "configures a Discord bot only after identity, intent, server, and channel permissions verify": 1300,
- "configures Telegram and preserves queued updates with webhook origin %s": 1487,
- "consumes Telegram forum-topic controls without remapping or waking the topic task": 645,
- "continues a legacy Teams binding across a regional route change without forking its task": 695,
- "continues an accepted GitHub task Retry from recovered saved work when its chat replay is refused after the click: %s": 50877,
- "continues an inherited GitHub task from its recorded result instead of replaying the committed provider failure": 964,
- "corrects Telegram DM conversation links without rewriting retained provider receipts": 568,
- "creates a channel-purpose connection and rejects attempts to change its assigned agent": 132,
- "deduplicates inbound events, keeps one task per thread, and enables newly discovered Slack channels": 887,
- "deduplicates Slack file-only revisions by consumed metadata without retaining private locators": 442,
- "defers a rate-limited Telegram receipt reaction for the full provider interval without blocking the inbound turn": 310,
- "defers continuation dispatch until the outer response transaction commits": 1692,
- "defers scheduled accepted-response recovery behind %s status effects": 931,
- "defers scheduled accepted-response recovery until the persisted retry is due": 614,
- "defers Slack file receipt recovery while the original post owns the same attempt": 827,
- "delivers and replaces a Slack %s card through the publication service": 5354,
- "delivers oversized Discord Markdown losslessly as one retryable attachment": 1552,
- "delivers queued provider notices from commit wakes without the deferred fast path": 307,
- "denies a pre-provider reviewed retry with %s": 8256,
- "denies a staged failed chat retry after its original lifecycle epoch changes": 564,
- "denies a stale automatic GitHub callback after pause and reconnect even with the still-current HMAC secret": 681,
- "denies guest Slack stops, fences delayed events from newer runs, and cancels queued wakes": 1244,
- "Discord automatic command registration > does not rediscover a receiver stopped by a company removal refresh": 391,
- "Discord automatic command registration > drives receiver discovery through real configure, rotation, pause, and resume producers": 1114,
- "Discord automatic command registration > fences receiver construction across renewal: %s": 6197,
- "Discord automatic command registration > keeps mention setup usable on registration failure and upgrades automatically when due": 622,
- "Discord automatic command registration > learns the first configured command and cancels its deadline when the endpoint is removed": 551,
- "Discord automatic command registration > preserves a healthy Discord Gateway when a due command refresh returns 503": 524,
- "Discord automatic command registration > rechecks durable ownership after an earlier renewal finishes before listener start": 502,
- "Discord automatic command registration > reconstructs an uncertain registration by GET without repeating the provider write": 546,
- "Discord automatic command registration > restarts a receiver after token loss only after the old listener has stopped": 2448,
- "Discord automatic command registration > retains the Gateway after an external command namespace conflict without overwriting it": 534,
- "Discord automatic command registration > takes over a persisted foreign receiver lease at its deadline through the worker": 1515,
- "Discord automatic command registration > updates scheduled registration after real %s": 1448,
- "Discord native commands with durable service authority > acknowledges privately before a blocked DB wait but denies %s before commit": 1925,
- "Discord native commands with durable service authority > answers a cold unavailable Discord command privately without leaving the interaction thinking": 867,
- "Discord native commands with durable service authority > denies a previously accepted command after %s without another action or public receipt": 7514,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > allows a complete freshly admitted coalesced batch": 1510,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > allows an admitted source sent after close command but before close confirmation to present": 1536,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > does not cross a historical close after current %s authority changes": 13914,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > does not drop an older coalesced source while selecting the fresh batch": 1557,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > does not grant presentation across a published control with %s proof": 4611,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > does not let an automatic child copy %s presentation authority": 2049,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > does not let an unseen stale native Discord %s act on reopened work": 2800,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > keeps a newly closed source internal after a still newer source reopens the thread": 1693,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > keeps a source admitted before close confirmation internal after a fresh source reopens": 1421,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > orders same-millisecond Discord sources only within the same worker and process": 1314,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > publishes working and the exact fresh final after pinned close without resurrecting the old source": 1666,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > refuses %s provider chronology at intake when first ingested after close": 2643,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > wakes a post-close milestone when %s authority is restored": 24541,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > wakes a post-close milestone when interrupted inbound acceptance settles its %s receipt": 4707,
- "Discord native commands with durable service authority > fresh-after-close publication bindings > wakes saved post-close native progress when %s authority returns": 10977,
- "Discord native commands with durable service authority > qualifies pinned Discord close-owned progress retirement (%s)": 4434,
- "Discord native commands with durable service authority > records DM new once and never applies its old replay to a replacement conversation": 1117,
- "Discord native commands with durable service authority > returns private status, keeps guild new as guidance, and closes only after a real public control receipt": 1018,
- "Discord native commands with durable service authority > rolls back staged public control when the durable command receipt fails": 784,
- "Discord native commands with durable service authority > serializes simultaneous exact close deliveries and denies a changed command or registered ID": 859,
- "Discord native commands with durable service authority > upgrades a retained prior-copy registration after service restart before admitting close": 985,
- "discovers a Slack connect identity without starting work or granting access": 534,
- "dispatches and publishes a queued Slack Board send with a one-connection database pool": 680,
- "dispatches saved input through the task Retry HTTP endpoint and survives a repeated click": 1261,
- "does not accept a contradictory HTTP%s Slack duplicate receipt": 729,
- "does not acknowledge lifecycle callbacks whose durable write fails": 287,
- "does not adopt historical pre-ingress GitHub failures when initializing a recovery epoch": 480,
- "does not adopt input or deliver a pending identity-contended Retry after %s": 5471,
- "does not bypass %s task guards from the Slack Board composer or its outbox": 2844,
- "does not bypass %s through an exact chat retry": 1932,
- "does not cancel an ambiguous Slack task start after credential-lease ownership is lost": 48,
- "does not commit a Telegram close control when its provider reply is definitively rejected": 860,
- "does not commit endpoint reach changes after credential-lease ownership is lost": 42,
- "does not commit stale Slack task-start recovery after credential-lease ownership is lost": 72,
- "does not complete GitHub webhook repair or overwrite a new credential lease owner after remote success": 553,
- "does not create SDK eyes reactions for accepted GitHub requests": 591,
- "does not deadlock reaction replay against publication link settlement": 882,
- "does not dispatch an accepted inbound wake after destination access is revoked": 415,
- "does not duplicate an inbound file when delivery recovery resumes after the task mutation": 585,
- "does not enable Discord modals after a connection-lock wait with %s": 731,
- "does not hide another endpoint behind a page of busy-bot conversation heads": 2995,
- "does not hold another endpoint's final publication behind Slack session status transport": 1065,
- "does not lend a consumed failure lane to a recovered answer with %s": 2541,
- "does not let a late %s milestone replace authoritative ownership attention or final status": 4033,
- "does not let an obsolete GitHub webhook secret reopen a repository during rotation": 775,
- "does not let an obsolete Slack signing secret verify a reconnected configuration": 446,
- "does not let an obsolete Slack task-start failure quarantine successor credentials or reach": 283,
- "does not let GitHub lifecycle recovery undo a webhook-secret rotation": 793,
- "does not let ineligible pre-ingress GitHub candidates exhaust every future recovery scan": 595,
- "does not let one blocked Slack conversation starve another outbox head": 624,
- "does not let pause overtake a credential-fenced Discord root thread creation": 284,
- "does not let pause return while a Slack publication is still in provider transport": 864,
- "does not let rejected callbacks or malformed proxy hints establish healthy Slack callbacks": 490,
- "does not let removed-input cleanup overwrite a pre-run FIFO lane already replaced by its answer": 834,
- "does not let Slack reach disables return ahead of in-flight provider sends": 1164,
- "does not let stale GitHub setup-secret rotation overwrite successor credentials": 118,
- "does not let stale Telegram removal clear successor credentials after lease reclamation": 227,
- "does not let two live agent connections claim the same native bot or spoof its verified identity": 175,
- "does not lock durably ineligible %s history on repeated issue milestones": 17979,
- "does not normalize a stale Slack retry-anyway action after credential-lease ownership is lost": 251,
- "does not recover a committed answer after %s": 6502,
- "does not reload dormant accepted-response history for an unrelated %s wake": 3138,
- "does not repeat a failed chat run with %s": 1066,
- "does not replace a failure while another exact-run authored publication is %s": 1460,
- "does not replay stale native progress after a paused endpoint restarts behind an exact final": 1596,
- "does not request automatic pre-ingress GitHub recovery while the latest provider attempt is %s": 1899,
- "does not resurrect publication ownership after waiting beyond expiry on a real lease row lock": 464,
- "does not retain signed GitHub events outside the configured App event set": 510,
- "does not retry a chat comment edited on the Board during the failed execution": 362,
- "does not retry a provider-accepted publication after its exact attempt lease is lost": 459,
- "does not retry automatic pre-ingress GitHub redelivery without a distinct failed provider attempt": 569,
- "does not retry unrelated company fixture database errors": 10,
- "does not rotate a GitHub webhook secret when stored credentials cannot be resolved": 470,
- "does not treat an accepted-response endpoint scheduling hint as current authority": 512,
- "does not wake twice when an operator replays an already admitted failed delivery": 478,
- "drains accepted GitHub webhooks from commit wakes and durable retry deadlines": 2018,
- "drains bounded Slack chat-origin milestones without admitting an internal issue run (%s)": 2465,
- "drains failed chat retries from durable work and becomes idle: %s": 9768,
- "durably admits a Telegram edit that races deferred original-message processing": 1181,
- "durably audits a rejected Discord Gateway action before surfacing transport rejection": 225,
- "durably deduplicates Telegram guidance webhook retries and filters disabled DMs": 384,
- "durably recovers rate-limited Telegram menu registration and removal cleanup": 674,
- "durably replays a reaction that arrives before its outbound link without waking the task": 991,
- "durably retries a signed Slack session stop and cancels its exact linked run once": 1025,
- "durably stages GitHub webhooks while credential mutation owns the processing lease": 880,
- "durably stages GitHub webhooks within budget before cold runtime initialization": 629,
- "edits a Slack working reply into one terminal failure reply": 581,
- "enforces Telegram group reach and privacy-mode addressing before retaining message content": 674,
- "enforces the native progress cadence boundary and one publication per phase": 692,
- "exhausts the existing delivery Retry budget after identity authorization without background renewal": 8538,
- "expires Teams consent from the committed Board transfer without periodic maintenance": 1988,
- "expires the saved identity wait without renewal when the lock is released before expiry processing: %s": 1807,
- "fails closed for unbound rich callbacks and unknown slash commands": 279,
- "fails closed on automatic pre-ingress GitHub recovery with %s": 980,
- "fails closed when GitHub App permissions drift before installation recovery": 1295,
- "fails closed when the GitHub installation has not approved the App permissions": 859,
- "fences a reclaimed Slack task admission from the obsolete worker's settlement": 411,
- "fences message and reaction callbacks that resume after Discord Gateway takeover": 1258,
- "filters a claimed message lifecycle delivery after pause and reconnect supersede its runtime": 915,
- "filters a durable orphan Telegram edit after the bounded reorder window": 555,
- "filters a durably admitted GitHub callback when rotation and reconnect supersede its runtime before deferred processing": 947,
- "filters a late duplicate instead of bypassing the bounded reaction-link lifetime": 1024,
- "filters a staged reaction when destination reach is revoked before replay": 929,
- "filters a standalone unaddressed GitHub comment after bounded orphan retention": 943,
- "filters an unlinked guest when the endpoint sponsor is suspended and exposes the reason and duplicate count": 313,
- "filters unlinked people when configured, then honors a confirmed active-member identity link": 827,
- "first-seen messages behind completed chat controls > accepts delayed %s backlog without an explicit control": 1734,
- "first-seen messages behind completed chat controls > continues to accept authenticated Slack slash close/new on a genuinely new generation": 1841,
- "first-seen messages behind completed chat controls > does not infer a stop from bare completed state with %s": 3450,
- "first-seen messages behind completed chat controls > does not let an unseen old Telegram /%s close a newer generation": 2071,
- "first-seen messages behind completed chat controls > does not lower a newer provider boundary when an older close is confirmed later": 1420,
- "first-seen messages behind completed chat controls > does not promote metadata-only %s timestamps after a completed control": 1986,
- "first-seen messages behind completed chat controls > does not recreate or filter a previously committed inbound link when its delivery retries after close": 1000,
- "first-seen messages behind completed chat controls > honors operator-confirmed close without inventing an outbound message receipt": 930,
- "first-seen messages behind completed chat controls > keeps controls scoped to their endpoint, immutable thread, and company": 2827,
- "first-seen messages behind completed chat controls > preserves a Teams close across regional routes (close after route change: %s)": 1943,
- "first-seen messages behind completed chat controls > rechecks a close committed while old input waits before the endpoint transaction": 865,
- "first-seen messages behind completed chat controls > refuses unseen %s input before %s (same second: %s) without creating work": 8159,
- "first-seen messages behind completed chat controls > retains a committed control boundary through pause, redacted duplicate, and resume": 1909,
- "first-seen messages behind completed chat controls > retains a completed trailing-newline control as a first-seen source boundary": 888,
- "GitHub agent review workflow > acknowledges a GitHub request after a durable scheduler retry succeeds": 1181,
- "GitHub agent review workflow > adds the progress tool to an existing enabled bot without restoring disabled tools": 1018,
- "GitHub agent review workflow > admits a GitHub request explicitly addressed to both connected bots": 1583,
- "GitHub agent review workflow > admits a newly mentioned %s edit while preserving its lifecycle record": 3264,
- "GitHub agent review workflow > admits opt-in signed issue events without PR checks, deduplicates them and rechecks revoked policy": 1684,
- "GitHub agent review workflow > admits signed %s mentions with automation off, deduplicates and retains manual task authority": 33894,
- "GitHub agent review workflow > admits signed PR events into an ordinary assigned task and deduplicates delivery": 4468,
- "GitHub agent review workflow > adopts an existing GitHub PR placeholder and retires earlier duplicate placeholders": 2233,
- "GitHub agent review workflow > authorizes description edits as the editor, never inheriting the original author's access": 2508,
- "GitHub agent review workflow > automatically retries a transient GitHub review publication (HTTP %s)": 9403,
- "GitHub agent review workflow > bounds GitHub response authorization reads with large saved chat content": 1359,
- "GitHub agent review workflow > checks live repository permission and reports a revoked installation selection": 559,
- "GitHub agent review workflow > classifies recovered GitHub receipts without republishing or overwriting historical success": 2391,
- "GitHub agent review workflow > closes a GitHub placeholder after a formal review (legacy receipt: %s)": 2546,
- "GitHub agent review workflow > closes an inline-only GitHub review when an earlier working comment was deleted: %s": 2994,
- "GitHub agent review workflow > coordinates GitHub working feedback with a %s fast response": 3605,
- "GitHub agent review workflow > defers GitHub review check enqueue until outer commit and discards rollback": 1878,
- "GitHub agent review workflow > does not admit an unlinked issue author through the linked webhook sender": 648,
- "GitHub agent review workflow > does not edit a %s replacement of the bound GitHub comment": 2524,
- "GitHub agent review workflow > does not handle a blocked new GitHub request with an older run's final reply": 1728,
- "GitHub agent review workflow > does not invent a GitHub completion response when the agent sends no tool reply": 1418,
- "GitHub agent review workflow > does not let a progress edit overwrite a final GitHub answer": 1475,
- "GitHub agent review workflow > does not let an unsettled GitHub fallback block a later board message": 1139,
- "GitHub agent review workflow > does not post a GitHub working comment when the scheduler declines the request": 671,
- "GitHub agent review workflow > does not resubmit a permanent GitHub publication rejection (HTTP %s)": 3371,
- "GitHub agent review workflow > does not route GitHub mentions using %s identities": 4374,
- "GitHub agent review workflow > drains more than one page of stale GitHub review projections without touching manual history": 2133,
- "GitHub agent review workflow > finalizes every working comment in a coalesced GitHub run": 2064,
- "GitHub agent review workflow > finds a GitHub review check after a full page of revoked work and ignores settled history": 6083,
- "GitHub agent review workflow > finds owed terminal GitHub work beyond a full page of unrelated request history": 1957,
- "GitHub agent review workflow > finds terminal GitHub responses by native issue binding before legacy run context": 2137,
- "GitHub agent review workflow > finishes the same GitHub working comment after an authorized same-App reconnect (legacy: %s)": 2594,
- "GitHub agent review workflow > GitHub failure fallback respects exact tool delivery state: %s": 14536,
- "GitHub agent review workflow > holds stale GitHub review projection receipt repair until the outer commit and discards rollback": 2793,
- "GitHub agent review workflow > ignores a review request addressed to an external GitHub bot": 1023,
- "GitHub agent review workflow > imports initial GitHub access for a %s App without a second picker and leaves later additions disabled": 1597,
- "GitHub agent review workflow > keeps a newer GitHub request open when its acknowledgement follows older progress": 2279,
- "GitHub agent review workflow > keeps a report-only GitHub check neutral after a %s run without an assessment": 2930,
- "GitHub agent review workflow > keeps an acknowledged paused GitHub request quiet until its new run finishes": 2862,
- "GitHub agent review workflow > keeps GitHub publication I/O outside transactions and fences an expired owner's receipt": 422,
- "GitHub agent review workflow > keeps GitHub response maintenance truthful for a new request: $scenario ($reason)": 54805,
- "GitHub agent review workflow > keeps GitHub response ownership checks independent of large run payloads": 1422,
- "GitHub agent review workflow > keeps GitHub review check history quiet and wakes from the real enqueue producer": 2895,
- "GitHub agent review workflow > keeps GitHub review tools callable through a later native task gateway (board follow-up: $boardFollowUp, legacy origin: $legacyOrigin)": 9341,
- "GitHub agent review workflow > keeps native presentation idle until its committed GitHub outcome: %s": 5965,
- "GitHub agent review workflow > keeps partial review delivery authoritative when the head changes %s": 2589,
- "GitHub agent review workflow > keeps per-request fallback outside the main GitHub PR review wait": 1361,
- "GitHub agent review workflow > keeps terminal GitHub responses waiting while a natively bound newer run is active": 871,
- "GitHub agent review workflow > legacy name-only registration preserves an explicit empty repository selection": 98,
- "GitHub agent review workflow > links a gated GitHub check to the current vanity review page before a task exists": 731,
- "GitHub agent review workflow > lists each GitHub bot tool once when an inline thread shares the task": 1155,
- "GitHub agent review workflow > loads an old GitHub review directly without crossing endpoint or company boundaries": 1390,
- "GitHub agent review workflow > loads only the current configured instruction skills, never provider links or another company": 2562,
- "GitHub agent review workflow > manual App credential retry imports repositories after an interrupted vault write": 1201,
- "GitHub agent review workflow > manual App setup preserves explicitly disabled repositories and tools": 789,
- "GitHub agent review workflow > manual App setup resumes tool initialization after an interrupted repository import": 929,
- "GitHub agent review workflow > offers Retry for a saved automatic PR event after a successful older review": 2910,
- "GitHub agent review workflow > parks a GitHub acknowledgement until native presentation commits": 1352,
- "GitHub agent review workflow > parks terminal GitHub responses behind the publication owner (uncertain: %s)": 6911,
- "GitHub agent review workflow > preserves %s policy context while omitting body content": 1779,
- "GitHub agent review workflow > preserves a final GitHub assessment while settling an incomplete request receipt": 1392,
- "GitHub agent review workflow > preserves an earlier final GitHub answer when a later continuation fails": 1132,
- "GitHub agent review workflow > preserves GitHub connection intent after publication HTTP %s": 2572,
- "GitHub agent review workflow > preserves malformed GitHub authority input %j": 5336,
- "GitHub agent review workflow > preserves newer GitHub PR progress when an older run fails": 1874,
- "GitHub agent review workflow > preserves the %s GitHub receipt lifecycle during acknowledgement recovery": 2360,
- "GitHub agent review workflow > preserves the published GitHub assessment during passive-response maintenance: %s": 4814,
- "GitHub agent review workflow > publishes one score heading when a newly configured bot submits a formatted summary": 1880,
- "GitHub agent review workflow > reactivates terminal GitHub response recovery from committed native identity": 3258,
- "GitHub agent review workflow > reads pending GitHub receipts without dispatch and refuses a missing publication": 2999,
- "GitHub agent review workflow > rechecks a GitHub fallback after waiting for the credential lane": 1231,
- "GitHub agent review workflow > rechecks another GitHub bot's mention when recovering a durable subscribed delivery": 1565,
- "GitHub agent review workflow > rechecks assessment ownership after stale GitHub review projection selection waits for a row lock (shutdown: %s)": 3635,
- "GitHub agent review workflow > reconciles a GitHub working comment when execution stops without a publication": 1726,
- "GitHub agent review workflow > reconciles stopped GitHub work from native identity without legacy wake fields": 1287,
- "GitHub agent review workflow > reconsiders the same GitHub reply after stopped native workspace cleanup (%s)": 40213,
- "GitHub agent review workflow > records automatic policy skips without retaining provider content, and refuses mentions in disabled repositories": 866,
- "GitHub agent review workflow > recovers %s after a timeout before publication staging": 3134,
- "GitHub agent review workflow > recovers a delayed GitHub acknowledgement after a successful run without leaving it working": 1216,
- "GitHub agent review workflow > recovers a durable GitHub publication receipt ($label)": 15195,
- "GitHub agent review workflow > recovers a missed GitHub head webhook only while a review check remains unresolved": 1087,
- "GitHub agent review workflow > recovers an acknowledgement whose local receipt was lost without posting another comment": 1190,
- "GitHub agent review workflow > recovers an approved queued GitHub review without another approval (revoked: %s)": 5397,
- "GitHub agent review workflow > recovers long %s requests without accepting changes hidden by the audit preview": 7503,
- "GitHub agent review workflow > recovers lost inline and check responses without duplicate GitHub publications": 9067,
- "GitHub agent review workflow > recovers stale GitHub review projection through %s": 4436,
- "GitHub agent review workflow > rejects arbitrary comment IDs and edits after the initiating person is revoked": 1039,
- "GitHub agent review workflow > rejects changed requests and revoked access before repeating an unstaged review": 7706,
- "GitHub agent review workflow > releases a GitHub acknowledgement after fast response %s without maintenance polling": 9886,
- "GitHub agent review workflow > replies in review finding threads behind an active run > answers each finding thread in its own run instead of one unattestable batch": 6263,
- "GitHub agent review workflow > replies in review finding threads behind an active run > still batches several replies in one finding thread into one attested run": 4161,
- "GitHub agent review workflow > replies in review finding threads behind an active run > still denies each separated finding-thread run after the linked identity is revoked": 2688,
- "GitHub agent review workflow > requires every essential GitHub tool and rejects Contents write during verification": 1148,
- "GitHub agent review workflow > restores terminal GitHub responses and leaves finalized history quiet": 1913,
- "GitHub agent review workflow > resumes a delayed GitHub publication after coordinator restart without another inbound event": 3487,
- "GitHub agent review workflow > resumes a paused GitHub request and reconciles stopped execution (prior run: %s, progress: %s)": 8763,
- "GitHub agent review workflow > retains a provider-verified GitHub mention when its plain text uses an alias": 1072,
- "GitHub agent review workflow > retains attachment provenance in a signed GitHub mention %s": 2722,
- "GitHub agent review workflow > retains failed stale GitHub review projection repair across drain without passive SQL": 1788,
- "GitHub agent review workflow > retains GitHub review check work across %s": 7576,
- "GitHub agent review workflow > retains subscribed GitHub follow-ups with incidental human or unknown mentions: %s": 7392,
- "GitHub agent review workflow > retains terminal GitHub response work across %s": 6174,
- "GitHub agent review workflow > retains the saved GitHub review check retry through restart without an early provider call": 1053,
- "GitHub agent review workflow > retires a legacy coalesced GitHub placeholder before replacing its receipt": 2942,
- "GitHub agent review workflow > retires a legacy GitHub placeholder when its acknowledgement is superseded": 2048,
- "GitHub agent review workflow > retries a failed GitHub acknowledgement at its saved deadline": 1842,
- "GitHub agent review workflow > retries an ambiguous GitHub edit without creating another comment": 7774,
- "GitHub agent review workflow > returns snapshot finding categories and publishes only accepted categories": 2307,
- "GitHub agent review workflow > reuses one main GitHub PR comment across review requests: %s": 5655,
- "GitHub agent review workflow > scopes guest tasks and rechecks their sponsor before every bot tool": 875,
- "GitHub agent review workflow > settles a deleted Board-origin request without starving unrelated terminal GitHub replies": 3066,
- "GitHub agent review workflow > settles a deleted coalesced working comment without blocking the current GitHub response": 1410,
- "GitHub agent review workflow > stack exchanges a callback code only once when vault storage is interrupted": 54,
- "GitHub agent review workflow > stack rejects forged raw gateway deliveries without changing verification or waking an agent": 1018,
- "GitHub agent review workflow > stages one assessment when the timed-out metadata read completes alongside its retry": 2522,
- "GitHub agent review workflow > still fences a GitHub publication when reconnect races the provider read": 1203,
- "GitHub agent review workflow > stops a queued GitHub publication after %s": 5732,
- "GitHub agent review workflow > stops GitHub acknowledgement sends at %s between provider requests": 5969,
- "GitHub agent review workflow > stops GitHub review check HTTP after shutdown admission and recovers its durable action": 7325,
- "GitHub agent review workflow > supersedes a late review projection after its check already rejected the old head": 1769,
- "GitHub agent review workflow > suppresses subscribed GitHub comments for another connected bot in %s": 4035,
- "GitHub agent review workflow > updates one GitHub acknowledgement through progress and final answer in %s": 5490,
- "GitHub agent review workflow > uses task-bound bot tools and deterministic checks, then denies revoked people": 3438,
- "GitHub agent review workflow > uses the manifest state parameter and rejects expired, reused, and wrong-origin registrations": 53,
- "GitHub agent review workflow > verifies %i enabled repositories in bounded token batches": 1136,
- "GitHub agent review workflow > verifies a repaired GitHub webhook in %s only from a %s installation delivery with %s repository": 7495,
- "GitHub agent review workflow > waits for and wakes from the actual GitHub review check publication lease": 1853,
- "GitHub agent review workflow > waits for the existing GitHub publication lease before a terminal response": 1951,
- "GitHub agent review workflow > wakes a GitHub acknowledgement only after the outer fast-response transaction commits": 2398,
- "GitHub agent review workflow > wakes a GitHub review check from committed run identity before its future head deadline": 2749,
- "GitHub agent review workflow > wakes a paused GitHub response from %s": 10137,
- "GitHub agent review workflow > wakes GitHub acknowledgements from a real publication lease %s": 5736,
- "GitHub agent review workflow > wakes GitHub milestone identity restoration only after outer commit and stays quiet on reconfirmation": 424,
- "GitHub agent review workflow > wakes milestone authority only when GitHub guest settings change, after outer commit": 657,
- "GitHub agent review workflow > wakes stale GitHub review projection repair from real admission and leaves settled history quiet": 1816,
- "GitHub agent review workflow > wakes stale GitHub review projection repair when cancellation commits after the review is admitted": 2517,
- "GitHub agent review workflow > wakes terminal GitHub responses after the outer issue transaction commits": 2037,
- "GitHub agent review workflow > wizard completes a verified connection automatically without claiming runtime execution": 762,
- "GitHub agent review workflow > wizard configures Cloud webhook delivery without a public instance URL": 528,
- "GitHub agent review workflow > wizard keeps localhost draft choices while waiting for Cloud enrollment": 53,
- "GitHub agent review workflow > wizard persists a %s owner and resumes the same bound registration after a lost Cloud response and enrolled origin change": 172,
- "GitHub agent review workflow > wizard preserves an explicit empty repository selection at revision zero": 679,
- "GitHub agent review workflow > wizard preserves explicit review behavior and repository restrictions on existing drafts": 671,
- "GitHub agent review workflow > wizard recovers a renamed enrolled origin only after checking bound state and Cloud authority": 52,
- "GitHub agent review workflow > wizard repairs Cloud after manual credential recovery and secret rotation without changing App identity": 824,
- "GitHub agent review workflow > wizard restarts only an expired unconsumed registration: %s": 490,
- "GitHub agent review workflow > wizard resumes a %s installation callback after its signed ping": 2896,
- "GitHub agent review workflow > wizard retains partial manifest recovery until explicit existing-App recovery succeeds": 941,
- "GitHub agent review workflow > wizard serializes identity starts and callbacks without overwriting PKCE or handoff state": 603,
- "GitHub repository pagination and bulk access > pages and searches 1000 repositories while toggle all changes unloaded rows atomically": 425,
- "GitHub terminal receipt composes pinned HTTP and durable source authority (%s)": 15635,
- "GitHub webhook recovery scheduling > joins held GitHub history at shutdown without starting another HTTP request": 565,
- "GitHub webhook recovery scheduling > leaves %s recovery quiet": 971,
- "GitHub webhook recovery scheduling > preempts a future GitHub recovery window when only credential references change": 1465,
- "GitHub webhook recovery scheduling > preserves a GitHub redelivery stopped before transport (%s, prior receipt: %s, superseded: %s)": 3904,
- "GitHub webhook recovery scheduling > reactivates recovery from real resume and cancels its deadline on pause": 3506,
- "GitHub webhook recovery scheduling > reconstructs due GitHub recovery through %s": 1629,
- "GitHub webhook recovery scheduling > reconstructs more than one page of GitHub recovery deadlines and dispatches fair batches of five": 2602,
- "GitHub webhook recovery scheduling > recovers a failed GitHub deadline reconstruction after drain without passive SQL": 573,
- "GitHub webhook recovery scheduling > rejects a %s assigned agent before GitHub recovery can become orphaned": 4431,
- "GitHub webhook recovery scheduling > retains GitHub recovery configuration intent through nested commit and rollback": 2434,
- "GitHub webhook recovery scheduling > waits for the saved recovery deadline and requests a genuine GitHub redelivery": 671,
- "globally fences GitHub App identity across owner transfers without leaking another company": 477,
- "globally fences one Microsoft Bot application across tenants": 183,
- "hands an explicitly bound same-run image to Discord's final native file response": 1394,
- "holds a delayed first Teams setup reply until its older root mention enables the channel": 557,
- "holds a delayed Slack thread reply until its older root mention arrives": 472,
- "holds a GitHub follow-up that arrives after the reorder window until its older root mention arrives": 869,
- "holds ambiguous provider sends for an audited duplicate-risk resolution without reordering": 1465,
- "holds an ordinary $provider Retry behind its exact remote recovery: $gate": 38604,
- "honors a prepared Retry identity wait after %s": 9729,
- "honors Slack slash-start rate-limit backoff without hammering transport": 317,
- "honors Telegram flood-control timing and publishes one final message after retry": 862,
- "ignores a signed GitHub installation before App credentials exist": 170,
- "ignores repeated unscoped routine %s hints without rebuilding dormant accepted-response history": 1027,
- "ignores signed Slack callbacks from a different workspace before SDK dispatch": 280,
- "immediately initializes a new GitHub recovery generation despite the previous epoch's 24-hour backoff": 568,
- "imports every Discord upload when text files include MIME parameters": 424,
- "ingests a pinned Telegram video-note without optional MIME metadata (%s)": 2277,
+ "$label": 2223,
+ "accepts a manually created GitHub App when /app lists only selectable webhook events": 330,
+ "accepts only signed GitHub setup pings before App credentials exist": 125,
+ "accepts the Slack invitation mention exactly once (%s)": 755,
+ "acknowledges a denied Slack action before its durable notice completes and deduplicates redelivery": 615,
+ "acknowledges a provider question when the board resolves after callback validation": 650,
+ "acknowledges a signed URL mention through the real Slack SDK without waiting for an unfurl": 309,
+ "acknowledges a Slack mention while %s is blocked": 1124,
+ "acknowledges a Slack retry while one durable worker owns the unrecorded command root": 350,
+ "acknowledges denied Telegram actions after one durable, payload-free notice": 181,
+ "acknowledges durable Slack ingress promptly and never replays paused traffic on resume": 898,
+ "acknowledges GitHub lifecycle callbacks without changing a paused endpoint": 287,
+ "acknowledges Telegram control $command without a processing receipt (bound=$bound denied=$denied)": 1819,
+ "acknowledges Telegram edits while verifying and when processing is suspended": 259,
+ "activates Slack only after provider verification and a real test message": 550,
+ "admits a separate connected-conversation Retry only after committed original-controller containment: %s": 7148,
+ "admits concurrent and retried Slack slash commands only once": 435,
+ "admits current GitHub task Retry without replaying obsolete input: %s": 4150,
+ "admits only an addressed raw GitHub comment as the first setup repository": 484,
+ "admits ordinary chat task Retry with a missing checkpoint only after containment: %s": 2025,
+ "admits the exact chat source for ordinary %s failure": 1205,
+ "advances failed retry notices past denied history with microsecond timestamps (%s)": 1387,
+ "advances native progress past suppressed candidates with microsecond timestamps": 712,
+ "advances pre-run FIFO selection past a suppressed page with microsecond timestamps (%s)": 2143,
+ "allows a new exact failed chat retry after an ordinary retry fails, without rearming its ancestors": 401,
+ "allows only one concurrent live endpoint to claim a Discord bot across guilds": 158,
+ "allows Slack thread replies without mentions while exempting DMs (DM=%s)": 1499,
+ "applies Teams installation and Telegram membership resource lifecycle": 689,
+ "applies the direct-message toggle to Slack slash commands": 211,
+ "applies the Slack Board resume once during %s dispatch": 1137,
+ "applies the Teams direct-message reach toggle and starts a new generation after task completion": 414,
+ "atomically admits only one first GitHub repository under concurrent root mentions": 407,
+ "atomically rejects a Slack DM when reach is revoked after initial admission": 240,
+ "atomically rejects a sponsored Telegram guest after the sponsor is suspended": 192,
+ "atomically rejects a Telegram DM when reach is revoked at the final task-mutation boundary": 155,
+ "atomically rejects Slack task mutation after a linked identity is revoked or loses write membership": 497,
+ "atomically rejects Teams messages when DM, group, or channel reach is revoked at the task-mutation boundary": 590,
+ "audits Microsoft Teams reactions idempotently without treating them as task instructions": 475,
+ "audits reactions on linked messages without treating them as task instructions": 500,
+ "audits repeated Discord reaction cycles while deduplicating an exact Gateway replay": 569,
+ "audits Telegram reactions on completed DM generations idempotently without comments or runs": 660,
+ "authorizes protected channel workspace defaults for the endpoint's assigned agent": 414,
+ "automatic Slack registration > acknowledges verification before sending one DM across concurrent callbacks and restart recovery": 529,
+ "automatic Slack registration > adds events only after saving signing credentials and answers Slack's update-time challenge before OAuth": 625,
+ "automatic Slack registration > claims callbacks once, keeps denied installation resumable, and does not replay ambiguous exchange": 604,
+ "automatic Slack registration > creates once under concurrent submissions and resumes after restart without exposing credentials": 192,
+ "automatic Slack registration > does not advance avatar state after management access is revoked during upload": 139,
+ "automatic Slack registration > does not bind runtime credentials when management access is revoked during provider checks": 259,
+ "automatic Slack registration > does not complete setup from %s event evidence": 5369,
+ "automatic Slack registration > does not link or welcome an installer after company membership is revoked during lookup": 395,
+ "automatic Slack registration > does not repeat uncertain creation until the operator explicitly confirms no app exists": 175,
+ "automatic Slack registration > does not replay a verification DM after %s": 1116,
+ "automatic Slack registration > does not replay a welcome dispatch interrupted by restart": 390,
+ "automatic Slack registration > does not send a pending verification DM after %s": 2234,
+ "automatic Slack registration > does not send a pending welcome to a subsequently revoked account link": 546,
+ "automatic Slack registration > does not verify or notify for a %s challenge": 1760,
+ "automatic Slack registration > keeps installation usable after %s without leaking provider echoes or creating another app": 1154,
+ "automatic Slack registration > keeps setup connected after %s and never retries an optional DM": 1206,
+ "automatic Slack registration > keeps the saved app installable after local avatar rendering fails": 147,
+ "automatic Slack registration > links the OAuth installer, sends one welcome DM, and still requires signed URL verification": 874,
+ "automatic Slack registration > managed Slack > atomically consumes manager state and rejects wrong actors and expired attempts": 138,
+ "automatic Slack registration > managed Slack > claims concurrent manager callbacks once": 234,
+ "automatic Slack registration > managed Slack > clears a manager reconnect error after renewing the bound grant": 898,
+ "automatic Slack registration > managed Slack > creates and installs once, uploads the avatar and links only the manager grant owner": 1039,
+ "automatic Slack registration > managed Slack > does not accept another company's grant or keep authorizations after removal": 167,
+ "automatic Slack registration > managed Slack > does not activate a bot when the manager grant is revoked during child OAuth": 515,
+ "automatic Slack registration > managed Slack > does not restore a revoked grant when an in-flight refresh returns": 143,
+ "automatic Slack registration > managed Slack > installs a second bot using the same grant without new manager consent": 1150,
+ "automatic Slack registration > managed Slack > keeps configured Cloud drafts managed when the broker profile disappears": 131,
+ "automatic Slack registration > managed Slack > keeps open-source setup independent of the broker": 152,
+ "automatic Slack registration > managed Slack > never recreates an uncertain app": 268,
+ "automatic Slack registration > managed Slack > preserves configured-app reconnect intent when managed installation fails": 961,
+ "automatic Slack registration > managed Slack > preserves declined manager authorization as a safe recoverable outcome": 209,
+ "automatic Slack registration > managed Slack > preserves provider rate-limit backoff across subsequent attempts": 535,
+ "automatic Slack registration > managed Slack > reconnects a rejected manager token without losing pending manifest configuration": 813,
+ "automatic Slack registration > managed Slack > reinstalls the configured app on an explicit %s reconnect": 2529,
+ "automatic Slack registration > managed Slack > reinstalls the saved app after missing bot scopes without creating another app": 660,
+ "automatic Slack registration > managed Slack > rejects a bot token belonging to a different Slack app before activation": 351,
+ "automatic Slack registration > managed Slack > rejects manager identity changes and both callback-origin and ingress-origin drift": 184,
+ "automatic Slack registration > managed Slack > rejects missing tool scopes before activating a managed bot": 534,
+ "automatic Slack registration > managed Slack > rejects missing, malformed, foreign and other-user manager grants before provisioning": 252,
+ "automatic Slack registration > managed Slack > resumes saved installation credentials after inventory failure without creating or reinstalling": 784,
+ "automatic Slack registration > managed Slack > retains reinstall intent after a provider failure instead of retrying rejected credentials": 787,
+ "automatic Slack registration > managed Slack > reuses the same personal workspace grant for another draft without another authorization": 117,
+ "automatic Slack registration > managed Slack > revocation invalidates pending authorization and prevents future provisioning": 188,
+ "automatic Slack registration > managed Slack > routes the broker claim_id callback back to the saved wizard without exposing the handoff": 217,
+ "automatic Slack registration > managed Slack > serializes refreshes across endpoints and never replays an ambiguous refresh": 201,
+ "automatic Slack registration > managed Slack > uses bound OAuth for approval fallback and rejects a different installer": 475,
+ "automatic Slack registration > managed Slack > uses the held transaction for grant queries without acquiring another pool connection": 183,
+ "automatic Slack registration > maps invalid token and validation echoes without persisting or exposing the supplied token": 339,
+ "automatic Slack registration > preserves a saved app when its creation activity fails without exposing the failure": 96,
+ "automatic Slack registration > preserves an existing %s account link without a welcome DM": 563,
+ "automatic Slack registration > recovers %s on the same saved app after restart without exposing provider echoes": 3277,
+ "automatic Slack registration > reinstalls a revoked bot using the same app and preserves the linked account": 767,
+ "automatic Slack registration > rejects a missing or invalid OAuth installer (%s)": 291,
+ "automatic Slack registration > rejects an authorization started before the bot was revoked": 734,
+ "automatic Slack registration > rejects an installer lookup %s mismatch without linking": 1503,
+ "automatic Slack registration > rejects an OAuth %s mismatch without binding runtime credentials": 826,
+ "automatic Slack registration > rejects changing an established %s during reauthorization": 766,
+ "automatic Slack registration > rejects expiry, wrong actor/session/company, permission revocation, and origin drift before exchange": 187,
+ "automatic Slack registration > removes registration secrets and prevents late callbacks after %s removal": 322,
+ "automatic Slack registration > respects disabled direct messages when provisioning the welcome": 296,
+ "automatic Slack registration > resumes an interrupted avatar upload without repeating creation or requesting another token": 165,
+ "automatic Slack registration > retains the token and installer after lookup failure and resumes without exchanging a code": 493,
+ "automatic Slack registration > returns expired authorization to the saved wizard without exchanging its code": 185,
+ "automatic Slack registration > reuses the saved installer and sends no further DM on reauthorization or restart": 785,
+ "automatic Slack registration > saves advanced app details with the initial draft and rejects them for other providers": 85,
+ "automatic Slack registration > shows interrupted creation as uncertain after restart and supports manual recovery on the same draft": 93,
+ "automatic Slack registration > Slack test messages > does not downgrade confirmed delivery when activity logging fails": 665,
+ "automatic Slack registration > Slack test messages > does not restore revoked access or take another user's identity": 531,
+ "automatic Slack registration > Slack test messages > loads another workspace page instead of truncating account discovery": 806,
+ "automatic Slack registration > Slack test messages > redacts provider failures and never retries an ambiguous send": 739,
+ "automatic Slack registration > Slack test messages > rejects wrong-workspace users, disabled DMs, and membership revocation": 639,
+ "automatic Slack registration > Slack test messages > requires a private Slack challenge for an unknown account before linking and sending the test": 813,
+ "automatic Slack registration > Slack test messages > sends to the current linked user and reuses a durable result on duplicate requests": 783,
+ "automatic Slack registration > Slack test messages > settles a failed Slack account-link intent without committing identity or sending a test message": 722,
+ "automatic Slack registration > Slack test messages > signals milestone eligibility around the real Slack account link and stays quiet on reconfirmation": 807,
+ "automatic Slack registration > uploads a real 512-pixel PNG from the production renderer": 2609,
+ "automatic Slack registration > uploads preset bytes after credentials are durable, even with private avatar %s": 309,
+ "automatic Slack registration > uses an authenticated message event to complete automatic setup without a URL challenge and notifies once": 491,
+ "automatic Slack registration > vaults the bot token before %s and resumes without code exchange": 1183,
+ "automatic Slack registration > wakes verification from a signed callback with no maintenance polling": 686,
+ "automatically enables native modals for an existing Discord endpoint after %s runtime qualification": 915,
+ "automatically recovers a pre-ingress GitHub failure only through a genuine callback and normal durable workers": 620,
+ "binds Slack DM slash controls to the latest task ($control, $status, $state)": 4312,
+ "binds Slack tools to the admitted linked request, recovers its provenance and revokes retained access": 4258,
+ "blocks a committed native review response and selected files at transport after %s": 1981,
+ "Board send terminal attachment rejection > commits one content-free scoped receipt for concurrent rejection and allows only a separately keyed corrected send": 843,
+ "Board send terminal attachment rejection > does not classify missing attachments as a safe terminal rejection": 877,
+ "Board send terminal attachment rejection > keeps the exact rejected key terminal after normal owner-comment deletion and service reconstruction": 554,
+ "Board send terminal attachment rejection > returns the exact HTTP rejection with only the bound subset and replays that receipt unchanged": 742,
+ "bounds a held Slack receipt before delivering an already-ready same-endpoint final": 2418,
+ "bounds company fixture prefix collision retries without creating a partial fixture": 70,
+ "bounds failed retry notice scope discovery with retained candidates (%s)": 2564,
+ "bounds inbound notice scope discovery with denied history (%s)": 2051,
+ "bounds interaction continuation recovery reads with completed history": 2304,
+ "bounds terminal confirmation recovery reads with completed history": 2314,
+ "cancels a queued Slack slash start when channel reach is revoked before transport": 213,
+ "cancels and redacts GitHub ingress when rotation wins before replay authentication": 636,
+ "cancels staged GitHub ingress when a minimal recovery tombstone arrives before processing": 412,
+ "cancels staged GitHub ingress when same-secret pause and resume wins at the replay barrier": 401,
+ "cannot publish a runtime whose initialization is overtaken by pause": 241,
+ "canonicalizes prefixed Chat SDK channel ids onto provider inventory resources": 264,
+ "captures initial Slack communication guidance once per task, ignoring forged message configuration": 531,
+ "captures signed Slack forwarding protocol with registered owners (%s)": 1138,
+ "checks both linked sender and agent assignment grants for protected organizational defaults": 562,
+ "checks protected organizational defaults against the assignee locked at creation": 430,
+ "classifies publication $label": 3848,
+ "cleans only the GitHub final run's receipt and never re-adds it on replay": 656,
+ "clears an older multi-line Slack receipt diagnostic on terminal removal with attachment warning %s": 718,
+ "coalesces closed native progress on %s fixture %s (%s) without projecting event content": 4087,
+ "coalesces concurrent automatic pre-ingress GitHub scans into one provider redelivery": 281,
+ "coalesces one Microsoft Teams run into one provider reply": 516,
+ "coalesces one Telegram run into one provider message": 904,
+ "coalesces Telegram status and final output into one run-scoped provider message": 570,
+ "composes a parsed Discord question answer with one same-thread continuation publication": 1294,
+ "configures a customer-owned GitHub App and only auto-enables the first addressed setup repository": 651,
+ "configures a customer-owned Microsoft Teams bot with the entered credentials": 101,
+ "configures a Discord bot only after identity, intent, server, and channel permissions verify": 907,
+ "configures Telegram and preserves queued updates with webhook origin %s": 881,
+ "consumes Telegram forum-topic controls without remapping or waking the topic task": 420,
+ "continues a legacy Teams binding across a regional route change without forking its task": 499,
+ "continues an accepted GitHub task Retry from recovered saved work when its chat replay is refused after the click: %s": 59477,
+ "continues an inherited GitHub task from its recorded result instead of replaying the committed provider failure": 602,
+ "corrects Telegram DM conversation links without rewriting retained provider receipts": 355,
+ "creates a channel-purpose connection and rejects attempts to change its assigned agent": 199,
+ "deduplicates inbound events, keeps one task per thread, and enables newly discovered Slack channels": 661,
+ "deduplicates Slack file-only revisions by consumed metadata without retaining private locators": 289,
+ "defers a rate-limited Telegram receipt reaction for the full provider interval without blocking the inbound turn": 291,
+ "defers continuation dispatch until the outer response transaction commits": 1430,
+ "defers scheduled accepted-response recovery behind %s status effects": 960,
+ "defers scheduled accepted-response recovery until the persisted retry is due": 548,
+ "defers Slack file receipt recovery while the original post owns the same attempt": 584,
+ "delivers a recovered %s answer without editing another run's failure notice": 1184,
+ "delivers and replaces a Slack %s card through the publication service": 4848,
+ "delivers oversized Discord Markdown losslessly as one retryable attachment": 1241,
+ "delivers queued provider notices from commit wakes without the deferred fast path": 271,
+ "denies a pre-provider reviewed retry with %s": 6262,
+ "denies a staged failed chat retry after its original lifecycle epoch changes": 258,
+ "denies a stale automatic GitHub callback after pause and reconnect even with the still-current HMAC secret": 577,
+ "denies guest Slack stops, fences delayed events from newer runs, and cancels queued wakes": 1115,
+ "Discord automatic command registration > does not rediscover a receiver stopped by a company removal refresh": 287,
+ "Discord automatic command registration > drives receiver discovery through real configure, rotation, pause, and resume producers": 897,
+ "Discord automatic command registration > fences receiver construction across renewal: %s": 5137,
+ "Discord automatic command registration > keeps mention setup usable on registration failure and upgrades automatically when due": 415,
+ "Discord automatic command registration > learns the first configured command and cancels its deadline when the endpoint is removed": 490,
+ "Discord automatic command registration > preserves a healthy Discord Gateway when a due command refresh returns 503": 516,
+ "Discord automatic command registration > rechecks durable ownership after an earlier renewal finishes before listener start": 384,
+ "Discord automatic command registration > reconstructs an uncertain registration by GET without repeating the provider write": 391,
+ "Discord automatic command registration > restarts a receiver after token loss only after the old listener has stopped": 2357,
+ "Discord automatic command registration > retains the Gateway after an external command namespace conflict without overwriting it": 364,
+ "Discord automatic command registration > takes over a persisted foreign receiver lease at its deadline through the worker": 1365,
+ "Discord automatic command registration > updates scheduled registration after real %s": 1041,
+ "Discord native commands with durable service authority > acknowledges privately before a blocked DB wait but denies %s before commit": 1354,
+ "Discord native commands with durable service authority > answers a cold unavailable Discord command privately without leaving the interaction thinking": 632,
+ "Discord native commands with durable service authority > denies a previously accepted command after %s without another action or public receipt": 4532,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > allows a complete freshly admitted coalesced batch": 1349,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > allows an admitted source sent after close command but before close confirmation to present": 1086,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > does not cross a historical close after current %s authority changes": 12159,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > does not drop an older coalesced source while selecting the fresh batch": 988,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > does not grant presentation across a published control with %s proof": 4360,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > does not let an automatic child copy %s presentation authority": 1820,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > does not let an unseen stale native Discord %s act on reopened work": 1691,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > keeps a newly closed source internal after a still newer source reopens the thread": 972,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > keeps a source admitted before close confirmation internal after a fresh source reopens": 1323,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > orders same-millisecond Discord sources only within the same worker and process": 1014,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > publishes working and the exact fresh final after pinned close without resurrecting the old source": 1716,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > refuses %s provider chronology at intake when first ingested after close": 1957,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > wakes a post-close milestone when %s authority is restored": 20614,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > wakes a post-close milestone when interrupted inbound acceptance settles its %s receipt": 4457,
+ "Discord native commands with durable service authority > fresh-after-close publication bindings > wakes saved post-close native progress when %s authority returns": 10286,
+ "Discord native commands with durable service authority > qualifies pinned Discord close-owned progress retirement (%s)": 3200,
+ "Discord native commands with durable service authority > records DM new once and never applies its old replay to a replacement conversation": 1195,
+ "Discord native commands with durable service authority > returns private status, keeps guild new as guidance, and closes only after a real public control receipt": 953,
+ "Discord native commands with durable service authority > rolls back staged public control when the durable command receipt fails": 654,
+ "Discord native commands with durable service authority > serializes simultaneous exact close deliveries and denies a changed command or registered ID": 470,
+ "Discord native commands with durable service authority > upgrades a retained prior-copy registration after service restart before admitting close": 836,
+ "discovers a Slack connect identity without starting work or granting access": 445,
+ "dispatches and publishes a queued Slack Board send with a one-connection database pool": 504,
+ "dispatches saved input through the task Retry HTTP endpoint and survives a repeated click": 899,
+ "does not accept a contradictory HTTP%s Slack duplicate receipt": 670,
+ "does not acknowledge lifecycle callbacks whose durable write fails": 207,
+ "does not adopt historical pre-ingress GitHub failures when initializing a recovery epoch": 360,
+ "does not adopt input or deliver a pending identity-contended Retry after %s": 4614,
+ "does not bypass %s task guards from the Slack Board composer or its outbox": 1718,
+ "does not bypass %s through an exact chat retry": 1748,
+ "does not cancel an ambiguous Slack task start after credential-lease ownership is lost": 29,
+ "does not commit a Telegram close control when its provider reply is definitively rejected": 461,
+ "does not commit endpoint reach changes after credential-lease ownership is lost": 25,
+ "does not commit stale Slack task-start recovery after credential-lease ownership is lost": 67,
+ "does not complete GitHub webhook repair or overwrite a new credential lease owner after remote success": 336,
+ "does not create SDK eyes reactions for accepted GitHub requests": 418,
+ "does not deadlock reaction replay against publication link settlement": 645,
+ "does not dispatch an accepted inbound wake after destination access is revoked": 340,
+ "does not duplicate an inbound file when delivery recovery resumes after the task mutation": 660,
+ "does not enable Discord modals after a connection-lock wait with %s": 419,
+ "does not hide another endpoint behind a page of busy-bot conversation heads": 2328,
+ "does not hold another endpoint's final publication behind Slack session status transport": 885,
+ "does not lend a consumed failure lane to a recovered answer with %s": 1863,
+ "does not let a late %s milestone replace authoritative ownership attention or final status": 2607,
+ "does not let an obsolete GitHub webhook secret reopen a repository during rotation": 508,
+ "does not let an obsolete Slack signing secret verify a reconnected configuration": 364,
+ "does not let an obsolete Slack task-start failure quarantine successor credentials or reach": 272,
+ "does not let GitHub lifecycle recovery undo a webhook-secret rotation": 543,
+ "does not let ineligible pre-ingress GitHub candidates exhaust every future recovery scan": 370,
+ "does not let one blocked Slack conversation starve another outbox head": 442,
+ "does not let pause overtake a credential-fenced Discord root thread creation": 211,
+ "does not let pause return while a Slack publication is still in provider transport": 568,
+ "does not let rejected callbacks or malformed proxy hints establish healthy Slack callbacks": 283,
+ "does not let Slack reach disables return ahead of in-flight provider sends": 816,
+ "does not let stale GitHub setup-secret rotation overwrite successor credentials": 80,
+ "does not let stale Telegram removal clear successor credentials after lease reclamation": 145,
+ "does not let two live agent connections claim the same native bot or spoof its verified identity": 107,
+ "does not lock durably ineligible %s history on repeated issue milestones": 16881,
+ "does not normalize a stale Slack retry-anyway action after credential-lease ownership is lost": 144,
+ "does not recover a committed answer after %s": 5862,
+ "does not reload dormant accepted-response history for an unrelated %s wake": 2888,
+ "does not repeat a failed chat run with %s": 798,
+ "does not replace a failure while another exact-run authored publication is %s": 1018,
+ "does not replay stale native progress after a paused endpoint restarts behind an exact final": 870,
+ "does not request automatic pre-ingress GitHub recovery while the latest provider attempt is %s": 1359,
+ "does not resurrect publication ownership after waiting beyond expiry on a real lease row lock": 402,
+ "does not retain signed GitHub events outside the configured App event set": 233,
+ "does not retry a chat comment edited on the Board during the failed execution": 344,
+ "does not retry a provider-accepted publication after its exact attempt lease is lost": 316,
+ "does not retry automatic pre-ingress GitHub redelivery without a distinct failed provider attempt": 367,
+ "does not retry unrelated company fixture database errors": 12,
+ "does not rotate a GitHub webhook secret when stored credentials cannot be resolved": 219,
+ "does not treat an accepted-response endpoint scheduling hint as current authority": 381,
+ "does not wake twice when an operator replays an already admitted failed delivery": 422,
+ "drains accepted GitHub webhooks from commit wakes and durable retry deadlines": 1652,
+ "drains bounded Slack chat-origin milestones without admitting an internal issue run (%s)": 2259,
+ "drains failed chat retries from durable work and becomes idle: %s": 9549,
+ "durably admits a Telegram edit that races deferred original-message processing": 1084,
+ "durably audits a rejected Discord Gateway action before surfacing transport rejection": 136,
+ "durably deduplicates Telegram guidance webhook retries and filters disabled DMs": 252,
+ "durably recovers rate-limited Telegram menu registration and removal cleanup": 431,
+ "durably replays a reaction that arrives before its outbound link without waking the task": 1033,
+ "durably retries a signed Slack session stop and cancels its exact linked run once": 813,
+ "durably stages GitHub webhooks while credential mutation owns the processing lease": 478,
+ "durably stages GitHub webhooks within budget before cold runtime initialization": 438,
+ "edits a Slack working reply into one terminal failure reply": 389,
+ "edits Slack public progress and posts the final as a fresh reply, cancelling an older queued edit": 887,
+ "enforces Telegram group reach and privacy-mode addressing before retaining message content": 570,
+ "enforces the native progress cadence boundary and one publication per phase": 617,
+ "exhausts the existing delivery Retry budget after identity authorization without background renewal": 8200,
+ "expires Teams consent from the committed Board transfer without periodic maintenance": 1816,
+ "expires the saved identity wait without renewal when the lock is released before expiry processing: %s": 1688,
+ "fails closed for unbound rich callbacks and unknown slash commands": 207,
+ "fails closed on automatic pre-ingress GitHub recovery with %s": 734,
+ "fails closed when GitHub App permissions drift before installation recovery": 837,
+ "fails closed when the GitHub installation has not approved the App permissions": 747,
+ "fences a reclaimed Slack task admission from the obsolete worker's settlement": 362,
+ "fences message and reaction callbacks that resume after Discord Gateway takeover": 864,
+ "filters a claimed message lifecycle delivery after pause and reconnect supersede its runtime": 614,
+ "filters a durable orphan Telegram edit after the bounded reorder window": 404,
+ "filters a durably admitted GitHub callback when rotation and reconnect supersede its runtime before deferred processing": 743,
+ "filters a late duplicate instead of bypassing the bounded reaction-link lifetime": 687,
+ "filters a staged reaction when destination reach is revoked before replay": 788,
+ "filters a standalone unaddressed GitHub comment after bounded orphan retention": 568,
+ "filters an unlinked guest when the endpoint sponsor is suspended and exposes the reason and duplicate count": 204,
+ "filters unlinked people when configured, then honors a confirmed active-member identity link": 690,
+ "first-seen messages behind completed chat controls > accepts delayed %s backlog without an explicit control": 1037,
+ "first-seen messages behind completed chat controls > continues to accept authenticated Slack slash close/new on a genuinely new generation": 1485,
+ "first-seen messages behind completed chat controls > does not infer a stop from bare completed state with %s": 2160,
+ "first-seen messages behind completed chat controls > does not let an unseen old Telegram /%s close a newer generation": 1801,
+ "first-seen messages behind completed chat controls > does not lower a newer provider boundary when an older close is confirmed later": 1131,
+ "first-seen messages behind completed chat controls > does not promote metadata-only %s timestamps after a completed control": 1394,
+ "first-seen messages behind completed chat controls > does not recreate or filter a previously committed inbound link when its delivery retries after close": 821,
+ "first-seen messages behind completed chat controls > honors operator-confirmed close without inventing an outbound message receipt": 777,
+ "first-seen messages behind completed chat controls > keeps controls scoped to their endpoint, immutable thread, and company": 2023,
+ "first-seen messages behind completed chat controls > preserves a Teams close across regional routes (close after route change: %s)": 1409,
+ "first-seen messages behind completed chat controls > rechecks a close committed while old input waits before the endpoint transaction": 747,
+ "first-seen messages behind completed chat controls > refuses unseen %s input before %s (same second: %s) without creating work": 5905,
+ "first-seen messages behind completed chat controls > retains a committed control boundary through pause, redacted duplicate, and resume": 2215,
+ "first-seen messages behind completed chat controls > retains a completed trailing-newline control as a first-seen source boundary": 777,
+ "GitHub agent review workflow > acknowledges a GitHub request after a durable scheduler retry succeeds": 563,
+ "GitHub agent review workflow > adds the progress tool to an existing enabled bot without restoring disabled tools": 717,
+ "GitHub agent review workflow > admits a GitHub request explicitly addressed to both connected bots": 1632,
+ "GitHub agent review workflow > admits a newly mentioned %s edit while preserving its lifecycle record": 2519,
+ "GitHub agent review workflow > admits opt-in signed issue events without PR checks, deduplicates them and rechecks revoked policy": 1436,
+ "GitHub agent review workflow > admits signed %s mentions with automation off, deduplicates and retains manual task authority": 32572,
+ "GitHub agent review workflow > admits signed PR events into an ordinary assigned task and deduplicates delivery": 4668,
+ "GitHub agent review workflow > adopts an existing GitHub PR placeholder and retires earlier duplicate placeholders": 1431,
+ "GitHub agent review workflow > authorizes description edits as the editor, never inheriting the original author's access": 2115,
+ "GitHub agent review workflow > automatically retries a transient GitHub review publication (HTTP %s)": 8356,
+ "GitHub agent review workflow > backs off remote head polls while an unresolved GitHub review check cannot change": 1261,
+ "GitHub agent review workflow > bounds GitHub response authorization reads with large saved chat content": 1285,
+ "GitHub agent review workflow > checks live repository permission and reports a revoked installation selection": 482,
+ "GitHub agent review workflow > classifies recovered GitHub receipts without republishing or overwriting historical success": 1569,
+ "GitHub agent review workflow > closes a GitHub placeholder after a formal review (legacy receipt: %s)": 2088,
+ "GitHub agent review workflow > closes an inline-only GitHub review when an earlier working comment was deleted: %s": 2641,
+ "GitHub agent review workflow > coordinates GitHub working feedback with a %s fast response": 3090,
+ "GitHub agent review workflow > defers GitHub review check enqueue until outer commit and discards rollback": 1855,
+ "GitHub agent review workflow > does not admit an unlinked issue author through the linked webhook sender": 406,
+ "GitHub agent review workflow > does not edit a %s replacement of the bound GitHub comment": 1500,
+ "GitHub agent review workflow > does not handle a blocked new GitHub request with an older run's final reply": 1711,
+ "GitHub agent review workflow > does not invent a GitHub completion response when the agent sends no tool reply": 1196,
+ "GitHub agent review workflow > does not let a progress edit overwrite a final GitHub answer": 1182,
+ "GitHub agent review workflow > does not let an unsettled GitHub fallback block a later board message": 966,
+ "GitHub agent review workflow > does not post a GitHub working comment when the scheduler declines the request": 349,
+ "GitHub agent review workflow > does not resubmit a permanent GitHub publication rejection (HTTP %s)": 2232,
+ "GitHub agent review workflow > does not route GitHub mentions using %s identities": 2984,
+ "GitHub agent review workflow > drains more than one page of stale GitHub review projections without touching manual history": 1734,
+ "GitHub agent review workflow > finalizes every working comment in a coalesced GitHub run": 1320,
+ "GitHub agent review workflow > finds a GitHub review check after a full page of revoked work and ignores settled history": 5882,
+ "GitHub agent review workflow > finds owed terminal GitHub work beyond a full page of unrelated request history": 2087,
+ "GitHub agent review workflow > finds terminal GitHub responses by native issue binding before legacy run context": 1590,
+ "GitHub agent review workflow > finishes the same GitHub working comment after an authorized same-App reconnect (legacy: %s)": 1503,
+ "GitHub agent review workflow > GitHub failure fallback respects exact tool delivery state: %s": 9519,
+ "GitHub agent review workflow > holds stale GitHub review projection receipt repair until the outer commit and discards rollback": 2435,
+ "GitHub agent review workflow > ignores a review request addressed to an external GitHub bot": 934,
+ "GitHub agent review workflow > imports initial GitHub access for a %s App without a second picker and leaves later additions disabled": 759,
+ "GitHub agent review workflow > keeps a newer GitHub request open when its acknowledgement follows older progress": 1949,
+ "GitHub agent review workflow > keeps a report-only GitHub check neutral after a %s run without an assessment": 1792,
+ "GitHub agent review workflow > keeps an acknowledged paused GitHub request quiet until its new run finishes": 2106,
+ "GitHub agent review workflow > keeps GitHub publication I/O outside transactions and fences an expired owner's receipt": 299,
+ "GitHub agent review workflow > keeps GitHub response maintenance truthful for a new request: $scenario ($reason)": 37299,
+ "GitHub agent review workflow > keeps GitHub response ownership checks independent of large run payloads": 1244,
+ "GitHub agent review workflow > keeps GitHub review check history quiet and wakes from the real enqueue producer": 2504,
+ "GitHub agent review workflow > keeps GitHub review tools callable through a later native task gateway (board follow-up: $boardFollowUp, legacy origin: $legacyOrigin)": 5744,
+ "GitHub agent review workflow > keeps native presentation idle until its committed GitHub outcome: %s": 5610,
+ "GitHub agent review workflow > keeps partial review delivery authoritative when the head changes %s": 2115,
+ "GitHub agent review workflow > keeps per-request fallback outside the main GitHub PR review wait": 986,
+ "GitHub agent review workflow > keeps terminal GitHub responses waiting while a natively bound newer run is active": 881,
+ "GitHub agent review workflow > keeps the published review in the main GitHub PR comment when a later request has only a status: %s": 2471,
+ "GitHub agent review workflow > legacy name-only registration preserves an explicit empty repository selection": 40,
+ "GitHub agent review workflow > links a gated GitHub check to the current vanity review page before a task exists": 420,
+ "GitHub agent review workflow > lists each GitHub bot tool once when an inline thread shares the task": 617,
+ "GitHub agent review workflow > loads an old GitHub review directly without crossing endpoint or company boundaries": 1100,
+ "GitHub agent review workflow > loads only the current configured instruction skills, never provider links or another company": 2046,
+ "GitHub agent review workflow > manual App credential retry imports repositories after an interrupted vault write": 788,
+ "GitHub agent review workflow > manual App setup preserves explicitly disabled repositories and tools": 530,
+ "GitHub agent review workflow > manual App setup resumes tool initialization after an interrupted repository import": 476,
+ "GitHub agent review workflow > offers Retry for a saved automatic PR event after a successful older review": 2034,
+ "GitHub agent review workflow > parks a GitHub acknowledgement until native presentation commits": 1056,
+ "GitHub agent review workflow > parks terminal GitHub responses behind the publication owner (uncertain: %s)": 6260,
+ "GitHub agent review workflow > preserves %s policy context while omitting body content": 2076,
+ "GitHub agent review workflow > preserves a final GitHub assessment while settling an incomplete request receipt": 1678,
+ "GitHub agent review workflow > preserves an earlier final GitHub answer when a later continuation fails": 866,
+ "GitHub agent review workflow > preserves GitHub connection intent after publication HTTP %s": 2399,
+ "GitHub agent review workflow > preserves malformed GitHub authority input %j": 4427,
+ "GitHub agent review workflow > preserves newer GitHub PR progress when an older run fails": 1728,
+ "GitHub agent review workflow > preserves the %s GitHub receipt lifecycle during acknowledgement recovery": 1409,
+ "GitHub agent review workflow > preserves the published GitHub assessment during passive-response maintenance: %s": 2348,
+ "GitHub agent review workflow > publishes a local change at once and still recovers a missed head after backing off": 1243,
+ "GitHub agent review workflow > publishes a run change for a GitHub review check at once from its issue milestone": 1167,
+ "GitHub agent review workflow > publishes one score heading when a newly configured bot submits a formatted summary": 1134,
+ "GitHub agent review workflow > reactivates terminal GitHub response recovery from committed native identity": 2016,
+ "GitHub agent review workflow > reads no GitHub review check status for company-wide hints and still reads it for the check's task": 851,
+ "GitHub agent review workflow > reads pending GitHub receipts without dispatch and refuses a missing publication": 2593,
+ "GitHub agent review workflow > rechecks a GitHub fallback after waiting for the credential lane": 880,
+ "GitHub agent review workflow > rechecks another GitHub bot's mention when recovering a durable subscribed delivery": 1133,
+ "GitHub agent review workflow > rechecks assessment ownership after stale GitHub review projection selection waits for a row lock (shutdown: %s)": 3174,
+ "GitHub agent review workflow > reconciles a GitHub working comment when execution stops without a publication": 991,
+ "GitHub agent review workflow > reconciles stopped GitHub work from native identity without legacy wake fields": 776,
+ "GitHub agent review workflow > reconsiders the same GitHub reply after stopped native workspace cleanup (%s)": 27754,
+ "GitHub agent review workflow > records automatic policy skips without retaining provider content, and refuses mentions in disabled repositories": 541,
+ "GitHub agent review workflow > recovers %s after a timeout before publication staging": 2302,
+ "GitHub agent review workflow > recovers a delayed GitHub acknowledgement after a successful run without leaving it working": 829,
+ "GitHub agent review workflow > recovers a durable GitHub publication receipt ($label)": 14526,
+ "GitHub agent review workflow > recovers a missed GitHub head webhook only while a review check remains unresolved": 606,
+ "GitHub agent review workflow > recovers an acknowledgement whose local receipt was lost without posting another comment": 1269,
+ "GitHub agent review workflow > recovers an approved queued GitHub review without another approval (revoked: %s)": 3892,
+ "GitHub agent review workflow > recovers long %s requests without accepting changes hidden by the audit preview": 4406,
+ "GitHub agent review workflow > recovers lost inline and check responses without duplicate GitHub publications": 7936,
+ "GitHub agent review workflow > recovers stale GitHub review projection through %s": 3271,
+ "GitHub agent review workflow > rejects arbitrary comment IDs and edits after the initiating person is revoked": 567,
+ "GitHub agent review workflow > rejects changed requests and revoked access before repeating an unstaged review": 7429,
+ "GitHub agent review workflow > releases a GitHub acknowledgement after fast response %s without maintenance polling": 9033,
+ "GitHub agent review workflow > replies in review finding threads behind an active run > answers each finding thread in its own run instead of one unattestable batch": 3506,
+ "GitHub agent review workflow > replies in review finding threads behind an active run > still batches several replies in one finding thread into one attested run": 3755,
+ "GitHub agent review workflow > replies in review finding threads behind an active run > still denies each separated finding-thread run after the linked identity is revoked": 1638,
+ "GitHub agent review workflow > requires every essential GitHub tool and rejects Contents write during verification": 508,
+ "GitHub agent review workflow > resolves only the secrets a %s signed GitHub webhook delivery uses": 599,
+ "GitHub agent review workflow > restores terminal GitHub responses and leaves finalized history quiet": 1469,
+ "GitHub agent review workflow > resumes a delayed GitHub publication after coordinator restart without another inbound event": 3373,
+ "GitHub agent review workflow > resumes a paused GitHub request and reconciles stopped execution (prior run: %s, progress: %s)": 4580,
+ "GitHub agent review workflow > retains a provider-verified GitHub mention when its plain text uses an alias": 1168,
+ "GitHub agent review workflow > retains attachment provenance in a signed GitHub mention %s": 2294,
+ "GitHub agent review workflow > retains failed stale GitHub review projection repair across drain without passive SQL": 1638,
+ "GitHub agent review workflow > retains GitHub review check work across %s": 5816,
+ "GitHub agent review workflow > retains subscribed GitHub follow-ups with incidental human or unknown mentions: %s": 6044,
+ "GitHub agent review workflow > retains terminal GitHub response work across %s": 5540,
+ "GitHub agent review workflow > retains the saved GitHub review check retry through restart without an early provider call": 607,
+ "GitHub agent review workflow > retires a legacy coalesced GitHub placeholder before replacing its receipt": 2076,
+ "GitHub agent review workflow > retires a legacy GitHub placeholder when its acknowledgement is superseded": 2043,
+ "GitHub agent review workflow > retries a failed GitHub acknowledgement at its saved deadline": 1064,
+ "GitHub agent review workflow > retries an ambiguous GitHub edit without creating another comment": 7896,
+ "GitHub agent review workflow > returns snapshot finding categories and publishes only accepted categories": 2110,
+ "GitHub agent review workflow > reuses one main GitHub PR comment across review requests: %s": 5300,
+ "GitHub agent review workflow > scopes guest tasks and rechecks their sponsor before every bot tool": 556,
+ "GitHub agent review workflow > settles a deleted Board-origin request without starving unrelated terminal GitHub replies": 2719,
+ "GitHub agent review workflow > settles a deleted coalesced working comment without blocking the current GitHub response": 1076,
+ "GitHub agent review workflow > settles a GitHub working comment whose run finished just before another request's run started": 2007,
+ "GitHub agent review workflow > settles an older request's status without replacing a newer main GitHub PR placeholder": 1243,
+ "GitHub agent review workflow > stack exchanges a callback code only once when vault storage is interrupted": 33,
+ "GitHub agent review workflow > stack rejects forged raw gateway deliveries without changing verification or waking an agent": 865,
+ "GitHub agent review workflow > stages one assessment when the timed-out metadata read completes alongside its retry": 1768,
+ "GitHub agent review workflow > still fences a GitHub publication when reconnect races the provider read": 990,
+ "GitHub agent review workflow > stops a queued GitHub publication after %s": 3349,
+ "GitHub agent review workflow > stops GitHub acknowledgement sends at %s between provider requests": 5753,
+ "GitHub agent review workflow > stops GitHub review check HTTP after shutdown admission and recovers its durable action": 7005,
+ "GitHub agent review workflow > supersedes a late review projection after its check already rejected the old head": 1360,
+ "GitHub agent review workflow > suppresses subscribed GitHub comments for another connected bot in %s": 2892,
+ "GitHub agent review workflow > updates one GitHub acknowledgement through progress and final answer in %s": 3652,
+ "GitHub agent review workflow > uses task-bound bot tools and deterministic checks, then denies revoked people": 2500,
+ "GitHub agent review workflow > uses the manifest state parameter and rejects expired, reused, and wrong-origin registrations": 29,
+ "GitHub agent review workflow > verifies %i enabled repositories in bounded token batches": 1010,
+ "GitHub agent review workflow > verifies a repaired GitHub webhook in %s only from a %s installation delivery with %s repository": 4124,
+ "GitHub agent review workflow > waits for and wakes from the actual GitHub review check publication lease": 1696,
+ "GitHub agent review workflow > waits for the existing GitHub publication lease before a terminal response": 1722,
+ "GitHub agent review workflow > wakes a GitHub acknowledgement only after the outer fast-response transaction commits": 1718,
+ "GitHub agent review workflow > wakes a GitHub review check from committed run identity before its future head deadline": 1639,
+ "GitHub agent review workflow > wakes a paused GitHub response from %s": 9412,
+ "GitHub agent review workflow > wakes GitHub acknowledgements from a real publication lease %s": 5660,
+ "GitHub agent review workflow > wakes GitHub milestone identity restoration only after outer commit and stays quiet on reconfirmation": 439,
+ "GitHub agent review workflow > wakes milestone authority only when GitHub guest settings change, after outer commit": 477,
+ "GitHub agent review workflow > wakes stale GitHub review projection repair from real admission and leaves settled history quiet": 1438,
+ "GitHub agent review workflow > wakes stale GitHub review projection repair when cancellation commits after the review is admitted": 1457,
+ "GitHub agent review workflow > wakes terminal GitHub responses after the outer issue transaction commits": 1652,
+ "GitHub agent review workflow > wizard completes a verified connection automatically without claiming runtime execution": 587,
+ "GitHub agent review workflow > wizard configures Cloud webhook delivery without a public instance URL": 344,
+ "GitHub agent review workflow > wizard keeps localhost draft choices while waiting for Cloud enrollment": 52,
+ "GitHub agent review workflow > wizard persists a %s owner and resumes the same bound registration after a lost Cloud response and enrolled origin change": 148,
+ "GitHub agent review workflow > wizard preserves an explicit empty repository selection at revision zero": 336,
+ "GitHub agent review workflow > wizard preserves explicit review behavior and repository restrictions on existing drafts": 644,
+ "GitHub agent review workflow > wizard recovers a renamed enrolled origin only after checking bound state and Cloud authority": 31,
+ "GitHub agent review workflow > wizard repairs Cloud after manual credential recovery and secret rotation without changing App identity": 550,
+ "GitHub agent review workflow > wizard restarts only an expired unconsumed registration: %s": 302,
+ "GitHub agent review workflow > wizard resumes a %s installation callback after its signed ping": 1267,
+ "GitHub agent review workflow > wizard retains partial manifest recovery until explicit existing-App recovery succeeds": 816,
+ "GitHub agent review workflow > wizard serializes identity starts and callbacks without overwriting PKCE or handoff state": 309,
+ "GitHub repository pagination and bulk access > pages and searches 1000 repositories while toggle all changes unloaded rows atomically": 525,
+ "GitHub terminal receipt composes pinned HTTP and durable source authority (%s)": 11177,
+ "GitHub webhook recovery scheduling > joins held GitHub history at shutdown without starting another HTTP request": 395,
+ "GitHub webhook recovery scheduling > leaves %s recovery quiet": 563,
+ "GitHub webhook recovery scheduling > preempts a future GitHub recovery window when only credential references change": 1270,
+ "GitHub webhook recovery scheduling > preserves a GitHub redelivery stopped before transport (%s, prior receipt: %s, superseded: %s)": 2457,
+ "GitHub webhook recovery scheduling > reactivates recovery from real resume and cancels its deadline on pause": 3400,
+ "GitHub webhook recovery scheduling > reconstructs due GitHub recovery through %s": 1155,
+ "GitHub webhook recovery scheduling > reconstructs more than one page of GitHub recovery deadlines and dispatches fair batches of five": 1988,
+ "GitHub webhook recovery scheduling > recovers a failed GitHub deadline reconstruction after drain without passive SQL": 329,
+ "GitHub webhook recovery scheduling > rejects a %s assigned agent before GitHub recovery can become orphaned": 4131,
+ "GitHub webhook recovery scheduling > retains GitHub recovery configuration intent through nested commit and rollback": 2314,
+ "GitHub webhook recovery scheduling > waits for the saved recovery deadline and requests a genuine GitHub redelivery": 360,
+ "globally fences GitHub App identity across owner transfers without leaking another company": 398,
+ "globally fences one Microsoft Bot application across tenants": 123,
+ "hands an explicitly bound same-run image to Discord's final native file response": 1008,
+ "holds a delayed first Teams setup reply until its older root mention enables the channel": 468,
+ "holds a delayed Slack thread reply until its older root mention arrives": 414,
+ "holds a GitHub follow-up that arrives after the reorder window until its older root mention arrives": 723,
+ "holds ambiguous provider sends for an audited duplicate-risk resolution without reordering": 1100,
+ "holds an ordinary $provider Retry behind its exact remote recovery: $gate": 22963,
+ "honors a prepared Retry identity wait after %s": 9624,
+ "honors Slack slash-start rate-limit backoff without hammering transport": 345,
+ "honors Telegram flood-control timing and publishes one final message after retry": 866,
+ "ignores a signed GitHub installation before App credentials exist": 117,
+ "ignores repeated unscoped routine %s hints without rebuilding dormant accepted-response history": 788,
+ "ignores signed Slack callbacks from a different workspace before SDK dispatch": 211,
+ "immediately initializes a new GitHub recovery generation despite the previous epoch's 24-hour backoff": 545,
+ "imports every Discord upload when text files include MIME parameters": 334,
+ "ingests a pinned Telegram video-note without optional MIME metadata (%s)": 1343,
"ingests bounded Telegram photo, audio, video, and document attachments without stranding text": 305,
- "ingests only admitted public GitHub attachments after restart (HTTP $status, $count files, expired batch $expireBatch)": 3735,
- "ingests Teams files only from personal chats and keeps non-DM references link-only": 476,
- "invalidates only an exact provider-verified GitHub source edit independently of editor admission: %s": 4217,
- "isolates malformed publication preparation so later messages still deliver": 871,
- "isolates pre-run FIFO reconciliation scopes and exhausts published history": 686,
- "joins in-flight recovery before rethrowing an ordinary drain failure (%s)": 2944,
- "keeps a %s retry's queue, working, and selected final on its own provider identity": 1778,
- "keeps a board message queued separately when saved GitHub Retry resumes after cleanup": 975,
- "keeps a chat-origin run presentation internal when its external question owns the reply": 1002,
- "keeps a claimed $provider identity immutable when first setup resumes from attention": 96,
- "keeps a first-channel Teams orphan payload-free during grace and filters it without a live retry": 209,
- "keeps a refused GitHub task Retry continued when reconciliation read it before the refusal settled": 729,
- "keeps a saved HTTP Retry alive through a healthy nine-second identity transaction": 11016,
- "keeps a successful GitHub link-question continuation final internal": 1344,
- "keeps a verified Slack $kind authoritative for $contentType read and reuse after reach or identity returns": 9182,
- "keeps accepted-response work behind the outer %s boundary": 3907,
- "keeps an aged live publication owned across standby sweeps but quarantines only exact-lease orphans": 851,
- "keeps an internal Telegram run summary private and completes its progress message": 1048,
- "keeps an omitted-file warning after an early Slack receipt failure and %s retry": 851,
- "keeps bare Slack mentions subject to %s access restrictions": 496,
- "keeps case-variant Teams Entra object ids on one external principal": 390,
- "keeps current GitHub task Retry authority gated: %s": 11935,
- "keeps disabled-channel Slack %s scoped to its exact source without admitting content": 2078,
- "keeps external-continuation lifecycle comments internal and publishes only the selected final": 620,
- "keeps GitHub issues, PR conversations, and inline review threads on distinct tasks": 1157,
- "keeps intermediate %s agent comments internal and publishes only the selected final": 1405,
- "keeps lifecycle and native progress projection independent with %s": 1495,
- "keeps medium Telegram $label in one native publication": 1482,
- "keeps missing attachment storage retryable but fails invalid metadata before provider transport": 904,
- "keeps native progress behind question, final, and current reach authority on %s fixture %s (%s)": 3230,
- "keeps one durable pre-run FIFO notice across coalescing and restart, then reuses only its successor lane": 1353,
- "keeps one Paperclip account mapping for the same provider principal across endpoints": 521,
- "keeps processing audit truth and rejects stale Slack runtime callbacks across resume": 536,
- "keeps provider startup diagnostics private on %s fixture %s (%s)": 5084,
- "keeps recovered GitHub final prose and attachment navigation internal (omission: %s)": 1464,
- "keeps root-chat bookkeeping comments internal and publishes only the selected final": 505,
- "keeps saved-input Retry behind current admission gates: %s": 4526,
- "keeps separate Slack DM thread roots on separate tasks": 531,
- "keeps Slack tools callable after a native task continuation without wake JSON": 763,
- "keeps successive Telegram DM messages on one active Paperclip task": 812,
- "keeps task-bound /close active after an ambiguous publication commit until explicit confirmation": 1214,
- "keeps Teams group chat closed by default without consuming first-channel setup enablement": 340,
- "keeps Telegram start and unknown commands as terse guidance without creating work": 269,
- "keeps the admitted chat Retry queued until its source lease cleanup settles: %s": 29364,
- "keeps the pre-run FIFO sweep running when a valid owner's action has comment ids that are not uuids": 901,
- "leaves a contended accepted response retryable without reclassifying or partially publishing it (%s)": 1232,
- "leaves accepted-response presentation to its worker during periodic %s replay": 1208,
- "leaves Cloud-managed GitHub webhook recovery to the relay": 581,
- "leaves fresh-commit accepted-response presentation to the worker when periodic replay skips it": 666,
- "leaves GitHub reconnect unqualified after a %s webhook repair failure": 2321,
- "leaves saved GitHub input pending when a persisted Retry wait loses board authority": 1145,
- "links outbound Teams files instead of attempting an unsupported native upload": 1021,
- "Lossless long Board publications > keeps an ambiguous %s text part blocked across restart and retries only that part and its tail": 5059,
- "Lossless long Board publications > preserves %s code, Unicode and sanitization expansion through actual durable parts": 6688,
- "Lossless long Board publications > preserves all 100000 characters for %s %s-comment publication": 39336,
- "Lossless long Board publications > preserves an accepted native Slack response whose rendered mentions exceed the Markdown cap": 1024,
- "Lossless long Board publications > refuses malformed persisted wrappers before provider I/O %#": 1678,
- "Lossless long Board publications > retains a complete 100000-character %s response in the existing Markdown document transport": 1743,
- "maps a timestamp-bearing Slack DM reaction to the completed generation that owns its linked message": 960,
- "maps Telegram image, audio, and video output onto native media lanes": 1073,
- "marks provider setup as needing attention when Telegram webhook registration fails": 136,
- "materializes direct external-chat finals once and accepts the next turn without agent bookkeeping writes": 3749,
- "migrates Telegram basic-group reach, topic tasks and $defaultsMode defaults (existing destination: $existingDestination)": 5914,
- "mirrors Paperclip messages with user attribution and returns only the selected Slack reply": 1127,
- "never promises a queued follow-up before durable admission succeeds": 448,
- "never re-arms a failed local GitHub receipt when an automatic redelivery races the original callback": 650,
- "never replaces or resurrects an already selected answer (deleted=%s)": 1038,
- "never stores a GitHub webhook body before its signature is authenticated": 428,
- "opens and corrects an actual Discord modal through current service authority exactly once (%s concurrent answers)": 2722,
- "orders a Telegram authentication failure before concurrent reconnect": 916,
- "orders a Telegram destination failure before concurrent membership recovery": 809,
- "orders a Telegram new command before the next message from the same provider second": 1169,
- "orders rapid Discord replies by provider time before waking one task": 744,
- "orders rapid Teams follow-ups by provider time when callbacks arrive reversed": 691,
- "orders reversed GitHub edit and delete callbacks behind their durable root (root processed before replay: %s)": 6213,
- "orders Slack private-channel archive, unarchive, and rename lifecycle": 431,
- "paginates mixed activity beyond 100 rows without losing timestamp ties": 110,
- "parks pending confirmation history, passes malformed prefixes, and wakes on the outer interaction commit": 9413,
- "parks provider-confirmed Slack admissions on paused endpoints without starving active work": 665,
- "passes historical continuation prefixes and retains a response committed during dispatch": 4350,
- "persists Slack manifest draft details and the registered command, then locks them once connected": 196,
- "persists Slack membership, uninstall, and same-bot reinstall lifecycle before acknowledging": 807,
- "persists the first identity wait deadline for an older pending action": 964,
- "presents a fresh Teams personal generation after close and a regional route change": 888,
- "preserves a published %s file prefix across restart and retries only an explicitly resolved ambiguous upload": 2533,
- "preserves a recorded %s presentation instead of recovering an unsolicited answer": 1058,
- "preserves a Teams personal %s attachment omission after losing its live download closure": 787,
- "preserves an early Slack receipt failure after %s acceptance": 982,
- "preserves an explicitly disabled Slack channel after invitation and mentions (%s)": 824,
- "preserves an interrupted run's selected final when its publication is %s": 1325,
- "preserves automatic final replies for legacy GitHub connections without saved review configuration": 875,
- "preserves delivery quarantine when a slow Slack post finishes after stale recovery": 840,
- "preserves exact Discord source authority through registered Gateway %s updates": 2169,
- "preserves GitHub webhook verification through setup completion and reconnect": 1071,
- "preserves one current GitHub Retry across %s": 28187,
- "preserves ordinary legacy task Retry success without replaying its canonical request": 1959,
- "preserves running Slack tool authority after Require at-mention is enabled": 469,
- "preserves selected answer and failure lanes after deferred admission (%s)": 1901,
- "preserves selected answer and failure lanes on $provider after $status ($order)": 16188,
- "preserves Slack thread history across completion ($isDM, $threaded, $status, $state)": 2965,
- "preserves stored Telegram credentials and lifecycle when reconnect uses an unsupported webhook port": 210,
- "preserves the complete failed coalesced chat batch and rejects a dropped sibling": 599,
- "preserves the GitHub resource, task, and conversation across repository rename and transfer": 939,
- "preserves the public inventory error response for %s": 1199,
- "preserves the raw webhook request and returns the provider adapter response": 323,
- "preserves unavailable Teams $surface file references through $mode admission": 4337,
- "projects prepared but unsettled task Retry using its actual stale-claim deadline": 1361,
- "provider timestamp provenance after closed conversations > retains only raw Telegram date through the pinned parser or runtime slash path (%s)": 3271,
- "provider timestamp provenance after closed conversations > retains only the actual Teams activity clock, not SDK display fallback (%s)": 4785,
- "provides assigned Slack tools to routine tasks and can DM only their linked responsible user": 2652,
- "publishes a closed-choice question, settles its Slack card, and delivers its exact continuation response": 1766,
- "publishes a serialized Telegram run response after the preceding run completes the conversation": 1068,
- "publishes a Telegram failure for an exact confirmation continuation that stops before commenting": 1104,
- "publishes an agent's explicitly selected same-run Slack attachment after its response": 1038,
- "publishes an explicitly selected board attachment through Telegram's native file lane": 849,
- "publishes complex question sets as non-executable Paperclip fallbacks": 699,
- "publishes equal-time Slack outbox rows once in stable order across concurrent drains": 548,
- "publishes explicit Board GitHub attachment fallbacks without provider file bytes": 1922,
- "publishes fast responses to the accepted %s thread without completing its work": 1640,
- "publishes GitHub questions as link-only cards with no executable callback": 558,
- "publishes long structured Telegram Markdown as one durable lossless document": 1277,
- "publishes native progress with a typed issue binding present: %s": 1166,
- "publishes one truthful notice when a selected PNG receives a definite provider rejection": 1054,
- "publishes only a resolver-selected Telegram reply for $authorizationReason": 2598,
- "publishes only explicitly selected board attachments and stays idempotent across retries": 1293,
- "publishes only the safe projection once and locks reassignment of a bound task": 942,
- "publishes the old final before /new and suppresses later output from the completed generation": 1112,
- "quarantines a Telegram control when the reply lands but its state commit crashes": 685,
- "quarantines an active GitHub endpoint when its dedicated App drifts to multiple installations": 851,
- "quarantines an ambiguous automatic pre-ingress GitHub redelivery without blindly repeating the POST": 568,
- "quarantines Telegram maintenance success when credential-lease ownership is reclaimed": 605,
- "queues Telegram guidance on the durable publication FIFO when a task is active": 469,
- "reactivates denied retry notices when authority is restored during %s": 7685,
- "reactivates dormant accepted-response work when the live chat authority registers": 2507,
- "reactivates failed retry notices from real admission after idle through %s": 3695,
- "reactivates restored ordinary input after an earlier Retry notice wake is consumed": 551,
- "reads the entire publication batch without side effects and rejects foreign bindings": 594,
- "reauthorizes a failed chat retry against a %s provider correction before lifecycle projection": 3205,
- "reauthorizes a failed chat retry and denies %s before scheduling": 3033,
- "reauthorizes skipped native progress after %s wins before retry": 1927,
- "rechecks %s authority before queued Slack Board messages and replies": 2579,
- "rechecks a recovered response at provider dispatch after %s": 3483,
- "rechecks a Slack file receipt after a competing worker changes its retry deadline": 1017,
- "rechecks canonical content before processing an automatically recovered GitHub callback": 595,
- "rechecks linked authority and channel reach before admitting a provider-confirmed Slack task (%s)": 1052,
- "rechecks pre-provider retry evidence after staging and refuses a late execution event": 694,
- "rechecks queued Slack channel roots but exempts replies and DMs (DM=$isDM, reply=$isReply)": 1695,
- "rechecks source retirement after a queued notice's late provider receipt commits": 764,
- "rechecks the outbound link when publication commits between reaction preflight reads": 1005,
- "rechecks the recovered failure link after waiting for the provider mutation lane": 866,
- "recognizes Slack callbacks behind TLS termination without trusting forwarded headers": 283,
- "reconciled chat retry delivery ownership > does not resolve or mint a substitute owner for %s": 1432,
- "reconciled chat retry delivery ownership > keeps one exact chat delivery owner through %s reconciliation": 1644,
- "reconciled chat retry delivery ownership > retains the sole owner but refuses its deferred dispatch after %s": 1237,
- "reconciles a foreign GitHub installation lifecycle event against canonical App inventory": 583,
- "reconciles a provider-confirmed Slack starter into one task without replaying Slack": 1023,
- "reconciles concurrent opposite GitHub lifecycle callbacks from canonical App state": 1186,
- "reconciles Slack membership during configure, resume, and reconnect": 733,
- "reconciles Slack session status without replaying messages after rate limits or restart": 1033,
- "reconstructs a future accepted-response deadline without early publication": 609,
- "reconstructs inbound admission committed after the notice worker stops": 473,
- "records message edits and deletes durably and deduplicates lifecycle callbacks": 797,
- "records one content-free GitHub receipt for a disabled repository without admitting work": 579,
- "records the public Cloud proxy host for authenticated Slack callback health": 345,
- "records verified Telegram edited_message updates against the existing DM task": 858,
- "recovers a committed %s answer once without rerunning or changing review/quarantine evidence": 1606,
- "recovers a genuine unanswered %s presentation": 1503,
- "recovers a provider-confirmed Slack starter after restart but rechecks revoked reach": 309,
- "recovers accepted-response work on startup and leaves selected history quiet": 1539,
- "recovers action rows on startup, wakes after outer commit, and leaves empty queues quiet": 1672,
- "recovers an accepted Slack file receipt without uploading twice or exposing provider identifiers": 1157,
- "recovers an ambiguous Slack slash-task start only after an audited explicit retry": 561,
- "recovers an authenticated GitHub webhook after shutdown before deferred work starts": 588,
- "recovers buffered Discord messages and reactions after an unreclaimed host-pause lease expiry": 1306,
- "recovers committed terminal confirmations without polling through %s": 4354,
- "recovers stale provider sends on startup without replaying uncertain effects": 356,
- "recovers the committed authorization phase after %s without renewing its deadline": 18228,
- "recovers the exact port-bound canonical response before skipping a superseded native decision": 647,
- "recovers the same Telegram bot and historical task after token rotation": 1409,
- "recovers the visible receipt exactly once after wake acceptance contention": 7724,
- "redacts lifecycle edits and ignores reactions after channel reach is revoked": 815,
- "redacts Telegram bot tokens from provider setup errors and endpoint health": 136,
- "refills four tracked publication endpoint lanes after a scheduled budget and joins shutdown": 2443,
- "refreshes Slack tool guidance without restoring disabled catalog policies": 344,
- "refuses an otherwise eligible exact Slack retry after %s without admitting source changes": 1417,
- "refuses to create a chat endpoint while its provider experiment is off": 82,
- "refuses to enable a destination the provider no longer exposes": 322,
- "registers ordinary-notice intent before a retry-owned receipt is retired": 815,
- "registers ordinary-notice work through the retry admission transaction": 575,
- "registers provider callbacks after a live Cloud claim (ingress: %s)": 1387,
- "rehydrates a durable attachment descriptor after restart and stores the file on the issue": 450,
- "rehydrates exact chat retry authority and verifies its persisted projection after service restart": 481,
- "rehydrates one Discord Gateway owner on startup and hands off cleanly across replicas": 293,
- "rejects a recovered Slack file identity when destination reach changes during lookup": 902,
- "rejects a signed automatic GitHub callback whose original %s identity changed": 2291,
- "rejects automatic pre-ingress GitHub recovery after %s": 1418,
- "rejects caller-controlled GitHub setup secrets and arbitrary credential fields": 158,
- "rejects chat endpoints for non-invokable agents": 69,
- "rejects over-scoped GitHub Apps while tolerating unavoidable lifecycle events": 225,
- "rejects reconnect credentials for a different Slack bot without rotating secrets": 158,
- "rejects under-scoped Slack and GitHub apps before saving provider credentials": 217,
- "rejects unsupported Telegram webhook ports before provider access or secret persistence": 39,
- "releases authorization row locks before a Slack slash starter waits on provider I/O": 326,
- "releases Discord ownership when runtime construction fails": 240,
- "releases task-control authorization locks before provider I/O and quarantines stale claims": 996,
- "removes a $label endpoint without deleting its task or audit history": 1258,
- "renders safe Telegram confirmations as opaque one-use buttons and wakes the resolved task": 1587,
- "reorders rapid Slack callbacks by provider time before one conversation drain": 2018,
- "reorders reverse-arrival Telegram webhooks by provider sequence before waking the agent": 1301,
- "reorders same-second GitHub callbacks by comment id before starting the task": 1393,
- "repairs a committed reply and its recovery notice without reversing row locks": 776,
- "repairs the same GitHub App webhook on reconnect without claiming a fresh signed ping or chat round trip": 638,
- "replaces a pre-connect GitHub webhook secret without inventing a broken existing App": 302,
- "replaces Telegram queued progress with its native confirmation and rejects late working progress": 1033,
- "replaces working with one safe ownership-attention message without terminalizing the run": 1060,
- "replays a pre-link reaction into the completed DM generation that sent the message": 1102,
- "replays one pre-link Discord reaction after service reconstruction without waking the task": 889,
- "requires a successful final response for setup qualification": 1053,
- "requires at-mentions by default only in Slack channels (DM=%s)": 1108,
- "requires connection-manager authority for chat connector administration": 218,
- "requires terminal-safe native ownership for an exact chat retry: %s": 9089,
- "requires the successful setup final to consume the qualifying follow-up": 1067,
- "resamples reaction expiry after replay waits on authorization locks": 849,
- "resolves ambiguous provider effects explicitly and never lets terminal failures starve reconciliation": 857,
- "resolves an admitted GitHub private image after restart with current reach at %s": 5052,
- "resource change audit atomicity > joins concurrent identical and opposite changes into actual before/after history": 124,
- "resource change audit atomicity > keeps duplicate last-write semantics but audits only net changes": 76,
- "resource change audit atomicity > keeps the audit aligned with commit on lease loss %s": 117,
- "resource change audit atomicity > reads the actual resource state after the row lock, not a pre-lock snapshot": 123,
- "resource change audit atomicity > rolls back resource writes and suppresses events on %s failure": 103,
- "resource change audit atomicity > rolls back the entire %s resource batch without audit or events": 134,
- "resource change auditing > records exact actual changes and authenticated route actor, without resource content": 182,
- "restarts an inbound notice cursor when privacy is restored during a bounded pass": 3129,
- "restores action retry and stale-claim deadlines and parks paused or uncertain work": 583,
- "restores changed native review metadata once and signals only its committed change": 1320,
- "restores chat queue deadlines without polling blocked followers or receipt owners": 376,
- "restores inbound retry and abandoned wake deadlines and excludes paused queues": 347,
- "resumes saved GitHub input after a successful board turn: %s": 2341,
- "retains a confirmation committed while another settlement is in flight": 2156,
- "retains a contended pre-run FIFO projection and settles cancelled input without a visible notice": 447,
- "retains a failed accepted-response attempt across drain and retries after resume": 724,
- "retains a retry final when its source authorization read fails transiently": 764,
- "retains a standalone unaddressed Slack thread reply for the bounded reorder window": 792,
- "retains admission committed while an empty inbound-notice selection is returning": 570,
- "retains an accepted-response deadline that elapses during the locked recovery check": 631,
- "retains an exact chat retry through a transient scheduling failure and a lost committed receipt acknowledgement": 470,
- "retains content-free GitHub source invalidation after actor revocation and denies stale retry after regrant": 1090,
- "retains HTTP Retry under the endpoint authorization row lock: %s": 5469,
- "retains inbound notices through %s during drain without passive SQL": 1473,
- "retains one HTTP task Retry intent while saved chat identity authorization is busy": 1466,
- "retains only a source invalidation for a Telegram edit when the original actor's link is revoked": 721,
- "retains the first accepted-response wake through idle drain without passive SQL": 1478,
- "retains the service idle probe after failed $name retirement and shutdown until owner retry": 1227,
- "retires a Discord receipt after terminal failure without letting an add retry resurrect it": 790,
- "retires a pre-run FIFO notice with the exact promoted %s run even before a working update": 1624,
- "retires a stale verifying receipt before another fixture runs recovery": 938,
- "retires an already-visible pre-run FIFO notice once without publishing scheduler failures": 734,
- "retires only the exact Slack final's receipt (%s)": 2802,
- "retires only the exact Telegram final receipt through the pinned adapter (%s)": 3412,
- "retires only the removed source's pre-run FIFO notice after its surviving batch promotes": 979,
- "retires superseded credentials and clears endpoint-owned secrets on removal": 419,
- "retries a colliding company fixture prefix and creates a distinct complete fixture": 88,
- "retries a contended committed review response before transport, then publishes it and its files once": 1747,
- "retries a contended pre-run FIFO receipt before I/O and observes cancellation after the lock releases": 612,
- "retries a durable lifecycle row without treating it as a message delivery": 339,
- "retries a fully recorded never-dispatched $provider setup through HTTP: $mode": 16878,
- "retries an accepted inbound wake outbox in FIFO order without blocking other conversations": 847,
- "retries an authenticated GitHub request after isolated-directory validation failed before allocation: %s": 26911,
- "retries an exact GitHub source denied by pre-provider reviewed attestation without rewriting its failure": 801,
- "retries credential cleanup after archival made a remove partially complete": 315,
- "retries failed chat execution authorization after actual %s lock contention": 18870,
- "retries lifecycle mutation atomically and reclaims it after restart": 1216,
- "retries only the original pre-provider Telegram request after exact cleanup: $mode ($errorMessage)": 27198,
- "retries pre-transport attachment integrity failures without blocking another conversation": 1362,
- "retries saved GitHub input after a successful run without replaying that run": 1103,
- "retries saved GitHub input after an endpoint admission lock collision": 31887,
- "retries the exact failed %s chat input with a new idempotent admission": 1073,
- "retries the newer saved $provider request instead of the failed request after a budget hold: $mode": 114415,
- "retries the saved board-message turn in a connected task after environment qualification failed before provider startup": 4460,
- "retries transient GitHub endpoint lock contention before accepting a wake": 879,
- "returns a committed one-time GitHub setup secret after final lease loss when its exact ref remains current": 81,
- "returns a failed link-only interaction continuation to its GitHub thread": 970,
- "returns a retryable webhook failure when the delivery insert fails before durable receipt": 1178,
- "returns ephemeral guidance for exact Slack controls in channels without creating tasks or actions": 393,
- "returns not found rather than revealing another company's chat endpoint": 45,
- "returns two answered Slack turns to Idle in the same thread (DM=%s)": 1974,
- "reuses a pre-run FIFO notice when the successor asks before its working milestone": 622,
- "reveals a rotated GitHub secret despite a later completion-audit failure and makes retry a new rotation": 1607,
- "revokes a deleted canonical GitHub installation and recovers the same endpoint after reinstall": 3454,
- "rotates a live GitHub webhook secret fail-closed and reconnects with stored credentials": 992,
- "rotates Microsoft Teams secrets without changing bot identity and preserves the last good credentials on rejection": 474,
- "round-trips a $label question modal and durably acknowledges denied or replayed tokens": 2622,
- "safely re-arms an exact terminal GitHub delivery after an operator redelivery": 666,
- "saves Slack communication instructions with validation, company isolation, and audit attribution": 259,
- "scopes board-send idempotency to one external conversation": 1427,
- "scopes failed retry notices and retains receipt contention without retrying settled history": 917,
- "scopes Slack setup %s detection to the linked user and current test": 935,
- "scopes Telegram publication failure from $label correctly": 1631,
- "segments long Telegram output into durable FIFO publications and resumes at the failed part": 1225,
- "selects the Telegram photo boundary before provider I/O (%s)": 10607,
- "sends Telegram audio and video outside native format contracts as exact original documents": 1135,
- "separates verified webhook ingress from board identity links for every webhook provider": 256,
- "serializes a GitHub secret rotation racing reconnect and preserves the rotated secret": 1166,
- "serializes and caps an agent run's selected Discord files before final handoff": 2605,
- "serializes concurrent GitHub setup-secret requests without losing stored credentials": 1597,
- "serializes Discord Gateway health events and recovers transient guild outages": 264,
- "serializes duplicate Slack admission with an owned provider-reply settlement: %s": 1324,
- "serializes recovered Telegram maintenance behind credential rotation": 443,
- "serializes setup activation ahead of a concurrent reconnect without overwriting the newer runtime": 873,
- "settles a refused GitHub task Retry by its own gates: %s": 4098,
- "settles a retried Slack receipt reaction when the provider reports already_reacted": 480,
- "settles a shared-endpoint accepted-response backlog without retrying its own locks": 2836,
- "settles an interrupted native run once without overwriting its successor": 996,
- "settles GitHub self-update receipts without orphan retries for %s": 5038,
- "settles rejected pre-acceptance intent and permits a later authorized external message": 485,
- "settles responses on different endpoints for one principal without retrying its own identity lock: %s": 4547,
- "singleflights concurrent cold GitHub runtime initialization": 678,
- "skips a locked native progress %s while unrelated final and question publications deliver": 5320,
- "skips a pre-run FIFO candidate with a noncanonical coalesced owner id (%s)": 1300,
- "skips paused outbox heads and resumes promptly without bypassing provider backoff": 1009,
- "sleeps behind an unresolved Slack tool send and wakes when its receipt settles": 453,
- "snapshots channel workspace defaults on new tasks and preserves them on replies": 777,
- "starts real Slack conversations from bare mentions and accepts same-thread follow-ups": 1581,
- "stops a conversation drain after its lease renewal fails": 560,
- "stops a Discord Gateway on lease loss and lets a standby take over": 649,
- "stops automatic pre-ingress GitHub pagination at the epoch floor without adopting older failures": 485,
- "stops starting continuation publications during %s": 4731,
- "streams long output in bounded chunks after applying the safe external projection": 734,
- "supplements Chat SDK with verified GitHub comment edit and delete lifecycle events": 2034,
- "supplements verified Teams edit, soft-delete, and restore activities against the existing task": 1351,
- "suppresses a pending pre-run FIFO notice after %s wins": 4422,
- "suppresses a queued provider reply when destination reach is revoked before transport": 352,
- "suppresses automatic pre-ingress GitHub redelivery for any existing local receipt (%s)": 2569,
- "suppresses persisted GitHub queued, progress and completion comments on replay": 696,
- "suppresses queued and working placeholders that terminalize while paused": 1090,
- "surfaces an attachment-only Telegram ingestion failure without waking the agent": 381,
- "Teams authenticated inline-picture intake > ingests an actual pinned-parser %s picture into its exact admitted turn (%s)": 3987,
- "Teams current file authority and composed Board transfer > deduplicates the same actual acceptance activity before and after file delivery": 1406,
- "Teams current file authority and composed Board transfer > durably accepts a callback inside the consent POST before the native receipt returns": 1272,
- "Teams current file authority and composed Board transfer > freezes the original recipient at Board Send and publishes only after consent and exact-byte PUT": 2219,
- "Teams current file authority and composed Board transfer > keeps the task-link fallback with no native file intent for %s": 2952,
- "Teams current file authority and composed Board transfer > offers only exact conflict cancellation after valid Teams consent receipts disagree": 1039,
- "Teams current file authority and composed Board transfer > rechecks revoked %s authority before acceptance and before PUT": 6295,
- "Teams current file authority and composed Board transfer > rejects a retained old-runtime consent callback after normal pause and resume": 1038,
- "Teams current file authority and composed Board transfer > retries only fileInfo after a confirmed PUT and an explicitly resolved missing fileInfo receipt": 1737,
- "Teams current file authority and composed Board transfer > stages native Board file consent on the first send from a cold reconstructed service": 1086,
- "Teams exact self-unknown source continuation > accepts the exact native file after a lost consent-card receipt without reposting": 1468,
- "Teams exact self-unknown source continuation > does not exempt other unknown effects or changed native authority: %s": 8488,
- "Teams exact self-unknown source continuation > retries only the confirmed native file-info stage with an exact audited phase/version, never its PUT": 2191,
- "Teams file receipt API projection > does not consume a worker slot for a pending Teams transfer on a %s endpoint": 1968,
- "Teams file receipt API projection > does not treat a caller-only transfer hint as ordinary delivery authority": 134,
- "Teams file receipt API projection > generic publication worker ignores an existing %s Teams transfer on an active endpoint": 1660,
- "Teams file receipt API projection > keeps a cancelled head locked while a consent-card receipt waits for the file tail": 125,
- "Teams file receipt API projection > never projects a transfer from another conversation into Activity": 113,
- "Teams file receipt API projection > offers only the exact %s stage actions": 453,
- "Teams file receipt API projection > preserves all-published legacy batches without transfer metadata and excludes other comments": 113,
- "Teams file receipt API projection > projects mixed delivered, declined, expired and cancelled file outcomes without making GET effects": 111,
- "Teams file receipt API projection > refuses generic replay of a failed transfer without another provider attempt": 114,
- "Teams file receipt API projection > refuses generic resolution with %s transfer preconditions without changing receipts": 654,
- "Teams file receipt API projection > refuses terminal success or actions for %s": 496,
- "Teams file receipt API projection > requires exact endpoint, conversation, publication and Board company scope": 223,
- "Teams inline picture publication > keeps $surface picture delivery truthful for $outcome": 9370,
- "Teams personal-recipient admission and durable restart > does not invent personal recipient proof when an AAD-only legacy delivery resumes without original runtime evidence": 309,
- "Teams personal-recipient admission and durable restart > preserves actual-parser personal recipient proof across database admission and reconstructed restart": 398,
- "Teams personal-recipient admission and durable restart > redacts a rejected personal destination instead of persisting its derived recipient proof": 176,
- "Telegram callback-only native private responses > cancels a queued private callback notice after %s changes without public fallback": 1223,
- "Telegram callback-only native private responses > does not rebind a retained callback denial to another %s": 754,
- "Telegram callback-only native private responses > does not refresh the callback deadline after service runtime-readiness waits": 191,
- "Telegram callback-only native private responses > does not treat another actor's private chat as a reply destination": 207,
- "Telegram callback-only native private responses > preserves an authenticated exact-actor DM denial without native ephemeral or public fallback": 246,
- "Telegram callback-only native private responses > quarantines missing private acceptance receipts and never retries them publicly": 275,
- "Telegram callback-only native private responses > records an authenticated denial before its recipient-bound send and deduplicates the exact callback": 277,
- "Telegram callback-only native private responses > retains an exact-actor DM proof across restart (expired=%s)": 447,
- "Telegram callback-only native private responses > retains the original private callback deadline across restart (expired=%s)": 533,
- "Telegram close-owned progress retirement > does not borrow an unrelated run's interaction as progress-consumer evidence": 956,
- "Telegram close-owned progress retirement > does not guess a close edit for %s": 5402,
- "Telegram close-owned progress retirement > does not reclaim a progress lane consumed by a $state $kind prompt": 3594,
- "Telegram close-owned progress retirement > keeps close uncommitted after %s of its retirement edit": 2207,
- "Telegram close-owned progress retirement > preserves an attempted unknown %s after public operator cancellation": 1994,
- "Telegram close-owned progress retirement > preserves an authored final that wins while close is admitted": 943,
- "Telegram close-owned progress retirement > qualifies $provider close-owned progress retirement ($mode)": 7384,
- "Telegram close-owned progress retirement > retires a status-interleaved working lane": 891,
- "Telegram close-owned progress retirement > retires one working lane on close without cancelling the run or publishing its late final": 1051,
- "Telegram close-owned progress retirement > treats a $state consumer with $attempts attempts conservatively": 1799,
- "Telegram current rich inbound compatibility > keeps rich files and omissions scoped through lifecycle recovery (%s)": 3025,
- "Telegram current rich inbound compatibility > retains current rich content through the pinned parser and service (%s)": 971,
- "Telegram durable private draft Stop > automatically repairs an existing %s subscription after restart without dropping updates": 6911,
- "Telegram durable private draft Stop > commits chat connection credentials atomically before waking maintenance": 930,
- "Telegram durable private draft Stop > does not confirm a subscription from non-boolean ok=%s": 1869,
- "Telegram durable private draft Stop > does not reuse an old draft ID after endpoint cascade deletion and same-bot re-binding": 1875,
- "Telegram durable private draft Stop > does not withdraw an unowned or already-claimed final (%s)": 4282,
- "Telegram durable private draft Stop > durably stops during the first draft RPC without cancelling a run, and never reuses its ID after restart": 1147,
- "Telegram durable private draft Stop > keeps ordinary output when automatic subscription repair is unsafe: %s": 11506,
- "Telegram durable private draft Stop > parks pending Telegram subscription repair while its %s is inactive": 4330,
- "Telegram durable private draft Stop > preserves an uncertain final after restart and a late Stop without automatic replay": 877,
- "Telegram durable private draft Stop > recovers Telegram maintenance from committed work and becomes SQL quiet: %s": 11961,
- "Telegram durable private draft Stop > refuses a retained Stop and later final after current %s authority changes": 3535,
- "Telegram durable private draft Stop > retries an unknown subscription mutation after restart using freshly observed options, not a recovered confirmation flag": 1378,
- "Telegram durable private draft Stop > returns 503 on failed Stop commit and accepts the exact verified retry before final send": 953,
- "Telegram durable private draft Stop > sends ordinary complete output without Stop when subscription proof is %s": 3593,
- "Telegram retained zero-message admission > recovers only ordinary source identity ($state / command=$command / $source)": 4134,
- "Telegram source-bound optional media > imports exact permitted bytes or gives accurate recovery advice (%s)": 3629,
- "Telegram source-bound optional media > retains exact durable media authority across restart (%s)": 1133,
- "tracks Slack callback surfaces independently and reports public URL drift": 311,
- "tracks the actual Board Teams claim and retires recovery when its receipt commits": 2107,
- "treats D-prefixed Slack status, new, and close callbacks as DM task controls even when the SDK flag is false": 1178,
- "turns a Slack slash command into a new native thread and one Paperclip task": 404,
- "updates only the linked same-run %s failure notice when recovering an accepted response": 1446,
- "uses a live Cloud claim after chat service startup (ingress: %s)": 265,
- "uses compact single-use Telegram action tokens and filters forged, expired, and oversized callbacks": 1447,
- "uses GitHub numeric user ids for linked authority and rechecks membership on every follow-up": 683,
- "uses the Teams group-chat toggle without weakening channel resource gates": 802,
- "wakes a failed retry notice only after %s cancellation commits": 1359,
- "wakes a not-started retry notice after resumed admission is denied": 932,
- "wakes a saved inbound notice when %s restores privacy access": 1686,
- "wakes a visible pre-run FIFO retirement only after %s commits": 5577,
- "wakes accepted-response recovery from the real coordinator retry release": 793,
- "wakes accepted-response recovery when its authenticated accepted-result journal arrives late": 2568,
- "wakes an existing chat milestone when ordinary ingress reactivates its conversation": 1417,
- "wakes chat dispatch after commit and refills free endpoint slots without the maintenance loop": 1895,
- "wakes dormant accepted-response history from the real company membership restoration owner": 2573,
- "wakes dormant accepted-response recovery after agent resume": 2831,
- "wakes inbound notice retirement from a signed Slack Stop without a maintenance scan": 901,
- "wakes interaction continuations from a committed response through %s": 12965,
- "wakes parked Slack %s actions after board %s commits": 7361,
- "wakes pre-run FIFO notices from real admission after quiet and becomes quiet again": 687,
- "wakes saved native progress when %s restores eligibility": 5559,
- "wakes Slack session sync from publication commit and leaves settled action queues quiet": 1699,
- "withholds a committed one-time GitHub setup secret after final lease loss when its ref was superseded": 70,
- "yields a %s inbound notice backlog between bounded passes without losing work": 6983
+ "ingests only admitted public GitHub attachments after restart (HTTP $status, $count files, expired batch $expireBatch)": 3661,
+ "ingests Teams files only from personal chats and keeps non-DM references link-only": 391,
+ "invalidates only an exact provider-verified GitHub source edit independently of editor admission: %s": 3110,
+ "isolates malformed publication preparation so later messages still deliver": 979,
+ "isolates pre-run FIFO reconciliation scopes and exhausts published history": 529,
+ "joins in-flight recovery before rethrowing an ordinary drain failure (%s)": 1582,
+ "keeps a %s retry's queue and working progress on its own provider identity and delivers its selected final": 2184,
+ "keeps a board message queued separately when saved GitHub Retry resumes after cleanup": 793,
+ "keeps a chat-origin run presentation internal when its external question owns the reply": 1078,
+ "keeps a claimed $provider identity immutable when first setup resumes from attention": 51,
+ "keeps a first-channel Teams orphan payload-free during grace and filters it without a live retry": 178,
+ "keeps a refused GitHub task Retry continued when reconciliation read it before the refusal settled": 526,
+ "keeps a saved HTTP Retry alive through a healthy nine-second identity transaction": 10314,
+ "keeps a separate FIFO answer visible while removed-input cleanup edits its queued notice": 1060,
+ "keeps a successful GitHub link-question continuation final internal": 769,
+ "keeps a verified Slack $kind authoritative for $contentType read and reuse after reach or identity returns": 7239,
+ "keeps accepted-response work behind the outer %s boundary": 3751,
+ "keeps an aged live publication owned across standby sweeps but quarantines only exact-lease orphans": 697,
+ "keeps an internal Telegram run summary private and completes its progress message": 711,
+ "keeps an omitted-file warning after an early Slack receipt failure and %s retry": 763,
+ "keeps bare Slack mentions subject to %s access restrictions": 326,
+ "keeps case-variant Teams Entra object ids on one external principal": 345,
+ "keeps current GitHub task Retry authority gated: %s": 8183,
+ "keeps disabled-channel Slack %s scoped to its exact source without admitting content": 1819,
+ "keeps external-continuation lifecycle comments internal and publishes only the selected final": 476,
+ "keeps GitHub issues, PR conversations, and inline review threads on distinct tasks": 853,
+ "keeps intermediate %s agent comments internal and publishes only the selected final": 1318,
+ "keeps lifecycle and native progress projection independent with %s": 1577,
+ "keeps medium Telegram $label in one native publication": 1109,
+ "keeps missing attachment storage retryable but fails invalid metadata before provider transport": 820,
+ "keeps native progress behind question, final, and current reach authority on %s fixture %s (%s)": 4897,
+ "keeps one durable pre-run FIFO notice across coalescing and restart, then reuses only its successor lane": 2176,
+ "keeps one Paperclip account mapping for the same provider principal across endpoints": 371,
+ "keeps one Slack progress message and a separate final response despite an interleaved task control": 662,
+ "keeps processing audit truth and rejects stale Slack runtime callbacks across resume": 362,
+ "keeps provider startup diagnostics private on %s fixture %s (%s)": 3392,
+ "keeps recovered GitHub final prose and attachment navigation internal (omission: %s)": 1148,
+ "keeps root-chat bookkeeping comments internal and publishes only the selected final": 362,
+ "keeps saved-input Retry behind current admission gates: %s": 3282,
+ "keeps separate Slack DM thread roots on separate tasks": 430,
+ "keeps Slack tools callable after a native task continuation without wake JSON": 517,
+ "keeps successive Telegram DM messages on one active Paperclip task": 586,
+ "keeps task-bound /close active after an ambiguous publication commit until explicit confirmation": 671,
+ "keeps Teams group chat closed by default without consuming first-channel setup enablement": 280,
+ "keeps Telegram start and unknown commands as terse guidance without creating work": 157,
+ "keeps the admitted chat Retry queued until its source lease cleanup settles: %s": 25477,
+ "keeps the pre-run FIFO sweep running when a valid owner's action has comment ids that are not uuids": 410,
+ "leaves a contended accepted response retryable without reclassifying or partially publishing it (%s)": 934,
+ "leaves accepted-response presentation to its worker during periodic %s replay": 945,
+ "leaves Cloud-managed GitHub webhook recovery to the relay": 333,
+ "leaves fresh-commit accepted-response presentation to the worker when periodic replay skips it": 446,
+ "leaves GitHub reconnect unqualified after a %s webhook repair failure": 1574,
+ "leaves saved GitHub input pending when a persisted Retry wait loses board authority": 849,
+ "links outbound Teams files instead of attempting an unsupported native upload": 616,
+ "Lossless long Board publications > keeps an ambiguous %s text part blocked across restart and retries only that part and its tail": 3766,
+ "Lossless long Board publications > preserves %s code, Unicode and sanitization expansion through actual durable parts": 4766,
+ "Lossless long Board publications > preserves all 100000 characters for %s %s-comment publication": 8009,
+ "Lossless long Board publications > preserves an accepted native Slack response whose rendered mentions exceed the Markdown cap": 581,
+ "Lossless long Board publications > refuses malformed persisted wrappers before provider I/O %#": 1238,
+ "Lossless long Board publications > retains a complete 100000-character %s response in the existing Markdown document transport": 1242,
+ "maps a timestamp-bearing Slack DM reaction to the completed generation that owns its linked message": 828,
+ "maps Telegram image, audio, and video output onto native media lanes": 652,
+ "marks provider setup as needing attention when Telegram webhook registration fails": 67,
+ "materializes direct external-chat finals once and accepts the next turn without agent bookkeeping writes": 3577,
+ "migrates Telegram basic-group reach, topic tasks and $defaultsMode defaults (existing destination: $existingDestination)": 5150,
+ "mirrors Paperclip messages with user attribution and returns only the selected Slack reply": 1081,
+ "never promises a queued follow-up before durable admission succeeds": 424,
+ "never re-arms a failed local GitHub receipt when an automatic redelivery races the original callback": 385,
+ "never replaces or resurrects an already selected answer (deleted=%s)": 964,
+ "never stores a GitHub webhook body before its signature is authenticated": 367,
+ "opens and corrects an actual Discord modal through current service authority exactly once (%s concurrent answers)": 1649,
+ "orders a Telegram authentication failure before concurrent reconnect": 527,
+ "orders a Telegram destination failure before concurrent membership recovery": 536,
+ "orders a Telegram new command before the next message from the same provider second": 1086,
+ "orders rapid Discord replies by provider time before waking one task": 484,
+ "orders rapid Teams follow-ups by provider time when callbacks arrive reversed": 518,
+ "orders reversed GitHub edit and delete callbacks behind their durable root (root processed before replay: %s)": 5757,
+ "orders Slack private-channel archive, unarchive, and rename lifecycle": 237,
+ "paginates mixed activity beyond 100 rows without losing timestamp ties": 79,
+ "parks pending confirmation history, passes malformed prefixes, and wakes on the outer interaction commit": 8904,
+ "parks provider-confirmed Slack admissions on paused endpoints without starving active work": 415,
+ "passes historical continuation prefixes and retains a response committed during dispatch": 3786,
+ "persists Slack manifest draft details and the registered command, then locks them once connected": 160,
+ "persists Slack membership, uninstall, and same-bot reinstall lifecycle before acknowledging": 703,
+ "persists the first identity wait deadline for an older pending action": 741,
+ "presents a fresh Teams personal generation after close and a regional route change": 822,
+ "preserves a published %s file prefix across restart and retries only an explicitly resolved ambiguous upload": 1989,
+ "preserves a recorded %s presentation instead of recovering an unsolicited answer": 668,
+ "preserves a Teams personal %s attachment omission after losing its live download closure": 574,
+ "preserves an early Slack receipt failure after %s acceptance": 679,
+ "preserves an explicitly disabled Slack channel after invitation and mentions (%s)": 541,
+ "preserves an interrupted run's selected final when its publication is %s": 867,
+ "preserves automatic final replies for legacy GitHub connections without saved review configuration": 622,
+ "preserves delivery quarantine when a slow Slack post finishes after stale recovery": 602,
+ "preserves exact Discord source authority through registered Gateway %s updates": 1567,
+ "preserves GitHub webhook verification through setup completion and reconnect": 962,
+ "preserves one current GitHub Retry across %s": 26093,
+ "preserves ordinary legacy task Retry success without replaying its canonical request": 1954,
+ "preserves running Slack tool authority after Require at-mention is enabled": 411,
+ "preserves selected answer and failure lanes after deferred admission (%s)": 1363,
+ "preserves selected answer and failure lanes on $provider after $status ($order)": 11962,
+ "preserves Slack thread history across completion ($isDM, $threaded, $status, $state)": 1988,
+ "preserves stored Telegram credentials and lifecycle when reconnect uses an unsupported webhook port": 161,
+ "preserves the complete failed coalesced chat batch and rejects a dropped sibling": 545,
+ "preserves the GitHub resource, task, and conversation across repository rename and transfer": 672,
+ "preserves the public inventory error response for %s": 814,
+ "preserves the raw webhook request and returns the provider adapter response": 178,
+ "preserves unavailable Teams $surface file references through $mode admission": 3429,
+ "projects prepared but unsettled task Retry using its actual stale-claim deadline": 1211,
+ "provider timestamp provenance after closed conversations > retains only raw Telegram date through the pinned parser or runtime slash path (%s)": 3508,
+ "provider timestamp provenance after closed conversations > retains only the actual Teams activity clock, not SDK display fallback (%s)": 3324,
+ "provides assigned Slack tools to routine tasks and can DM only their linked responsible user": 1666,
+ "publishes a closed-choice question, settles its Slack card, and delivers its exact continuation response": 1917,
+ "publishes a serialized Telegram run response after the preceding run completes the conversation": 1176,
+ "publishes a Telegram failure for an exact confirmation continuation that stops before commenting": 964,
+ "publishes an agent's explicitly selected same-run Slack attachment after its response": 940,
+ "publishes an explicitly selected board attachment through Telegram's native file lane": 557,
+ "publishes complex question sets as non-executable Paperclip fallbacks": 651,
+ "publishes equal-time Slack outbox rows once in stable order across concurrent drains": 431,
+ "publishes explicit Board GitHub attachment fallbacks without provider file bytes": 1779,
+ "publishes fast responses to the accepted %s thread without completing its work": 1732,
+ "publishes GitHub questions as link-only cards with no executable callback": 546,
+ "publishes long structured Telegram Markdown as one durable lossless document": 850,
+ "publishes native progress with a typed issue binding present: %s": 860,
+ "publishes one truthful notice when a selected PNG receives a definite provider rejection": 1130,
+ "publishes only a resolver-selected Telegram reply for $authorizationReason": 2015,
+ "publishes only explicitly selected board attachments and stays idempotent across retries": 827,
+ "publishes only the safe projection once and locks reassignment of a bound task": 848,
+ "publishes the old final before /new and suppresses later output from the completed generation": 1071,
+ "quarantines a Telegram control when the reply lands but its state commit crashes": 729,
+ "quarantines an active GitHub endpoint when its dedicated App drifts to multiple installations": 520,
+ "quarantines an ambiguous automatic pre-ingress GitHub redelivery without blindly repeating the POST": 354,
+ "quarantines Telegram maintenance success when credential-lease ownership is reclaimed": 510,
+ "queues Telegram guidance on the durable publication FIFO when a task is active": 360,
+ "reactivates denied retry notices when authority is restored during %s": 6377,
+ "reactivates dormant accepted-response work when the live chat authority registers": 2389,
+ "reactivates failed retry notices from real admission after idle through %s": 3676,
+ "reactivates restored ordinary input after an earlier Retry notice wake is consumed": 406,
+ "reads the entire publication batch without side effects and rejects foreign bindings": 347,
+ "reauthorizes a failed chat retry against a %s provider correction before lifecycle projection": 2885,
+ "reauthorizes a failed chat retry and denies %s before scheduling": 2983,
+ "reauthorizes skipped native progress after %s wins before retry": 1556,
+ "rechecks %s authority before queued Slack Board messages and replies": 2445,
+ "rechecks a recovered response at provider dispatch after %s": 2594,
+ "rechecks a Slack file receipt after a competing worker changes its retry deadline": 694,
+ "rechecks canonical content before processing an automatically recovered GitHub callback": 406,
+ "rechecks linked authority and channel reach before admitting a provider-confirmed Slack task (%s)": 512,
+ "rechecks pre-provider retry evidence after staging and refuses a late execution event": 594,
+ "rechecks queued Slack channel roots but exempts replies and DMs (DM=$isDM, reply=$isReply)": 970,
+ "rechecks source retirement after a queued notice's late provider receipt commits": 772,
+ "rechecks the outbound link when publication commits between reaction preflight reads": 874,
+ "rechecks the recovered failure link after waiting for the provider mutation lane": 544,
+ "recognizes Slack callbacks behind TLS termination without trusting forwarded headers": 168,
+ "reconciled chat retry delivery ownership > does not resolve or mint a substitute owner for %s": 1062,
+ "reconciled chat retry delivery ownership > keeps one exact chat delivery owner through %s reconciliation": 1325,
+ "reconciled chat retry delivery ownership > retains the sole owner but refuses its deferred dispatch after %s": 1095,
+ "reconciles a foreign GitHub installation lifecycle event against canonical App inventory": 425,
+ "reconciles a provider-confirmed Slack starter into one task without replaying Slack": 975,
+ "reconciles concurrent opposite GitHub lifecycle callbacks from canonical App state": 667,
+ "reconciles Slack membership during configure, resume, and reconnect": 399,
+ "reconciles Slack session status without replaying messages after rate limits or restart": 968,
+ "reconstructs a future accepted-response deadline without early publication": 434,
+ "reconstructs inbound admission committed after the notice worker stops": 495,
+ "records message edits and deletes durably and deduplicates lifecycle callbacks": 557,
+ "records one content-free GitHub receipt for a disabled repository without admitting work": 393,
+ "records the public Cloud proxy host for authenticated Slack callback health": 199,
+ "records verified Telegram edited_message updates against the existing DM task": 738,
+ "recovers a committed %s answer once without rerunning or changing review/quarantine evidence": 1266,
+ "recovers a genuine unanswered %s presentation": 1374,
+ "recovers a provider-confirmed Slack starter after restart but rechecks revoked reach": 201,
+ "recovers accepted-response work on startup and leaves selected history quiet": 1473,
+ "recovers action rows on startup, wakes after outer commit, and leaves empty queues quiet": 1499,
+ "recovers an accepted Slack file receipt without uploading twice or exposing provider identifiers": 992,
+ "recovers an ambiguous Slack slash-task start only after an audited explicit retry": 457,
+ "recovers an authenticated GitHub webhook after shutdown before deferred work starts": 431,
+ "recovers buffered Discord messages and reactions after an unreclaimed host-pause lease expiry": 1235,
+ "recovers committed terminal confirmations without polling through %s": 4461,
+ "recovers stale provider sends on startup without replaying uncertain effects": 214,
+ "recovers the committed authorization phase after %s without renewing its deadline": 17664,
+ "recovers the exact port-bound canonical response before skipping a superseded native decision": 570,
+ "recovers the same Telegram bot and historical task after token rotation": 1234,
+ "recovers the visible receipt exactly once after wake acceptance contention": 7621,
+ "redacts lifecycle edits and ignores reactions after channel reach is revoked": 647,
+ "redacts Telegram bot tokens from provider setup errors and endpoint health": 82,
+ "refills four tracked publication endpoint lanes after a scheduled budget and joins shutdown": 1787,
+ "refreshes Slack tool guidance without restoring disabled catalog policies": 255,
+ "refuses an otherwise eligible exact Slack retry after %s without admitting source changes": 897,
+ "refuses to create a chat endpoint while its provider experiment is off": 104,
+ "refuses to enable a destination the provider no longer exposes": 137,
+ "registers ordinary-notice intent before a retry-owned receipt is retired": 575,
+ "registers ordinary-notice work through the retry admission transaction": 489,
+ "registers provider callbacks after a live Cloud claim (ingress: %s)": 982,
+ "rehydrates a durable attachment descriptor after restart and stores the file on the issue": 448,
+ "rehydrates exact chat retry authority and verifies its persisted projection after service restart": 514,
+ "rehydrates one Discord Gateway owner on startup and hands off cleanly across replicas": 188,
+ "rejects a recovered Slack file identity when destination reach changes during lookup": 533,
+ "rejects a signed automatic GitHub callback whose original %s identity changed": 1470,
+ "rejects automatic pre-ingress GitHub recovery after %s": 948,
+ "rejects caller-controlled GitHub setup secrets and arbitrary credential fields": 379,
+ "rejects chat endpoints for non-invokable agents": 46,
+ "rejects over-scoped GitHub Apps while tolerating unavoidable lifecycle events": 98,
+ "rejects reconnect credentials for a different Slack bot without rotating secrets": 119,
+ "rejects under-scoped Slack and GitHub apps before saving provider credentials": 182,
+ "rejects unsupported Telegram webhook ports before provider access or secret persistence": 24,
+ "releases authorization row locks before a Slack slash starter waits on provider I/O": 278,
+ "releases Discord ownership when runtime construction fails": 178,
+ "releases task-control authorization locks before provider I/O and quarantines stale claims": 777,
+ "removes a $label endpoint without deleting its task or audit history": 1108,
+ "renders safe Telegram confirmations as opaque one-use buttons and wakes the resolved task": 1274,
+ "reorders rapid Slack callbacks by provider time before one conversation drain": 1767,
+ "reorders reverse-arrival Telegram webhooks by provider sequence before waking the agent": 1099,
+ "reorders same-second GitHub callbacks by comment id before starting the task": 1357,
+ "repairs a committed reply and its recovery notice without reversing row locks": 482,
+ "repairs the same GitHub App webhook on reconnect without claiming a fresh signed ping or chat round trip": 475,
+ "replaces a pre-connect GitHub webhook secret without inventing a broken existing App": 166,
+ "replaces Telegram queued progress with its native confirmation and rejects late working progress": 777,
+ "replaces working with one safe ownership-attention message without terminalizing the run": 899,
+ "replays a pre-link reaction into the completed DM generation that sent the message": 911,
+ "replays one pre-link Discord reaction after service reconstruction without waking the task": 765,
+ "requires a successful final response for setup qualification": 777,
+ "requires at-mentions by default only in Slack channels (DM=%s)": 1111,
+ "requires connection-manager authority for chat connector administration": 238,
+ "requires terminal-safe native ownership for an exact chat retry: %s": 7495,
+ "requires the successful setup final to consume the qualifying follow-up": 747,
+ "resamples reaction expiry after replay waits on authorization locks": 698,
+ "resolves ambiguous provider effects explicitly and never lets terminal failures starve reconciliation": 758,
+ "resolves an admitted GitHub private image after restart with current reach at %s": 3803,
+ "resource change audit atomicity > joins concurrent identical and opposite changes into actual before/after history": 107,
+ "resource change audit atomicity > keeps duplicate last-write semantics but audits only net changes": 37,
+ "resource change audit atomicity > keeps the audit aligned with commit on lease loss %s": 75,
+ "resource change audit atomicity > reads the actual resource state after the row lock, not a pre-lock snapshot": 100,
+ "resource change audit atomicity > rolls back resource writes and suppresses events on %s failure": 63,
+ "resource change audit atomicity > rolls back the entire %s resource batch without audit or events": 96,
+ "resource change auditing > records exact actual changes and authenticated route actor, without resource content": 135,
+ "restarts an inbound notice cursor when privacy is restored during a bounded pass": 2409,
+ "restores action retry and stale-claim deadlines and parks paused or uncertain work": 363,
+ "restores changed native review metadata once and signals only its committed change": 817,
+ "restores chat queue deadlines without polling blocked followers or receipt owners": 257,
+ "restores inbound retry and abandoned wake deadlines and excludes paused queues": 216,
+ "resumes saved GitHub input after a successful board turn: %s": 1481,
+ "retains a confirmation committed while another settlement is in flight": 1699,
+ "retains a contended pre-run FIFO projection and settles cancelled input without a visible notice": 347,
+ "retains a failed accepted-response attempt across drain and retries after resume": 445,
+ "retains a retry final when its source authorization read fails transiently": 534,
+ "retains a standalone unaddressed Slack thread reply for the bounded reorder window": 489,
+ "retains admission committed while an empty inbound-notice selection is returning": 449,
+ "retains an accepted-response deadline that elapses during the locked recovery check": 402,
+ "retains an exact chat retry through a transient scheduling failure and a lost committed receipt acknowledgement": 350,
+ "retains content-free GitHub source invalidation after actor revocation and denies stale retry after regrant": 958,
+ "retains HTTP Retry under the endpoint authorization row lock: %s": 3713,
+ "retains inbound notices through %s during drain without passive SQL": 1315,
+ "retains one HTTP task Retry intent while saved chat identity authorization is busy": 1296,
+ "retains only a source invalidation for a Telegram edit when the original actor's link is revoked": 602,
+ "retains the first accepted-response wake through idle drain without passive SQL": 465,
+ "retains the service idle probe after failed $name retirement and shutdown until owner retry": 956,
+ "retires a Discord receipt after terminal failure without letting an add retry resurrect it": 527,
+ "retires a pre-run FIFO notice with the exact promoted %s run even before a working update": 1306,
+ "retires a stale verifying receipt before another fixture runs recovery": 690,
+ "retires an already-visible pre-run FIFO notice once without publishing scheduler failures": 503,
+ "retires only the exact Slack final's receipt (%s)": 2187,
+ "retires only the exact Telegram final receipt through the pinned adapter (%s)": 2684,
+ "retires only the removed source's pre-run FIFO notice after its surviving batch promotes": 676,
+ "retires superseded credentials and clears endpoint-owned secrets on removal": 289,
+ "retries a colliding company fixture prefix and creates a distinct complete fixture": 72,
+ "retries a contended committed review response before transport, then publishes it and its files once": 1547,
+ "retries a contended pre-run FIFO receipt before I/O and observes cancellation after the lock releases": 448,
+ "retries a durable lifecycle row without treating it as a message delivery": 175,
+ "retries a fully recorded never-dispatched $provider setup through HTTP: $mode": 13493,
+ "retries an accepted inbound wake outbox in FIFO order without blocking other conversations": 740,
+ "retries an authenticated GitHub request after isolated-directory validation failed before allocation: %s": 24684,
+ "retries an exact GitHub source denied by pre-provider reviewed attestation without rewriting its failure": 487,
+ "retries credential cleanup after archival made a remove partially complete": 333,
+ "retries failed chat execution authorization after actual %s lock contention": 17188,
+ "retries lifecycle mutation atomically and reclaims it after restart": 1040,
+ "retries only the original pre-provider Telegram request after exact cleanup: $mode ($errorMessage)": 11958,
+ "retries pre-transport attachment integrity failures without blocking another conversation": 1267,
+ "retries saved GitHub input after a successful run without replaying that run": 862,
+ "retries saved GitHub input after an endpoint admission lock collision": 31953,
+ "retries the exact failed %s chat input with a new idempotent admission": 789,
+ "retries the newer saved $provider request instead of the failed request after a budget hold: $mode": 91979,
+ "retries the saved board-message turn in a connected task after environment qualification failed before provider startup": 4463,
+ "retries transient GitHub endpoint lock contention before accepting a wake": 768,
+ "returns a committed one-time GitHub setup secret after final lease loss when its exact ref remains current": 63,
+ "returns a failed link-only interaction continuation to its GitHub thread": 841,
+ "returns a retryable webhook failure when the delivery insert fails before durable receipt": 1074,
+ "returns ephemeral guidance for exact Slack controls in channels without creating tasks or actions": 362,
+ "returns not found rather than revealing another company's chat endpoint": 47,
+ "returns two answered Slack turns to Idle in the same thread (DM=%s)": 1533,
+ "reuses a pre-run FIFO notice when the successor asks before its working milestone": 427,
+ "reveals a rotated GitHub secret despite a later completion-audit failure and makes retry a new rotation": 1088,
+ "revokes a deleted canonical GitHub installation and recovers the same endpoint after reinstall": 3212,
+ "rotates a live GitHub webhook secret fail-closed and reconnects with stored credentials": 551,
+ "rotates Microsoft Teams secrets without changing bot identity and preserves the last good credentials on rejection": 309,
+ "round-trips a $label question modal and durably acknowledges denied or replayed tokens": 2486,
+ "safely re-arms an exact terminal GitHub delivery after an operator redelivery": 358,
+ "saves Slack communication instructions with validation, company isolation, and audit attribution": 139,
+ "scopes board-send idempotency to one external conversation": 1082,
+ "scopes failed retry notices and retains receipt contention without retrying settled history": 831,
+ "scopes Slack setup %s detection to the linked user and current test": 520,
+ "scopes Telegram publication failure from $label correctly": 1293,
+ "segments long Telegram output into durable FIFO publications and resumes at the failed part": 833,
+ "selects the Telegram photo boundary before provider I/O (%s)": 10801,
+ "sends Telegram audio and video outside native format contracts as exact original documents": 787,
+ "separates verified webhook ingress from board identity links for every webhook provider": 213,
+ "serializes a GitHub secret rotation racing reconnect and preserves the rotated secret": 893,
+ "serializes and caps an agent run's selected Discord files before final handoff": 2174,
+ "serializes concurrent GitHub setup-secret requests without losing stored credentials": 1067,
+ "serializes Discord Gateway health events and recovers transient guild outages": 203,
+ "serializes duplicate Slack admission with an owned provider-reply settlement: %s": 871,
+ "serializes recovered Telegram maintenance behind credential rotation": 334,
+ "serializes setup activation ahead of a concurrent reconnect without overwriting the newer runtime": 728,
+ "settles a refused GitHub task Retry by its own gates: %s": 3796,
+ "settles a retried Slack receipt reaction when the provider reports already_reacted": 240,
+ "settles a shared-endpoint accepted-response backlog without retrying its own locks": 2694,
+ "settles an interrupted native run once without overwriting its successor": 675,
+ "settles GitHub self-update receipts without orphan retries for %s": 4030,
+ "settles rejected pre-acceptance intent and permits a later authorized external message": 463,
+ "settles responses on different endpoints for one principal without retrying its own identity lock: %s": 3964,
+ "singleflights concurrent cold GitHub runtime initialization": 473,
+ "skips a locked native progress %s while unrelated final and question publications deliver": 2910,
+ "skips a pre-run FIFO candidate with a noncanonical coalesced owner id (%s)": 850,
+ "skips paused outbox heads and resumes promptly without bypassing provider backoff": 602,
+ "sleeps behind an unresolved Slack tool send and wakes when its receipt settles": 380,
+ "snapshots channel workspace defaults on new tasks and preserves them on replies": 705,
+ "starts real Slack conversations from bare mentions and accepts same-thread follow-ups": 1221,
+ "stops a conversation drain after its lease renewal fails": 453,
+ "stops a Discord Gateway on lease loss and lets a standby take over": 542,
+ "stops automatic pre-ingress GitHub pagination at the epoch floor without adopting older failures": 324,
+ "stops starting continuation publications during %s": 3222,
+ "streams long output in bounded chunks after applying the safe external projection": 773,
+ "supplements Chat SDK with verified GitHub comment edit and delete lifecycle events": 1278,
+ "supplements verified Teams edit, soft-delete, and restore activities against the existing task": 1286,
+ "suppresses a pending pre-run FIFO notice after %s wins": 2789,
+ "suppresses a queued provider reply when destination reach is revoked before transport": 201,
+ "suppresses automatic pre-ingress GitHub redelivery for any existing local receipt (%s)": 1734,
+ "suppresses persisted GitHub queued, progress and completion comments on replay": 559,
+ "suppresses queued and working placeholders that terminalize while paused": 846,
+ "surfaces an attachment-only Telegram ingestion failure without waking the agent": 270,
+ "Teams authenticated inline-picture intake > ingests an actual pinned-parser %s picture into its exact admitted turn (%s)": 2783,
+ "Teams current file authority and composed Board transfer > deduplicates the same actual acceptance activity before and after file delivery": 788,
+ "Teams current file authority and composed Board transfer > durably accepts a callback inside the consent POST before the native receipt returns": 1102,
+ "Teams current file authority and composed Board transfer > freezes the original recipient at Board Send and publishes only after consent and exact-byte PUT": 1184,
+ "Teams current file authority and composed Board transfer > keeps the task-link fallback with no native file intent for %s": 2547,
+ "Teams current file authority and composed Board transfer > offers only exact conflict cancellation after valid Teams consent receipts disagree": 1166,
+ "Teams current file authority and composed Board transfer > rechecks revoked %s authority before acceptance and before PUT": 4582,
+ "Teams current file authority and composed Board transfer > rejects a retained old-runtime consent callback after normal pause and resume": 678,
+ "Teams current file authority and composed Board transfer > retries only fileInfo after a confirmed PUT and an explicitly resolved missing fileInfo receipt": 1189,
+ "Teams current file authority and composed Board transfer > stages native Board file consent on the first send from a cold reconstructed service": 844,
+ "Teams exact self-unknown source continuation > accepts the exact native file after a lost consent-card receipt without reposting": 1502,
+ "Teams exact self-unknown source continuation > does not exempt other unknown effects or changed native authority: %s": 4731,
+ "Teams exact self-unknown source continuation > retries only the confirmed native file-info stage with an exact audited phase/version, never its PUT": 2128,
+ "Teams file receipt API projection > does not consume a worker slot for a pending Teams transfer on a %s endpoint": 1542,
+ "Teams file receipt API projection > does not treat a caller-only transfer hint as ordinary delivery authority": 81,
+ "Teams file receipt API projection > generic publication worker ignores an existing %s Teams transfer on an active endpoint": 1024,
+ "Teams file receipt API projection > keeps a cancelled head locked while a consent-card receipt waits for the file tail": 82,
+ "Teams file receipt API projection > never projects a transfer from another conversation into Activity": 163,
+ "Teams file receipt API projection > offers only the exact %s stage actions": 253,
+ "Teams file receipt API projection > preserves all-published legacy batches without transfer metadata and excludes other comments": 69,
+ "Teams file receipt API projection > projects mixed delivered, declined, expired and cancelled file outcomes without making GET effects": 92,
+ "Teams file receipt API projection > refuses generic replay of a failed transfer without another provider attempt": 107,
+ "Teams file receipt API projection > refuses generic resolution with %s transfer preconditions without changing receipts": 527,
+ "Teams file receipt API projection > refuses terminal success or actions for %s": 389,
+ "Teams file receipt API projection > requires exact endpoint, conversation, publication and Board company scope": 132,
+ "Teams inline picture publication > keeps $surface picture delivery truthful for $outcome": 7050,
+ "Teams personal-recipient admission and durable restart > does not invent personal recipient proof when an AAD-only legacy delivery resumes without original runtime evidence": 233,
+ "Teams personal-recipient admission and durable restart > preserves actual-parser personal recipient proof across database admission and reconstructed restart": 239,
+ "Teams personal-recipient admission and durable restart > redacts a rejected personal destination instead of persisting its derived recipient proof": 143,
+ "Telegram callback-only native private responses > cancels a queued private callback notice after %s changes without public fallback": 772,
+ "Telegram callback-only native private responses > does not rebind a retained callback denial to another %s": 584,
+ "Telegram callback-only native private responses > does not refresh the callback deadline after service runtime-readiness waits": 127,
+ "Telegram callback-only native private responses > does not treat another actor's private chat as a reply destination": 125,
+ "Telegram callback-only native private responses > preserves an authenticated exact-actor DM denial without native ephemeral or public fallback": 170,
+ "Telegram callback-only native private responses > quarantines missing private acceptance receipts and never retries them publicly": 147,
+ "Telegram callback-only native private responses > records an authenticated denial before its recipient-bound send and deduplicates the exact callback": 215,
+ "Telegram callback-only native private responses > retains an exact-actor DM proof across restart (expired=%s)": 380,
+ "Telegram callback-only native private responses > retains the original private callback deadline across restart (expired=%s)": 370,
+ "Telegram close-owned progress retirement > does not borrow an unrelated run's interaction as progress-consumer evidence": 707,
+ "Telegram close-owned progress retirement > does not guess a close edit for %s": 4374,
+ "Telegram close-owned progress retirement > does not reclaim a progress lane consumed by a $state $kind prompt": 3239,
+ "Telegram close-owned progress retirement > keeps close uncommitted after %s of its retirement edit": 1432,
+ "Telegram close-owned progress retirement > preserves an attempted unknown %s after public operator cancellation": 1608,
+ "Telegram close-owned progress retirement > preserves an authored final that wins while close is admitted": 648,
+ "Telegram close-owned progress retirement > qualifies $provider close-owned progress retirement ($mode)": 7083,
+ "Telegram close-owned progress retirement > retires a status-interleaved working lane": 856,
+ "Telegram close-owned progress retirement > retires one working lane on close without cancelling the run or publishing its late final": 1054,
+ "Telegram close-owned progress retirement > treats a $state consumer with $attempts attempts conservatively": 1256,
+ "Telegram current rich inbound compatibility > keeps rich files and omissions scoped through lifecycle recovery (%s)": 1272,
+ "Telegram current rich inbound compatibility > retains current rich content through the pinned parser and service (%s)": 938,
+ "Telegram durable private draft Stop > automatically repairs an existing %s subscription after restart without dropping updates": 6559,
+ "Telegram durable private draft Stop > commits chat connection credentials atomically before waking maintenance": 612,
+ "Telegram durable private draft Stop > does not confirm a subscription from non-boolean ok=%s": 1288,
+ "Telegram durable private draft Stop > does not reuse an old draft ID after endpoint cascade deletion and same-bot re-binding": 1474,
+ "Telegram durable private draft Stop > does not withdraw an unowned or already-claimed final (%s)": 4326,
+ "Telegram durable private draft Stop > durably stops during the first draft RPC without cancelling a run, and never reuses its ID after restart": 894,
+ "Telegram durable private draft Stop > keeps ordinary output when automatic subscription repair is unsafe: %s": 6669,
+ "Telegram durable private draft Stop > parks pending Telegram subscription repair while its %s is inactive": 3861,
+ "Telegram durable private draft Stop > preserves an uncertain final after restart and a late Stop without automatic replay": 647,
+ "Telegram durable private draft Stop > recovers Telegram maintenance from committed work and becomes SQL quiet: %s": 10717,
+ "Telegram durable private draft Stop > refuses a retained Stop and later final after current %s authority changes": 2518,
+ "Telegram durable private draft Stop > retries an unknown subscription mutation after restart using freshly observed options, not a recovered confirmation flag": 1143,
+ "Telegram durable private draft Stop > returns 503 on failed Stop commit and accepts the exact verified retry before final send": 762,
+ "Telegram durable private draft Stop > sends ordinary complete output without Stop when subscription proof is %s": 4661,
+ "Telegram retained zero-message admission > recovers only ordinary source identity ($state / command=$command / $source)": 3408,
+ "Telegram source-bound optional media > imports exact permitted bytes or gives accurate recovery advice (%s)": 1872,
+ "Telegram source-bound optional media > retains exact durable media authority across restart (%s)": 842,
+ "tracks Slack callback surfaces independently and reports public URL drift": 261,
+ "tracks the actual Board Teams claim and retires recovery when its receipt commits": 1579,
+ "treats D-prefixed Slack status, new, and close callbacks as DM task controls even when the SDK flag is false": 877,
+ "turns a Slack slash command into a new native thread and one Paperclip task": 345,
+ "uses a live Cloud claim after chat service startup (ingress: %s)": 191,
+ "uses compact single-use Telegram action tokens and filters forged, expired, and oversized callbacks": 984,
+ "uses GitHub numeric user ids for linked authority and rechecks membership on every follow-up": 539,
+ "uses the Teams group-chat toggle without weakening channel resource gates": 498,
+ "wakes a failed retry notice only after %s cancellation commits": 1019,
+ "wakes a not-started retry notice after resumed admission is denied": 853,
+ "wakes a saved inbound notice when %s restores privacy access": 965,
+ "wakes a visible pre-run FIFO retirement only after %s commits": 4434,
+ "wakes accepted-response recovery from the real coordinator retry release": 559,
+ "wakes accepted-response recovery when its authenticated accepted-result journal arrives late": 2297,
+ "wakes an existing chat milestone when ordinary ingress reactivates its conversation": 1385,
+ "wakes chat dispatch after commit and refills free endpoint slots without the maintenance loop": 1416,
+ "wakes dormant accepted-response history from the real company membership restoration owner": 2388,
+ "wakes dormant accepted-response recovery after agent resume": 2343,
+ "wakes inbound notice retirement from a signed Slack Stop without a maintenance scan": 692,
+ "wakes interaction continuations from a committed response through %s": 10828,
+ "wakes parked Slack %s actions after board %s commits": 7018,
+ "wakes pre-run FIFO notices from real admission after quiet and becomes quiet again": 360,
+ "wakes saved native progress when %s restores eligibility": 5081,
+ "wakes Slack session sync from publication commit and leaves settled action queues quiet": 1543,
+ "withholds a committed one-time GitHub setup secret after final lease loss when its ref was superseded": 58,
+ "yields a %s inbound notice backlog between bounded passes without losing work": 6641
}
}
diff --git a/scripts/ci-typecheck-lane.mjs b/scripts/ci-typecheck-lane.mjs
index eb8bd50bf69..139380955dd 100644
--- a/scripts/ci-typecheck-lane.mjs
+++ b/scripts/ci-typecheck-lane.mjs
@@ -1,22 +1,24 @@
#!/usr/bin/env node
import { execFileSync, spawn, spawnSync } from "node:child_process";
+import { mkdirSync } from "node:fs";
import { availableParallelism, setPriority, totalmem } from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { listLayers } from "../server/scripts/typecheck-layers.mjs";
-import { LOW_MEMORY_VARIABLE, EMIT_ONLY_VARIABLE } from "./run-tsc.mjs";
+import { LOW_MEMORY_VARIABLE, EMIT_ONLY_VARIABLE, runTsc } from "./run-tsc.mjs";
import { selectTestPrograms } from "./typecheck-test-programs.mjs";
-import { PROJECTS, selectTestProjects } from "./typecheck-test-projects.mjs";
+import { PROJECTS, orderProjectsLpt, selectTestProjects } from "./typecheck-test-projects.mjs";
export const SERIAL_BUILD_GAPS = ["@paperclipai/paperclip-runner"];
export const BACKGROUND_PRIORITY = 10;
export const DEFAULT_MAX_CONCURRENCY = 3;
-export const DEFAULT_TEST_PROGRAMS_CONCURRENCY = 2;
+export const DEFAULT_TEST_PROGRAMS_CONCURRENCY = 3;
export const PREPARE_RUNNER_VENDOR = "prepare runner vendor";
export const BUILD_SERVER_EMIT_ONLY = "build server without type checks";
const SERVER_DECLARATIONS = "server declarations";
export const CLI_GUIDANCE_SAFETY = "CLI guidance safety";
+export const UI_TSBUILDINFO = "ui/node_modules/.cache/paperclip-ui.tsbuildinfo";
const lowMemory = { [LOW_MEMORY_VARIABLE]: "1" };
/**
@@ -45,7 +47,7 @@ export function computeResourceProfile({ cpus = availableParallelism(), totalMem
serverLayerCheckers: 1,
testProjectCheckers: 1,
uiGomaxprocs: 2,
- testProgramsConcurrency: 2,
+ testProgramsConcurrency: 3,
testProgramsCheckers: 1,
};
}
@@ -58,7 +60,7 @@ export function computeResourceProfile({ cpus = availableParallelism(), totalMem
serverLayerCheckers: 1,
testProjectCheckers: 1,
uiGomaxprocs: 4,
- testProgramsConcurrency: 3,
+ testProgramsConcurrency: 4,
testProgramsCheckers: 1,
};
}
@@ -200,6 +202,47 @@ export function shouldRunServerTypecheck(changedFiles, selectedProjects = []) {
);
}
+/**
+ * Rust typecheck (`cargo fmt --check && cargo check`) only reads files inside `packages/paperclip-runner/`
+ * and Rust toolchain config. When a PR only touches shared TypeScript packages (`packages/shared`,
+ * `packages/adapter-utils`, `packages/paperclip-eval-kernel`), running `typecheck:typescript` alone is sound
+ * and saves ~9s of serial prepare time.
+ */
+export function shouldRunRunnerRustTypecheck(changedFiles) {
+ if (!Array.isArray(changedFiles)) return true;
+ if (changedFiles.some(isGlobalTypecheckInput)) return true;
+ return changedFiles.some(
+ (file) =>
+ file.startsWith("packages/paperclip-runner/") ||
+ file.startsWith("rust-toolchain") ||
+ file.startsWith(".cargo/"),
+ );
+}
+
+export function typecheckUiIncremental({
+ root,
+ env = process.env,
+ spawnSyncImpl = spawnSync,
+ runTscImpl = runTsc,
+}) {
+ const uiDir = path.join(root, "ui");
+ const catalog = spawnSyncImpl(process.execPath, [path.join(root, "scripts", "storybook-catalog.mjs")], {
+ cwd: uiDir,
+ env,
+ stdio: "inherit",
+ });
+ if (catalog.error) throw catalog.error;
+ if ((catalog.status ?? 1) !== 0) return catalog.status ?? 1;
+
+ const tsBuildInfoPath = path.join(root, UI_TSBUILDINFO);
+ mkdirSync(path.dirname(tsBuildInfoPath), { recursive: true });
+ const relTsBuildInfo = path.relative(uiDir, tsBuildInfoPath).split(path.sep).join(path.posix.sep);
+ return runTscImpl(["-p", "tsconfig.json", "--incremental", "--tsBuildInfoFile", relTsBuildInfo], {
+ cwd: uiDir,
+ env,
+ }).status;
+}
+
function readGitDiff(root, rangeArgs, execGit) {
const output = execGit(["diff", "--no-ext-diff", "--no-textconv", "--no-renames", "--name-only", "-z", ...rangeArgs, "--"], {
cwd: root,
@@ -277,20 +320,38 @@ export function planLane({
}) {
const isPrMode = Array.isArray(changedFiles);
const selectedBuildGaps = selectBuildGapPackages(buildGapPackages, changedFiles);
- const selectedProjects = selectTestProjects(changedFiles, projects);
+ const selectedProjects = orderProjectsLpt(selectTestProjects(changedFiles, projects));
const runServer = shouldRunServerTypecheck(changedFiles, selectedProjects);
const runReleaseRegistry = shouldRunReleaseRegistryTests(changedFiles);
+ const runRunnerRust = shouldRunRunnerRustTypecheck(changedFiles);
const programSelection = selectTestPrograms(changedFiles);
- const typecheckPackage = (name, background, needs) => ({
- name: `typecheck ${name}`,
- command: "pnpm",
- args: ["--filter", name, "typecheck"],
- // UI typecheck runs ~7-10x faster without --singleThreaded while staying at ~4.4 GiB with bounded GOMAXPROCS.
- env: name === "@paperclipai/ui" ? { GOMAXPROCS: String(resources.uiGomaxprocs) } : lowMemory,
- background,
- ...(needs ? { needs } : {}),
- });
+ const typecheckPackage = (name, background, needs) => {
+ if (name === "@paperclipai/ui") {
+ return {
+ name: `typecheck ${name}`,
+ command: "node",
+ args: ["scripts/ci-typecheck-lane.mjs", "--typecheck-ui"],
+ // UI typecheck runs ~7-10x faster without --singleThreaded while staying at ~4.4 GiB with bounded GOMAXPROCS,
+ // and persists ui/node_modules/.cache/paperclip-ui.tsbuildinfo for incremental reuse across runs.
+ env: { GOMAXPROCS: String(resources.uiGomaxprocs) },
+ background,
+ ...(needs ? { needs } : {}),
+ };
+ }
+ const args =
+ name === "@paperclipai/paperclip-runner" && !runRunnerRust
+ ? ["--filter", name, "run", "typecheck:typescript"]
+ : ["--filter", name, "typecheck"];
+ return {
+ name: `typecheck ${name}`,
+ command: "pnpm",
+ args,
+ env: lowMemory,
+ background,
+ ...(needs ? { needs } : {}),
+ };
+ };
const prepare = [{ name: "link workspace packages", command: "pnpm", args: ["run", "preflight:workspace-links"] }];
@@ -352,6 +413,11 @@ export function planLane({
tasks.push({ name: "release registry tests", command: "pnpm", args: ["run", "test:release-registry"] });
}
+ if (selectedBuildGaps.includes("@paperclipai/ui")) {
+ // Schedule UI right at t=0 alongside prepare runner vendor / release registry instead of behind small plugins.
+ tasks.push(typecheckPackage("@paperclipai/ui", true));
+ }
+
if (programSelection.programs.length > 0 || programSelection.checkCoverage) {
const programArgs = [
"scripts/typecheck-test-programs.mjs",
@@ -386,19 +452,9 @@ export function planLane({
}
if (runServer) {
+ // Start LPT-ordered test projects (longest non-incremental project like tests/runner-e2e first)
+ // alongside incremental server test layers so they never form a late tail wave.
tasks.push(
- ...testLayers.map((layer) => ({
- name: `server layer ${layer}`,
- command: "node",
- args: [
- "server/scripts/typecheck-layers.mjs",
- "--layer",
- layer,
- "--checkers",
- String(resources.serverLayerCheckers),
- ],
- needs: needsDeclarations,
- })),
...selectedProjects.map((project) => ({
name: `test project ${project}`,
command: "node",
@@ -411,6 +467,18 @@ export function planLane({
],
needs: needsDeclarations,
})),
+ ...testLayers.map((layer) => ({
+ name: `server layer ${layer}`,
+ command: "node",
+ args: [
+ "server/scripts/typecheck-layers.mjs",
+ "--layer",
+ layer,
+ "--checkers",
+ String(resources.serverLayerCheckers),
+ ],
+ needs: needsDeclarations,
+ })),
{
name: BUILD_SERVER_EMIT_ONLY,
command: "pnpm",
@@ -433,7 +501,7 @@ export function planLane({
tasks.push(
...selectedBuildGaps
- .filter((name) => !SERIAL_BUILD_GAPS.includes(name))
+ .filter((name) => !SERIAL_BUILD_GAPS.includes(name) && name !== "@paperclipai/ui")
.map((name) =>
typecheckPackage(name, true, runServer && name === "paperclipai" ? needsRunnerVendor : undefined),
),
@@ -624,50 +692,54 @@ function listBuildGapPackages(root) {
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
const args = process.argv.slice(2);
- const resources = computeResourceProfile();
- let concurrency = resources.laneConcurrency;
- let base;
- let full = false;
- let valid = true;
- for (let i = 0; i < args.length; i += 1) {
- const arg = args[i];
- if (arg === "--concurrency") {
- concurrency = Number(args[++i]);
- if (!Number.isInteger(concurrency) || concurrency < 1) valid = false;
- } else if (arg === "--base") {
- base = args[++i];
- if (!base || base.startsWith("--")) valid = false;
- } else if (arg === "--full") {
- full = true;
- } else {
- valid = false;
- }
- }
- if (!valid) {
- console.error("Usage: node scripts/ci-typecheck-lane.mjs [--concurrency ] [--base [] [--full]");
- process.exitCode = 2;
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
+ if (args.length === 1 && args[0] === "--typecheck-ui") {
+ process.exitCode = typecheckUiIncremental({ root, env: process.env });
} else {
- const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
- const buildGapPackages = listBuildGapPackages(root);
- if (buildGapPackages === null) {
- process.exitCode = 1;
+ const resources = computeResourceProfile();
+ let concurrency = resources.laneConcurrency;
+ let base;
+ let full = false;
+ let valid = true;
+ for (let i = 0; i < args.length; i += 1) {
+ const arg = args[i];
+ if (arg === "--concurrency") {
+ concurrency = Number(args[++i]);
+ if (!Number.isInteger(concurrency) || concurrency < 1) valid = false;
+ } else if (arg === "--base") {
+ base = args[++i];
+ if (!base || base.startsWith("--")) valid = false;
+ } else if (arg === "--full") {
+ full = true;
+ } else {
+ valid = false;
+ }
+ }
+ if (!valid) {
+ console.error("Usage: node scripts/ci-typecheck-lane.mjs [--concurrency ] [--base ][] [--full] | --typecheck-ui");
+ process.exitCode = 2;
} else {
- const testLayers = listLayers(path.join(root, "server"))
- .filter((layer) => !layer.emitsDeclarations)
- .map((layer) => layer.name);
- const scope = resolveScope({ root, env: process.env, base, full });
- const scopeDetail =
- scope.mode === "pr"
- ? `PR (${scope.changedFiles.length} changed files via ${scope.reason})`
- : `full (${scope.reason})`;
- const lanePlan = planLane({ buildGapPackages, testLayers, changedFiles: scope.changedFiles, resources });
- console.log(
- `typecheck lane: ${concurrency} at a time (${availableParallelism()} vCPU, ${(totalmem() / 1024 ** 3).toFixed(1)} GiB; ` +
- `decl=${resources.serverDeclCheckers}, layers=${resources.serverLayerCheckers}, ui=${resources.uiGomaxprocs}); ` +
- `mode: ${scopeDetail}; prepare: ${lanePlan.prepare.length}; tasks: ${lanePlan.tasks.length}; ` +
- `build gaps: ${buildGapPackages.join(", ")}`,
- );
- process.exitCode = await runLane({ ...lanePlan, concurrency, cwd: root });
+ const buildGapPackages = listBuildGapPackages(root);
+ if (buildGapPackages === null) {
+ process.exitCode = 1;
+ } else {
+ const testLayers = listLayers(path.join(root, "server"))
+ .filter((layer) => !layer.emitsDeclarations)
+ .map((layer) => layer.name);
+ const scope = resolveScope({ root, env: process.env, base, full });
+ const scopeDetail =
+ scope.mode === "pr"
+ ? `PR (${scope.changedFiles.length} changed files via ${scope.reason})`
+ : `full (${scope.reason})`;
+ const lanePlan = planLane({ buildGapPackages, testLayers, changedFiles: scope.changedFiles, resources });
+ console.log(
+ `typecheck lane: ${concurrency} at a time (${availableParallelism()} vCPU, ${(totalmem() / 1024 ** 3).toFixed(1)} GiB; ` +
+ `decl=${resources.serverDeclCheckers}, layers=${resources.serverLayerCheckers}, ui=${resources.uiGomaxprocs}); ` +
+ `mode: ${scopeDetail}; prepare: ${lanePlan.prepare.length}; tasks: ${lanePlan.tasks.length}; ` +
+ `build gaps: ${buildGapPackages.join(", ")}`,
+ );
+ process.exitCode = await runLane({ ...lanePlan, concurrency, cwd: root });
+ }
}
}
}
diff --git a/scripts/ci/nightly-only-suites.json b/scripts/ci/nightly-only-suites.json
index d10b6e5ec3d..5a15e1ef8f2 100644
--- a/scripts/ci/nightly-only-suites.json
+++ b/scripts/ci/nightly-only-suites.json
@@ -289,6 +289,12 @@
"reason": "Native runner replacement, lease, or continuation recovery soak (89.9s in run 45238253588)",
"measuredMs": 89949
},
+ {
+ "path": "server/src/services/ssh-remote-workspace-heartbeat-cli.integration.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Real SSH server remote-workspace CLI heartbeat soak (88.9s in run 45440355579)",
+ "measuredMs": 88895
+ },
{
"path": "server/src/__tests__/heartbeat-workspace-busy.test.ts",
"category": "workspace-recovery-soak",
@@ -379,6 +385,12 @@
"reason": "Plugin scheduled-work real-clock deadline/quietness soak (70s)",
"measuredMs": 69649
},
+ {
+ "path": "server/src/services/ssh-remote-workspace-heartbeat-codex.integration.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Real SSH server remote-workspace Codex heartbeat soak (69.4s in run 45440355579)",
+ "measuredMs": 69357
+ },
{
"path": "server/src/__tests__/heartbeat-held-comment-wake.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -403,6 +415,18 @@
"reason": "Real-clock recovery, census, idle-quietness, retention, deadline, or background-work soak (65.7s in run 45238253588)",
"measuredMs": 65684
},
+ {
+ "path": "server/src/services/ssh-remote-workspace-heartbeat-claude.integration.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Real SSH server remote-workspace Claude heartbeat soak (64.2s in run 45440355579)",
+ "measuredMs": 64218
+ },
+ {
+ "path": "server/src/services/ssh-remote-workspace-heartbeat-gemini.integration.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Real SSH server remote-workspace Gemini heartbeat soak (61.8s in run 45440355579)",
+ "measuredMs": 61817
+ },
{
"path": "server/src/services/native-runtime/native-safe-replacement.test.ts",
"category": "restart-lease-soak",
@@ -697,6 +721,12 @@
"reason": "Remote workspace snapshot reuse soak (39s)",
"measuredMs": 38856
},
+ {
+ "path": "server/src/services/quarantined-task-retry.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Quarantined task retry soak (38.8s in run 45440355579)",
+ "measuredMs": 38826
+ },
{
"path": "server/src/__tests__/native-workspace-sync-history.test.ts",
"category": "workspace-recovery-soak",
@@ -901,6 +931,12 @@
"reason": "Remote/git workspace recovery, migration, or heavy working-copy soak (30.4s in run 45238253588)",
"measuredMs": 30390
},
+ {
+ "path": "server/src/services/remote-workspace-readonly-inventory-entries.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Remote workspace readonly inventory entries soak (30.4s in run 45440355579)",
+ "measuredMs": 30380
+ },
{
"path": "server/src/services/heartbeat/run-lifecycle.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -1063,6 +1099,12 @@
"reason": "Real-clock soak, watchdog, drain, sweep, archive, or heavy lifecycle integration (25.2s in run 45238253588)",
"measuredMs": 25170
},
+ {
+ "path": "server/src/__tests__/heartbeat-isolated-continuation-hold.test.ts",
+ "category": "restart-lease-soak",
+ "reason": "Isolated continuation hold soak (25.2s in run 45440355579)",
+ "measuredMs": 25154
+ },
{
"path": "server/src/services/fresh-continuation-move-forward-offer.test.ts",
"category": "restart-lease-soak",
@@ -1195,6 +1237,12 @@
"reason": "Real-clock recovery, census, idle-quietness, retention, deadline, or background-work soak (22.3s in run 45238253588)",
"measuredMs": 22254
},
+ {
+ "path": "server/src/__tests__/heartbeat-clean-continuation-dispatch.test.ts",
+ "category": "restart-lease-soak",
+ "reason": "Clean continuation dispatch soak (22.2s in run 45440355579)",
+ "measuredMs": 22213
+ },
{
"path": "server/src/__tests__/heartbeat-agent-directory-busy.test.ts",
"category": "workspace-recovery-soak",
@@ -1339,6 +1387,12 @@
"reason": "Execution workspace reopen git/DB soak (20.3s in run 45238253588)",
"measuredMs": 20305
},
+ {
+ "path": "server/src/__tests__/environment-retained-orphan-listing-cost.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Retained orphan listing SQL query-cost benchmark (20.2s in run 45440355579)",
+ "measuredMs": 20229
+ },
{
"path": "server/src/__tests__/heartbeat-remote-workspace-busy.test.ts",
"category": "workspace-recovery-soak",
@@ -1393,6 +1447,12 @@
"reason": "External provider, adapter CLI, sandbox-provider, or container-image integration soak (19.8s in run 45238253588)",
"measuredMs": 19765
},
+ {
+ "path": "server/src/__tests__/plugin-loader-activation-timeout.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Real-clock plugin loader activation timeout soak (19.6s in run 45440355579)",
+ "measuredMs": 19637
+ },
{
"path": "server/src/__tests__/chat-completion-delivery.test.ts",
"category": "channel-integration-soak",
@@ -1441,6 +1501,12 @@
"reason": "Agent file durability storage soak (19.1s in run 45238253588)",
"measuredMs": 19117
},
+ {
+ "path": "server/src/__tests__/abandoned-workspace-files-hold.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Abandoned workspace files hold soak (19.0s in run 45440355579)",
+ "measuredMs": 19046
+ },
{
"path": "server/src/services/native-runtime/plugin-task-source-recovery.integration.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -1453,6 +1519,12 @@
"reason": "Heavy multi-component integration suite (covered on master/release-verify/full-ci) (18.6s in run 45238253588)",
"measuredMs": 18587
},
+ {
+ "path": "server/src/__tests__/heartbeat-answer-behind-settling-run.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Settling-run answer race soak (18.4s in run 45440355579)",
+ "measuredMs": 18391
+ },
{
"path": "server/src/services/native-runtime/create-skill.integration.test.ts",
"category": "integration-soak",
@@ -1471,6 +1543,18 @@
"reason": "Real-clock recovery, census, idle-quietness, retention, deadline, or background-work soak (18.0s in run 45238253588)",
"measuredMs": 17969
},
+ {
+ "path": "server/src/__tests__/heartbeat-context-compaction-execution.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Heartbeat context compaction execution soak (18.0s in run 45440355579)",
+ "measuredMs": 17964
+ },
+ {
+ "path": "server/src/services/native-runtime/native-cancelled-workspace-preservation.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Cancelled workspace preservation soak (17.9s in run 45440355579)",
+ "measuredMs": 17893
+ },
{
"path": "server/src/__tests__/merged-pr-confirmation-work.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -1525,6 +1609,12 @@
"reason": "Heavy multi-component integration suite (covered on master/release-verify/full-ci) (16.8s in run 45238253588)",
"measuredMs": 16813
},
+ {
+ "path": "server/src/__tests__/legacy-workspace-rehome.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Legacy workspace rehome migration soak (16.8s in run 45440355579)",
+ "measuredMs": 16753
+ },
{
"path": "server/src/__tests__/recovery-durable-wait-projection.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -1573,6 +1663,12 @@
"reason": "Heavy native-runtime continuation, lease, handoff, or multi-turn soak (16.2s in run 45238253588)",
"measuredMs": 16226
},
+ {
+ "path": "server/src/__tests__/heartbeat-lease-release-before-runner-attach.test.ts",
+ "category": "restart-lease-soak",
+ "reason": "Heartbeat lease release before runner attach soak (16.2s in run 45440355579)",
+ "measuredMs": 16200
+ },
{
"path": "server/src/services/native-runtime/native-provider-capacity.integration.test.ts",
"category": "integration-soak",
@@ -1585,6 +1681,12 @@
"reason": "Real-clock soak, watchdog, drain, sweep, archive, or heavy lifecycle integration (16.0s in run 45238253588)",
"measuredMs": 16037
},
+ {
+ "path": "server/src/__tests__/heartbeat-reassignment-deferred-wake.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Heartbeat reassignment deferred-wake soak (16.0s in run 45440355579)",
+ "measuredMs": 16031
+ },
{
"path": "server/src/__tests__/decision-expiry-work.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -1597,6 +1699,12 @@
"reason": "Real-clock recovery, census, idle-quietness, retention, deadline, or background-work soak (15.7s in run 45238253588)",
"measuredMs": 15693
},
+ {
+ "path": "server/src/services/setup-failure-after-work-continuation.test.ts",
+ "category": "restart-lease-soak",
+ "reason": "Setup failure after work continuation soak (15.5s in run 45440355579)",
+ "measuredMs": 15457
+ },
{
"path": "server/src/__tests__/chat-native-progress-work.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -1609,6 +1717,12 @@
"reason": "Real-clock soak, watchdog, drain, sweep, archive, or heavy lifecycle integration (15.2s in run 45238253588)",
"measuredMs": 15224
},
+ {
+ "path": "server/src/__tests__/heartbeat-workspace-finalize-branch.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Heartbeat workspace finalize-branch git soak (15.0s in run 45440355579)",
+ "measuredMs": 15046
+ },
{
"path": "server/src/services/remote-workspace-snapshot-storage.test.ts",
"category": "workspace-recovery-soak",
@@ -1729,6 +1843,12 @@
"reason": "Real-clock soak, watchdog, drain, sweep, archive, or heavy lifecycle integration (13.5s in run 45238253588)",
"measuredMs": 13543
},
+ {
+ "path": "server/src/__tests__/never-started-retry-cancellation-hold.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Never-started retry cancellation hold soak (13.5s in run 45440355579)",
+ "measuredMs": 13511
+ },
{
"path": "server/src/__tests__/eval-feedback-recovery.integration.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -1957,6 +2077,12 @@
"reason": "Remote/git workspace recovery, migration, or heavy working-copy soak (10.5s in run 45238253588)",
"measuredMs": 10495
},
+ {
+ "path": "server/src/__tests__/plugin-connector-tool-timeout.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Real-clock plugin connector tool timeout soak (10.5s in run 45440355579)",
+ "measuredMs": 10473
+ },
{
"path": "server/src/services/native-runtime/agent-instruction-tools.integration.test.ts",
"category": "integration-soak",
@@ -1987,6 +2113,12 @@
"reason": "Real-clock recovery, census, idle-quietness, retention, deadline, or background-work soak (10.4s in run 45238253588)",
"measuredMs": 10383
},
+ {
+ "path": "server/src/services/native-runtime/native-harness-backup-upload-deadline.integration.test.ts",
+ "category": "restart-lease-soak",
+ "reason": "Native harness backup upload deadline soak (10.3s in run 45440355579)",
+ "measuredMs": 10256
+ },
{
"path": "server/src/services/legacy-source-unavailable-continuation.test.ts",
"category": "restart-lease-soak",
@@ -2047,6 +2179,12 @@
"reason": "Heavy multi-component integration suite (covered on master/release-verify/full-ci) (9.9s in run 45238253588)",
"measuredMs": 9905
},
+ {
+ "path": "server/src/__tests__/plugin-workspace-terminal-hold.integration.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Plugin workspace terminal hold integration soak (9.9s in run 45440355579)",
+ "measuredMs": 9863
+ },
{
"path": "server/src/services/native-runtime/native-harness-filesystem-independence-continuation.integration.test.ts",
"category": "restart-lease-soak",
@@ -2137,6 +2275,12 @@
"reason": "External provider, adapter CLI, sandbox-provider, or container-image integration soak (9.5s in run 45238253588)",
"measuredMs": 9454
},
+ {
+ "path": "server/src/services/online-durable-data-migration-postgres.test.ts",
+ "category": "workspace-recovery-soak",
+ "reason": "Online durable-data migration Postgres soak (9.4s in run 45440355579)",
+ "measuredMs": 9418
+ },
{
"path": "server/src/__tests__/plugin-runner-task.integration.test.ts",
"category": "integration-soak",
@@ -2155,6 +2299,12 @@
"reason": "Heavy git/worktree workspace preparation, rotation, or cleanup soak (9.3s in run 45238253588)",
"measuredMs": 9335
},
+ {
+ "path": "server/src/__tests__/tool-gateway-named-gateway-deadlock.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Tool gateway named-gateway deadlock soak (9.3s in run 45440355579)",
+ "measuredMs": 9298
+ },
{
"path": "server/src/__tests__/chat-run-milestone-recovery-work.test.ts",
"category": "recovery-idle-maintenance-soak",
@@ -2179,6 +2329,12 @@
"reason": "Heavy multi-component integration suite (covered on master/release-verify/full-ci) (9.2s in run 45238253588)",
"measuredMs": 9151
},
+ {
+ "path": "server/src/__tests__/native-plan-review-card-finalizer.test.ts",
+ "category": "restart-lease-soak",
+ "reason": "Native plan-review card finalizer soak (9.1s in run 45440355579)",
+ "measuredMs": 9104
+ },
{
"path": "server/src/maintenance/native-harness-prestage-runtime.test.ts",
"category": "restart-lease-soak",
@@ -2209,6 +2365,12 @@
"reason": "Heavy multi-component integration suite (covered on master/release-verify/full-ci) (9.0s in run 45238253588)",
"measuredMs": 8957
},
+ {
+ "path": "server/src/services/recovery/restored-configuration.test.ts",
+ "category": "recovery-idle-maintenance-soak",
+ "reason": "Restored configuration recovery soak (8.9s in run 45440355579)",
+ "measuredMs": 8921
+ },
{
"path": "server/src/__tests__/board-native-attachments.integration.test.ts",
"category": "integration-soak",
diff --git a/scripts/e2e-shard-durations.json b/scripts/e2e-shard-durations.json
index c1fa2c07c4f..a12a6c17efc 100644
--- a/scripts/e2e-shard-durations.json
+++ b/scripts/e2e-shard-durations.json
@@ -1,85 +1,81 @@
{
- "$comment": "Generated by node scripts/ci/refresh-test-durations.mjs from successful .github/workflows/pr.yml runs of PRs merged into master, each pinned to the PR's final head SHA. Per spec: the sum of gaps between consecutive Playwright result lines in 'Run e2e tests' (one worker), so fixture and navigation time count; tests located in a *.shared.ts file are attributed to the shard's matching spec. Median across runs. scripts/e2e-shard.mjs uses these weights only to place specs on shards; they never change which specs run. Missing specs retain their prior weight or the median fallback.",
+ "$comment": "Refreshed from successful merged PR #22729 (run 45440355579) and PR #22679 (run 45314200835) with exact per-test split totals for agent-chat-projects, chat-adapters-ui-providers, and chat-adapters-ui-messaging. scripts/e2e-shard.mjs uses these weights only to place specs on shards; they never change which specs run.",
"unit": "ms",
"sources": [
{
- "pull": 19613,
- "run": 42296374365,
- "attempt": 2,
- "sha": "cd8c9cd07c192832fa180a845577d36fb0bc41c8",
- "url": "https://github.com/paperclipai/paperclip/actions/runs/42296374365"
+ "pull": 22729,
+ "run": 45440355579,
+ "attempt": 1,
+ "sha": "6ca7a27481e1af45c60069a563632f2b00a008a7",
+ "url": "https://github.com/paperclipai/paperclip/actions/runs/45440355579"
},
{
- "pull": 19191,
- "run": 42297700476,
- "attempt": 1,
- "sha": "36c0400008a12ec74ed65a0e17951f1b47221a02",
- "url": "https://github.com/paperclipai/paperclip/actions/runs/42297700476"
- },
- {
- "pull": 19176,
- "run": 42296994179,
- "attempt": 1,
- "sha": "d0a937768da9be297485323c5b905eb63371ec15",
- "url": "https://github.com/paperclipai/paperclip/actions/runs/42296994179"
+ "pull": 22679,
+ "run": 45314200835,
+ "attempt": 3,
+ "sha": "d930b4a9b30bc2d9e9a80f5ae93ca95a659bc52c",
+ "url": "https://github.com/paperclipai/paperclip/actions/runs/45314200835"
}
],
"coverage": {
- "measured": 51,
- "withSetup": 51,
- "inventory": 51
+ "measured": 54,
+ "withSetup": 54,
+ "inventory": 54
},
"durations": {
- "tests/e2e/acp-stop-continuation.spec.ts": 67299,
- "tests/e2e/action-test-agent-picker.spec.ts": 13115,
- "tests/e2e/agent-chat-messages.spec.ts": 42000,
- "tests/e2e/agent-chat-projects.spec.ts": 155000,
- "tests/e2e/agent-chat-sessions.spec.ts": 80000,
- "tests/e2e/agent-configuration.spec.ts": 101200,
- "tests/e2e/agentmail.spec.ts": 22000,
- "tests/e2e/ai-personal-connection-recovery.spec.ts": 14900,
- "tests/e2e/announcement-first-session.spec.ts": 11600,
- "tests/e2e/announcement-placement.spec.ts": 20400,
- "tests/e2e/app-not-connected.spec.ts": 15300,
- "tests/e2e/applications-crud.spec.ts": 11400,
- "tests/e2e/apps-prosumer-mcp-flow.spec.ts": 13276,
- "tests/e2e/archived-company-url.spec.ts": 6500,
- "tests/e2e/artifact-tab-arrival.spec.ts": 11800,
- "tests/e2e/artifact-uploads.spec.ts": 34900,
- "tests/e2e/board-attachment-receipts.spec.ts": 78000,
- "tests/e2e/cases-read-only.spec.ts": 10500,
- "tests/e2e/chat-adapters-ui-messaging.spec.ts": 125000,
- "tests/e2e/chat-adapters-ui-providers.spec.ts": 181541,
- "tests/e2e/chunk-load-recovery.spec.ts": 16330,
- "tests/e2e/classic-workspace.spec.ts": 7600,
- "tests/e2e/cloud-auth.spec.ts": 40400,
- "tests/e2e/company-context-refresh.spec.ts": 4128,
- "tests/e2e/completed-task-paused-assignee.spec.ts": 25016,
- "tests/e2e/composer-stop.spec.ts": 55400,
- "tests/e2e/conference-room-typing-intro.spec.ts": 53600,
- "tests/e2e/connection-intents.spec.ts": 20900,
- "tests/e2e/connection-reviews.spec.ts": 75000,
- "tests/e2e/coordinator-inbox-views.spec.ts": 21600,
- "tests/e2e/daytona-connector.spec.ts": 4700,
- "tests/e2e/disconnect-resilience.spec.ts": 55000,
- "tests/e2e/disconnect-write-recovery.spec.ts": 61000,
- "tests/e2e/document-image-gallery.spec.ts": 47800,
- "tests/e2e/mcp-user-stories.spec.ts": 45600,
- "tests/e2e/new-task-picker-touch.spec.ts": 25700,
- "tests/e2e/onboarding.spec.ts": 70300,
- "tests/e2e/paused-composer.spec.ts": 60500,
- "tests/e2e/plan-task-fixture.spec.ts": 7828,
- "tests/e2e/project-repositories.spec.ts": 16000,
- "tests/e2e/railway-catalog.spec.ts": 3000,
- "tests/e2e/runner-e2e-dashboard.spec.ts": 4700,
- "tests/e2e/runner-task-creation.spec.ts": 32437,
- "tests/e2e/sidebar-takeover.spec.ts": 7700,
- "tests/e2e/signoff-policy.spec.ts": 52229,
- "tests/e2e/smoke-lab-p1-p4.spec.ts": 19700,
- "tests/e2e/smoke-lab-p5-p7.spec.ts": 16416,
- "tests/e2e/task-loading-frame.spec.ts": 37600,
- "tests/e2e/task-reload.spec.ts": 21200,
- "tests/e2e/text-attachment-tabs.spec.ts": 18200,
- "tests/e2e/unikraft-connector.spec.ts": 4000
+ "tests/e2e/acp-stop-continuation.spec.ts": 69300,
+ "tests/e2e/action-test-agent-picker.spec.ts": 7200,
+ "tests/e2e/agent-chat-messages.spec.ts": 69900,
+ "tests/e2e/agent-chat-projects-handoff.spec.ts": 93000,
+ "tests/e2e/agent-chat-projects.spec.ts": 88900,
+ "tests/e2e/agent-chat-sessions.spec.ts": 104100,
+ "tests/e2e/agent-configuration.spec.ts": 111700,
+ "tests/e2e/agentmail.spec.ts": 17100,
+ "tests/e2e/ai-personal-connection-recovery.spec.ts": 12900,
+ "tests/e2e/announcement-first-session.spec.ts": 10900,
+ "tests/e2e/announcement-placement.spec.ts": 22700,
+ "tests/e2e/app-not-connected.spec.ts": 16700,
+ "tests/e2e/applications-crud.spec.ts": 9400,
+ "tests/e2e/apps-prosumer-mcp-flow.spec.ts": 21500,
+ "tests/e2e/archived-company-url.spec.ts": 6200,
+ "tests/e2e/artifact-tab-arrival.spec.ts": 18100,
+ "tests/e2e/artifact-uploads.spec.ts": 45900,
+ "tests/e2e/board-attachment-receipts.spec.ts": 147338,
+ "tests/e2e/cases-read-only.spec.ts": 9900,
+ "tests/e2e/chat-adapters-ui-messaging-batches.spec.ts": 95000,
+ "tests/e2e/chat-adapters-ui-messaging.spec.ts": 100900,
+ "tests/e2e/chat-adapters-ui-providers-catalog.spec.ts": 133000,
+ "tests/e2e/chat-adapters-ui-providers.spec.ts": 86800,
+ "tests/e2e/chunk-load-recovery.spec.ts": 17000,
+ "tests/e2e/classic-workspace.spec.ts": 10000,
+ "tests/e2e/cloud-auth.spec.ts": 49000,
+ "tests/e2e/company-context-refresh.spec.ts": 3600,
+ "tests/e2e/completed-task-paused-assignee.spec.ts": 32400,
+ "tests/e2e/composer-stop.spec.ts": 41900,
+ "tests/e2e/conference-room-typing-intro.spec.ts": 60600,
+ "tests/e2e/connection-intents.spec.ts": 25600,
+ "tests/e2e/connection-reviews.spec.ts": 121300,
+ "tests/e2e/coordinator-inbox-views.spec.ts": 31400,
+ "tests/e2e/daytona-connector.spec.ts": 6300,
+ "tests/e2e/disconnect-resilience.spec.ts": 116700,
+ "tests/e2e/disconnect-write-recovery.spec.ts": 56600,
+ "tests/e2e/document-image-gallery.spec.ts": 49400,
+ "tests/e2e/mcp-user-stories.spec.ts": 45900,
+ "tests/e2e/new-task-picker-touch.spec.ts": 23500,
+ "tests/e2e/onboarding.spec.ts": 78300,
+ "tests/e2e/paused-composer.spec.ts": 65200,
+ "tests/e2e/plan-task-fixture.spec.ts": 9200,
+ "tests/e2e/project-repositories.spec.ts": 19000,
+ "tests/e2e/railway-catalog.spec.ts": 5400,
+ "tests/e2e/runner-e2e-dashboard.spec.ts": 5378,
+ "tests/e2e/runner-task-creation.spec.ts": 35000,
+ "tests/e2e/sidebar-takeover.spec.ts": 12100,
+ "tests/e2e/signoff-policy.spec.ts": 57208,
+ "tests/e2e/smoke-lab-p1-p4.spec.ts": 22500,
+ "tests/e2e/smoke-lab-p5-p7.spec.ts": 19100,
+ "tests/e2e/task-loading-frame.spec.ts": 44200,
+ "tests/e2e/task-reload.spec.ts": 26600,
+ "tests/e2e/text-attachment-tabs.spec.ts": 16000,
+ "tests/e2e/unikraft-connector.spec.ts": 5800
}
}
diff --git a/scripts/e2e-shard.mjs b/scripts/e2e-shard.mjs
index b01ac28918c..75610783e87 100644
--- a/scripts/e2e-shard.mjs
+++ b/scripts/e2e-shard.mjs
@@ -20,6 +20,7 @@ export const IGNORED_SPECS = ["in-feed-native/**", "multi-user.spec.ts", "multi-
// with `SERIAL_SPECS` in tests/e2e/playwright.config.ts —
// `scripts/__tests__/e2e-shard.test.mjs` fails if the two ever drift.
export const SERIAL_SPECS = [
+ "agent-chat-projects-handoff.spec.ts",
"agent-chat-projects.spec.ts",
"agent-chat-sessions.spec.ts",
"agent-configuration.spec.ts",
@@ -36,11 +37,12 @@ export const SERIAL_SPECS = [
// Matches the 4-vCPU CI worker count in tests/e2e/playwright.config.ts for
// shards that contain only parallel-safe specs. Empirical wall-clock speedup
-// on 4-vCPU runners with 2 Chromium workers sharing one server + Postgres is
-// ~1.5x (measured on run 45245582904); using the empirical factor avoids
-// under-allocating shards to parallel specs.
+// on 4-vCPU runners with 2 Chromium workers sharing one server + non-durable
+// Postgres is ~1.85x (measured 1.78x-1.91x across shards 4-8 on run
+// 45440355579); using the empirical factor keeps serial and parallel shards
+// balanced across 12 shards.
export const DEFAULT_PARALLEL_WORKERS = 2;
-export const EFFECTIVE_PARALLEL_SPEEDUP = 1.5;
+export const EFFECTIVE_PARALLEL_SPEEDUP = 1.85;
export function isSerialE2eSpec(file) {
return SERIAL_SPECS.includes(path.posix.basename(file.split(path.sep).join("/")));
diff --git a/scripts/general-server-shard-durations.json b/scripts/general-server-shard-durations.json
index 0f158636879..e9b11bcf4fd 100644
--- a/scripts/general-server-shard-durations.json
+++ b/scripts/general-server-shard-durations.json
@@ -3,600 +3,614 @@
"unit": "ms",
"sources": [
{
- "pull": 22679,
- "run": 45238253588,
+ "run": 45440355579,
"attempt": 1,
- "sha": "8d513d5b1ab8fbfa2905d41be44c165b03a8a320",
- "url": "https://github.com/paperclipai/paperclip/actions/runs/45238253588"
+ "sha": "6ca7a27481e1af45c60069a563632f2b00a008a7",
+ "url": "https://github.com/paperclipai/paperclip/actions/runs/45440355579"
}
],
"coverage": {
- "measured": 2052,
- "withSetup": 2052,
- "inventory": 2033
+ "measured": 1577,
+ "withSetup": 1577,
+ "inventory": 2142
},
"durations": {
- "server/scripts/bundle-runtime.test.mjs": 2860,
- "server/scripts/prepare-runner-vendor.test.mjs": 1759,
- "server/scripts/reporting-lock-policy.test.mjs": 798,
- "server/scripts/sleep-otel-setup.test.mjs": 791,
- "server/scripts/sleep-qualification.test.mjs": 908,
- "server/scripts/typecheck-layers.test.mjs": 7818,
- "server/scripts/verify-runner-vendor-dependencies.test.mjs": 1068,
- "server/src/__tests__/abandoned-workspace-files-hold.test.ts": 15152,
- "server/src/__tests__/access-service.test.ts": 9874,
- "server/src/__tests__/access-validators.test.ts": 1606,
- "server/src/__tests__/activity-credential-access.test.ts": 6480,
- "server/src/__tests__/activity-log-responsible-user.test.ts": 8056,
- "server/src/__tests__/activity-service.test.ts": 11380,
- "server/src/__tests__/adapter-cost-failure-paths.test.ts": 7243,
- "server/src/__tests__/adapter-models.test.ts": 5837,
- "server/src/__tests__/adapter-registry.test.ts": 6247,
- "server/src/__tests__/adapter-session-codecs.test.ts": 1808,
- "server/src/__tests__/admission-independent-of-cleanup.test.ts": 10330,
- "server/src/__tests__/agent-auth-identity-transfer.test.ts": 7068,
- "server/src/__tests__/agent-auth-jwt.test.ts": 1662,
- "server/src/__tests__/agent-auth-middleware.test.ts": 6299,
- "server/src/__tests__/agent-auth-prepared-statements.test.ts": 6177,
- "server/src/__tests__/agent-avatars.test.ts": 7769,
- "server/src/__tests__/agent-budget-configuration.test.ts": 7808,
+ "server/scripts/build-config.test.mjs": 10828,
+ "server/scripts/bundle-runtime.test.mjs": 2999,
+ "server/scripts/prepare-runner-vendor.test.mjs": 1400,
+ "server/scripts/reporting-lock-policy.test.mjs": 838,
+ "server/scripts/sleep-otel-setup.test.mjs": 945,
+ "server/scripts/sleep-qualification.test.mjs": 978,
+ "server/scripts/typecheck-layers.test.mjs": 9834,
+ "server/scripts/verify-runner-vendor-dependencies.test.mjs": 805,
+ "server/src/__tests__/abandoned-workspace-files-hold.test.ts": 19046,
+ "server/src/__tests__/access-service.test.ts": 10890,
+ "server/src/__tests__/access-validators.test.ts": 1051,
+ "server/src/__tests__/activity-credential-access.test.ts": 7026,
+ "server/src/__tests__/activity-log-responsible-user.test.ts": 7102,
+ "server/src/__tests__/activity-service.test.ts": 21655,
+ "server/src/__tests__/adapter-cost-failure-paths.test.ts": 9260,
+ "server/src/__tests__/adapter-models.test.ts": 6288,
+ "server/src/__tests__/adapter-registry.test.ts": 6477,
+ "server/src/__tests__/adapter-session-codecs.test.ts": 1997,
+ "server/src/__tests__/admission-independent-of-cleanup.test.ts": 12635,
+ "server/src/__tests__/agent-auth-identity-transfer.test.ts": 8036,
+ "server/src/__tests__/agent-auth-jwt.test.ts": 1283,
+ "server/src/__tests__/agent-auth-middleware.test.ts": 7331,
+ "server/src/__tests__/agent-auth-prepared-statements.test.ts": 7540,
+ "server/src/__tests__/agent-avatars.test.ts": 14246,
+ "server/src/__tests__/agent-budget-configuration.test.ts": 6576,
"server/src/__tests__/agent-chat-messages.test.ts": 34676,
- "server/src/__tests__/agent-commentary-daytona-smoke.test.ts": 2229,
- "server/src/__tests__/agent-commentary-helper.test.ts": 12029,
- "server/src/__tests__/agent-commentary-reader.test.ts": 6994,
- "server/src/__tests__/agent-commentary-skills.test.ts": 1745,
+ "server/src/__tests__/agent-commentary-daytona-smoke.test.ts": 2310,
+ "server/src/__tests__/agent-commentary-helper.test.ts": 12362,
+ "server/src/__tests__/agent-commentary-reader.test.ts": 6792,
+ "server/src/__tests__/agent-commentary-skills.test.ts": 1874,
"server/src/__tests__/agent-commentary.integration.test.ts": 16813,
- "server/src/__tests__/agent-config-read-access.test.ts": 9434,
- "server/src/__tests__/agent-configuration-revision.test.ts": 1934,
- "server/src/__tests__/agent-configuration-save.test.ts": 9334,
+ "server/src/__tests__/agent-config-read-access.test.ts": 9876,
+ "server/src/__tests__/agent-configuration-revision.test.ts": 1907,
+ "server/src/__tests__/agent-configuration-save.test.ts": 12621,
"server/src/__tests__/agent-connection-catalog.integration.test.ts": 7637,
- "server/src/__tests__/agent-conversation-delivery.test.ts": 9155,
+ "server/src/__tests__/agent-conversation-delivery.test.ts": 9506,
"server/src/__tests__/agent-conversations.test.ts": 30413,
- "server/src/__tests__/agent-default-configure-grants.test.ts": 6637,
- "server/src/__tests__/agent-directory-lock-crash-point.test.ts": 6090,
- "server/src/__tests__/agent-directory-probe.test.ts": 3480,
- "server/src/__tests__/agent-directory-remote-checkpoint-lock.test.ts": 11799,
+ "server/src/__tests__/agent-default-configure-grants.test.ts": 8492,
+ "server/src/__tests__/agent-directory-lock-crash-point.test.ts": 6804,
+ "server/src/__tests__/agent-directory-probe.test.ts": 3446,
+ "server/src/__tests__/agent-directory-remote-checkpoint-lock.test.ts": 11747,
"server/src/__tests__/agent-directory-working-copies.test.ts": 110993,
- "server/src/__tests__/agent-file-checkpoint-locking.test.ts": 10603,
- "server/src/__tests__/agent-file-checkpoints.test.ts": 5828,
+ "server/src/__tests__/agent-file-checkpoint-locking.test.ts": 8499,
+ "server/src/__tests__/agent-file-checkpoints.test.ts": 7656,
"server/src/__tests__/agent-file-durability.test.ts": 19117,
- "server/src/__tests__/agent-file-restore-locking.test.ts": 7419,
- "server/src/__tests__/agent-harness-verification-preflight.test.ts": 7845,
- "server/src/__tests__/agent-harness-verification-provider-api.test.ts": 10297,
- "server/src/__tests__/agent-harness-verification-remote.test.ts": 6926,
- "server/src/__tests__/agent-harness-verification.test.ts": 6941,
+ "server/src/__tests__/agent-file-restore-locking.test.ts": 7994,
+ "server/src/__tests__/agent-harness-verification-preflight.test.ts": 8076,
+ "server/src/__tests__/agent-harness-verification-provider-api.test.ts": 13173,
+ "server/src/__tests__/agent-harness-verification-remote.test.ts": 8080,
+ "server/src/__tests__/agent-harness-verification.test.ts": 7674,
"server/src/__tests__/agent-hire-ai-connections.test.ts": 28940,
- "server/src/__tests__/agent-identity-master-key.test.ts": 1135,
- "server/src/__tests__/agent-identity.test.ts": 31776,
- "server/src/__tests__/agent-instance-secrets.test.ts": 10141,
+ "server/src/__tests__/agent-identity-lock-order.test.ts": 7916,
+ "server/src/__tests__/agent-identity-master-key.test.ts": 1118,
+ "server/src/__tests__/agent-identity.test.ts": 31202,
+ "server/src/__tests__/agent-instance-secrets.test.ts": 8270,
"server/src/__tests__/agent-instruction-copy-retry-backoff.test.ts": 10912,
- "server/src/__tests__/agent-instruction-git-exclusion.test.ts": 3116,
- "server/src/__tests__/agent-instruction-revisions.test.ts": 6931,
+ "server/src/__tests__/agent-instruction-git-exclusion.test.ts": 3030,
+ "server/src/__tests__/agent-instruction-revisions.test.ts": 11290,
+ "server/src/__tests__/agent-instruction-save-history.test.ts": 7053,
"server/src/__tests__/agent-instruction-working-copies.test.ts": 37991,
- "server/src/__tests__/agent-instructions-service.test.ts": 6897,
+ "server/src/__tests__/agent-instructions-service.test.ts": 7457,
"server/src/__tests__/agent-interaction-acceptance.test.ts": 85112,
- "server/src/__tests__/agent-interaction-mutations.test.ts": 9010,
- "server/src/__tests__/agent-interaction-permissions.test.ts": 29587,
- "server/src/__tests__/agent-interaction-policy.test.ts": 2520,
- "server/src/__tests__/agent-invokability.test.ts": 1853,
- "server/src/__tests__/agent-jwt-request-authentication.test.ts": 7439,
- "server/src/__tests__/agent-observability-test.test.ts": 2108,
- "server/src/__tests__/agent-observability.test.ts": 9432,
- "server/src/__tests__/agent-permission-grants.test.ts": 6963,
- "server/src/__tests__/agent-permissions-service.test.ts": 1282,
- "server/src/__tests__/agent-persona-persistence.test.ts": 5549,
- "server/src/__tests__/agent-profile-avatar.test.ts": 10716,
- "server/src/__tests__/agent-project-access.test.ts": 8430,
- "server/src/__tests__/agent-provider-rate-limits.test.ts": 7894,
- "server/src/__tests__/agent-record-read-projections.test.ts": 7836,
- "server/src/__tests__/agent-refusal-finality.test.ts": 5599,
- "server/src/__tests__/agent-reporting-chain.test.ts": 11480,
- "server/src/__tests__/agent-run-authentication.test.ts": 7411,
- "server/src/__tests__/agent-runner-platform.test.ts": 5151,
- "server/src/__tests__/agent-runtime-assignments.test.ts": 10426,
- "server/src/__tests__/agent-runtime-connector-access.test.ts": 9324,
+ "server/src/__tests__/agent-interaction-mutations.test.ts": 8616,
+ "server/src/__tests__/agent-interaction-permissions.test.ts": 27144,
+ "server/src/__tests__/agent-interaction-policy.test.ts": 2815,
+ "server/src/__tests__/agent-invokability.test.ts": 1832,
+ "server/src/__tests__/agent-jwt-request-authentication.test.ts": 6590,
+ "server/src/__tests__/agent-observability-test.test.ts": 2249,
+ "server/src/__tests__/agent-observability.test.ts": 8490,
+ "server/src/__tests__/agent-permission-grants.test.ts": 7172,
+ "server/src/__tests__/agent-permissions-service.test.ts": 1668,
+ "server/src/__tests__/agent-persona-persistence.test.ts": 7154,
+ "server/src/__tests__/agent-profile-avatar.test.ts": 9761,
+ "server/src/__tests__/agent-project-access.test.ts": 10341,
+ "server/src/__tests__/agent-provider-rate-limits.test.ts": 8930,
+ "server/src/__tests__/agent-record-read-projections.test.ts": 8234,
+ "server/src/__tests__/agent-refusal-finality.test.ts": 7583,
+ "server/src/__tests__/agent-reporting-chain.test.ts": 10210,
+ "server/src/__tests__/agent-run-authentication.test.ts": 7733,
+ "server/src/__tests__/agent-runner-platform.test.ts": 5622,
+ "server/src/__tests__/agent-runtime-assignments.test.ts": 14400,
+ "server/src/__tests__/agent-runtime-connector-access.test.ts": 24135,
"server/src/__tests__/agent-runtime-hooks.test.ts": 21201,
- "server/src/__tests__/agent-runtime-settings.test.ts": 1539,
- "server/src/__tests__/agent-runtime-skills.test.ts": 8161,
- "server/src/__tests__/agent-runtime-tool-definitions.test.ts": 13696,
+ "server/src/__tests__/agent-runtime-settings.test.ts": 1721,
+ "server/src/__tests__/agent-runtime-skills.test.ts": 8442,
+ "server/src/__tests__/agent-runtime-tool-definitions.test.ts": 25917,
"server/src/__tests__/agent-scaling-load-model.test.ts": 55895,
- "server/src/__tests__/agent-setup-connection-intents.test.ts": 10060,
- "server/src/__tests__/agent-shortname-collision.test.ts": 7092,
- "server/src/__tests__/agent-skill-contract.test.ts": 776,
- "server/src/__tests__/agent-task-hierarchy-depth.test.ts": 8587,
- "server/src/__tests__/agent-task-run-telemetry.test.ts": 3688,
+ "server/src/__tests__/agent-setup-connection-intents.test.ts": 12724,
+ "server/src/__tests__/agent-setup-progress.test.ts": 7885,
+ "server/src/__tests__/agent-shortname-collision.test.ts": 6370,
+ "server/src/__tests__/agent-skill-contract.test.ts": 968,
+ "server/src/__tests__/agent-task-hierarchy-depth.test.ts": 9313,
+ "server/src/__tests__/agent-task-run-telemetry.test.ts": 3811,
"server/src/__tests__/agent-timer-deadlines.test.ts": 49401,
- "server/src/__tests__/agent-volume-free-config-patch.test.ts": 6909,
- "server/src/__tests__/agentmail-api.test.ts": 3318,
- "server/src/__tests__/agents-adapter-config-user-secret.test.ts": 7788,
- "server/src/__tests__/agents-claude-oauth-binding.test.ts": 9167,
- "server/src/__tests__/agents-paperclip-runner-skills.test.ts": 1727,
- "server/src/__tests__/agents-pending-approval-config.test.ts": 11998,
- "server/src/__tests__/agents-service-clear-error.test.ts": 7321,
- "server/src/__tests__/agents-service-secret-bindings.test.ts": 7450,
- "server/src/__tests__/aggregator-app-discovery.test.ts": 1113,
- "server/src/__tests__/aggregator-app-sync.test.ts": 9054,
- "server/src/__tests__/ai-auth-failure.test.ts": 1892,
- "server/src/__tests__/ai-connection-binding-mode.test.ts": 7792,
- "server/src/__tests__/ai-connection-session.test.ts": 6830,
- "server/src/__tests__/ai-connections.test.ts": 62434,
- "server/src/__tests__/ai-legacy-compatibility.test.ts": 7545,
- "server/src/__tests__/ai-provider-routing.test.ts": 1945,
- "server/src/__tests__/announcement-animation.test.ts": 2350,
- "server/src/__tests__/announcement-feed.test.ts": 2274,
- "server/src/__tests__/announcement-publisher.test.ts": 2273,
+ "server/src/__tests__/agent-volume-free-config-patch.test.ts": 8394,
+ "server/src/__tests__/agentmail-api.test.ts": 3564,
+ "server/src/__tests__/agents-adapter-config-user-secret.test.ts": 9218,
+ "server/src/__tests__/agents-claude-oauth-binding.test.ts": 12273,
+ "server/src/__tests__/agents-paperclip-runner-skills.test.ts": 1752,
+ "server/src/__tests__/agents-pending-approval-config.test.ts": 7947,
+ "server/src/__tests__/agents-service-clear-error.test.ts": 8356,
+ "server/src/__tests__/agents-service-secret-bindings.test.ts": 8842,
+ "server/src/__tests__/aggregator-app-discovery.test.ts": 913,
+ "server/src/__tests__/aggregator-app-sync.test.ts": 10598,
+ "server/src/__tests__/ai-auth-failure.test.ts": 1523,
+ "server/src/__tests__/ai-connection-binding-mode.test.ts": 6286,
+ "server/src/__tests__/ai-connection-session.test.ts": 7093,
+ "server/src/__tests__/ai-connections.test.ts": 72277,
+ "server/src/__tests__/ai-legacy-compatibility.test.ts": 7520,
+ "server/src/__tests__/ai-provider-routing.test.ts": 1988,
+ "server/src/__tests__/announcement-animation.test.ts": 2926,
+ "server/src/__tests__/announcement-feed.test.ts": 2568,
+ "server/src/__tests__/announcement-publisher.test.ts": 2614,
"server/src/__tests__/antigravity-ai-connections.integration.test.ts": 9951,
- "server/src/__tests__/antigravity-ai-runtime.test.ts": 7446,
- "server/src/__tests__/antigravity-connection-models.test.ts": 1130,
- "server/src/__tests__/antigravity-connection-probe.test.ts": 2751,
- "server/src/__tests__/antigravity-local-ai-login.test.ts": 2883,
- "server/src/__tests__/antigravity-managed-subscription.test.ts": 3205,
- "server/src/__tests__/api-compression.test.ts": 1020,
- "server/src/__tests__/api-server-timing.test.ts": 728,
- "server/src/__tests__/app-hmr-port.test.ts": 9594,
- "server/src/__tests__/app-permission-save.test.ts": 8509,
- "server/src/__tests__/app-private-hostname-gate.test.ts": 9394,
- "server/src/__tests__/app-vite-dev-routing.test.ts": 10177,
- "server/src/__tests__/approval-queue-seeding-work.test.ts": 42153,
- "server/src/__tests__/approval-retention-work.test.ts": 28754,
- "server/src/__tests__/approvals-service.test.ts": 7905,
+ "server/src/__tests__/antigravity-ai-runtime.test.ts": 7053,
+ "server/src/__tests__/antigravity-connection-models.test.ts": 1786,
+ "server/src/__tests__/antigravity-connection-probe.test.ts": 3014,
+ "server/src/__tests__/antigravity-local-ai-login.test.ts": 2819,
+ "server/src/__tests__/antigravity-managed-subscription.test.ts": 3335,
+ "server/src/__tests__/antigravity-save-refusal.test.ts": 8917,
+ "server/src/__tests__/api-compression.test.ts": 815,
+ "server/src/__tests__/api-server-timing.test.ts": 1052,
+ "server/src/__tests__/app-hmr-port.test.ts": 14997,
+ "server/src/__tests__/app-permission-save.test.ts": 8350,
+ "server/src/__tests__/app-private-hostname-gate.test.ts": 13115,
+ "server/src/__tests__/app-vite-dev-routing.test.ts": 7348,
+ "server/src/__tests__/approval-queue-seeding-work.test.ts": 46649,
+ "server/src/__tests__/approval-retention-work.test.ts": 39181,
+ "server/src/__tests__/approvals-service.test.ts": 6557,
"server/src/__tests__/archived-nested-repository.test.ts": 16037,
- "server/src/__tests__/artifact-review-documents-service.test.ts": 3519,
- "server/src/__tests__/assigned-work-invariant.test.ts": 35951,
+ "server/src/__tests__/artifact-review-documents-service.test.ts": 3862,
+ "server/src/__tests__/assigned-work-invariant.test.ts": 46131,
"server/src/__tests__/assigned-work-recheck-idle.test.ts": 53061,
"server/src/__tests__/assigned-work-stalled-queued-run.test.ts": 13543,
"server/src/__tests__/assigned-work-sweep-round-trips.test.ts": 15224,
- "server/src/__tests__/attachment-types.test.ts": 1034,
- "server/src/__tests__/attention-audience-service.test.ts": 17695,
+ "server/src/__tests__/attachment-types.test.ts": 924,
+ "server/src/__tests__/attention-audience-service.test.ts": 22351,
"server/src/__tests__/attention-close.test.ts": 28295,
- "server/src/__tests__/attention-current-cards.test.ts": 13125,
- "server/src/__tests__/attention-escalation-owners.test.ts": 13872,
- "server/src/__tests__/attention-excerpt.test.ts": 9944,
- "server/src/__tests__/attention-obligations.test.ts": 12566,
- "server/src/__tests__/attention-receipts.test.ts": 12603,
+ "server/src/__tests__/attention-current-cards.test.ts": 15676,
+ "server/src/__tests__/attention-escalation-owners.test.ts": 12834,
+ "server/src/__tests__/attention-excerpt.test.ts": 5069,
+ "server/src/__tests__/attention-obligations.test.ts": 13786,
+ "server/src/__tests__/attention-receipts.test.ts": 15595,
"server/src/__tests__/attention-retention-candidates.test.ts": 6627,
"server/src/__tests__/attention-retention-work.test.ts": 77085,
- "server/src/__tests__/attention-service.test.ts": 106942,
- "server/src/__tests__/attention-source-eligibility.test.ts": 1808,
+ "server/src/__tests__/attention-service.test.ts": 116849,
+ "server/src/__tests__/attention-source-eligibility.test.ts": 1601,
"server/src/__tests__/attention-summary-counts.test.ts": 80693,
- "server/src/__tests__/authorization-privacy-query.test.ts": 8222,
- "server/src/__tests__/authorization-request-reads.test.ts": 9787,
- "server/src/__tests__/authorization-run-context.test.ts": 3242,
- "server/src/__tests__/authorization-service.test.ts": 6576,
+ "server/src/__tests__/authorization-privacy-query.test.ts": 8400,
+ "server/src/__tests__/authorization-request-reads.test.ts": 9550,
+ "server/src/__tests__/authorization-run-context.test.ts": 3024,
+ "server/src/__tests__/authorization-service.test.ts": 8151,
"server/src/__tests__/automatic-run-brake-import.test.ts": 5272,
"server/src/__tests__/automatic-run-brake-recovery-passes.test.ts": 32314,
"server/src/__tests__/automatic-run-brake.test.ts": 22864,
"server/src/__tests__/automatic-run-start-gate.test.ts": 50100,
- "server/src/__tests__/aws-secrets-manager-provider.test.ts": 750,
- "server/src/__tests__/batched-chat-authorization.integration.test.ts": 6015,
- "server/src/__tests__/better-auth-credential-signup.integration.test.ts": 2931,
- "server/src/__tests__/better-auth.test.ts": 2196,
- "server/src/__tests__/blocked-inbox-review-wait-scope.test.ts": 6326,
+ "server/src/__tests__/aws-mcp-connector.test.ts": 10337,
+ "server/src/__tests__/aws-secrets-manager-provider.test.ts": 763,
+ "server/src/__tests__/batched-chat-authorization.integration.test.ts": 6957,
+ "server/src/__tests__/better-auth-credential-signup.integration.test.ts": 3629,
+ "server/src/__tests__/better-auth.test.ts": 2565,
+ "server/src/__tests__/blocked-inbox-review-wait-scope.test.ts": 7201,
"server/src/__tests__/blocker-workspace-history-performance.test.ts": 48579,
- "server/src/__tests__/board-access-denial.test.ts": 6323,
- "server/src/__tests__/board-claim.test.ts": 6225,
- "server/src/__tests__/board-mutation-guard.test.ts": 1052,
+ "server/src/__tests__/board-access-denial.test.ts": 7595,
+ "server/src/__tests__/board-claim.test.ts": 6230,
+ "server/src/__tests__/board-mutation-guard.test.ts": 992,
"server/src/__tests__/board-native-attachments.integration.test.ts": 8898,
- "server/src/__tests__/body-limits.test.ts": 730,
- "server/src/__tests__/braintrust-connection.test.ts": 12515,
- "server/src/__tests__/browser-tracing-config.test.ts": 1554,
+ "server/src/__tests__/body-limits.test.ts": 814,
+ "server/src/__tests__/braintrust-connection.test.ts": 12584,
+ "server/src/__tests__/browser-tracing-config.test.ts": 1631,
"server/src/__tests__/browser-use-connection.test.ts": 40117,
- "server/src/__tests__/browser-use-viewport.test.ts": 1596,
+ "server/src/__tests__/browser-use-viewport.test.ts": 1710,
"server/src/__tests__/browser-use-work.test.ts": 1905,
- "server/src/__tests__/browser-use.test.ts": 1691,
- "server/src/__tests__/budget-control-publication.test.ts": 10444,
- "server/src/__tests__/budget-enforcement-scoping.test.ts": 15337,
- "server/src/__tests__/budget-enforcement-worker.test.ts": 2322,
- "server/src/__tests__/budget-evaluation-work.test.ts": 17407,
- "server/src/__tests__/budget-live-attempts.test.ts": 9385,
- "server/src/__tests__/budget-policy-write-contention.test.ts": 7527,
- "server/src/__tests__/budgets-history.test.ts": 7267,
- "server/src/__tests__/budgets-service.test.ts": 9228,
- "server/src/__tests__/build-commit.test.ts": 715,
- "server/src/__tests__/build-version.test.ts": 807,
- "server/src/__tests__/built-in-agents.test.ts": 32604,
- "server/src/__tests__/bundled-plugin-package.test.ts": 1829,
- "server/src/__tests__/bundled-plugin-registration.test.ts": 10188,
- "server/src/__tests__/bundled-plugin-runtime.test.ts": 923,
- "server/src/__tests__/bundled-plugins.test.ts": 1485,
+ "server/src/__tests__/browser-use.test.ts": 1781,
+ "server/src/__tests__/budget-control-publication.test.ts": 11498,
+ "server/src/__tests__/budget-enforcement-scoping.test.ts": 17858,
+ "server/src/__tests__/budget-enforcement-worker.test.ts": 2014,
+ "server/src/__tests__/budget-evaluation-work.test.ts": 15212,
+ "server/src/__tests__/budget-live-attempts.test.ts": 11741,
+ "server/src/__tests__/budget-policy-write-contention.test.ts": 12488,
+ "server/src/__tests__/budgets-history.test.ts": 8128,
+ "server/src/__tests__/budgets-service.test.ts": 9411,
+ "server/src/__tests__/build-commit.test.ts": 920,
+ "server/src/__tests__/build-version.test.ts": 783,
+ "server/src/__tests__/built-in-agents.test.ts": 48704,
+ "server/src/__tests__/bundled-plugin-package.test.ts": 2284,
+ "server/src/__tests__/bundled-plugin-registration.test.ts": 9429,
+ "server/src/__tests__/bundled-plugin-runtime.test.ts": 942,
+ "server/src/__tests__/bundled-plugins.test.ts": 2623,
"server/src/__tests__/case-handoff-legacy.integration.test.ts": 16308,
- "server/src/__tests__/case-history-api-discovery.test.ts": 6863,
+ "server/src/__tests__/case-history-api-discovery.test.ts": 5795,
"server/src/__tests__/case-mutation-fence.integration.test.ts": 9507,
- "server/src/__tests__/change-consent-gate.test.ts": 3689,
+ "server/src/__tests__/change-consent-gate.test.ts": 3035,
"server/src/__tests__/chat-action-work.test.ts": 6415,
- "server/src/__tests__/chat-admission-condition.test.ts": 2780,
+ "server/src/__tests__/chat-admission-condition.test.ts": 2827,
"server/src/__tests__/chat-channels.integration.test.ts": 428744,
"server/src/__tests__/chat-completion-delivery.test.ts": 19576,
- "server/src/__tests__/chat-completion-proof.test.ts": 2281,
+ "server/src/__tests__/chat-completion-proof.test.ts": 3148,
"server/src/__tests__/chat-delivery-work.test.ts": 6220,
- "server/src/__tests__/chat-execution-defaults.test.ts": 6424,
- "server/src/__tests__/chat-failed-run-retry-boundary.test.ts": 8628,
- "server/src/__tests__/chat-interaction-publications.test.ts": 7703,
- "server/src/__tests__/chat-native-progress-statement.test.ts": 9096,
+ "server/src/__tests__/chat-execution-defaults.test.ts": 6586,
+ "server/src/__tests__/chat-failed-run-retry-boundary.test.ts": 9094,
+ "server/src/__tests__/chat-interaction-publications.test.ts": 19155,
+ "server/src/__tests__/chat-native-progress-statement.test.ts": 9544,
"server/src/__tests__/chat-native-progress-work.test.ts": 15340,
"server/src/__tests__/chat-project-tools.test.ts": 31556,
"server/src/__tests__/chat-receiver-work.test.ts": 21267,
- "server/src/__tests__/chat-run-milestone-candidates.test.ts": 6827,
+ "server/src/__tests__/chat-run-milestone-candidates.test.ts": 8036,
"server/src/__tests__/chat-run-milestone-governed-work.test.ts": 10752,
"server/src/__tests__/chat-run-milestone-identity-work.test.ts": 8727,
"server/src/__tests__/chat-run-milestone-recovery-work.test.ts": 9193,
"server/src/__tests__/chat-run-milestone-resource-work.test.ts": 8027,
- "server/src/__tests__/chat-run-milestone-toast.test.ts": 7000,
+ "server/src/__tests__/chat-run-milestone-toast.test.ts": 7397,
"server/src/__tests__/chat-run-milestone-work.test.ts": 55190,
- "server/src/__tests__/chat-webhook-diagnostics.test.ts": 8238,
- "server/src/__tests__/chat-webhook-public-url.test.ts": 2429,
- "server/src/__tests__/claude-local-adapter-environment.test.ts": 2899,
- "server/src/__tests__/claude-local-adapter.test.ts": 1851,
+ "server/src/__tests__/chat-webhook-diagnostics.test.ts": 12531,
+ "server/src/__tests__/chat-webhook-public-url.test.ts": 2604,
+ "server/src/__tests__/claude-local-adapter-environment.test.ts": 2471,
+ "server/src/__tests__/claude-local-adapter.test.ts": 1850,
"server/src/__tests__/claude-local-execute.test.ts": 29948,
- "server/src/__tests__/claude-local-skill-sync.test.ts": 1418,
- "server/src/__tests__/cleanup-removal-service.test.ts": 8452,
- "server/src/__tests__/cli-invocation-safety.test.ts": 2771,
+ "server/src/__tests__/claude-local-skill-sync.test.ts": 2075,
+ "server/src/__tests__/cleanup-removal-service.test.ts": 10068,
+ "server/src/__tests__/cli-invocation-safety.test.ts": 2672,
"server/src/__tests__/closed-native-receipt-accounting.test.ts": 38079,
- "server/src/__tests__/cloud-bundled-package-digest.test.ts": 2275,
+ "server/src/__tests__/cloud-bundled-package-digest.test.ts": 2285,
"server/src/__tests__/cloud-configuration-migration-postgres.test.ts": 7737,
- "server/src/__tests__/cloud-configuration-readers.test.ts": 5910,
- "server/src/__tests__/cloud-control-task-drain.test.ts": 2141,
- "server/src/__tests__/cloud-image-bundled-plugins.test.ts": 850,
- "server/src/__tests__/cloud-image-sentry.test.ts": 1184,
- "server/src/__tests__/cloud-instance.test.ts": 710,
- "server/src/__tests__/cloud-lifecycle-sync.test.ts": 878,
- "server/src/__tests__/cloud-portfolio-error.test.ts": 619,
- "server/src/__tests__/cloud-posthog-browser.test.ts": 9482,
- "server/src/__tests__/cloud-posthog-config.test.ts": 702,
- "server/src/__tests__/cloud-runtime-config.test.ts": 6702,
- "server/src/__tests__/cloud-runtime-identity.test.ts": 7463,
- "server/src/__tests__/cloud-tenant-actor-round-trips.test.ts": 10396,
- "server/src/__tests__/cloud-tenant-actor-statements.test.ts": 8162,
- "server/src/__tests__/cloud-tenant-company-provisioning.test.ts": 5911,
- "server/src/__tests__/cloud-tenant-transient-db-retry.test.ts": 7596,
- "server/src/__tests__/cloud-warm-standby.test.ts": 6419,
- "server/src/__tests__/codex-auth-reconciliation.test.ts": 2055,
- "server/src/__tests__/codex-local-adapter-environment.test.ts": 1855,
- "server/src/__tests__/codex-local-adapter.test.ts": 1429,
+ "server/src/__tests__/cloud-configuration-qualification.test.ts": 1978,
+ "server/src/__tests__/cloud-configuration-readers.test.ts": 7314,
+ "server/src/__tests__/cloud-control-task-drain.test.ts": 2374,
+ "server/src/__tests__/cloud-image-bundled-plugins.test.ts": 906,
+ "server/src/__tests__/cloud-image-sentry.test.ts": 895,
+ "server/src/__tests__/cloud-instance.test.ts": 753,
+ "server/src/__tests__/cloud-lifecycle-sync.test.ts": 934,
+ "server/src/__tests__/cloud-portfolio-error.test.ts": 679,
+ "server/src/__tests__/cloud-posthog-browser.test.ts": 9856,
+ "server/src/__tests__/cloud-posthog-config.test.ts": 904,
+ "server/src/__tests__/cloud-runtime-config.test.ts": 7629,
+ "server/src/__tests__/cloud-runtime-identity.test.ts": 9263,
+ "server/src/__tests__/cloud-tenant-actor-round-trips.test.ts": 11996,
+ "server/src/__tests__/cloud-tenant-actor-statements.test.ts": 8102,
+ "server/src/__tests__/cloud-tenant-company-provisioning.test.ts": 8795,
+ "server/src/__tests__/cloud-tenant-transient-db-retry.test.ts": 6866,
+ "server/src/__tests__/cloud-warm-standby.test.ts": 8094,
+ "server/src/__tests__/codex-auth-reconciliation.test.ts": 2270,
+ "server/src/__tests__/codex-local-adapter-environment.test.ts": 2461,
+ "server/src/__tests__/codex-local-adapter.test.ts": 2155,
"server/src/__tests__/codex-local-execute.test.ts": 11921,
- "server/src/__tests__/codex-local-skill-injection.test.ts": 1686,
- "server/src/__tests__/codex-local-skill-sync.test.ts": 1906,
- "server/src/__tests__/committed-chat-response-authority.test.ts": 1818,
- "server/src/__tests__/companies-service.test.ts": 13659,
- "server/src/__tests__/company-artifacts-service.test.ts": 13229,
- "server/src/__tests__/company-cloud-floor.test.ts": 7990,
- "server/src/__tests__/company-import-cloud-floor.test.ts": 8056,
- "server/src/__tests__/company-portability-import-batching.test.ts": 8431,
- "server/src/__tests__/company-quota-windows.test.ts": 2490,
- "server/src/__tests__/company-search-extract-service.test.ts": 2861,
- "server/src/__tests__/company-search-service.test.ts": 9014,
- "server/src/__tests__/company-skill-import-boundary.test.ts": 8177,
- "server/src/__tests__/company-skill-policy-service.test.ts": 6978,
- "server/src/__tests__/company-skill-test-runs-service.test.ts": 17462,
+ "server/src/__tests__/codex-local-skill-injection.test.ts": 1843,
+ "server/src/__tests__/codex-local-skill-sync.test.ts": 1977,
+ "server/src/__tests__/committed-chat-response-authority.test.ts": 2294,
+ "server/src/__tests__/companies-service.test.ts": 18908,
+ "server/src/__tests__/company-artifacts-service.test.ts": 12706,
+ "server/src/__tests__/company-cloud-floor.test.ts": 6550,
+ "server/src/__tests__/company-deletion-concurrent-activity.test.ts": 7218,
+ "server/src/__tests__/company-import-cloud-floor.test.ts": 6363,
+ "server/src/__tests__/company-portability-import-batching.test.ts": 11583,
+ "server/src/__tests__/company-quota-windows.test.ts": 2116,
+ "server/src/__tests__/company-search-extract-service.test.ts": 3176,
+ "server/src/__tests__/company-search-service.test.ts": 20679,
+ "server/src/__tests__/company-skill-import-boundary.test.ts": 9253,
+ "server/src/__tests__/company-skill-policy-service.test.ts": 7474,
+ "server/src/__tests__/company-skill-test-runs-service.test.ts": 18784,
"server/src/__tests__/company-skills-catalog-service.test.ts": 19294,
- "server/src/__tests__/company-skills-detail.test.ts": 7054,
- "server/src/__tests__/company-skills-empty-runtime.test.ts": 7582,
- "server/src/__tests__/company-skills-list-statements.test.ts": 9172,
- "server/src/__tests__/company-skills-observability.test.ts": 7541,
- "server/src/__tests__/company-skills-runtime-concurrency.test.ts": 8240,
- "server/src/__tests__/company-skills-runtime-selection.test.ts": 10199,
- "server/src/__tests__/company-skills-service.test.ts": 72609,
- "server/src/__tests__/company-skills.test.ts": 6274,
- "server/src/__tests__/company-transfer-runs.test.ts": 2009,
- "server/src/__tests__/company-work-batch.test.ts": 714,
- "server/src/__tests__/completed-turn-cleanup-hold-settle.test.ts": 13362,
+ "server/src/__tests__/company-skills-detail.test.ts": 7649,
+ "server/src/__tests__/company-skills-empty-runtime.test.ts": 5736,
+ "server/src/__tests__/company-skills-list-statements.test.ts": 10225,
+ "server/src/__tests__/company-skills-observability.test.ts": 7192,
+ "server/src/__tests__/company-skills-runtime-concurrency.test.ts": 9022,
+ "server/src/__tests__/company-skills-runtime-selection.test.ts": 8641,
+ "server/src/__tests__/company-skills-service.test.ts": 75744,
+ "server/src/__tests__/company-skills.test.ts": 7335,
+ "server/src/__tests__/company-transfer-runs.test.ts": 3082,
+ "server/src/__tests__/company-work-batch.test.ts": 863,
+ "server/src/__tests__/completed-turn-cleanup-hold-settle.test.ts": 13914,
"server/src/__tests__/composio-app-setup.test.ts": 9173,
- "server/src/__tests__/config-file.test.ts": 1133,
- "server/src/__tests__/config-tailnet-bind-detection.test.ts": 3389,
- "server/src/__tests__/configured-secret-guidance.test.ts": 2076,
- "server/src/__tests__/confirmation-comment-resolution.test.ts": 9855,
+ "server/src/__tests__/config-file.test.ts": 1668,
+ "server/src/__tests__/config-tailnet-bind-detection.test.ts": 4471,
+ "server/src/__tests__/configured-secret-guidance.test.ts": 1951,
+ "server/src/__tests__/confirmation-comment-resolution.test.ts": 11338,
"server/src/__tests__/connection-aggregator-fallback.test.ts": 31814,
- "server/src/__tests__/connection-grant-resolution.test.ts": 7038,
+ "server/src/__tests__/connection-grant-resolution.test.ts": 9457,
"server/src/__tests__/connection-install-capabilities.test.ts": 7067,
- "server/src/__tests__/connection-instructions.test.ts": 8449,
- "server/src/__tests__/connection-intents-service.test.ts": 15849,
- "server/src/__tests__/connection-management.integration.test.ts": 185806,
- "server/src/__tests__/connection-profile-configuration.test.ts": 7082,
- "server/src/__tests__/connector-tool-policy.test.ts": 6365,
- "server/src/__tests__/container-init-reaping.test.ts": 696,
- "server/src/__tests__/context-compaction.test.ts": 2386,
+ "server/src/__tests__/connection-instructions.test.ts": 8609,
+ "server/src/__tests__/connection-intents-service.test.ts": 29268,
+ "server/src/__tests__/connection-management.integration.test.ts": 181790,
+ "server/src/__tests__/connection-profile-configuration.test.ts": 8513,
+ "server/src/__tests__/connector-tool-policy.test.ts": 6985,
+ "server/src/__tests__/container-init-reaping.test.ts": 774,
+ "server/src/__tests__/context-compaction.test.ts": 2410,
"server/src/__tests__/continuation-delivery-unwakeable-agent-idle.test.ts": 12925,
"server/src/__tests__/controller-instance-lease.test.ts": 26788,
- "server/src/__tests__/conversation-settlement-transfer.test.ts": 12265,
+ "server/src/__tests__/conversation-settlement-transfer.test.ts": 12284,
"server/src/__tests__/coordinator-handoff.test.ts": 12393,
- "server/src/__tests__/copilot-connection-probe.test.ts": 2255,
- "server/src/__tests__/cost-data-quality.test.ts": 9192,
- "server/src/__tests__/crash-point-call-sites.test.ts": 7935,
- "server/src/__tests__/cross-issue-influence-limit-postgres.test.ts": 3536,
- "server/src/__tests__/cross-issue-influence-limit.test.ts": 1740,
- "server/src/__tests__/cursor-local-adapter-environment.test.ts": 4080,
- "server/src/__tests__/cursor-local-adapter.test.ts": 1644,
- "server/src/__tests__/cursor-local-execute.test.ts": 2646,
- "server/src/__tests__/cursor-local-skill-injection.test.ts": 1651,
- "server/src/__tests__/cursor-local-skill-sync.test.ts": 1896,
+ "server/src/__tests__/copilot-connection-probe.test.ts": 2221,
+ "server/src/__tests__/cost-data-quality.test.ts": 8087,
+ "server/src/__tests__/crash-point-call-sites.test.ts": 7234,
+ "server/src/__tests__/cross-issue-influence-limit-postgres.test.ts": 2815,
+ "server/src/__tests__/cross-issue-influence-limit.test.ts": 1952,
+ "server/src/__tests__/cursor-local-adapter-environment.test.ts": 6107,
+ "server/src/__tests__/cursor-local-adapter.test.ts": 2115,
+ "server/src/__tests__/cursor-local-execute.test.ts": 4731,
+ "server/src/__tests__/cursor-local-skill-injection.test.ts": 2017,
+ "server/src/__tests__/cursor-local-skill-sync.test.ts": 1732,
"server/src/__tests__/custom-image-cleanup-work.test.ts": 2507,
"server/src/__tests__/customer-success-cloud.test.ts": 1410,
- "server/src/__tests__/customer-success-run-liveness.test.ts": 7151,
- "server/src/__tests__/customer-success.test.ts": 9098,
- "server/src/__tests__/dashboard-disconnect-retry.test.ts": 3423,
- "server/src/__tests__/dashboard-service.test.ts": 7126,
- "server/src/__tests__/database-backup-owner.test.ts": 8776,
- "server/src/__tests__/database-backup-qualification-guards.test.ts": 1930,
+ "server/src/__tests__/customer-success-run-liveness.test.ts": 7396,
+ "server/src/__tests__/customer-success.test.ts": 8799,
+ "server/src/__tests__/dashboard-disconnect-retry.test.ts": 3609,
+ "server/src/__tests__/dashboard-service.test.ts": 8864,
+ "server/src/__tests__/database-backup-owner.test.ts": 9022,
+ "server/src/__tests__/database-backup-qualification-guards.test.ts": 1876,
"server/src/__tests__/database-backup-work.test.ts": 1755,
- "server/src/__tests__/database-operation-attribution.test.ts": 2025,
+ "server/src/__tests__/database-operation-attribution.test.ts": 2420,
"server/src/__tests__/daytona-connection.test.ts": 16846,
- "server/src/__tests__/daytona-http-boundary.test.ts": 1518,
- "server/src/__tests__/db-errors.test.ts": 834,
+ "server/src/__tests__/daytona-http-boundary.test.ts": 1695,
+ "server/src/__tests__/db-errors.test.ts": 826,
"server/src/__tests__/deadline-work.test.ts": 1862,
"server/src/__tests__/decision-effect-recovery-work.test.ts": 24365,
"server/src/__tests__/decision-expiry-work.test.ts": 16024,
- "server/src/__tests__/decision-history.test.ts": 9747,
- "server/src/__tests__/decision-model-provider.test.ts": 2162,
- "server/src/__tests__/decision-models.test.ts": 12584,
- "server/src/__tests__/decision-retention-materialization-security.test.ts": 16798,
+ "server/src/__tests__/decision-history.test.ts": 18084,
+ "server/src/__tests__/decision-model-provider.test.ts": 1803,
+ "server/src/__tests__/decision-models.test.ts": 31881,
+ "server/src/__tests__/decision-retention-materialization-security.test.ts": 20798,
"server/src/__tests__/decision-retention-service.test.ts": 11706,
"server/src/__tests__/decision-target-work.test.ts": 14584,
- "server/src/__tests__/decision-training.test.ts": 12154,
- "server/src/__tests__/decision-wakeup.test.ts": 888,
- "server/src/__tests__/decisions-service.test.ts": 20736,
+ "server/src/__tests__/decision-training.test.ts": 11604,
+ "server/src/__tests__/decision-wakeup.test.ts": 737,
+ "server/src/__tests__/decisions-service.test.ts": 22211,
"server/src/__tests__/deferred-chat-wake-sweep.test.ts": 25678,
"server/src/__tests__/deferred-execution-receipt-work.test.ts": 292434,
"server/src/__tests__/delivery-work-coordinator.test.ts": 7099,
"server/src/__tests__/deployment-connections.test.ts": 19322,
- "server/src/__tests__/deployment-notifications.test.ts": 1913,
- "server/src/__tests__/dev-runner-native-binary.test.ts": 2172,
- "server/src/__tests__/dev-runner-options.test.ts": 916,
- "server/src/__tests__/dev-runner-output.test.ts": 962,
- "server/src/__tests__/dev-runner-paths.test.ts": 856,
- "server/src/__tests__/dev-runner-snapshot.test.ts": 788,
- "server/src/__tests__/dev-runner-worktree.test.ts": 602,
- "server/src/__tests__/dev-server-status.test.ts": 902,
- "server/src/__tests__/dev-watch-ignore.test.ts": 740,
- "server/src/__tests__/device-login-credential-read.test.ts": 1337,
- "server/src/__tests__/device-login-reaper.test.ts": 6125,
- "server/src/__tests__/device-login-service.test.ts": 20142,
- "server/src/__tests__/disposition-repair.test.ts": 6090,
- "server/src/__tests__/distribution-plugin-catalog.test.ts": 874,
- "server/src/__tests__/docker-build-stamp.test.ts": 960,
- "server/src/__tests__/docker-entrypoint.test.ts": 1309,
- "server/src/__tests__/docker-image-layer-reuse.test.ts": 886,
- "server/src/__tests__/docker-runner-workflows.test.ts": 654,
- "server/src/__tests__/document-annotations-service.test.ts": 8416,
- "server/src/__tests__/documents-service.test.ts": 2904,
- "server/src/__tests__/documents.test.ts": 2018,
- "server/src/__tests__/dot-invitations.test.ts": 7733,
- "server/src/__tests__/dot-oauth-onboarding.test.ts": 7834,
- "server/src/__tests__/dot-runner.test.ts": 64825,
- "server/src/__tests__/duplex-observability-recorder.test.ts": 754,
+ "server/src/__tests__/deployment-notifications.test.ts": 2765,
+ "server/src/__tests__/dev-runner-native-binary.test.ts": 1771,
+ "server/src/__tests__/dev-runner-options.test.ts": 903,
+ "server/src/__tests__/dev-runner-output.test.ts": 816,
+ "server/src/__tests__/dev-runner-paths.test.ts": 658,
+ "server/src/__tests__/dev-runner-snapshot.test.ts": 646,
+ "server/src/__tests__/dev-runner-worktree.test.ts": 707,
+ "server/src/__tests__/dev-server-status.test.ts": 885,
+ "server/src/__tests__/dev-watch-ignore.test.ts": 858,
+ "server/src/__tests__/device-login-credential-read.test.ts": 1324,
+ "server/src/__tests__/device-login-reaper.test.ts": 7370,
+ "server/src/__tests__/device-login-service.test.ts": 18734,
+ "server/src/__tests__/disposition-repair.test.ts": 6270,
+ "server/src/__tests__/distribution-plugin-catalog.test.ts": 671,
+ "server/src/__tests__/docker-build-stamp.test.ts": 1071,
+ "server/src/__tests__/docker-entrypoint.test.ts": 1022,
+ "server/src/__tests__/docker-image-layer-reuse.test.ts": 901,
+ "server/src/__tests__/docker-runner-workflows.test.ts": 1022,
+ "server/src/__tests__/document-annotations-service.test.ts": 9862,
+ "server/src/__tests__/documents-service.test.ts": 3765,
+ "server/src/__tests__/documents.test.ts": 1973,
+ "server/src/__tests__/dot-invitations.test.ts": 8594,
+ "server/src/__tests__/dot-oauth-onboarding.test.ts": 9055,
+ "server/src/__tests__/dot-runner.test.ts": 69192,
+ "server/src/__tests__/duplex-observability-recorder.test.ts": 772,
"server/src/__tests__/durable-chat-wakeup.test.ts": 42102,
- "server/src/__tests__/durable-directory.test.ts": 2203,
- "server/src/__tests__/effective-run-config-fingerprints.test.ts": 1190,
+ "server/src/__tests__/durable-directory.test.ts": 2573,
+ "server/src/__tests__/effective-run-config-fingerprints.test.ts": 1880,
"server/src/__tests__/email-address-check.test.ts": 5253,
"server/src/__tests__/email-channels.integration.test.ts": 40296,
"server/src/__tests__/email-idle-work.test.ts": 6264,
- "server/src/__tests__/embedded-postgres-supervisor.test.ts": 756,
- "server/src/__tests__/env-file-policy.test.ts": 553,
- "server/src/__tests__/environment-acquisition-diagnostics.test.ts": 3995,
- "server/src/__tests__/environment-capability-contract.test.ts": 5627,
+ "server/src/__tests__/embedded-postgres-supervisor.test.ts": 602,
+ "server/src/__tests__/env-file-policy.test.ts": 717,
+ "server/src/__tests__/environment-acquisition-diagnostics.test.ts": 3623,
+ "server/src/__tests__/environment-capability-contract.test.ts": 6143,
"server/src/__tests__/environment-cleanup-work.test.ts": 36256,
- "server/src/__tests__/environment-config.test.ts": 7042,
- "server/src/__tests__/environment-custom-image-terminal-ws.test.ts": 3365,
- "server/src/__tests__/environment-custom-images-service.test.ts": 10627,
- "server/src/__tests__/environment-driver-traits.test.ts": 688,
- "server/src/__tests__/environment-execution-target-capabilities.test.ts": 1767,
- "server/src/__tests__/environment-execution-target-duplex-kill-switch.test.ts": 2143,
- "server/src/__tests__/environment-execution-target-duplex.test.ts": 6221,
- "server/src/__tests__/environment-execution-target.test.ts": 2612,
- "server/src/__tests__/environment-lease-owner-stamps.test.ts": 8560,
- "server/src/__tests__/environment-live-ssh.test.ts": 1481,
- "server/src/__tests__/environment-login-probe-lease-ownership.test.ts": 8123,
+ "server/src/__tests__/environment-config.test.ts": 7171,
+ "server/src/__tests__/environment-custom-image-terminal-ws.test.ts": 3475,
+ "server/src/__tests__/environment-custom-images-service.test.ts": 24834,
+ "server/src/__tests__/environment-driver-traits.test.ts": 822,
+ "server/src/__tests__/environment-execution-target-capabilities.test.ts": 1855,
+ "server/src/__tests__/environment-execution-target-duplex-kill-switch.test.ts": 1817,
+ "server/src/__tests__/environment-execution-target-duplex.test.ts": 7676,
+ "server/src/__tests__/environment-execution-target.test.ts": 3954,
+ "server/src/__tests__/environment-lease-owner-stamps.test.ts": 7337,
+ "server/src/__tests__/environment-live-ssh.test.ts": 1657,
+ "server/src/__tests__/environment-login-probe-lease-ownership.test.ts": 8858,
"server/src/__tests__/environment-pending-cleanup-queue-owner.test.ts": 8493,
- "server/src/__tests__/environment-probe.test.ts": 6153,
- "server/src/__tests__/environment-retained-orphan-listing-cost.test.ts": 17480,
- "server/src/__tests__/environment-retained-orphan-sandbox.test.ts": 8688,
- "server/src/__tests__/environment-run-lease-ownership.test.ts": 10538,
- "server/src/__tests__/environment-run-orchestrator.test.ts": 11261,
- "server/src/__tests__/environment-runtime-driver-contract.test.ts": 7717,
- "server/src/__tests__/environment-runtime-duplex-bridge-input.test.ts": 6549,
+ "server/src/__tests__/environment-probe.test.ts": 7154,
+ "server/src/__tests__/environment-retained-orphan-listing-cost.test.ts": 20229,
+ "server/src/__tests__/environment-retained-orphan-sandbox.test.ts": 12364,
+ "server/src/__tests__/environment-run-lease-ownership.test.ts": 11630,
+ "server/src/__tests__/environment-run-orchestrator.test.ts": 23244,
+ "server/src/__tests__/environment-runtime-driver-contract.test.ts": 8206,
+ "server/src/__tests__/environment-runtime-duplex-bridge-input.test.ts": 8367,
"server/src/__tests__/environment-runtime-reusable-resume-replacement.test.ts": 37524,
- "server/src/__tests__/environment-runtime.test.ts": 73957,
- "server/src/__tests__/environment-service.test.ts": 13617,
- "server/src/__tests__/environment-skills.test.ts": 11707,
- "server/src/__tests__/environment-sync-out-error.test.ts": 1344,
- "server/src/__tests__/environment-task-authority.integration.test.ts": 6554,
- "server/src/__tests__/environment-task-runtime.test.ts": 6025,
- "server/src/__tests__/environment-test-harness.test.ts": 1250,
- "server/src/__tests__/ephemeral-enrollment-replay.test.ts": 6741,
- "server/src/__tests__/ephemeral-server-contract.test.ts": 6420,
- "server/src/__tests__/ephemeral-server-data.test.ts": 7443,
- "server/src/__tests__/ephemeral-server-startup-run-state.test.ts": 9149,
- "server/src/__tests__/error-handler-client-abort.test.ts": 6273,
- "server/src/__tests__/error-handler-tool-gateway.test.ts": 6632,
- "server/src/__tests__/error-handler.test.ts": 5911,
+ "server/src/__tests__/environment-runtime.test.ts": 89552,
+ "server/src/__tests__/environment-service.test.ts": 22450,
+ "server/src/__tests__/environment-skills.test.ts": 10876,
+ "server/src/__tests__/environment-sync-out-error.test.ts": 2066,
+ "server/src/__tests__/environment-task-authority.integration.test.ts": 17257,
+ "server/src/__tests__/environment-task-runtime.test.ts": 7889,
+ "server/src/__tests__/environment-test-harness.test.ts": 2057,
+ "server/src/__tests__/ephemeral-enrollment-replay.test.ts": 8239,
+ "server/src/__tests__/ephemeral-server-contract.test.ts": 7676,
+ "server/src/__tests__/ephemeral-server-data.test.ts": 8448,
+ "server/src/__tests__/ephemeral-server-runtime-skill-startup.test.ts": 8717,
+ "server/src/__tests__/ephemeral-server-startup-run-state.test.ts": 8935,
+ "server/src/__tests__/error-handler-client-abort.test.ts": 6779,
+ "server/src/__tests__/error-handler-tool-gateway.test.ts": 7146,
+ "server/src/__tests__/error-handler.test.ts": 6684,
"server/src/__tests__/eval-feedback-recovery.integration.test.ts": 13456,
"server/src/__tests__/execution-control-work.test.ts": 16340,
- "server/src/__tests__/execution-lock-orphan-cleanup.test.ts": 8988,
- "server/src/__tests__/execution-preparation-phases.test.ts": 2629,
- "server/src/__tests__/execution-workspace-compaction.test.ts": 11717,
- "server/src/__tests__/execution-workspace-policy.test.ts": 1394,
+ "server/src/__tests__/execution-lock-orphan-cleanup.test.ts": 10844,
+ "server/src/__tests__/execution-preparation-phases.test.ts": 2597,
+ "server/src/__tests__/execution-workspace-compaction.test.ts": 14736,
+ "server/src/__tests__/execution-workspace-policy.test.ts": 2101,
"server/src/__tests__/execution-workspace-reopen.test.ts": 20305,
- "server/src/__tests__/execution-workspace-runtime-control-conflict.test.ts": 5759,
- "server/src/__tests__/execution-workspaces-service.test.ts": 50904,
- "server/src/__tests__/export-fidelity.test.ts": 2537,
+ "server/src/__tests__/execution-workspace-runtime-control-conflict.test.ts": 17146,
+ "server/src/__tests__/execution-workspaces-service.test.ts": 49410,
+ "server/src/__tests__/export-fidelity.test.ts": 3122,
"server/src/__tests__/external-object-idle-schedule.test.ts": 941,
"server/src/__tests__/external-object-refresh-work.test.ts": 17969,
- "server/src/__tests__/external-objects-service.test.ts": 7744,
+ "server/src/__tests__/external-objects-service.test.ts": 18537,
"server/src/__tests__/failed-continuation-continues-again.test.ts": 34068,
- "server/src/__tests__/fast-response-models.test.ts": 1365,
- "server/src/__tests__/fast-response-provider.test.ts": 1810,
- "server/src/__tests__/fast-responses.test.ts": 11499,
- "server/src/__tests__/feedback-flush-controller.test.ts": 10231,
- "server/src/__tests__/feedback-redaction.test.ts": 907,
- "server/src/__tests__/feedback-service.test.ts": 7459,
- "server/src/__tests__/feedback-share-client.test.ts": 754,
+ "server/src/__tests__/fast-response-models.test.ts": 1685,
+ "server/src/__tests__/fast-response-provider.test.ts": 1613,
+ "server/src/__tests__/fast-responses.test.ts": 13353,
+ "server/src/__tests__/feedback-flush-controller.test.ts": 7293,
+ "server/src/__tests__/feedback-redaction.test.ts": 910,
+ "server/src/__tests__/feedback-service.test.ts": 17631,
+ "server/src/__tests__/feedback-share-client.test.ts": 782,
"server/src/__tests__/file-delivery-bridges.test.ts": 20870,
- "server/src/__tests__/file-resources-git-scan-load.test.ts": 5770,
+ "server/src/__tests__/file-resources-git-scan-load.test.ts": 6876,
"server/src/__tests__/file-resources.test.ts": 23012,
- "server/src/__tests__/first-admin-claim.test.ts": 2737,
- "server/src/__tests__/folders-service.test.ts": 3571,
- "server/src/__tests__/forbidden-tokens.test.ts": 705,
- "server/src/__tests__/gateway-credential-expiry.test.ts": 9979,
- "server/src/__tests__/gemini-local-adapter-environment.test.ts": 1230,
- "server/src/__tests__/gemini-local-adapter.test.ts": 2193,
- "server/src/__tests__/gemini-local-execute.test.ts": 2369,
- "server/src/__tests__/gemini-local-skill-sync.test.ts": 1692,
- "server/src/__tests__/general-capability-classifier.test.ts": 6292,
+ "server/src/__tests__/first-admin-claim.test.ts": 2147,
+ "server/src/__tests__/folders-service.test.ts": 3442,
+ "server/src/__tests__/forbidden-tokens.test.ts": 915,
+ "server/src/__tests__/gateway-credential-expiry.test.ts": 11396,
+ "server/src/__tests__/gemini-local-adapter-environment.test.ts": 1912,
+ "server/src/__tests__/gemini-local-adapter.test.ts": 2025,
+ "server/src/__tests__/gemini-local-execute.test.ts": 2607,
+ "server/src/__tests__/gemini-local-skill-sync.test.ts": 1711,
+ "server/src/__tests__/general-capability-classifier.test.ts": 7156,
"server/src/__tests__/generic-mcp-connection.test.ts": 55072,
- "server/src/__tests__/git-credentials.test.ts": 7716,
- "server/src/__tests__/git-expiration-auth-fallback.test.ts": 5742,
- "server/src/__tests__/git-mount-boundary.test.ts": 7144,
- "server/src/__tests__/git-repository-excludes.test.ts": 7134,
- "server/src/__tests__/git-reproducible-managed-checkouts.test.ts": 12319,
+ "server/src/__tests__/git-credentials.test.ts": 6482,
+ "server/src/__tests__/git-expiration-auth-fallback.test.ts": 6132,
+ "server/src/__tests__/git-mount-boundary.test.ts": 7055,
+ "server/src/__tests__/git-repository-excludes.test.ts": 9434,
+ "server/src/__tests__/git-reproducible-managed-checkouts.test.ts": 13528,
"server/src/__tests__/git-restore-point-expiration-config.test.ts": 1957,
"server/src/__tests__/git-restore-point-expiration.test.ts": 49208,
- "server/src/__tests__/git-restore-point-ledger-config.test.ts": 1562,
+ "server/src/__tests__/git-restore-point-ledger-config.test.ts": 2114,
"server/src/__tests__/git-restore-point-ledger.test.ts": 8440,
"server/src/__tests__/git-restore-point.test.ts": 10673,
- "server/src/__tests__/git-workspace-activity.test.ts": 15399,
- "server/src/__tests__/git-workspace-base-storage.test.ts": 7180,
- "server/src/__tests__/git-workspace-contents.test.ts": 6821,
+ "server/src/__tests__/git-workspace-activity.test.ts": 21080,
+ "server/src/__tests__/git-workspace-base-storage.test.ts": 6565,
+ "server/src/__tests__/git-workspace-contents.test.ts": 8136,
"server/src/__tests__/git-workspace-expiration-eligibility.test.ts": 17358,
"server/src/__tests__/git-workspace-expiration.test.ts": 198261,
- "server/src/__tests__/git-workspace-fetch-head.test.ts": 7912,
- "server/src/__tests__/git-workspace-restoration-diagnostic.test.ts": 7200,
- "server/src/__tests__/github-catalog-timing.test.ts": 7201,
- "server/src/__tests__/github-commit-details.test.ts": 6284,
+ "server/src/__tests__/git-workspace-fetch-head.test.ts": 9961,
+ "server/src/__tests__/git-workspace-restoration-diagnostic.test.ts": 7491,
+ "server/src/__tests__/github-catalog-timing.test.ts": 9017,
+ "server/src/__tests__/github-commit-details.test.ts": 6945,
"server/src/__tests__/github-connection-enrollment-work.test.ts": 8390,
- "server/src/__tests__/github-connection-events.test.ts": 10696,
+ "server/src/__tests__/github-connection-events.test.ts": 10393,
"server/src/__tests__/github-connection-work.test.ts": 17548,
- "server/src/__tests__/github-grant-metadata.test.ts": 9430,
+ "server/src/__tests__/github-grant-metadata.test.ts": 7008,
"server/src/__tests__/github-health-recovery.test.ts": 6236,
- "server/src/__tests__/github-link-preview.test.ts": 7519,
- "server/src/__tests__/github-operation-credentials.test.ts": 11571,
- "server/src/__tests__/github-repository-catalog-failure.test.ts": 1001,
- "server/src/__tests__/github-repository-token-cache.test.ts": 7295,
- "server/src/__tests__/github-review-check-state.test.ts": 2857,
- "server/src/__tests__/github-review-wait.test.ts": 4158,
+ "server/src/__tests__/github-inbound-steering.test.ts": 33061,
+ "server/src/__tests__/github-link-preview.test.ts": 6445,
+ "server/src/__tests__/github-operation-credentials.test.ts": 11262,
+ "server/src/__tests__/github-repository-catalog-failure.test.ts": 698,
+ "server/src/__tests__/github-repository-token-cache.test.ts": 7158,
+ "server/src/__tests__/github-review-check-state.test.ts": 2764,
+ "server/src/__tests__/github-review-wait.test.ts": 4850,
"server/src/__tests__/github-skill-source.test.ts": 28979,
- "server/src/__tests__/github-workspace-delivery.test.ts": 6042,
- "server/src/__tests__/goal-parent-company-validation.test.ts": 10228,
- "server/src/__tests__/google-sheets-gallery.test.ts": 6199,
- "server/src/__tests__/google-workspace-injection-screening.test.ts": 11732,
+ "server/src/__tests__/github-workspace-delivery.test.ts": 6722,
+ "server/src/__tests__/goal-parent-company-validation.test.ts": 10607,
+ "server/src/__tests__/google-managed-connection-removal.test.ts": 23350,
+ "server/src/__tests__/google-pending-revocation.test.ts": 15904,
+ "server/src/__tests__/google-sheets-gallery.test.ts": 6022,
+ "server/src/__tests__/google-workspace-injection-screening.test.ts": 15159,
"server/src/__tests__/google-workspace-rest-transport.test.ts": 11985,
"server/src/__tests__/grok-bot-routine.test.ts": 24423,
"server/src/__tests__/grok-dispatch-work.test.ts": 13302,
- "server/src/__tests__/grok-local-skill-sync.test.ts": 2156,
- "server/src/__tests__/health-server-info-git-probe.test.ts": 10496,
- "server/src/__tests__/health-workspace-readiness.test.ts": 6479,
+ "server/src/__tests__/grok-local-skill-sync.test.ts": 1912,
+ "server/src/__tests__/harness-availability.test.ts": 919,
+ "server/src/__tests__/health-server-info-git-probe.test.ts": 6754,
+ "server/src/__tests__/health-workspace-readiness.test.ts": 7379,
"server/src/__tests__/heartbeat-accepted-plan-workspace-refresh.test.ts": 26442,
"server/src/__tests__/heartbeat-active-run-output-watchdog.test.ts": 23228,
"server/src/__tests__/heartbeat-agent-directory-busy.test.ts": 22123,
- "server/src/__tests__/heartbeat-agent-session-message.test.ts": 6730,
+ "server/src/__tests__/heartbeat-agent-session-message.test.ts": 7447,
"server/src/__tests__/heartbeat-agent-status-recovery.test.ts": 8890,
- "server/src/__tests__/heartbeat-answer-behind-settling-run.test.ts": 14143,
- "server/src/__tests__/heartbeat-archived-company-guard.test.ts": 7700,
- "server/src/__tests__/heartbeat-auto-checkout.test.ts": 8960,
+ "server/src/__tests__/heartbeat-answer-behind-settling-run.test.ts": 18391,
+ "server/src/__tests__/heartbeat-archived-company-guard.test.ts": 8720,
+ "server/src/__tests__/heartbeat-auto-checkout.test.ts": 7744,
"server/src/__tests__/heartbeat-blocked-question-answer.test.ts": 30782,
"server/src/__tests__/heartbeat-case-handoff.test.ts": 9748,
"server/src/__tests__/heartbeat-case-terminal-handoff.test.ts": 8571,
- "server/src/__tests__/heartbeat-chat-task-link.test.ts": 8851,
+ "server/src/__tests__/heartbeat-chat-task-link.test.ts": 7163,
+ "server/src/__tests__/heartbeat-clean-continuation-dispatch.test.ts": 22213,
"server/src/__tests__/heartbeat-comment-wake-batching.test.ts": 81437,
- "server/src/__tests__/heartbeat-context-compaction-execution.test.ts": 14982,
- "server/src/__tests__/heartbeat-context-summary.test.ts": 6453,
- "server/src/__tests__/heartbeat-cost-accounting.test.ts": 8738,
- "server/src/__tests__/heartbeat-direct-adapter-native-isolation.test.ts": 14982,
+ "server/src/__tests__/heartbeat-context-compaction-execution.test.ts": 17964,
+ "server/src/__tests__/heartbeat-context-summary.test.ts": 6783,
+ "server/src/__tests__/heartbeat-cost-accounting.test.ts": 8651,
+ "server/src/__tests__/heartbeat-direct-adapter-native-isolation.test.ts": 16073,
"server/src/__tests__/heartbeat-drain-native-resume-dispatch.test.ts": 7922,
"server/src/__tests__/heartbeat-execution-configuration.test.ts": 32284,
"server/src/__tests__/heartbeat-git-restore-point-resume.test.ts": 22905,
"server/src/__tests__/heartbeat-held-comment-wake.test.ts": 67821,
"server/src/__tests__/heartbeat-instruction-working-copy.test.ts": 21994,
+ "server/src/__tests__/heartbeat-isolated-continuation-hold.test.ts": 25154,
"server/src/__tests__/heartbeat-issue-rewake-throttle.test.ts": 20323,
- "server/src/__tests__/heartbeat-lease-release-before-runner-attach.test.ts": 14730,
- "server/src/__tests__/heartbeat-ledger-billing-code.test.ts": 8743,
- "server/src/__tests__/heartbeat-list.test.ts": 10959,
- "server/src/__tests__/heartbeat-local-environment.test.ts": 13521,
- "server/src/__tests__/heartbeat-lock-release-on-reassignment.test.ts": 10323,
- "server/src/__tests__/heartbeat-managed-clone-credentials.test.ts": 8704,
- "server/src/__tests__/heartbeat-model-fallback-warning.test.ts": 5766,
- "server/src/__tests__/heartbeat-native-cleanup-admission-hold.test.ts": 12906,
+ "server/src/__tests__/heartbeat-lease-release-before-runner-attach.test.ts": 16200,
+ "server/src/__tests__/heartbeat-ledger-billing-code.test.ts": 9045,
+ "server/src/__tests__/heartbeat-list.test.ts": 7781,
+ "server/src/__tests__/heartbeat-local-environment.test.ts": 14676,
+ "server/src/__tests__/heartbeat-lock-release-on-reassignment.test.ts": 10703,
+ "server/src/__tests__/heartbeat-managed-clone-credentials.test.ts": 10689,
+ "server/src/__tests__/heartbeat-model-fallback-warning.test.ts": 6457,
+ "server/src/__tests__/heartbeat-native-cleanup-admission-hold.test.ts": 10580,
"server/src/__tests__/heartbeat-native-cleanup-admission.test.ts": 20757,
- "server/src/__tests__/heartbeat-native-early-hand-off.test.ts": 15018,
+ "server/src/__tests__/heartbeat-native-early-hand-off.test.ts": 12534,
"server/src/__tests__/heartbeat-native-orphan-sweep-lease-race.test.ts": 8348,
"server/src/__tests__/heartbeat-native-predispatch-retry.test.ts": 34006,
"server/src/__tests__/heartbeat-native-remote-failure-retention.test.ts": 13612,
"server/src/__tests__/heartbeat-native-restart-suspension.test.ts": 223420,
- "server/src/__tests__/heartbeat-native-resume-lease-failure.test.ts": 9807,
- "server/src/__tests__/heartbeat-native-runner-cancellation.test.ts": 8657,
- "server/src/__tests__/heartbeat-native-status-context.test.ts": 7268,
- "server/src/__tests__/heartbeat-native-stop-before-admission.test.ts": 11608,
+ "server/src/__tests__/heartbeat-native-resume-lease-failure.test.ts": 10210,
+ "server/src/__tests__/heartbeat-native-runner-cancellation.test.ts": 8349,
+ "server/src/__tests__/heartbeat-native-status-context.test.ts": 7721,
+ "server/src/__tests__/heartbeat-native-stop-before-admission.test.ts": 8178,
"server/src/__tests__/heartbeat-observed-workspace-preservation.test.ts": 50141,
"server/src/__tests__/heartbeat-orphaned-active-lease-sweep.test.ts": 9957,
- "server/src/__tests__/heartbeat-paused-assignee-new-task.test.ts": 10679,
+ "server/src/__tests__/heartbeat-paused-assignee-new-task.test.ts": 12006,
"server/src/__tests__/heartbeat-pending-cleanup-sweep.test.ts": 10615,
"server/src/__tests__/heartbeat-person-tree-dispatch.test.ts": 26150,
- "server/src/__tests__/heartbeat-plugin-environment.test.ts": 17979,
- "server/src/__tests__/heartbeat-preparation-gap-spans.test.ts": 9938,
- "server/src/__tests__/heartbeat-project-env.test.ts": 8109,
+ "server/src/__tests__/heartbeat-plugin-environment.test.ts": 20161,
+ "server/src/__tests__/heartbeat-preparation-gap-spans.test.ts": 10438,
+ "server/src/__tests__/heartbeat-project-env.test.ts": 8463,
"server/src/__tests__/heartbeat-project-repositories.test.ts": 158961,
"server/src/__tests__/heartbeat-provider-limit-wait.test.ts": 24818,
- "server/src/__tests__/heartbeat-queued-run-claim-isolation.test.ts": 29189,
- "server/src/__tests__/heartbeat-reassignment-deferred-wake.test.ts": 13446,
- "server/src/__tests__/heartbeat-referenced-projects.test.ts": 7393,
- "server/src/__tests__/heartbeat-refused-assignment-wake.test.ts": 11095,
- "server/src/__tests__/heartbeat-remote-referenced-projects.test.ts": 7645,
+ "server/src/__tests__/heartbeat-queued-run-claim-isolation.test.ts": 33654,
+ "server/src/__tests__/heartbeat-reassignment-deferred-wake.test.ts": 16031,
+ "server/src/__tests__/heartbeat-referenced-projects.test.ts": 9873,
+ "server/src/__tests__/heartbeat-refused-assignment-wake.test.ts": 8790,
+ "server/src/__tests__/heartbeat-remote-referenced-projects.test.ts": 8671,
"server/src/__tests__/heartbeat-remote-workspace-busy.test.ts": 20229,
"server/src/__tests__/heartbeat-repository-catalog-recovery.test.ts": 79077,
- "server/src/__tests__/heartbeat-responsible-user-invariant.test.ts": 45664,
- "server/src/__tests__/heartbeat-restart-claim-lapse.test.ts": 8577,
+ "server/src/__tests__/heartbeat-responsible-user-invariant.test.ts": 54531,
+ "server/src/__tests__/heartbeat-restart-claim-lapse.test.ts": 8610,
"server/src/__tests__/heartbeat-retry-scheduling.test.ts": 54171,
"server/src/__tests__/heartbeat-reviewed-chat-binding.integration.test.ts": 20887,
- "server/src/__tests__/heartbeat-run-dispatch-lifecycle.test.ts": 6351,
+ "server/src/__tests__/heartbeat-run-dispatch-lifecycle.test.ts": 6945,
"server/src/__tests__/heartbeat-run-dispatch-work.test.ts": 51459,
- "server/src/__tests__/heartbeat-run-event-atomic-append.test.ts": 15326,
- "server/src/__tests__/heartbeat-run-event-sequencing.test.ts": 12287,
- "server/src/__tests__/heartbeat-run-lease-release-terminalization.test.ts": 11461,
- "server/src/__tests__/heartbeat-run-log.test.ts": 6583,
+ "server/src/__tests__/heartbeat-run-event-atomic-append.test.ts": 19161,
+ "server/src/__tests__/heartbeat-run-event-sequencing.test.ts": 9859,
+ "server/src/__tests__/heartbeat-run-lease-release-terminalization.test.ts": 10763,
+ "server/src/__tests__/heartbeat-run-log.test.ts": 8074,
"server/src/__tests__/heartbeat-run-output.test.ts": 34150,
- "server/src/__tests__/heartbeat-run-privacy-disconnect-retry.test.ts": 2830,
+ "server/src/__tests__/heartbeat-run-privacy-disconnect-retry.test.ts": 2749,
"server/src/__tests__/heartbeat-run-scratch-recovery.test.ts": 10008,
"server/src/__tests__/heartbeat-run-start-handover.test.ts": 13908,
- "server/src/__tests__/heartbeat-run-status-payload.test.ts": 7089,
- "server/src/__tests__/heartbeat-run-summary.test.ts": 896,
- "server/src/__tests__/heartbeat-run-terminalize-before-release.test.ts": 11221,
- "server/src/__tests__/heartbeat-running-followup.test.ts": 4933,
- "server/src/__tests__/heartbeat-runtime-mcp-servers.test.ts": 13449,
+ "server/src/__tests__/heartbeat-run-status-payload.test.ts": 7622,
+ "server/src/__tests__/heartbeat-run-summary.test.ts": 1333,
+ "server/src/__tests__/heartbeat-run-terminalize-before-release.test.ts": 11542,
+ "server/src/__tests__/heartbeat-running-followup.test.ts": 4924,
+ "server/src/__tests__/heartbeat-runtime-mcp-servers.test.ts": 31507,
"server/src/__tests__/heartbeat-runtime-services.test.ts": 20472,
- "server/src/__tests__/heartbeat-runtime-skills.test.ts": 17033,
- "server/src/__tests__/heartbeat-runtime-state.test.ts": 8087,
- "server/src/__tests__/heartbeat-scheduling-suppression.test.ts": 7131,
+ "server/src/__tests__/heartbeat-runtime-skills.test.ts": 17652,
+ "server/src/__tests__/heartbeat-runtime-state.test.ts": 8979,
+ "server/src/__tests__/heartbeat-scheduling-suppression.test.ts": 7604,
"server/src/__tests__/heartbeat-session-preparation.test.ts": 39528,
"server/src/__tests__/heartbeat-slack-invitation.test.ts": 25600,
"server/src/__tests__/heartbeat-stale-queue-invalidation.test.ts": 145134,
- "server/src/__tests__/heartbeat-startup-fresh-dispatch.test.ts": 14060,
- "server/src/__tests__/heartbeat-status-preserving-telemetry.test.ts": 7654,
+ "server/src/__tests__/heartbeat-startup-fresh-dispatch.test.ts": 13721,
+ "server/src/__tests__/heartbeat-status-preserving-telemetry.test.ts": 7698,
"server/src/__tests__/heartbeat-stop-queued-task.test.ts": 71194,
"server/src/__tests__/heartbeat-subtask-acquired-repository.test.ts": 19535,
"server/src/__tests__/heartbeat-task-context.test.ts": 20582,
- "server/src/__tests__/heartbeat-task-directory-restore.test.ts": 10598,
+ "server/src/__tests__/heartbeat-task-directory-restore.test.ts": 12107,
"server/src/__tests__/heartbeat-task-drain-admission-release.test.ts": 23078,
"server/src/__tests__/heartbeat-task-drain.test.ts": 8334,
- "server/src/__tests__/heartbeat-task-session-reset.test.ts": 7866,
- "server/src/__tests__/heartbeat-terminate-pending-native-retry.test.ts": 8453,
- "server/src/__tests__/heartbeat-timer-wake-session-reset-pf4.test.ts": 8080,
- "server/src/__tests__/heartbeat-undispatched-execution-wait.test.ts": 10407,
- "server/src/__tests__/heartbeat-workspace-branch-containment.test.ts": 57923,
+ "server/src/__tests__/heartbeat-task-session-reset.test.ts": 8307,
+ "server/src/__tests__/heartbeat-terminate-pending-native-retry.test.ts": 8872,
+ "server/src/__tests__/heartbeat-timer-wake-session-reset-pf4.test.ts": 7736,
+ "server/src/__tests__/heartbeat-undispatched-execution-wait.test.ts": 12435,
+ "server/src/__tests__/heartbeat-workspace-branch-containment.test.ts": 55549,
"server/src/__tests__/heartbeat-workspace-busy.test.ts": 85133,
- "server/src/__tests__/heartbeat-workspace-finalize-branch.test.ts": 15287,
- "server/src/__tests__/heartbeat-workspace-ready-comment.test.ts": 7488,
+ "server/src/__tests__/heartbeat-workspace-finalize-branch.test.ts": 15046,
+ "server/src/__tests__/heartbeat-workspace-ready-comment.test.ts": 8519,
"server/src/__tests__/heartbeat-workspace-session.test.ts": 25884,
- "server/src/__tests__/heartbeat-workspace-source-trust.test.ts": 83786,
- "server/src/__tests__/heartbeat-worktree-suppression.test.ts": 16354,
- "server/src/__tests__/heartbeat-zombie-guard.test.ts": 7385,
- "server/src/__tests__/helpers/external-test-database.test.ts": 743,
- "server/src/__tests__/helpers/full-database-response-capture.test.ts": 963,
- "server/src/__tests__/helpers/truncate-with-deadlock-retry.test.ts": 743,
- "server/src/__tests__/hire-hook.test.ts": 2353,
+ "server/src/__tests__/heartbeat-workspace-source-trust.test.ts": 109068,
+ "server/src/__tests__/heartbeat-worktree-suppression.test.ts": 11464,
+ "server/src/__tests__/heartbeat-zombie-guard.test.ts": 8592,
+ "server/src/__tests__/helpers/external-test-database.test.ts": 619,
+ "server/src/__tests__/helpers/full-database-response-capture.test.ts": 1015,
+ "server/src/__tests__/helpers/truncate-with-deadlock-retry.test.ts": 758,
+ "server/src/__tests__/hire-hook.test.ts": 2247,
"server/src/__tests__/historical-cleanup-verification.test.ts": 29875,
- "server/src/__tests__/historical-provider-credentials.test.ts": 8249,
- "server/src/__tests__/http-adapter-remote-fetch.test.ts": 806,
- "server/src/__tests__/http-log-aborted-response.test.ts": 1169,
- "server/src/__tests__/http-log-policy.test.ts": 759,
- "server/src/__tests__/http-log-redaction.test.ts": 6807,
+ "server/src/__tests__/historical-provider-credentials.test.ts": 9215,
+ "server/src/__tests__/http-adapter-remote-fetch.test.ts": 1328,
+ "server/src/__tests__/http-log-aborted-response.test.ts": 1296,
+ "server/src/__tests__/http-log-policy.test.ts": 881,
+ "server/src/__tests__/http-log-redaction.test.ts": 8186,
"server/src/__tests__/human-directed-work.test.ts": 8399,
"server/src/__tests__/idle-accounting-work.test.ts": 7533,
"server/src/__tests__/idle-admission.test.ts": 1366,
@@ -612,52 +626,52 @@
"server/src/__tests__/idle-response-waits.test.ts": 37561,
"server/src/__tests__/idle-scheduled-work.test.ts": 669,
"server/src/__tests__/idle-sleep-diagnostics-postgres.test.ts": 13581,
- "server/src/__tests__/idle-sleep-diagnostics.test.ts": 7789,
+ "server/src/__tests__/idle-sleep-diagnostics.test.ts": 8607,
"server/src/__tests__/idle-sleep-preparation.test.ts": 6643,
"server/src/__tests__/idle-sleep-safety.test.ts": 150013,
"server/src/__tests__/import-spool-cleanup-work.test.ts": 3447,
- "server/src/__tests__/inbound-queue-discovery.test.ts": 8858,
- "server/src/__tests__/inbox-dismissals.test.ts": 8425,
- "server/src/__tests__/inbox-mine-candidates.test.ts": 7909,
- "server/src/__tests__/instance-settings-cache.test.ts": 9036,
- "server/src/__tests__/instance-settings-cloud-defaults.test.ts": 6290,
- "server/src/__tests__/instance-settings-managed-overlay.test.ts": 6174,
- "server/src/__tests__/instance-settings-operator-defaults.test.ts": 5978,
- "server/src/__tests__/instance-settings-service.test.ts": 4759,
- "server/src/__tests__/instrumentation-signals.test.ts": 1055,
- "server/src/__tests__/instrumentation.test.ts": 1120,
- "server/src/__tests__/interaction-resolution-cross-issue-cap-postgres.test.ts": 10860,
- "server/src/__tests__/interrupted-preparation-hold-settle.test.ts": 15835,
- "server/src/__tests__/interrupted-preparation-restore-retry.test.ts": 9335,
- "server/src/__tests__/invitation-token-redaction.test.ts": 783,
- "server/src/__tests__/invite-join-grants.test.ts": 1303,
- "server/src/__tests__/invite-rate-limit.test.ts": 643,
- "server/src/__tests__/invite-token-entropy.test.ts": 4983,
+ "server/src/__tests__/inbound-queue-discovery.test.ts": 13745,
+ "server/src/__tests__/inbox-dismissals.test.ts": 9293,
+ "server/src/__tests__/inbox-mine-candidates.test.ts": 9100,
+ "server/src/__tests__/instance-settings-cache.test.ts": 9390,
+ "server/src/__tests__/instance-settings-cloud-defaults.test.ts": 6823,
+ "server/src/__tests__/instance-settings-managed-overlay.test.ts": 6101,
+ "server/src/__tests__/instance-settings-operator-defaults.test.ts": 7649,
+ "server/src/__tests__/instance-settings-service.test.ts": 7966,
+ "server/src/__tests__/instrumentation-signals.test.ts": 874,
+ "server/src/__tests__/instrumentation.test.ts": 1100,
+ "server/src/__tests__/interaction-resolution-cross-issue-cap-postgres.test.ts": 13754,
+ "server/src/__tests__/interrupted-preparation-hold-settle.test.ts": 18239,
+ "server/src/__tests__/interrupted-preparation-restore-retry.test.ts": 10721,
+ "server/src/__tests__/invitation-token-redaction.test.ts": 888,
+ "server/src/__tests__/invite-join-grants.test.ts": 1606,
+ "server/src/__tests__/invite-rate-limit.test.ts": 650,
+ "server/src/__tests__/invite-token-entropy.test.ts": 6255,
"server/src/__tests__/isolated-repository-rehome.test.ts": 93407,
"server/src/__tests__/isolated-task-directory-retention-config.test.ts": 1632,
"server/src/__tests__/isolated-task-directory-retention.test.ts": 36349,
- "server/src/__tests__/isolated-test-home.test.ts": 932,
- "server/src/__tests__/issue-blocker-attention.test.ts": 12671,
+ "server/src/__tests__/isolated-test-home.test.ts": 1040,
+ "server/src/__tests__/issue-blocker-attention.test.ts": 12080,
"server/src/__tests__/issue-blocker-stall-waiter-statement.test.ts": 8086,
"server/src/__tests__/issue-blocker-stall-wakeups.test.ts": 22472,
- "server/src/__tests__/issue-comment-receipt-postgres.test.ts": 6450,
- "server/src/__tests__/issue-comment-redaction.test.ts": 10914,
- "server/src/__tests__/issue-context-usage.test.ts": 1905,
- "server/src/__tests__/issue-continuation-summary.test.ts": 1964,
- "server/src/__tests__/issue-creation-source-read.test.ts": 3828,
- "server/src/__tests__/issue-dependency-restore-wake-policy.test.ts": 2213,
- "server/src/__tests__/issue-detail-statements.test.ts": 9613,
- "server/src/__tests__/issue-display-status.test.ts": 20706,
- "server/src/__tests__/issue-execution-policy-persistence.test.ts": 6060,
- "server/src/__tests__/issue-execution-policy.test.ts": 1462,
- "server/src/__tests__/issue-existing-branch-validation-status.test.ts": 7389,
- "server/src/__tests__/issue-goal-fallback.test.ts": 727,
- "server/src/__tests__/issue-graph-liveness-equivalence.test.ts": 2067,
- "server/src/__tests__/issue-list-review-wait-authorization.integration.test.ts": 6933,
- "server/src/__tests__/issue-liveness.test.ts": 1622,
+ "server/src/__tests__/issue-comment-receipt-postgres.test.ts": 7560,
+ "server/src/__tests__/issue-comment-redaction.test.ts": 9709,
+ "server/src/__tests__/issue-context-usage.test.ts": 2360,
+ "server/src/__tests__/issue-continuation-summary.test.ts": 2103,
+ "server/src/__tests__/issue-creation-source-read.test.ts": 2958,
+ "server/src/__tests__/issue-dependency-restore-wake-policy.test.ts": 2100,
+ "server/src/__tests__/issue-detail-statements.test.ts": 10875,
+ "server/src/__tests__/issue-display-status.test.ts": 19785,
+ "server/src/__tests__/issue-execution-policy-persistence.test.ts": 6811,
+ "server/src/__tests__/issue-execution-policy.test.ts": 3135,
+ "server/src/__tests__/issue-existing-branch-validation-status.test.ts": 6770,
+ "server/src/__tests__/issue-goal-fallback.test.ts": 867,
+ "server/src/__tests__/issue-graph-liveness-equivalence.test.ts": 2431,
+ "server/src/__tests__/issue-list-review-wait-authorization.integration.test.ts": 8294,
+ "server/src/__tests__/issue-liveness.test.ts": 1969,
"server/src/__tests__/issue-monitor-scheduler.test.ts": 34340,
"server/src/__tests__/issue-read-filter-batching.test.ts": 23819,
- "server/src/__tests__/issue-reassignment-queued-run.test.ts": 8813,
+ "server/src/__tests__/issue-reassignment-queued-run.test.ts": 8502,
"server/src/__tests__/issue-recovery-actions.test.ts": 46806,
"server/src/__tests__/issue-recovery-activity-hints.test.ts": 112944,
"server/src/__tests__/issue-recovery-agent-row-write-census.test.ts": 74922,
@@ -676,102 +690,106 @@
"server/src/__tests__/issue-recovery-terminal-run-settling.test.ts": 8681,
"server/src/__tests__/issue-recovery-work-debug-attribution.test.ts": 41278,
"server/src/__tests__/issue-recovery-work-lifecycle.test.ts": 6108,
- "server/src/__tests__/issue-references-service.test.ts": 3501,
- "server/src/__tests__/issue-remove-cascade.test.ts": 5867,
- "server/src/__tests__/issue-review-attention.test.ts": 7811,
- "server/src/__tests__/issue-review-policy.test.ts": 2666,
- "server/src/__tests__/issue-rewake-throttle.test.ts": 595,
- "server/src/__tests__/issue-runs-read-cost.test.ts": 11092,
- "server/src/__tests__/issue-runtime-workspace-binding.test.ts": 8013,
- "server/src/__tests__/issue-thread-interactions-service.test.ts": 23650,
- "server/src/__tests__/issue-thread-interactions-telemetry.test.ts": 7122,
- "server/src/__tests__/issue-tree-control-service-unit.test.ts": 4369,
- "server/src/__tests__/issue-tree-control-service.test.ts": 7372,
+ "server/src/__tests__/issue-references-service.test.ts": 4228,
+ "server/src/__tests__/issue-remove-cascade.test.ts": 8192,
+ "server/src/__tests__/issue-review-attention.test.ts": 7639,
+ "server/src/__tests__/issue-review-policy.test.ts": 2941,
+ "server/src/__tests__/issue-rewake-throttle.test.ts": 740,
+ "server/src/__tests__/issue-runs-read-cost.test.ts": 9947,
+ "server/src/__tests__/issue-runtime-workspace-binding.test.ts": 8310,
+ "server/src/__tests__/issue-thread-interactions-service.test.ts": 30876,
+ "server/src/__tests__/issue-thread-interactions-telemetry.test.ts": 7836,
+ "server/src/__tests__/issue-tree-control-service-unit.test.ts": 4393,
+ "server/src/__tests__/issue-tree-control-service.test.ts": 8659,
"server/src/__tests__/issue-tree-pause-resume-run.test.ts": 65684,
- "server/src/__tests__/issue-update-lock-contention-postgres.test.ts": 7884,
- "server/src/__tests__/issues-assignee-unread.test.ts": 16311,
- "server/src/__tests__/issues-creation-visibility.test.ts": 12304,
- "server/src/__tests__/issues-list-query-parsing.test.ts": 12785,
- "server/src/__tests__/issues-parent-id-alias.test.ts": 12056,
- "server/src/__tests__/issues-unread-inbox.test.ts": 7414,
- "server/src/__tests__/issues-user-context.test.ts": 7168,
- "server/src/__tests__/join-request-dedupe.test.ts": 783,
+ "server/src/__tests__/issue-update-lock-contention-postgres.test.ts": 11368,
+ "server/src/__tests__/issues-assignee-unread.test.ts": 15847,
+ "server/src/__tests__/issues-creation-visibility.test.ts": 11297,
+ "server/src/__tests__/issues-list-query-parsing.test.ts": 14377,
+ "server/src/__tests__/issues-parent-id-alias.test.ts": 10035,
+ "server/src/__tests__/issues-unread-inbox.test.ts": 9100,
+ "server/src/__tests__/issues-user-context.test.ts": 6682,
+ "server/src/__tests__/join-request-dedupe.test.ts": 898,
"server/src/__tests__/join-request-retention-work.test.ts": 17441,
- "server/src/__tests__/json-parse-error-handler.test.ts": 5885,
- "server/src/__tests__/json-schema-secret-refs.test.ts": 1028,
- "server/src/__tests__/kimi-connection-probe.test.ts": 1393,
- "server/src/__tests__/kimi-local-skill-sync.test.ts": 2070,
- "server/src/__tests__/legacy-continuation-authority.test.ts": 18643,
- "server/src/__tests__/legacy-finalization-regression.test.ts": 9718,
- "server/src/__tests__/legacy-runtime-tool-refresh.test.ts": 1803,
- "server/src/__tests__/legacy-workspace-rehome.test.ts": 16273,
- "server/src/__tests__/legacy-workspace-restore-lock-contention.test.ts": 6556,
+ "server/src/__tests__/json-parse-error-handler.test.ts": 6983,
+ "server/src/__tests__/json-schema-secret-refs.test.ts": 754,
+ "server/src/__tests__/kimi-connection-probe.test.ts": 2191,
+ "server/src/__tests__/kimi-local-skill-sync.test.ts": 1725,
+ "server/src/__tests__/legacy-continuation-authority.test.ts": 16892,
+ "server/src/__tests__/legacy-finalization-regression.test.ts": 12225,
+ "server/src/__tests__/legacy-runtime-tool-refresh.test.ts": 1923,
+ "server/src/__tests__/legacy-workspace-rehome.test.ts": 16753,
+ "server/src/__tests__/legacy-workspace-restore-lock-contention.test.ts": 7078,
"server/src/__tests__/legacy-workspace-restore-recovery.test.ts": 9551,
"server/src/__tests__/link-preview-store.integration.test.ts": 9626,
- "server/src/__tests__/link-previews.test.ts": 2127,
- "server/src/__tests__/live-events-run-read.test.ts": 11582,
- "server/src/__tests__/live-events-toast.test.ts": 6468,
- "server/src/__tests__/live-events-ws.test.ts": 7141,
+ "server/src/__tests__/link-previews.test.ts": 2118,
+ "server/src/__tests__/live-events-run-read.test.ts": 12855,
+ "server/src/__tests__/live-events-toast.test.ts": 6652,
+ "server/src/__tests__/live-events-ws.test.ts": 8733,
"server/src/__tests__/live-recovery-work.test.ts": 207953,
- "server/src/__tests__/live-runs-batched-reads.test.ts": 15576,
- "server/src/__tests__/liveness.test.ts": 5462,
- "server/src/__tests__/local-agent-process-boundary.test.ts": 13010,
- "server/src/__tests__/local-ai-credential-file.test.ts": 539,
- "server/src/__tests__/local-ai-credentials.test.ts": 2157,
- "server/src/__tests__/local-ai-login-policy.test.ts": 690,
- "server/src/__tests__/local-encrypted-cipher.test.ts": 1057,
- "server/src/__tests__/local-service-supervisor.test.ts": 9920,
- "server/src/__tests__/log-redaction.test.ts": 905,
- "server/src/__tests__/logger-invitation-redaction.test.ts": 918,
- "server/src/__tests__/logger-tz.test.ts": 673,
+ "server/src/__tests__/live-runs-batched-reads.test.ts": 17736,
+ "server/src/__tests__/liveness.test.ts": 5999,
+ "server/src/__tests__/local-agent-process-boundary.test.ts": 11558,
+ "server/src/__tests__/local-ai-credential-file.test.ts": 1007,
+ "server/src/__tests__/local-ai-credentials.test.ts": 2653,
+ "server/src/__tests__/local-ai-login-policy.test.ts": 674,
+ "server/src/__tests__/local-encrypted-cipher.test.ts": 944,
+ "server/src/__tests__/local-service-supervisor.test.ts": 8630,
+ "server/src/__tests__/log-redaction.test.ts": 829,
+ "server/src/__tests__/logger-invitation-redaction.test.ts": 978,
+ "server/src/__tests__/logger-pretty-transport-reuse.test.ts": 709,
+ "server/src/__tests__/logger-tz.test.ts": 818,
"server/src/__tests__/login-cleanup-work.test.ts": 13356,
- "server/src/__tests__/login-session-runtime.test.ts": 6254,
- "server/src/__tests__/maintenance-harness-resources.test.ts": 839,
- "server/src/__tests__/maintenance-postgres-proxy.test.ts": 2460,
- "server/src/__tests__/managed-cloud-prerequisites.test.ts": 2259,
- "server/src/__tests__/managed-config.test.ts": 1647,
- "server/src/__tests__/managed-instance-default.test.ts": 7354,
- "server/src/__tests__/managed-loopback-auth.test.ts": 2257,
- "server/src/__tests__/managed-plugin-environments.test.ts": 8655,
- "server/src/__tests__/managed-plugin-worker-env.test.ts": 1655,
- "server/src/__tests__/managed-repository-checkout.test.ts": 5948,
- "server/src/__tests__/managed-runtime-public-url.test.ts": 1800,
+ "server/src/__tests__/login-session-runtime.test.ts": 7488,
+ "server/src/__tests__/maintenance-clock-database-startup.test.ts": 845,
+ "server/src/__tests__/maintenance-harness-resources.test.ts": 904,
+ "server/src/__tests__/maintenance-postgres-proxy.test.ts": 3223,
+ "server/src/__tests__/managed-cloud-prerequisites.test.ts": 2692,
+ "server/src/__tests__/managed-config.test.ts": 1875,
+ "server/src/__tests__/managed-instance-default.test.ts": 7749,
+ "server/src/__tests__/managed-loopback-auth.test.ts": 3185,
+ "server/src/__tests__/managed-plugin-environments.test.ts": 8003,
+ "server/src/__tests__/managed-plugin-worker-env.test.ts": 1563,
+ "server/src/__tests__/managed-repository-checkout.test.ts": 7882,
+ "server/src/__tests__/managed-runtime-public-url.test.ts": 1925,
"server/src/__tests__/managed-skill-content.test.ts": 152199,
- "server/src/__tests__/managed-worktree-inspection.test.ts": 8358,
- "server/src/__tests__/mcp-apps.test.ts": 10157,
- "server/src/__tests__/mcp-elicitation.test.ts": 18313,
- "server/src/__tests__/mcp-error-message.test.ts": 843,
- "server/src/__tests__/mcp-http.test.ts": 1731,
- "server/src/__tests__/mcp-protocol-versions.test.ts": 9056,
- "server/src/__tests__/mcp-skills.test.ts": 11975,
+ "server/src/__tests__/managed-worktree-inspection.test.ts": 7271,
+ "server/src/__tests__/mcp-apps.test.ts": 14554,
+ "server/src/__tests__/mcp-elicitation.test.ts": 24880,
+ "server/src/__tests__/mcp-error-message.test.ts": 886,
+ "server/src/__tests__/mcp-http.test.ts": 1604,
+ "server/src/__tests__/mcp-protocol-versions.test.ts": 10318,
+ "server/src/__tests__/mcp-skills.test.ts": 10526,
"server/src/__tests__/mcp-task-work.test.ts": 602,
"server/src/__tests__/mcp-tasks-demo-server.test.ts": 27076,
- "server/src/__tests__/mcp-tasks.test.ts": 42151,
- "server/src/__tests__/memory-connectors.test.ts": 5709,
+ "server/src/__tests__/mcp-tasks.test.ts": 50713,
+ "server/src/__tests__/memory-connectors.test.ts": 7244,
"server/src/__tests__/merged-pr-confirmation-sweep.test.ts": 8317,
"server/src/__tests__/merged-pr-confirmation-work.test.ts": 17605,
- "server/src/__tests__/missing-empty-task-directory.test.ts": 6123,
- "server/src/__tests__/monthly-spend-service.test.ts": 7225,
+ "server/src/__tests__/missing-empty-task-directory.test.ts": 7277,
+ "server/src/__tests__/monthly-spend-service.test.ts": 8218,
"server/src/__tests__/muse-client-contract.test.ts": 13742,
"server/src/__tests__/muse-control.test.ts": 107452,
"server/src/__tests__/muse-terminal-settlement.test.ts": 25265,
- "server/src/__tests__/native-cancellation-delivery.test.ts": 6799,
+ "server/src/__tests__/native-cancellation-delivery.test.ts": 7761,
"server/src/__tests__/native-cancellation-request.integration.test.ts": 8844,
- "server/src/__tests__/native-connection-baseline-fixture.test.ts": 12137,
+ "server/src/__tests__/native-connection-baseline-fixture.test.ts": 16122,
"server/src/__tests__/native-environment-settlement-work.test.ts": 19901,
- "server/src/__tests__/native-event-boundary-golden.test.ts": 3132,
- "server/src/__tests__/native-exhausted-finalization-retry.test.ts": 9032,
+ "server/src/__tests__/native-event-boundary-golden.test.ts": 3391,
+ "server/src/__tests__/native-exhausted-finalization-retry.test.ts": 9199,
"server/src/__tests__/native-failed-run-owner-release-idle.test.ts": 13796,
"server/src/__tests__/native-finalization-recovery.test.ts": 7766,
- "server/src/__tests__/native-finalization-retry-budget.test.ts": 5766,
- "server/src/__tests__/native-finalization-settled-candidates.test.ts": 7997,
+ "server/src/__tests__/native-finalization-retry-budget.test.ts": 8367,
+ "server/src/__tests__/native-finalization-settled-candidates.test.ts": 8415,
"server/src/__tests__/native-harness-backup-expiration-config.test.ts": 1632,
"server/src/__tests__/native-harness-backup-expiration.test.ts": 34702,
- "server/src/__tests__/native-interaction-bridge-closed.test.ts": 5482,
- "server/src/__tests__/native-interaction-bridge.test.ts": 7765,
+ "server/src/__tests__/native-interaction-bridge-closed.test.ts": 7199,
+ "server/src/__tests__/native-interaction-bridge.test.ts": 18552,
"server/src/__tests__/native-observer-replay.test.ts": 8254,
- "server/src/__tests__/native-plan-proposal-sync.test.ts": 6802,
- "server/src/__tests__/native-procedure-measurement.test.ts": 6774,
+ "server/src/__tests__/native-plan-proposal-sync.test.ts": 8421,
+ "server/src/__tests__/native-plan-review-card-finalizer.test.ts": 9104,
+ "server/src/__tests__/native-plan-review-card.test.ts": 14263,
+ "server/src/__tests__/native-procedure-measurement.test.ts": 7171,
"server/src/__tests__/native-question-process-handoff.test.ts": 28851,
"server/src/__tests__/native-recovery-dispatch-lease-reacquire.test.ts": 6988,
"server/src/__tests__/native-recovery-notice-work.test.ts": 15693,
@@ -779,988 +797,1049 @@
"server/src/__tests__/native-result-commit-work.test.ts": 14821,
"server/src/__tests__/native-retention-blocker-batch.test.ts": 14621,
"server/src/__tests__/native-run-projection-work.test.ts": 36499,
- "server/src/__tests__/native-runner-input-boundary.test.ts": 671,
- "server/src/__tests__/native-runtime-response-delivery.test.ts": 7102,
- "server/src/__tests__/native-sandbox-lifecycle.test.ts": 7167,
+ "server/src/__tests__/native-runner-input-boundary.test.ts": 915,
+ "server/src/__tests__/native-runtime-response-delivery.test.ts": 7586,
+ "server/src/__tests__/native-sandbox-lifecycle.test.ts": 6255,
"server/src/__tests__/native-session-resumption.test.ts": 30914,
- "server/src/__tests__/native-settled-process-release.test.ts": 12518,
+ "server/src/__tests__/native-settled-process-release.test.ts": 14575,
"server/src/__tests__/native-startup-cleanup-recovery.test.ts": 13606,
"server/src/__tests__/native-status-arbiter-corpus.test.ts": 98250,
"server/src/__tests__/native-status-reassessment-work.test.ts": 57482,
+ "server/src/__tests__/native-terminal-state-readers.test.ts": 1039,
"server/src/__tests__/native-tool-call-loop-continuation.test.ts": 12786,
"server/src/__tests__/native-workspace-finalization-work.test.ts": 12186,
"server/src/__tests__/native-workspace-sync-history.test.ts": 38523,
"server/src/__tests__/native-workspace-sync-retention-config.test.ts": 1494,
"server/src/__tests__/native-workspace-sync-retention.test.ts": 7658,
- "server/src/__tests__/native-workspace-sync.test.ts": 2469,
+ "server/src/__tests__/native-workspace-sync.test.ts": 2500,
"server/src/__tests__/nested-clone-migration.test.ts": 78158,
- "server/src/__tests__/oauth-client-metadata.test.ts": 10057,
- "server/src/__tests__/onboarding-approval-history.test.ts": 21935,
+ "server/src/__tests__/never-started-retry-cancellation-hold.test.ts": 13511,
+ "server/src/__tests__/oauth-client-metadata.test.ts": 6653,
+ "server/src/__tests__/oauth-dcr-failure-reporting.test.ts": 10075,
+ "server/src/__tests__/onboarding-approval-history.test.ts": 29835,
"server/src/__tests__/onboarding-first-task-admission.test.ts": 43108,
- "server/src/__tests__/onepassword-connection.test.ts": 10517,
+ "server/src/__tests__/onepassword-connection.test.ts": 11120,
"server/src/__tests__/online-workspace-migration-compatibility.test.ts": 9742,
- "server/src/__tests__/openclaw-gateway-adapter.test.ts": 2147,
- "server/src/__tests__/opencode-local-adapter.test.ts": 1878,
- "server/src/__tests__/opencode-local-skill-sync.test.ts": 1868,
- "server/src/__tests__/owner-chat-instruction-authority.test.ts": 11490,
- "server/src/__tests__/owner-gone-attestation.test.ts": 10180,
+ "server/src/__tests__/openclaw-gateway-adapter.test.ts": 2026,
+ "server/src/__tests__/opencode-local-adapter.test.ts": 1957,
+ "server/src/__tests__/opencode-local-skill-sync.test.ts": 2124,
+ "server/src/__tests__/owner-chat-instruction-authority.test.ts": 10576,
+ "server/src/__tests__/owner-gone-attestation.test.ts": 9914,
"server/src/__tests__/ownership-reconciliation-report.test.ts": 73104,
- "server/src/__tests__/paperclip-env.test.ts": 1678,
- "server/src/__tests__/paperclip-issue-update-helper.test.ts": 6452,
- "server/src/__tests__/paperclip-semantic-conformance.test.ts": 11359,
- "server/src/__tests__/paperclip-skill-utils.test.ts": 9225,
- "server/src/__tests__/parse-status-filter.test.ts": 5230,
- "server/src/__tests__/persisted-workspace-source.test.ts": 8968,
+ "server/src/__tests__/paperclip-cloud-connector-status.test.ts": 791,
+ "server/src/__tests__/paperclip-env.test.ts": 1829,
+ "server/src/__tests__/paperclip-issue-update-helper.test.ts": 5710,
+ "server/src/__tests__/paperclip-semantic-conformance.test.ts": 13686,
+ "server/src/__tests__/paperclip-skill-utils.test.ts": 10184,
+ "server/src/__tests__/parse-status-filter.test.ts": 7327,
+ "server/src/__tests__/persisted-workspace-source.test.ts": 10691,
"server/src/__tests__/photon/channel.integration.test.ts": 38384,
- "server/src/__tests__/photon/photon.test.ts": 1559,
- "server/src/__tests__/pi-local-adapter-environment.test.ts": 2327,
- "server/src/__tests__/pi-local-execute.test.ts": 2644,
- "server/src/__tests__/pi-local-skill-sync.test.ts": 1664,
- "server/src/__tests__/plan-task-fixture.test.ts": 12701,
- "server/src/__tests__/plugin-access-authorization-host-services.test.ts": 7499,
- "server/src/__tests__/plugin-agent-sessions.test.ts": 8062,
- "server/src/__tests__/plugin-config-startup-delivery.test.ts": 2482,
- "server/src/__tests__/plugin-config-validator.test.ts": 1779,
- "server/src/__tests__/plugin-connectors-circleback-parity.test.ts": 10883,
- "server/src/__tests__/plugin-connectors-plugin-transport.test.ts": 10639,
- "server/src/__tests__/plugin-database.test.ts": 2041,
- "server/src/__tests__/plugin-dev-watcher.test.ts": 943,
+ "server/src/__tests__/photon/photon.test.ts": 2160,
+ "server/src/__tests__/pi-local-adapter-environment.test.ts": 2031,
+ "server/src/__tests__/pi-local-execute.test.ts": 2423,
+ "server/src/__tests__/pi-local-skill-sync.test.ts": 2046,
+ "server/src/__tests__/plan-task-fixture.test.ts": 13874,
+ "server/src/__tests__/plugin-access-authorization-host-services.test.ts": 9995,
+ "server/src/__tests__/plugin-agent-sessions.test.ts": 6832,
+ "server/src/__tests__/plugin-config-startup-delivery.test.ts": 2424,
+ "server/src/__tests__/plugin-config-validator.test.ts": 1933,
+ "server/src/__tests__/plugin-connector-agent-grant.test.ts": 13310,
+ "server/src/__tests__/plugin-connector-install-gate.test.ts": 11779,
+ "server/src/__tests__/plugin-connector-tool-timeout.test.ts": 10473,
+ "server/src/__tests__/plugin-connectors-circleback-parity.test.ts": 12322,
+ "server/src/__tests__/plugin-connectors-plugin-transport.test.ts": 11835,
+ "server/src/__tests__/plugin-database.test.ts": 3626,
+ "server/src/__tests__/plugin-dev-watcher.test.ts": 1377,
"server/src/__tests__/plugin-environment-driver-ready-recovery.test.ts": 10383,
- "server/src/__tests__/plugin-environment-driver-sandbox-capabilities.test.ts": 1855,
- "server/src/__tests__/plugin-environment-driver-seam.test.ts": 1700,
- "server/src/__tests__/plugin-environment-driver-selection.test.ts": 2905,
- "server/src/__tests__/plugin-execution-workspace-bridge.test.ts": 792,
+ "server/src/__tests__/plugin-environment-driver-sandbox-capabilities.test.ts": 2252,
+ "server/src/__tests__/plugin-environment-driver-seam.test.ts": 2286,
+ "server/src/__tests__/plugin-environment-driver-selection.test.ts": 2436,
+ "server/src/__tests__/plugin-execution-workspace-bridge.test.ts": 783,
"server/src/__tests__/plugin-fresh-workspaces.integration.test.ts": 8075,
- "server/src/__tests__/plugin-host-services-span.test.ts": 7416,
+ "server/src/__tests__/plugin-host-services-span.test.ts": 8321,
"server/src/__tests__/plugin-idle-manager.test.ts": 11378,
"server/src/__tests__/plugin-idle-rpc.test.ts": 3073,
- "server/src/__tests__/plugin-inspection-concurrency.test.ts": 2286,
+ "server/src/__tests__/plugin-inspection-concurrency.test.ts": 2361,
"server/src/__tests__/plugin-install-autobuild.test.ts": 9089,
- "server/src/__tests__/plugin-install-guard.test.ts": 2486,
- "server/src/__tests__/plugin-lifecycle-delivery.test.ts": 11826,
- "server/src/__tests__/plugin-lifecycle-restart.test.ts": 2624,
- "server/src/__tests__/plugin-loader-activation-timeout.test.ts": 18736,
- "server/src/__tests__/plugin-loader-error-retry.test.ts": 2060,
- "server/src/__tests__/plugin-local-folders.test.ts": 818,
- "server/src/__tests__/plugin-managed-agents.test.ts": 13067,
- "server/src/__tests__/plugin-managed-routines.test.ts": 8478,
- "server/src/__tests__/plugin-managed-skills.test.ts": 14142,
- "server/src/__tests__/plugin-operational-reads-tenant-scope.test.ts": 9099,
- "server/src/__tests__/plugin-orchestration-apis.test.ts": 15274,
- "server/src/__tests__/plugin-organization-switcher.test.ts": 1610,
- "server/src/__tests__/plugin-project-snapshots.test.ts": 763,
+ "server/src/__tests__/plugin-install-guard.test.ts": 2529,
+ "server/src/__tests__/plugin-lifecycle-delivery.test.ts": 22153,
+ "server/src/__tests__/plugin-lifecycle-restart.test.ts": 2444,
+ "server/src/__tests__/plugin-loader-activation-timeout.test.ts": 19637,
+ "server/src/__tests__/plugin-loader-error-retry.test.ts": 2552,
+ "server/src/__tests__/plugin-local-folders.test.ts": 957,
+ "server/src/__tests__/plugin-managed-agents.test.ts": 12465,
+ "server/src/__tests__/plugin-managed-routines.test.ts": 9683,
+ "server/src/__tests__/plugin-managed-skills.test.ts": 16089,
+ "server/src/__tests__/plugin-operational-reads-tenant-scope.test.ts": 7322,
+ "server/src/__tests__/plugin-orchestration-apis.test.ts": 28511,
+ "server/src/__tests__/plugin-organization-switcher.test.ts": 2319,
+ "server/src/__tests__/plugin-project-snapshots.test.ts": 788,
+ "server/src/__tests__/plugin-runner-credential-names.test.ts": 2301,
"server/src/__tests__/plugin-runner-task.integration.test.ts": 9392,
- "server/src/__tests__/plugin-sandbox-provider-config-validation.test.ts": 1723,
+ "server/src/__tests__/plugin-sandbox-provider-config-validation.test.ts": 1977,
"server/src/__tests__/plugin-sandbox-provider-schema-census.test.ts": 7215,
"server/src/__tests__/plugin-scheduled-work.test.ts": 69649,
- "server/src/__tests__/plugin-sdk-orchestration-contract.test.ts": 1606,
- "server/src/__tests__/plugin-sdk-testing.test.ts": 1647,
- "server/src/__tests__/plugin-secrets-handler.test.ts": 6466,
- "server/src/__tests__/plugin-task-credential-writeback.test.ts": 11130,
- "server/src/__tests__/plugin-telemetry-bridge.test.ts": 7306,
- "server/src/__tests__/plugin-tenant-isolation.test.ts": 9176,
- "server/src/__tests__/plugin-tool-dispatcher-pluginDbId.test.ts": 1874,
- "server/src/__tests__/plugin-ui-static.test.ts": 6492,
+ "server/src/__tests__/plugin-sdk-orchestration-contract.test.ts": 1683,
+ "server/src/__tests__/plugin-sdk-testing.test.ts": 1489,
+ "server/src/__tests__/plugin-secrets-handler.test.ts": 7541,
+ "server/src/__tests__/plugin-task-credential-writeback.test.ts": 12753,
+ "server/src/__tests__/plugin-telemetry-bridge.test.ts": 8356,
+ "server/src/__tests__/plugin-tenant-isolation.test.ts": 8680,
+ "server/src/__tests__/plugin-tool-dispatcher-pluginDbId.test.ts": 2162,
+ "server/src/__tests__/plugin-ui-static.test.ts": 5861,
"server/src/__tests__/plugin-warm-tasks.integration.test.ts": 9651,
"server/src/__tests__/plugin-worker-manager-daytona-close.test.ts": 9454,
- "server/src/__tests__/plugin-worker-manager-duplex.test.ts": 5839,
- "server/src/__tests__/plugin-worker-manager.test.ts": 9117,
+ "server/src/__tests__/plugin-worker-manager-duplex.test.ts": 6405,
+ "server/src/__tests__/plugin-worker-manager.test.ts": 10726,
+ "server/src/__tests__/plugin-workspace-terminal-hold.integration.test.ts": 9863,
"server/src/__tests__/plugin-workspace-terminal-retry.integration.test.ts": 8780,
"server/src/__tests__/plugin-workspaces.integration.test.ts": 18587,
- "server/src/__tests__/posthog-direct-event-shape.test.ts": 778,
- "server/src/__tests__/posthog-direct-telemetry.test.ts": 732,
- "server/src/__tests__/posthog-direct-transport.test.ts": 738,
- "server/src/__tests__/prepared-chat-authorization.integration.test.ts": 7032,
- "server/src/__tests__/prepared-statements-driver.test.ts": 6492,
- "server/src/__tests__/prepared-statements.test.ts": 754,
- "server/src/__tests__/primary-agent-guidance.test.ts": 4120,
- "server/src/__tests__/primary-agent.test.ts": 8618,
- "server/src/__tests__/principal-access-compatibility.test.ts": 2399,
- "server/src/__tests__/privacy-production-review.test.ts": 14500,
- "server/src/__tests__/private-hostname-guard.test.ts": 1023,
- "server/src/__tests__/private-json-etag.test.ts": 839,
- "server/src/__tests__/project-environments.test.ts": 17546,
- "server/src/__tests__/project-git-authorization.test.ts": 9603,
- "server/src/__tests__/project-goal-validation.test.ts": 8467,
- "server/src/__tests__/project-icon-persistence.test.ts": 8529,
- "server/src/__tests__/project-instance-secrets.test.ts": 7685,
- "server/src/__tests__/project-list-metrics.test.ts": 6276,
- "server/src/__tests__/project-repositories-persistence.test.ts": 7238,
- "server/src/__tests__/project-repositories.test.ts": 6198,
- "server/src/__tests__/project-shortname-resolution.test.ts": 5523,
- "server/src/__tests__/project-skill-setup-identity.test.ts": 2350,
- "server/src/__tests__/project-skill-sources.test.ts": 18035,
- "server/src/__tests__/project-tools-pagination.test.ts": 2909,
+ "server/src/__tests__/posthog-direct-event-shape.test.ts": 706,
+ "server/src/__tests__/posthog-direct-telemetry.test.ts": 1024,
+ "server/src/__tests__/posthog-direct-transport.test.ts": 903,
+ "server/src/__tests__/prepared-chat-authorization.integration.test.ts": 7209,
+ "server/src/__tests__/prepared-statements-driver.test.ts": 6901,
+ "server/src/__tests__/prepared-statements.test.ts": 803,
+ "server/src/__tests__/primary-agent-guidance.test.ts": 4326,
+ "server/src/__tests__/primary-agent.test.ts": 10405,
+ "server/src/__tests__/principal-access-compatibility.test.ts": 3032,
+ "server/src/__tests__/privacy-production-review.test.ts": 12611,
+ "server/src/__tests__/private-hostname-guard.test.ts": 996,
+ "server/src/__tests__/private-json-etag.test.ts": 833,
+ "server/src/__tests__/product-telemetry.test.ts": 7683,
+ "server/src/__tests__/project-environments.test.ts": 17604,
+ "server/src/__tests__/project-git-authorization.test.ts": 11771,
+ "server/src/__tests__/project-goal-validation.test.ts": 7094,
+ "server/src/__tests__/project-icon-persistence.test.ts": 6318,
+ "server/src/__tests__/project-instance-secrets.test.ts": 8507,
+ "server/src/__tests__/project-list-metrics.test.ts": 6153,
+ "server/src/__tests__/project-repositories-persistence.test.ts": 8737,
+ "server/src/__tests__/project-repositories.test.ts": 7386,
+ "server/src/__tests__/project-shortname-resolution.test.ts": 5527,
+ "server/src/__tests__/project-skill-setup-identity.test.ts": 2205,
+ "server/src/__tests__/project-skill-sources.test.ts": 34700,
+ "server/src/__tests__/project-tools-pagination.test.ts": 2765,
"server/src/__tests__/project-workspace-provider.integration.test.ts": 19935,
- "server/src/__tests__/project-workspace-root-provenance.test.ts": 6628,
- "server/src/__tests__/prompt-injection-gateway.test.ts": 13919,
- "server/src/__tests__/prompt-injection-prevention.test.ts": 11057,
- "server/src/__tests__/prompt-injection-provider.test.ts": 2399,
+ "server/src/__tests__/project-workspace-root-provenance.test.ts": 8288,
+ "server/src/__tests__/prompt-injection-gateway.test.ts": 14917,
+ "server/src/__tests__/prompt-injection-prevention.test.ts": 20605,
+ "server/src/__tests__/prompt-injection-provider.test.ts": 2325,
"server/src/__tests__/provider-trace-retention-work.test.ts": 2344,
- "server/src/__tests__/provider-trace-store.test.ts": 1880,
- "server/src/__tests__/public-mcp-client-metadata.test.ts": 1695,
- "server/src/__tests__/public-mcp-dispatch-shutdown.test.ts": 5856,
- "server/src/__tests__/public-mcp.test.ts": 36323,
- "server/src/__tests__/qa-routine-secrets-e2e.test.ts": 8585,
+ "server/src/__tests__/provider-trace-store.test.ts": 2015,
+ "server/src/__tests__/public-mcp-client-metadata.test.ts": 1925,
+ "server/src/__tests__/public-mcp-dispatch-shutdown.test.ts": 6684,
+ "server/src/__tests__/public-mcp.test.ts": 48555,
+ "server/src/__tests__/qa-routine-secrets-e2e.test.ts": 9274,
"server/src/__tests__/question-response-delivery.test.ts": 19309,
- "server/src/__tests__/queued-comment-consumption.test.ts": 10130,
+ "server/src/__tests__/queued-comment-consumption.test.ts": 11413,
"server/src/__tests__/queued-run-dispatch-stacking.test.ts": 98136,
- "server/src/__tests__/quota-windows-service.test.ts": 5777,
- "server/src/__tests__/quota-windows.test.ts": 1542,
- "server/src/__tests__/railway-connection.test.ts": 9611,
- "server/src/__tests__/railway-ssh.test.ts": 2622,
- "server/src/__tests__/railway.test.ts": 1635,
+ "server/src/__tests__/quota-windows-service.test.ts": 6062,
+ "server/src/__tests__/quota-windows.test.ts": 2032,
+ "server/src/__tests__/railway-connection.test.ts": 11009,
+ "server/src/__tests__/railway-ssh.test.ts": 2751,
+ "server/src/__tests__/railway.test.ts": 1763,
"server/src/__tests__/recovery-classifiers.test.ts": 6462,
"server/src/__tests__/recovery-cutover.test.ts": 1141,
"server/src/__tests__/recovery-deadline-bootstrap.test.ts": 6390,
"server/src/__tests__/recovery-deadline-ordinary-bootstrap.test.ts": 4981,
"server/src/__tests__/recovery-durable-wait-projection.test.ts": 16751,
- "server/src/__tests__/recovery-observability.test.ts": 7801,
+ "server/src/__tests__/recovery-observability.test.ts": 9540,
"server/src/__tests__/recovery-postgres-mode.test.ts": 539,
"server/src/__tests__/recovery-settled-records-census.test.ts": 221352,
"server/src/__tests__/recovery-stale-issue-lock-sweep.test.ts": 12088,
"server/src/__tests__/recovery-wake-herd.test.ts": 51736,
- "server/src/__tests__/redact-sensitive.test.ts": 630,
- "server/src/__tests__/released-writer-escalation.test.ts": 8430,
- "server/src/__tests__/remote-http-endpoint-guard.test.ts": 706,
- "server/src/__tests__/remote-http-rebinding.test.ts": 2590,
- "server/src/__tests__/remote-mcp-connectors.test.ts": 14953,
- "server/src/__tests__/remote-mcp-pending.test.ts": 6482,
- "server/src/__tests__/remote-mcp-protocol.test.ts": 1672,
- "server/src/__tests__/remote-mcp-redaction.test.ts": 792,
- "server/src/__tests__/remote-pi-companion.test.ts": 2478,
- "server/src/__tests__/remote-snapshot-ledger-settlement.test.ts": 10754,
+ "server/src/__tests__/redact-sensitive.test.ts": 882,
+ "server/src/__tests__/released-writer-escalation.test.ts": 9784,
+ "server/src/__tests__/remote-http-endpoint-guard.test.ts": 900,
+ "server/src/__tests__/remote-http-rebinding.test.ts": 3491,
+ "server/src/__tests__/remote-mcp-connectors.test.ts": 13493,
+ "server/src/__tests__/remote-mcp-pending.test.ts": 7641,
+ "server/src/__tests__/remote-mcp-protocol.test.ts": 1668,
+ "server/src/__tests__/remote-mcp-redaction.test.ts": 801,
+ "server/src/__tests__/remote-pi-companion.test.ts": 2092,
+ "server/src/__tests__/remote-snapshot-ledger-settlement.test.ts": 11640,
"server/src/__tests__/remote-workspace-file-resources.test.ts": 35772,
- "server/src/__tests__/remove-test-home.test.ts": 635,
- "server/src/__tests__/repository-admission-tracing.test.ts": 7623,
- "server/src/__tests__/repository-object-cache.test.ts": 7765,
- "server/src/__tests__/repository-root-reader-queries.test.ts": 7210,
- "server/src/__tests__/required-quality-review.test.ts": 12059,
+ "server/src/__tests__/remove-test-home.test.ts": 832,
+ "server/src/__tests__/repository-admission-tracing.test.ts": 11297,
+ "server/src/__tests__/repository-object-cache.test.ts": 9892,
+ "server/src/__tests__/repository-root-reader-queries.test.ts": 9134,
+ "server/src/__tests__/required-quality-review.test.ts": 13058,
"server/src/__tests__/rerun-survival.integration.test.ts": 6052,
- "server/src/__tests__/resolved-dependency-candidates.test.ts": 11212,
- "server/src/__tests__/resource-lifecycle-events.test.ts": 13915,
+ "server/src/__tests__/resolved-dependency-candidates.test.ts": 11327,
+ "server/src/__tests__/resource-lifecycle-events.test.ts": 23942,
+ "server/src/__tests__/responsibilities-rollup.test.ts": 8051,
+ "server/src/__tests__/responsibilities.test.ts": 34331,
+ "server/src/__tests__/responsibility-automation-conversations.test.ts": 11090,
+ "server/src/__tests__/responsibility-automation.test.ts": 8947,
+ "server/src/__tests__/responsibility-bar-templates.test.ts": 7624,
+ "server/src/__tests__/responsibility-bars.test.ts": 12917,
+ "server/src/__tests__/responsibility-dashboard.test.ts": 19058,
+ "server/src/__tests__/responsibility-metrics.test.ts": 11257,
+ "server/src/__tests__/responsibility-runs.test.ts": 8981,
+ "server/src/__tests__/responsibility-status-reports.test.ts": 13638,
+ "server/src/__tests__/responsibility-summaries.test.ts": 10042,
+ "server/src/__tests__/responsibility-summary-generator.test.ts": 8617,
+ "server/src/__tests__/responsibility-tools.test.ts": 829,
"server/src/__tests__/retained-native-session-cleanup-work.test.ts": 16414,
- "server/src/__tests__/retained-ui-assets.test.ts": 1152,
- "server/src/__tests__/reusable-leases-default.test.ts": 1637,
- "server/src/__tests__/review-attention-classification-equivalence.test.ts": 16260,
- "server/src/__tests__/routable-blocked.test.ts": 721,
+ "server/src/__tests__/retained-ui-assets.test.ts": 990,
+ "server/src/__tests__/reusable-leases-default.test.ts": 1925,
+ "server/src/__tests__/review-attention-classification-equivalence.test.ts": 13804,
+ "server/src/__tests__/routable-blocked.test.ts": 875,
"server/src/__tests__/routine-execution-status-work.test.ts": 36142,
- "server/src/__tests__/routine-execution-status-worker.test.ts": 1822,
- "server/src/__tests__/routine-run-telemetry.test.ts": 9883,
+ "server/src/__tests__/routine-execution-status-worker.test.ts": 2128,
+ "server/src/__tests__/routine-run-telemetry.test.ts": 9221,
"server/src/__tests__/routine-schedule-work.test.ts": 21858,
"server/src/__tests__/routine-status-reconciliation.test.ts": 19810,
- "server/src/__tests__/routines-service.test.ts": 35301,
- "server/src/__tests__/run-authority-read-projections.test.ts": 6981,
- "server/src/__tests__/run-continuations.test.ts": 1464,
+ "server/src/__tests__/routine-suggestions.test.ts": 13270,
+ "server/src/__tests__/routine-tools.test.ts": 1713,
+ "server/src/__tests__/routine-trigger-update-plan.test.ts": 905,
+ "server/src/__tests__/routines-service.test.ts": 39150,
+ "server/src/__tests__/run-authority-read-projections.test.ts": 8278,
+ "server/src/__tests__/run-continuations.test.ts": 2051,
"server/src/__tests__/run-evidence-migration-work.test.ts": 1802,
"server/src/__tests__/run-failure-sentry-real-sdk.test.ts": 792,
- "server/src/__tests__/run-failure-sentry.test.ts": 12278,
- "server/src/__tests__/run-identity-projections.test.ts": 9405,
- "server/src/__tests__/run-identity.test.ts": 9202,
- "server/src/__tests__/run-liveness.test.ts": 1616,
- "server/src/__tests__/run-output-secret-env-redaction.test.ts": 10436,
- "server/src/__tests__/run-secret-redaction.test.ts": 1973,
+ "server/src/__tests__/run-failure-sentry.test.ts": 12444,
+ "server/src/__tests__/run-identity-projections.test.ts": 8098,
+ "server/src/__tests__/run-identity.test.ts": 10732,
+ "server/src/__tests__/run-liveness.test.ts": 1770,
+ "server/src/__tests__/run-output-secret-env-redaction.test.ts": 12207,
+ "server/src/__tests__/run-secret-redaction.test.ts": 2085,
"server/src/__tests__/run-start-handover.test.ts": 28002,
- "server/src/__tests__/run-trust-preset.test.ts": 6908,
+ "server/src/__tests__/run-trust-preset.test.ts": 6933,
"server/src/__tests__/runner-api-recovery.test.ts": 741,
"server/src/__tests__/runner-connection-eval-fixtures.test.ts": 19765,
- "server/src/__tests__/runner-image-identity.test.ts": 922,
- "server/src/__tests__/runner-image-layout.test.ts": 4389,
- "server/src/__tests__/runner-image-oci.test.ts": 2163,
- "server/src/__tests__/runner-image-publish.test.ts": 1084,
- "server/src/__tests__/runner-image-resolve.test.ts": 1066,
- "server/src/__tests__/runner-image-workflow.test.ts": 618,
- "server/src/__tests__/runner-lockfile-guards.test.ts": 897,
- "server/src/__tests__/runner-project-icon-contract.test.ts": 2838,
- "server/src/__tests__/runtime-api.test.ts": 1890,
- "server/src/__tests__/runtime-skill-cache.test.ts": 12608,
- "server/src/__tests__/runtime-skill-preservation.test.ts": 8112,
- "server/src/__tests__/sandbox-creation-intent-ownership.test.ts": 8743,
+ "server/src/__tests__/runner-image-identity.test.ts": 909,
+ "server/src/__tests__/runner-image-layout.test.ts": 4783,
+ "server/src/__tests__/runner-image-oci.test.ts": 2416,
+ "server/src/__tests__/runner-image-publish.test.ts": 1750,
+ "server/src/__tests__/runner-image-resolve.test.ts": 990,
+ "server/src/__tests__/runner-image-workflow.test.ts": 929,
+ "server/src/__tests__/runner-lockfile-guards.test.ts": 849,
+ "server/src/__tests__/runner-project-icon-contract.test.ts": 2855,
+ "server/src/__tests__/runtime-api.test.ts": 2236,
+ "server/src/__tests__/runtime-skill-cache.test.ts": 13610,
+ "server/src/__tests__/runtime-skill-preservation.test.ts": 10488,
+ "server/src/__tests__/sandbox-creation-intent-ownership.test.ts": 8811,
"server/src/__tests__/sandbox-creation-operations.test.ts": 90610,
- "server/src/__tests__/sandbox-orphan-cleanup-spool.test.ts": 722,
- "server/src/__tests__/sandbox-provider-runtime.test.ts": 935,
- "server/src/__tests__/sandbox-provider-schema-reads.test.ts": 8056,
- "server/src/__tests__/sandbox-snapshot-qualification.test.ts": 1475,
+ "server/src/__tests__/sandbox-orphan-cleanup-spool.test.ts": 761,
+ "server/src/__tests__/sandbox-provider-outage-error-handler.test.ts": 7175,
+ "server/src/__tests__/sandbox-provider-runtime.test.ts": 671,
+ "server/src/__tests__/sandbox-provider-schema-reads.test.ts": 9244,
+ "server/src/__tests__/sandbox-snapshot-qualification.test.ts": 1873,
"server/src/__tests__/satisfied-connection-intents.test.ts": 54642,
- "server/src/__tests__/scheduled-work-postgres.test.ts": 8449,
+ "server/src/__tests__/scheduled-work-postgres.test.ts": 9218,
"server/src/__tests__/scheduled-work.test.ts": 2510,
- "server/src/__tests__/scoped-deadline-work-notifications.test.ts": 3476,
+ "server/src/__tests__/scoped-deadline-work-notifications.test.ts": 2950,
"server/src/__tests__/scoped-deadline-work.test.ts": 2998,
- "server/src/__tests__/secret-binding-discovery.test.ts": 4155,
- "server/src/__tests__/secret-entry-guidance.test.ts": 4334,
- "server/src/__tests__/secret-provider-registry.test.ts": 852,
- "server/src/__tests__/secret-sensitive-request-error.test.ts": 6141,
- "server/src/__tests__/secrets-service-dangling-user-secret.test.ts": 8044,
- "server/src/__tests__/secrets-service-user-secret-owner-scoped.test.ts": 6675,
- "server/src/__tests__/secrets-service.test.ts": 24412,
- "server/src/__tests__/sentry-directory-merge-lock.test.ts": 2031,
- "server/src/__tests__/sentry-dsn.test.ts": 793,
- "server/src/__tests__/sentry-dynamic-import-provenance.test.ts": 772,
- "server/src/__tests__/sentry-links.test.ts": 568,
- "server/src/__tests__/sentry.test.ts": 9899,
- "server/src/__tests__/server-info.test.ts": 1027,
- "server/src/__tests__/server-metrics.test.ts": 2049,
- "server/src/__tests__/server-package-build-script.test.ts": 667,
- "server/src/__tests__/server-package-otel-peer-metadata.test.ts": 774,
- "server/src/__tests__/server-package-sentry-peer-metadata.test.ts": 685,
+ "server/src/__tests__/secret-binding-discovery.test.ts": 2921,
+ "server/src/__tests__/secret-entry-guidance.test.ts": 3727,
+ "server/src/__tests__/secret-provider-registry.test.ts": 917,
+ "server/src/__tests__/secret-sensitive-request-error.test.ts": 6884,
+ "server/src/__tests__/secrets-service-dangling-user-secret.test.ts": 8396,
+ "server/src/__tests__/secrets-service-user-secret-owner-scoped.test.ts": 6935,
+ "server/src/__tests__/secrets-service.test.ts": 22089,
+ "server/src/__tests__/sentry-directory-merge-lock.test.ts": 2294,
+ "server/src/__tests__/sentry-dsn.test.ts": 745,
+ "server/src/__tests__/sentry-dynamic-import-provenance.test.ts": 878,
+ "server/src/__tests__/sentry-links.test.ts": 710,
+ "server/src/__tests__/sentry-oauth-provider-failure.test.ts": 1921,
+ "server/src/__tests__/sentry.test.ts": 14358,
+ "server/src/__tests__/server-info.test.ts": 1725,
+ "server/src/__tests__/server-metrics.test.ts": 1989,
+ "server/src/__tests__/server-package-build-script.test.ts": 812,
+ "server/src/__tests__/server-package-otel-peer-metadata.test.ts": 876,
+ "server/src/__tests__/server-package-sentry-peer-metadata.test.ts": 868,
"server/src/__tests__/server-startup-feedback-export.test.ts": 28040,
- "server/src/__tests__/service-read-disconnect-retry.test.ts": 8867,
- "server/src/__tests__/service-version.test.ts": 926,
+ "server/src/__tests__/service-read-disconnect-retry.test.ts": 9290,
+ "server/src/__tests__/service-version.test.ts": 916,
"server/src/__tests__/settled-native-process-rechecks.test.ts": 19494,
- "server/src/__tests__/shared-telemetry-events.test.ts": 729,
- "server/src/__tests__/shutdown-settled-process-release.test.ts": 13293,
- "server/src/__tests__/sidebar-badges.test.ts": 6174,
- "server/src/__tests__/skill-default-cadence-prewire.test.ts": 3897,
- "server/src/__tests__/skill-import-discovery.test.ts": 3222,
+ "server/src/__tests__/shared-telemetry-events.test.ts": 758,
+ "server/src/__tests__/shutdown-settled-process-release.test.ts": 14085,
+ "server/src/__tests__/sidebar-badges.test.ts": 6165,
+ "server/src/__tests__/skill-default-cadence-prewire.test.ts": 3159,
+ "server/src/__tests__/skill-import-discovery.test.ts": 4267,
+ "server/src/__tests__/skill-package-storage-throttle.test.ts": 6580,
"server/src/__tests__/skill-package-store.test.ts": 21032,
- "server/src/__tests__/skill-repository-dependencies.test.ts": 1475,
- "server/src/__tests__/skill-repository-package.test.ts": 2022,
- "server/src/__tests__/skill-source-branches.test.ts": 1557,
- "server/src/__tests__/skill-source-git-snapshot.test.ts": 9014,
- "server/src/__tests__/skill-source-github-access.test.ts": 7001,
- "server/src/__tests__/skill-source-retry.test.ts": 1015,
- "server/src/__tests__/skill-source-scan-limit.test.ts": 806,
- "server/src/__tests__/skill-sources.test.ts": 16101,
- "server/src/__tests__/skill-update-diff.test.ts": 709,
- "server/src/__tests__/skill-version-cache.test.ts": 10506,
+ "server/src/__tests__/skill-package-upload.test.ts": 12080,
+ "server/src/__tests__/skill-repository-dependencies.test.ts": 1425,
+ "server/src/__tests__/skill-repository-package.test.ts": 1876,
+ "server/src/__tests__/skill-source-branches.test.ts": 1810,
+ "server/src/__tests__/skill-source-git-snapshot.test.ts": 10208,
+ "server/src/__tests__/skill-source-github-access.test.ts": 5427,
+ "server/src/__tests__/skill-source-retry.test.ts": 803,
+ "server/src/__tests__/skill-source-scan-limit.test.ts": 740,
+ "server/src/__tests__/skill-sources.test.ts": 30396,
+ "server/src/__tests__/skill-update-diff.test.ts": 711,
+ "server/src/__tests__/skill-version-cache.test.ts": 10677,
"server/src/__tests__/skill-version-retention-config.test.ts": 1526,
"server/src/__tests__/skill-version-retention-work.test.ts": 1585,
"server/src/__tests__/skill-version-retention.test.ts": 31824,
- "server/src/__tests__/skills-catalog-service.test.ts": 719,
- "server/src/__tests__/slack-authorization-revision.test.ts": 9033,
- "server/src/__tests__/slack-cloud-forms.test.ts": 1936,
+ "server/src/__tests__/skills-catalog-service.test.ts": 876,
+ "server/src/__tests__/slack-authorization-revision.test.ts": 11334,
+ "server/src/__tests__/slack-cloud-forms.test.ts": 2150,
"server/src/__tests__/slack-cloud-owner-work.test.ts": 27508,
"server/src/__tests__/slack-conversation-lifecycle.test.ts": 31522,
- "server/src/__tests__/slack-development-manager.test.ts": 1178,
+ "server/src/__tests__/slack-development-manager.test.ts": 1950,
"server/src/__tests__/slack-form-publication-readiness.test.ts": 5820,
"server/src/__tests__/slack-tool-preparation.test.ts": 7909,
- "server/src/__tests__/sleep-backup-observation.test.ts": 808,
- "server/src/__tests__/sleep-early-diagnostics.test.ts": 752,
+ "server/src/__tests__/sleep-backup-observation.test.ts": 897,
+ "server/src/__tests__/sleep-early-diagnostics.test.ts": 914,
"server/src/__tests__/sleep-idle-work-capture.test.ts": 2055,
- "server/src/__tests__/sleep-incoming-http-observation.test.ts": 1944,
- "server/src/__tests__/sleep-managed-fixture.test.ts": 2145,
- "server/src/__tests__/sleep-otel-export.test.ts": 2809,
+ "server/src/__tests__/sleep-incoming-http-observation.test.ts": 2049,
+ "server/src/__tests__/sleep-managed-fixture.test.ts": 2418,
+ "server/src/__tests__/sleep-otel-export.test.ts": 2101,
"server/src/__tests__/smoke-lab.test.ts": 10012,
- "server/src/__tests__/snapshot-attempt-upload-abort.test.ts": 6889,
- "server/src/__tests__/source-trust.test.ts": 4414,
- "server/src/__tests__/speko-call-report.test.ts": 1931,
- "server/src/__tests__/speko-delivery-diagnostics.test.ts": 1620,
- "server/src/__tests__/speko-protocol.test.ts": 1952,
- "server/src/__tests__/speko-provider.test.ts": 1729,
- "server/src/__tests__/ssh-tailscale-connection.test.ts": 1635,
- "server/src/__tests__/startup-readiness-boundary.test.ts": 1011,
- "server/src/__tests__/startup-refusals.test.ts": 579,
- "server/src/__tests__/static-index-html.test.ts": 982,
- "server/src/__tests__/static-ui-cache.test.ts": 710,
- "server/src/__tests__/static-ui-compression.test.ts": 927,
+ "server/src/__tests__/snapshot-attempt-upload-abort.test.ts": 7285,
+ "server/src/__tests__/source-trust.test.ts": 2772,
+ "server/src/__tests__/speko-call-report.test.ts": 1702,
+ "server/src/__tests__/speko-delivery-diagnostics.test.ts": 1794,
+ "server/src/__tests__/speko-protocol.test.ts": 1756,
+ "server/src/__tests__/speko-provider.test.ts": 2000,
+ "server/src/__tests__/ssh-adapter-session-codecs.test.ts": 6472,
+ "server/src/__tests__/ssh-tailscale-connection.test.ts": 2277,
+ "server/src/__tests__/startup-readiness-boundary.test.ts": 874,
+ "server/src/__tests__/startup-refusals.test.ts": 855,
+ "server/src/__tests__/static-index-html.test.ts": 877,
+ "server/src/__tests__/static-ui-cache.test.ts": 684,
+ "server/src/__tests__/static-ui-compression.test.ts": 960,
"server/src/__tests__/static-ui-idle.test.ts": 1062,
- "server/src/__tests__/status-card-compile-prompt.test.ts": 8912,
+ "server/src/__tests__/status-card-compile-prompt.test.ts": 7954,
"server/src/__tests__/status-card-evaluation-work.test.ts": 67793,
"server/src/__tests__/status-card-idle-schedule.test.ts": 2123,
- "server/src/__tests__/status-card-notifications.test.ts": 1933,
- "server/src/__tests__/status-card-update-engine.test.ts": 1508,
+ "server/src/__tests__/status-card-notifications.test.ts": 2228,
+ "server/src/__tests__/status-card-update-engine.test.ts": 2259,
"server/src/__tests__/status-cards.test.ts": 30724,
- "server/src/__tests__/storage-immutable-namespace.test.ts": 844,
- "server/src/__tests__/storage-local-provider.test.ts": 1103,
+ "server/src/__tests__/storage-immutable-namespace.test.ts": 974,
+ "server/src/__tests__/storage-local-provider.test.ts": 1049,
"server/src/__tests__/storage-outage-wait.test.ts": 20089,
- "server/src/__tests__/storage-request-stats.test.ts": 992,
- "server/src/__tests__/storage-s3-credential-rotation.test.ts": 20958,
- "server/src/__tests__/storage-s3-failure-diagnostics.test.ts": 2064,
- "server/src/__tests__/storage-s3-multipart-backoff.test.ts": 1071,
- "server/src/__tests__/storage-s3-multipart-shutdown.test.ts": 1193,
- "server/src/__tests__/storage-s3-multipart-throttle.test.ts": 1546,
+ "server/src/__tests__/storage-request-stats.test.ts": 949,
+ "server/src/__tests__/storage-s3-credential-rotation.test.ts": 21040,
+ "server/src/__tests__/storage-s3-failure-diagnostics.test.ts": 1971,
+ "server/src/__tests__/storage-s3-multipart-backoff.test.ts": 883,
+ "server/src/__tests__/storage-s3-multipart-shutdown.test.ts": 1427,
+ "server/src/__tests__/storage-s3-multipart-throttle.test.ts": 1713,
"server/src/__tests__/storage-s3-multipart.test.ts": 5750,
- "server/src/__tests__/storage-s3-request-timeout-retry.test.ts": 1418,
- "server/src/__tests__/storage-s3-transient-retry.test.ts": 2135,
- "server/src/__tests__/subscription-refresh.test.ts": 1981,
- "server/src/__tests__/subscriptions.test.ts": 8141,
- "server/src/__tests__/subtask-workspace-independence.test.ts": 9363,
- "server/src/__tests__/summary-slots.test.ts": 10159,
- "server/src/__tests__/task-admission-deadline.test.ts": 1965,
- "server/src/__tests__/task-cold-open.test.ts": 9608,
+ "server/src/__tests__/storage-s3-request-timeout-retry.test.ts": 1557,
+ "server/src/__tests__/storage-s3-small-upload-throttle.test.ts": 1567,
+ "server/src/__tests__/storage-s3-transient-retry.test.ts": 2216,
+ "server/src/__tests__/storage-unavailable-error-handler.test.ts": 5451,
+ "server/src/__tests__/subscription-refresh.test.ts": 2778,
+ "server/src/__tests__/subscriptions.test.ts": 20952,
+ "server/src/__tests__/subtask-workspace-independence.test.ts": 10336,
+ "server/src/__tests__/summary-slots.test.ts": 13372,
+ "server/src/__tests__/task-admission-deadline.test.ts": 1892,
+ "server/src/__tests__/task-cold-open.test.ts": 9764,
"server/src/__tests__/task-creation-recovery.integration.test.ts": 16295,
- "server/src/__tests__/task-interruption-automatic-path.test.ts": 7737,
- "server/src/__tests__/task-interruption-query.test.ts": 12709,
- "server/src/__tests__/task-list-projection-query.test.ts": 10090,
- "server/src/__tests__/task-search-quality.test.ts": 9039,
- "server/src/__tests__/task-search-query.test.ts": 1878,
- "server/src/__tests__/task-toast-eligibility.test.ts": 3061,
+ "server/src/__tests__/task-interruption-automatic-path.test.ts": 15069,
+ "server/src/__tests__/task-interruption-query.test.ts": 18811,
+ "server/src/__tests__/task-list-projection-query.test.ts": 12070,
+ "server/src/__tests__/task-retry-banner-execution-owner.test.ts": 8605,
+ "server/src/__tests__/task-search-quality.test.ts": 8726,
+ "server/src/__tests__/task-search-query.test.ts": 2077,
+ "server/src/__tests__/task-toast-eligibility.test.ts": 2970,
"server/src/__tests__/task-watchdogs-classifier.test.ts": 7353,
- "server/src/__tests__/task-watchdogs-incident-fixture.test.ts": 876,
+ "server/src/__tests__/task-watchdogs-incident-fixture.test.ts": 854,
"server/src/__tests__/task-watchdogs-scheduler.test.ts": 20633,
- "server/src/__tests__/task-workspace-admission.test.ts": 5703,
+ "server/src/__tests__/task-workspace-admission.test.ts": 6851,
"server/src/__tests__/task-workspace-api.test.ts": 21431,
- "server/src/__tests__/task-workspace-binding.test.ts": 13977,
- "server/src/__tests__/task-workspace-child-trust.test.ts": 10214,
- "server/src/__tests__/task-workspace-repositories-persistence.test.ts": 9190,
- "server/src/__tests__/task-workspace-repositories-trust.test.ts": 18584,
- "server/src/__tests__/task-workspace-repositories.test.ts": 6126,
- "server/src/__tests__/task-workspace-source-copy-privacy.test.ts": 7089,
- "server/src/__tests__/task-workspace-tools.test.ts": 1981,
+ "server/src/__tests__/task-workspace-binding.test.ts": 32205,
+ "server/src/__tests__/task-workspace-child-trust.test.ts": 11277,
+ "server/src/__tests__/task-workspace-repositories-persistence.test.ts": 12404,
+ "server/src/__tests__/task-workspace-repositories-trust.test.ts": 32597,
+ "server/src/__tests__/task-workspace-repositories.test.ts": 6834,
+ "server/src/__tests__/task-workspace-source-copy-privacy.test.ts": 7824,
+ "server/src/__tests__/task-workspace-tools.test.ts": 2141,
"server/src/__tests__/teams-catalog-install-no-overrides.test.ts": 13040,
- "server/src/__tests__/teams-catalog-service.test.ts": 3466,
- "server/src/__tests__/telemetry-client-flush.test.ts": 855,
- "server/src/__tests__/telemetry-startup.test.ts": 752,
+ "server/src/__tests__/teams-catalog-service.test.ts": 3724,
+ "server/src/__tests__/telemetry-client-flush.test.ts": 775,
+ "server/src/__tests__/telemetry-startup.test.ts": 780,
"server/src/__tests__/terminal-workspace-deadlines.test.ts": 42823,
"server/src/__tests__/terminal-workspace-idle.test.ts": 10197,
- "server/src/__tests__/terminal-workspace-page-batch.test.ts": 8055,
+ "server/src/__tests__/terminal-workspace-page-batch.test.ts": 9752,
"server/src/__tests__/terminal-workspace-rotation-limits.test.ts": 26808,
"server/src/__tests__/terminal-workspace-work.test.ts": 1814,
- "server/src/__tests__/tool-access-client-credentials.test.ts": 15803,
- "server/src/__tests__/tool-access-connector-telemetry.test.ts": 7389,
- "server/src/__tests__/tool-access-oauth-protocol.integration.test.ts": 22446,
- "server/src/__tests__/tool-access-policy-index.test.ts": 11475,
- "server/src/__tests__/tool-access-policy-service.test.ts": 20356,
- "server/src/__tests__/tool-access-service.test.ts": 75593,
- "server/src/__tests__/tool-call-progress-store.test.ts": 5943,
- "server/src/__tests__/tool-call-progress.test.ts": 5991,
- "server/src/__tests__/tool-catalog-publication.test.ts": 9966,
+ "server/src/__tests__/tool-access-cancelled-first-sign-in.integration.test.ts": 13972,
+ "server/src/__tests__/tool-access-client-credentials.test.ts": 39377,
+ "server/src/__tests__/tool-access-connector-telemetry.test.ts": 8929,
+ "server/src/__tests__/tool-access-oauth-protocol.integration.test.ts": 26979,
+ "server/src/__tests__/tool-access-policy-index.test.ts": 13750,
+ "server/src/__tests__/tool-access-policy-service.test.ts": 23744,
+ "server/src/__tests__/tool-access-service.test.ts": 92525,
+ "server/src/__tests__/tool-call-progress-store.test.ts": 7165,
+ "server/src/__tests__/tool-call-progress.test.ts": 6471,
+ "server/src/__tests__/tool-catalog-publication.test.ts": 11949,
"server/src/__tests__/tool-connection-content-deletion-canary.test.ts": 47442,
- "server/src/__tests__/tool-connection-content-deletion.test.ts": 10204,
+ "server/src/__tests__/tool-connection-content-deletion.test.ts": 9670,
"server/src/__tests__/tool-connection-health-work.test.ts": 52429,
"server/src/__tests__/tool-connection-installs.test.ts": 8725,
- "server/src/__tests__/tool-connection-removal.test.ts": 13402,
- "server/src/__tests__/tool-connection-review-counts-http.test.ts": 12844,
- "server/src/__tests__/tool-connection-review-counts.test.ts": 3160,
- "server/src/__tests__/tool-connection-visibility.test.ts": 5441,
- "server/src/__tests__/tool-content-guards.test.ts": 1410,
- "server/src/__tests__/tool-effective-assignments.test.ts": 16297,
- "server/src/__tests__/tool-gateway-agent-errors.test.ts": 6669,
- "server/src/__tests__/tool-gateway-connector-telemetry.test.ts": 12455,
- "server/src/__tests__/tool-gateway-discovery-http.test.ts": 12542,
- "server/src/__tests__/tool-gateway-listing-memory.test.ts": 15052,
- "server/src/__tests__/tool-gateway-service.test.ts": 150610,
- "server/src/__tests__/tool-gateway.test.ts": 70985,
- "server/src/__tests__/tool-grant-scope.test.ts": 9162,
- "server/src/__tests__/tool-oauth-legacy-backfill.test.ts": 5584,
- "server/src/__tests__/tool-profile-entry-order.test.ts": 5397,
- "server/src/__tests__/tool-profile-entry-validation.test.ts": 11324,
- "server/src/__tests__/tool-profile-matching.test.ts": 2298,
- "server/src/__tests__/tool-profile-pending-projection.test.ts": 2578,
- "server/src/__tests__/tool-profile-review-service.test.ts": 5277,
- "server/src/__tests__/tool-review-queue-unsigned-request.test.ts": 4895,
- "server/src/__tests__/trust-preset-resolver.test.ts": 1528,
- "server/src/__tests__/trust-proxy.test.ts": 825,
- "server/src/__tests__/ui-branding.test.ts": 721,
- "server/src/__tests__/unikraft-connection.test.ts": 9573,
- "server/src/__tests__/unikraft-http-boundary.test.ts": 928,
- "server/src/__tests__/version.test.ts": 967,
- "server/src/__tests__/vite-html-renderer.test.ts": 743,
- "server/src/__tests__/vitest-chat-shards.test.ts": 13174,
+ "server/src/__tests__/tool-connection-removal.test.ts": 12219,
+ "server/src/__tests__/tool-connection-review-counts-http.test.ts": 17131,
+ "server/src/__tests__/tool-connection-review-counts.test.ts": 2588,
+ "server/src/__tests__/tool-connection-visibility.test.ts": 5889,
+ "server/src/__tests__/tool-content-guards.test.ts": 1639,
+ "server/src/__tests__/tool-effective-assignments.test.ts": 19200,
+ "server/src/__tests__/tool-gateway-agent-errors.test.ts": 8723,
+ "server/src/__tests__/tool-gateway-connector-telemetry.test.ts": 16062,
+ "server/src/__tests__/tool-gateway-discovery-http.test.ts": 11674,
+ "server/src/__tests__/tool-gateway-listing-memory.test.ts": 15847,
+ "server/src/__tests__/tool-gateway-named-gateway-deadlock.test.ts": 9298,
+ "server/src/__tests__/tool-gateway-service.test.ts": 100846,
+ "server/src/__tests__/tool-gateway.test.ts": 110569,
+ "server/src/__tests__/tool-grant-scope.test.ts": 11130,
+ "server/src/__tests__/tool-oauth-legacy-backfill.test.ts": 7497,
+ "server/src/__tests__/tool-profile-entry-order.test.ts": 6995,
+ "server/src/__tests__/tool-profile-entry-validation.test.ts": 9779,
+ "server/src/__tests__/tool-profile-matching.test.ts": 1869,
+ "server/src/__tests__/tool-profile-pending-projection.test.ts": 2107,
+ "server/src/__tests__/tool-profile-review-service.test.ts": 7837,
+ "server/src/__tests__/tool-review-queue-unsigned-request.test.ts": 7018,
+ "server/src/__tests__/trust-preset-resolver.test.ts": 1602,
+ "server/src/__tests__/trust-proxy.test.ts": 795,
+ "server/src/__tests__/ui-branding.test.ts": 769,
+ "server/src/__tests__/unikraft-connection.test.ts": 12875,
+ "server/src/__tests__/unikraft-http-boundary.test.ts": 861,
+ "server/src/__tests__/version.test.ts": 787,
+ "server/src/__tests__/vite-html-renderer.test.ts": 807,
+ "server/src/__tests__/vitest-chat-shards.test.ts": 15402,
"server/src/__tests__/voice-call-reports.test.ts": 9524,
"server/src/__tests__/voice-inbound-cleanup.test.ts": 9552,
"server/src/__tests__/voice-inbound-retention.test.ts": 4727,
"server/src/__tests__/voice-recovery-work.test.ts": 25368,
"server/src/__tests__/voice-session-store.integration.test.ts": 78942,
- "server/src/__tests__/warm-sandbox-expiry.test.ts": 8140,
+ "server/src/__tests__/warm-sandbox-expiry.test.ts": 8343,
"server/src/__tests__/work-product-runtime-reconciliation.test.ts": 7198,
- "server/src/__tests__/work-product-workspace-validation.test.ts": 5809,
- "server/src/__tests__/work-products.test.ts": 6136,
- "server/src/__tests__/work-scheduler.test.ts": 748,
- "server/src/__tests__/work-timeline-service.test.ts": 17371,
- "server/src/__tests__/workspace-authorization-query.test.ts": 9652,
- "server/src/__tests__/workspace-cleanup-retained-local-dir.test.ts": 6489,
- "server/src/__tests__/workspace-compaction.test.ts": 1500,
+ "server/src/__tests__/work-product-workspace-validation.test.ts": 6717,
+ "server/src/__tests__/work-products.test.ts": 7496,
+ "server/src/__tests__/work-scheduler.test.ts": 852,
+ "server/src/__tests__/work-timeline-service.test.ts": 20862,
+ "server/src/__tests__/workload-identity.test.ts": 20190,
+ "server/src/__tests__/workspace-authorization-query.test.ts": 8981,
+ "server/src/__tests__/workspace-cleanup-retained-local-dir.test.ts": 7373,
+ "server/src/__tests__/workspace-compaction.test.ts": 1585,
"server/src/__tests__/workspace-delivery-cleanup.integration.test.ts": 11616,
- "server/src/__tests__/workspace-history-user-journey.test.ts": 11436,
- "server/src/__tests__/workspace-host-provision.test.ts": 2015,
- "server/src/__tests__/workspace-instance-cleanup.test.ts": 652,
- "server/src/__tests__/workspace-login-handoff-endpoint.test.ts": 2386,
- "server/src/__tests__/workspace-login-handoff-issuer.test.ts": 1893,
- "server/src/__tests__/workspace-login-handoff.test.ts": 825,
+ "server/src/__tests__/workspace-history-user-journey.test.ts": 15152,
+ "server/src/__tests__/workspace-host-provision.test.ts": 1985,
+ "server/src/__tests__/workspace-instance-cleanup.test.ts": 960,
+ "server/src/__tests__/workspace-login-handoff-endpoint.test.ts": 2785,
+ "server/src/__tests__/workspace-login-handoff-issuer.test.ts": 1867,
+ "server/src/__tests__/workspace-login-handoff.test.ts": 727,
"server/src/__tests__/workspace-operations-reconciliation.test.ts": 8506,
- "server/src/__tests__/workspace-preferences.test.ts": 6065,
- "server/src/__tests__/workspace-preparation-history.test.ts": 15947,
- "server/src/__tests__/workspace-provider-failure.test.ts": 1400,
- "server/src/__tests__/workspace-readiness.test.ts": 1955,
- "server/src/__tests__/workspace-reaper-cooldown-config.test.ts": 1871,
+ "server/src/__tests__/workspace-preferences.test.ts": 8174,
+ "server/src/__tests__/workspace-preparation-history.test.ts": 14982,
+ "server/src/__tests__/workspace-provider-failure.test.ts": 1965,
+ "server/src/__tests__/workspace-readiness.test.ts": 2601,
+ "server/src/__tests__/workspace-reaper-cooldown-config.test.ts": 1608,
"server/src/__tests__/workspace-runtime-control-recovery.test.ts": 7273,
"server/src/__tests__/workspace-runtime-exposure-reservation.test.ts": 9335,
"server/src/__tests__/workspace-runtime-https-live-exercise.test.ts": 2771,
- "server/src/__tests__/workspace-runtime-lease-ownership.test.ts": 11219,
- "server/src/__tests__/workspace-runtime-leases.test.ts": 4296,
+ "server/src/__tests__/workspace-runtime-lease-ownership.test.ts": 12038,
+ "server/src/__tests__/workspace-runtime-leases.test.ts": 4386,
"server/src/__tests__/workspace-runtime-lifecycle.test.ts": 7179,
"server/src/__tests__/workspace-runtime-start-terminality.test.ts": 9698,
- "server/src/__tests__/workspace-runtime.test.ts": 102579,
+ "server/src/__tests__/workspace-runtime.test.ts": 90801,
"server/src/__tests__/workspace-worktree-concurrency.test.ts": 30390,
- "server/src/__tests__/worktree-config.test.ts": 1938,
- "server/src/__tests__/worktree-seed-server-spawn.test.ts": 8828,
- "server/src/__tests__/write-build-stamp.test.ts": 1065,
- "server/src/__tests__/write-path-membership.test.ts": 6313,
- "server/src/adapters/claude-agent-id-header.test.ts": 829,
- "server/src/adapters/cloud-external-adapters.test.ts": 10072,
- "server/src/adapters/http/execute.test.ts": 1754,
- "server/src/adapters/plugin-loader.test.ts": 759,
- "server/src/adapters/registry.test.ts": 6375,
- "server/src/embedded-postgres-owner.test.ts": 685,
- "server/src/event-loop-stall-monitor.test.ts": 2403,
- "server/src/google-workspace-rest-tools/allowlist.test.ts": 2706,
- "server/src/google-workspace-rest-tools/boundary.test.ts": 1335,
- "server/src/google-workspace-rest-tools/calendar/create-event.test.ts": 901,
- "server/src/google-workspace-rest-tools/calendar/delete-event.test.ts": 748,
- "server/src/google-workspace-rest-tools/calendar/event.test.ts": 883,
- "server/src/google-workspace-rest-tools/calendar/get-event.test.ts": 1286,
- "server/src/google-workspace-rest-tools/calendar/list-calendars.test.ts": 1007,
- "server/src/google-workspace-rest-tools/calendar/list-events.test.ts": 857,
- "server/src/google-workspace-rest-tools/calendar/respond-to-event.test.ts": 803,
- "server/src/google-workspace-rest-tools/calendar/search-events.test.ts": 904,
- "server/src/google-workspace-rest-tools/calendar/suggest-time.test.ts": 817,
- "server/src/google-workspace-rest-tools/calendar/time.test.ts": 812,
- "server/src/google-workspace-rest-tools/calendar/update-event.test.ts": 1496,
- "server/src/google-workspace-rest-tools/docs/read-doc.test.ts": 940,
- "server/src/google-workspace-rest-tools/docs/render.test.ts": 917,
- "server/src/google-workspace-rest-tools/docs/request-kinds.test.ts": 899,
- "server/src/google-workspace-rest-tools/docs/update-doc.test.ts": 942,
- "server/src/google-workspace-rest-tools/documents-shared.test.ts": 1023,
- "server/src/google-workspace-rest-tools/drive/annotations.test.ts": 900,
- "server/src/google-workspace-rest-tools/drive/copy-file.test.ts": 661,
- "server/src/google-workspace-rest-tools/drive/create-file.test.ts": 821,
- "server/src/google-workspace-rest-tools/drive/download-file-content.test.ts": 730,
- "server/src/google-workspace-rest-tools/drive/get-file-metadata.test.ts": 1277,
- "server/src/google-workspace-rest-tools/drive/get-file-permissions.test.ts": 843,
- "server/src/google-workspace-rest-tools/drive/list-recent-files.test.ts": 1087,
- "server/src/google-workspace-rest-tools/drive/query.test.ts": 584,
- "server/src/google-workspace-rest-tools/drive/read-file-content.test.ts": 969,
- "server/src/google-workspace-rest-tools/drive/search-files.test.ts": 776,
- "server/src/google-workspace-rest-tools/gmail/address.test.ts": 852,
- "server/src/google-workspace-rest-tools/gmail/create-draft.test.ts": 1127,
- "server/src/google-workspace-rest-tools/gmail/get-draft.test.ts": 1116,
- "server/src/google-workspace-rest-tools/gmail/get-message.test.ts": 875,
- "server/src/google-workspace-rest-tools/gmail/get-thread.test.ts": 819,
- "server/src/google-workspace-rest-tools/gmail/list-drafts.test.ts": 887,
- "server/src/google-workspace-rest-tools/gmail/list-labels.test.ts": 933,
- "server/src/google-workspace-rest-tools/gmail/list-threads.test.ts": 902,
- "server/src/google-workspace-rest-tools/gmail/parallel.test.ts": 1107,
- "server/src/google-workspace-rest-tools/gmail/search-messages.test.ts": 622,
- "server/src/google-workspace-rest-tools/gmail/search-threads.test.ts": 822,
- "server/src/google-workspace-rest-tools/google-http.test.ts": 800,
- "server/src/google-workspace-rest-tools/probe.test.ts": 880,
- "server/src/google-workspace-rest-tools/result-budget.test.ts": 2010,
- "server/src/google-workspace-rest-tools/server.test.ts": 1360,
- "server/src/google-workspace-rest-tools/sheets/get-spreadsheet.test.ts": 879,
- "server/src/google-workspace-rest-tools/sheets/get-values.test.ts": 1162,
- "server/src/google-workspace-rest-tools/sheets/insert-dimension.test.ts": 896,
- "server/src/google-workspace-rest-tools/sheets/range.test.ts": 737,
- "server/src/google-workspace-rest-tools/sheets/update-spreadsheet.test.ts": 870,
- "server/src/google-workspace-rest-tools/sheets/update-values.test.ts": 1144,
- "server/src/google-workspace-rest-tools/sheets/wiring.test.ts": 1665,
- "server/src/google-workspace-rest-tools/slides/read-presentation.test.ts": 1050,
- "server/src/google-workspace-rest-tools/slides/render.test.ts": 814,
- "server/src/google-workspace-rest-tools/slides/request-kinds.test.ts": 902,
- "server/src/google-workspace-rest-tools/slides/update-presentation.test.ts": 1114,
- "server/src/http/server.test.ts": 2908,
- "server/src/lib/active-run-slots.test.ts": 868,
- "server/src/lib/request-promise-memo.test.ts": 887,
- "server/src/lib/single-flight.test.ts": 889,
+ "server/src/__tests__/worktree-config.test.ts": 2347,
+ "server/src/__tests__/worktree-seed-server-spawn.test.ts": 10537,
+ "server/src/__tests__/write-build-stamp.test.ts": 959,
+ "server/src/__tests__/write-path-membership.test.ts": 6877,
+ "server/src/adapters/claude-agent-id-header.test.ts": 912,
+ "server/src/adapters/cloud-external-adapters.test.ts": 10083,
+ "server/src/adapters/http/execute.test.ts": 2041,
+ "server/src/adapters/plugin-loader.test.ts": 1014,
+ "server/src/adapters/registry.test.ts": 7041,
+ "server/src/embedded-postgres-owner.test.ts": 868,
+ "server/src/event-loop-stall-monitor.test.ts": 2515,
+ "server/src/google-workspace-rest-tools/allowlist.test.ts": 1795,
+ "server/src/google-workspace-rest-tools/boundary.test.ts": 1360,
+ "server/src/google-workspace-rest-tools/calendar/create-event.test.ts": 1058,
+ "server/src/google-workspace-rest-tools/calendar/delete-event.test.ts": 1029,
+ "server/src/google-workspace-rest-tools/calendar/event.test.ts": 873,
+ "server/src/google-workspace-rest-tools/calendar/get-event.test.ts": 1057,
+ "server/src/google-workspace-rest-tools/calendar/list-calendars.test.ts": 999,
+ "server/src/google-workspace-rest-tools/calendar/list-events.test.ts": 977,
+ "server/src/google-workspace-rest-tools/calendar/respond-to-event.test.ts": 896,
+ "server/src/google-workspace-rest-tools/calendar/search-events.test.ts": 992,
+ "server/src/google-workspace-rest-tools/calendar/suggest-time.test.ts": 914,
+ "server/src/google-workspace-rest-tools/calendar/time.test.ts": 875,
+ "server/src/google-workspace-rest-tools/calendar/update-event.test.ts": 864,
+ "server/src/google-workspace-rest-tools/docs/read-doc.test.ts": 795,
+ "server/src/google-workspace-rest-tools/docs/render.test.ts": 876,
+ "server/src/google-workspace-rest-tools/docs/request-kinds.test.ts": 1182,
+ "server/src/google-workspace-rest-tools/docs/update-doc.test.ts": 903,
+ "server/src/google-workspace-rest-tools/documents-shared.test.ts": 990,
+ "server/src/google-workspace-rest-tools/drive/annotations.test.ts": 1059,
+ "server/src/google-workspace-rest-tools/drive/copy-file.test.ts": 1073,
+ "server/src/google-workspace-rest-tools/drive/create-file.test.ts": 875,
+ "server/src/google-workspace-rest-tools/drive/download-file-content.test.ts": 915,
+ "server/src/google-workspace-rest-tools/drive/get-file-metadata.test.ts": 821,
+ "server/src/google-workspace-rest-tools/drive/get-file-permissions.test.ts": 927,
+ "server/src/google-workspace-rest-tools/drive/list-recent-files.test.ts": 973,
+ "server/src/google-workspace-rest-tools/drive/query.test.ts": 1016,
+ "server/src/google-workspace-rest-tools/drive/read-file-content.test.ts": 1084,
+ "server/src/google-workspace-rest-tools/drive/search-files.test.ts": 1122,
+ "server/src/google-workspace-rest-tools/gmail/address.test.ts": 850,
+ "server/src/google-workspace-rest-tools/gmail/create-draft.test.ts": 1031,
+ "server/src/google-workspace-rest-tools/gmail/get-draft.test.ts": 994,
+ "server/src/google-workspace-rest-tools/gmail/get-message.test.ts": 1063,
+ "server/src/google-workspace-rest-tools/gmail/get-thread.test.ts": 869,
+ "server/src/google-workspace-rest-tools/gmail/list-drafts.test.ts": 942,
+ "server/src/google-workspace-rest-tools/gmail/list-labels.test.ts": 864,
+ "server/src/google-workspace-rest-tools/gmail/list-threads.test.ts": 997,
+ "server/src/google-workspace-rest-tools/gmail/parallel.test.ts": 743,
+ "server/src/google-workspace-rest-tools/gmail/search-messages.test.ts": 944,
+ "server/src/google-workspace-rest-tools/gmail/search-threads.test.ts": 1048,
+ "server/src/google-workspace-rest-tools/google-http.test.ts": 1041,
+ "server/src/google-workspace-rest-tools/probe.test.ts": 992,
+ "server/src/google-workspace-rest-tools/result-budget.test.ts": 2062,
+ "server/src/google-workspace-rest-tools/server.test.ts": 1253,
+ "server/src/google-workspace-rest-tools/sheets/get-spreadsheet.test.ts": 1074,
+ "server/src/google-workspace-rest-tools/sheets/get-values.test.ts": 1097,
+ "server/src/google-workspace-rest-tools/sheets/insert-dimension.test.ts": 957,
+ "server/src/google-workspace-rest-tools/sheets/range.test.ts": 882,
+ "server/src/google-workspace-rest-tools/sheets/update-spreadsheet.test.ts": 974,
+ "server/src/google-workspace-rest-tools/sheets/update-values.test.ts": 961,
+ "server/src/google-workspace-rest-tools/sheets/wiring.test.ts": 2098,
+ "server/src/google-workspace-rest-tools/slides/read-presentation.test.ts": 915,
+ "server/src/google-workspace-rest-tools/slides/render.test.ts": 915,
+ "server/src/google-workspace-rest-tools/slides/request-kinds.test.ts": 1052,
+ "server/src/google-workspace-rest-tools/slides/update-presentation.test.ts": 916,
+ "server/src/google-workspace-rest-tools/strict-arguments.test.ts": 1060,
+ "server/src/http/server.test.ts": 3003,
+ "server/src/lib/active-run-slots.test.ts": 523,
+ "server/src/lib/request-promise-memo.test.ts": 791,
+ "server/src/lib/single-flight.test.ts": 740,
"server/src/maintenance/ephemeral-migration-service.test.ts": 1291,
"server/src/maintenance/native-harness-prestage-runtime.test.ts": 9103,
- "server/src/maintenance/native-harness-prestage.test.ts": 1031,
+ "server/src/maintenance/native-harness-prestage.test.ts": 1107,
"server/src/maintenance/online-workspace-migration.test.ts": 6949,
- "server/src/middleware/cloud-tenant-actor.test.ts": 6804,
- "server/src/middleware/cloud-tenant-sync-postgres.test.ts": 22374,
- "server/src/middleware/runner-call-outcome.test.ts": 3023,
- "server/src/modules/active-run-watchdog/adapters/process.test.ts": 1696,
- "server/src/modules/active-run-watchdog/application/use-cases.test.ts": 724,
- "server/src/modules/active-run-watchdog/domain/policy.test.ts": 886,
- "server/src/modules/agent-lifecycle/__tests__/diagnostics.test.ts": 8270,
- "server/src/modules/agent-lifecycle/__tests__/driver-scope.test.ts": 7479,
- "server/src/modules/agent-lifecycle/__tests__/environment-plugins.test.ts": 9410,
- "server/src/modules/agent-lifecycle/__tests__/lifecycle.test.ts": 37484,
+ "server/src/middleware/cloud-tenant-actor.test.ts": 9679,
+ "server/src/middleware/cloud-tenant-sync-postgres.test.ts": 23600,
+ "server/src/middleware/runner-call-outcome.test.ts": 3980,
+ "server/src/modules/active-run-watchdog/adapters/process.test.ts": 1851,
+ "server/src/modules/active-run-watchdog/application/use-cases.test.ts": 760,
+ "server/src/modules/active-run-watchdog/domain/policy.test.ts": 785,
+ "server/src/modules/agent-lifecycle/__tests__/diagnostics.test.ts": 6352,
+ "server/src/modules/agent-lifecycle/__tests__/driver-scope.test.ts": 7287,
+ "server/src/modules/agent-lifecycle/__tests__/environment-plugins.test.ts": 10464,
+ "server/src/modules/agent-lifecycle/__tests__/lifecycle.test.ts": 37682,
"server/src/modules/agent-lifecycle/__tests__/pending-backoff.test.ts": 6985,
- "server/src/modules/agent-lifecycle/__tests__/policy-sweep.test.ts": 8793,
- "server/src/modules/agent-lifecycle/__tests__/resource-wait-stop.test.ts": 11051,
- "server/src/modules/agent-lifecycle/__tests__/restart-verification.test.ts": 7019,
- "server/src/modules/agent-lifecycle/__tests__/setup.test.ts": 8764,
- "server/src/modules/agent-lifecycle/__tests__/verification-retry.test.ts": 10040,
- "server/src/modules/execution-admission/adapters/postgres.test.ts": 7352,
- "server/src/modules/execution-admission/domain/policy.test.ts": 733,
- "server/src/modules/external-agents/cloud-principal-http.test.ts": 6307,
- "server/src/modules/external-agents/cloud-principal-log.test.ts": 1086,
- "server/src/modules/external-agents/original-token-principal.test.ts": 6875,
- "server/src/modules/run-dispatch/adapters/postgres.test.ts": 31715,
- "server/src/modules/run-dispatch/application/use-cases.test.ts": 733,
- "server/src/modules/run-dispatch/domain/policy.test.ts": 917,
- "server/src/modules/run-dispatch/domain/wake-context.test.ts": 766,
- "server/src/modules/wake-queue/adapters/chat-declined-outcome-reported.test.ts": 8840,
- "server/src/modules/wake-queue/adapters/chat-wake-conversation-batch.test.ts": 8403,
- "server/src/modules/wake-queue/adapters/chat-wake-delivered.test.ts": 7354,
- "server/src/modules/wake-queue/adapters/operator-stop.test.ts": 5816,
- "server/src/modules/wake-queue/adapters/postgres.test.ts": 38573,
- "server/src/modules/wake-queue/adapters/promoted-retry-scope.test.ts": 6760,
- "server/src/modules/wake-queue/adapters/queued-comment-postgres.test.ts": 6682,
- "server/src/modules/wake-queue/adapters/queued-operator-stop-postgres.test.ts": 6080,
- "server/src/modules/wake-queue/adapters/release-run-read.test.ts": 2580,
+ "server/src/modules/agent-lifecycle/__tests__/policy-sweep.test.ts": 7506,
+ "server/src/modules/agent-lifecycle/__tests__/resource-wait-stop.test.ts": 11219,
+ "server/src/modules/agent-lifecycle/__tests__/restart-verification.test.ts": 7445,
+ "server/src/modules/agent-lifecycle/__tests__/setup.test.ts": 9432,
+ "server/src/modules/agent-lifecycle/__tests__/verification-retry.test.ts": 9560,
+ "server/src/modules/execution-admission/adapters/postgres.test.ts": 7019,
+ "server/src/modules/execution-admission/domain/policy.test.ts": 893,
+ "server/src/modules/external-agents/cloud-principal-http.test.ts": 7389,
+ "server/src/modules/external-agents/cloud-principal-log.test.ts": 859,
+ "server/src/modules/external-agents/original-token-principal.test.ts": 6101,
+ "server/src/modules/run-dispatch/adapters/postgres.test.ts": 39295,
+ "server/src/modules/run-dispatch/application/use-cases.test.ts": 724,
+ "server/src/modules/run-dispatch/domain/policy.test.ts": 795,
+ "server/src/modules/run-dispatch/domain/wake-context.test.ts": 996,
+ "server/src/modules/wake-queue/adapters/chat-declined-outcome-reported.test.ts": 8101,
+ "server/src/modules/wake-queue/adapters/chat-wake-conversation-batch.test.ts": 8819,
+ "server/src/modules/wake-queue/adapters/chat-wake-delivered.test.ts": 7818,
+ "server/src/modules/wake-queue/adapters/operator-stop.test.ts": 6114,
+ "server/src/modules/wake-queue/adapters/postgres.test.ts": 41109,
+ "server/src/modules/wake-queue/adapters/promoted-retry-scope.test.ts": 7323,
+ "server/src/modules/wake-queue/adapters/queued-comment-postgres.test.ts": 8164,
+ "server/src/modules/wake-queue/adapters/queued-operator-stop-postgres.test.ts": 6629,
+ "server/src/modules/wake-queue/adapters/release-run-read.test.ts": 2720,
"server/src/modules/wake-queue/adapters/retryable-before-provider-work.test.ts": 5229,
- "server/src/modules/wake-queue/application/queued-comment-use-cases.test.ts": 774,
- "server/src/modules/wake-queue/application/use-cases.test.ts": 7492,
- "server/src/modules/wake-queue/domain/context.test.ts": 6037,
- "server/src/modules/wake-queue/domain/policy.test.ts": 1025,
- "server/src/realtime/live-event-delivery.cost.test.ts": 897,
- "server/src/realtime/live-event-delivery.test.ts": 745,
- "server/src/realtime/runner-prp-outbound.test.ts": 806,
- "server/src/realtime/runner-prp-ws.test.ts": 2722,
- "server/src/routes/adapters.test.ts": 5585,
- "server/src/routes/chat-channels.identity.test.ts": 7775,
- "server/src/routes/chat-channels.webhook.test.ts": 7956,
- "server/src/routes/connection-intents.test.ts": 5811,
- "server/src/routes/ephemeral-enrollment.test.ts": 2108,
- "server/src/routes/issues-wake-diagnostics.test.ts": 4963,
- "server/src/routes/setup-token-route.test.ts": 9288,
- "server/src/routes/tool-access-connection-intent.test.ts": 7464,
- "server/src/routes/voice-sessions.auth.test.ts": 7695,
- "server/src/runtime-tools-token.test.ts": 1406,
- "server/src/services/__tests__/git-connection-failure.test.ts": 753,
- "server/src/services/__tests__/mcp-connection-failure.test.ts": 688,
- "server/src/services/__tests__/process-loss-diagnostics.test.ts": 880,
- "server/src/services/__tests__/run-failure-diagnostics-provider-unavailable.test.ts": 1815,
- "server/src/services/__tests__/run-failure-diagnostics.test.ts": 1637,
- "server/src/services/__tests__/run-failure-report-native-usage-limit.test.ts": 7350,
- "server/src/services/__tests__/run-failure-report-project-access.test.ts": 6454,
- "server/src/services/__tests__/run-failure-report-reviewed-chat.test.ts": 7286,
+ "server/src/modules/wake-queue/application/issue-wake-admission.test.ts": 703,
+ "server/src/modules/wake-queue/application/queued-comment-use-cases.test.ts": 1136,
+ "server/src/modules/wake-queue/application/recovery-admission.test.ts": 868,
+ "server/src/modules/wake-queue/application/recovery-deferral.test.ts": 6956,
+ "server/src/modules/wake-queue/application/use-cases.test.ts": 20203,
+ "server/src/modules/wake-queue/domain/context.test.ts": 6788,
+ "server/src/modules/wake-queue/domain/policy.test.ts": 793,
+ "server/src/realtime/activity-toast-details.test.ts": 2070,
+ "server/src/realtime/live-event-delivery.cost.test.ts": 625,
+ "server/src/realtime/live-event-delivery.test.ts": 875,
+ "server/src/realtime/runner-prp-outbound.test.ts": 790,
+ "server/src/realtime/runner-prp-ws.test.ts": 2320,
+ "server/src/routes/adapters.test.ts": 6128,
+ "server/src/routes/chat-channels.identity.test.ts": 9732,
+ "server/src/routes/chat-channels.webhook.test.ts": 9846,
+ "server/src/routes/connection-intents.test.ts": 6824,
+ "server/src/routes/ephemeral-enrollment.test.ts": 2652,
+ "server/src/routes/issue-document-batch.test.ts": 2324,
+ "server/src/routes/issues-wake-diagnostics.test.ts": 5181,
+ "server/src/routes/setup-token-route.test.ts": 22759,
+ "server/src/routes/tool-access-connection-intent.test.ts": 9663,
+ "server/src/routes/voice-sessions.auth.test.ts": 6633,
+ "server/src/runtime-tools-token.test.ts": 826,
+ "server/src/services/__tests__/git-connection-failure.test.ts": 818,
+ "server/src/services/__tests__/mcp-connection-failure.test.ts": 780,
+ "server/src/services/__tests__/process-loss-diagnostics.test.ts": 740,
+ "server/src/services/__tests__/run-failure-diagnostics-provider-unavailable.test.ts": 1622,
+ "server/src/services/__tests__/run-failure-diagnostics.test.ts": 1907,
+ "server/src/services/__tests__/run-failure-report-native-usage-limit.test.ts": 7152,
+ "server/src/services/__tests__/run-failure-report-project-access.test.ts": 7865,
+ "server/src/services/__tests__/run-failure-report-reviewed-chat.test.ts": 7151,
+ "server/src/services/__tests__/run-failure-report-sandbox-resume.test.ts": 7160,
"server/src/services/__tests__/run-failure-report.test.ts": 21951,
- "server/src/services/__tests__/sentry-run-links.test.ts": 2351,
- "server/src/services/acknowledged-native-stop.test.ts": 2689,
- "server/src/services/adapter-execution-control.test.ts": 1434,
- "server/src/services/adapter-execution-phase.test.ts": 682,
- "server/src/services/adapter-login-lease.test.ts": 699,
- "server/src/services/adapter-models-env.test.ts": 932,
- "server/src/services/adapter-registry-bootstrap.reconcile.test.ts": 6276,
- "server/src/services/adapter-registry-bootstrap.test.ts": 5086,
- "server/src/services/adapter-settings-local.test.ts": 2366,
- "server/src/services/adapter-settings-postgres.test.ts": 6481,
- "server/src/services/agent-budget-hold-activity.test.ts": 8607,
- "server/src/services/agent-cost-history-deletion.test.ts": 6277,
- "server/src/services/agent-environment-test-status.test.ts": 5644,
- "server/src/services/agent-identity-redaction.test.ts": 2040,
- "server/src/services/agent-interaction-delivery.test.ts": 7079,
- "server/src/services/agent-invented-host-links.test.ts": 1731,
- "server/src/services/agent-runner-selection.test.ts": 5364,
- "server/src/services/agent-start-lock.test.ts": 559,
- "server/src/services/ai-account-identity.test.ts": 2027,
- "server/src/services/ai-auth-failure.test.ts": 1974,
- "server/src/services/ai-connection-configuration-failure.test.ts": 984,
- "server/src/services/ai-connection-usage.test.ts": 1774,
- "server/src/services/anthropic-pricing.test.ts": 1976,
- "server/src/services/app-webhook.test.ts": 739,
- "server/src/services/approved-execution-wait.test.ts": 947,
- "server/src/services/attention-audience.test.ts": 7537,
- "server/src/services/attention-resolver-audience.test.ts": 6558,
- "server/src/services/board-auth.test.ts": 11874,
- "server/src/services/budget-live-usage.test.ts": 2077,
- "server/src/services/budget-resume-continuation.test.ts": 10211,
- "server/src/services/budget-tracing.test.ts": 1887,
- "server/src/services/bundled-skill-release-validation.test.ts": 2693,
- "server/src/services/case-agent-read.test.ts": 2438,
- "server/src/services/case-deletion.test.ts": 7502,
- "server/src/services/case-handoff-privacy.test.ts": 7182,
+ "server/src/services/__tests__/sentry-run-links.test.ts": 2294,
+ "server/src/services/acknowledged-native-stop.test.ts": 3212,
+ "server/src/services/adapter-execution-control.test.ts": 1599,
+ "server/src/services/adapter-execution-phase.test.ts": 706,
+ "server/src/services/adapter-login-lease.test.ts": 809,
+ "server/src/services/adapter-models-env.test.ts": 665,
+ "server/src/services/adapter-registry-bootstrap.reconcile.test.ts": 6349,
+ "server/src/services/adapter-registry-bootstrap.test.ts": 5412,
+ "server/src/services/adapter-settings-local.test.ts": 2256,
+ "server/src/services/adapter-settings-postgres.test.ts": 7846,
+ "server/src/services/agent-budget-hold-activity.test.ts": 6723,
+ "server/src/services/agent-cost-history-deletion.test.ts": 5956,
+ "server/src/services/agent-environment-test-status.test.ts": 5780,
+ "server/src/services/agent-identity-redaction.test.ts": 2274,
+ "server/src/services/agent-interaction-delivery.test.ts": 10275,
+ "server/src/services/agent-invented-host-links.test.ts": 1816,
+ "server/src/services/agent-runner-selection.test.ts": 11646,
+ "server/src/services/agent-start-lock.test.ts": 807,
+ "server/src/services/ai-account-identity.test.ts": 1993,
+ "server/src/services/ai-api-key-test.test.ts": 747,
+ "server/src/services/ai-auth-failure.test.ts": 1926,
+ "server/src/services/ai-connection-configuration-failure.test.ts": 991,
+ "server/src/services/ai-connection-usage.test.ts": 1925,
+ "server/src/services/anthropic-pricing.test.ts": 1563,
+ "server/src/services/app-webhook.test.ts": 831,
+ "server/src/services/approved-execution-wait.test.ts": 653,
+ "server/src/services/attention-audience.test.ts": 6642,
+ "server/src/services/attention-resolver-audience.test.ts": 6738,
+ "server/src/services/board-auth.test.ts": 14036,
+ "server/src/services/budget-live-usage.test.ts": 2119,
+ "server/src/services/budget-resume-continuation.test.ts": 9335,
+ "server/src/services/budget-tracing.test.ts": 1882,
+ "server/src/services/bundled-skill-release-validation.test.ts": 2609,
+ "server/src/services/case-agent-read.test.ts": 2408,
+ "server/src/services/case-deletion.test.ts": 8417,
+ "server/src/services/case-handoff-privacy.test.ts": 7294,
"server/src/services/case-handoffs.test.ts": 59635,
- "server/src/services/case-task-documents.test.ts": 7695,
- "server/src/services/chat-channels/authorization-run-read.test.ts": 2401,
+ "server/src/services/case-task-documents.test.ts": 7435,
+ "server/src/services/chat-channels/authorization-run-read.test.ts": 2496,
"server/src/services/chat-channels/discord/command-work.test.ts": 2014,
+ "server/src/services/chat-channels/failed-chat-retry-source-stop-wait.test.ts": 7026,
"server/src/services/chat-channels/github/response-run-state.test.ts": 8778,
"server/src/services/chat-channels/github/response-sweep-scope.test.ts": 6654,
"server/src/services/chat-channels/github/retry.test.ts": 6396,
"server/src/services/chat-channels/github/review-check-work.test.ts": 3215,
- "server/src/services/chat-channels/github/review-heading.test.ts": 722,
- "server/src/services/chat-channels/github/review-instructions.test.ts": 1825,
+ "server/src/services/chat-channels/github/review-heading.test.ts": 686,
+ "server/src/services/chat-channels/github/review-instructions.test.ts": 1835,
"server/src/services/chat-channels/github/terminal-response-work.test.ts": 12889,
- "server/src/services/chat-channels/github/webhook-ingress.test.ts": 8916,
- "server/src/services/chat-channels/inbound/wakeup-authorization-error.test.ts": 621,
+ "server/src/services/chat-channels/github/webhook-ingress.test.ts": 10592,
+ "server/src/services/chat-channels/inbound/resource-admission.test.ts": 7160,
+ "server/src/services/chat-channels/inbound/wakeup-authorization-error.test.ts": 719,
"server/src/services/chat-channels/run-origin.test.ts": 6023,
- "server/src/services/chat-channels/slack/adapter.test.ts": 2150,
- "server/src/services/chat-channels/slack/cards.test.ts": 2222,
+ "server/src/services/chat-channels/slack/adapter.test.ts": 2482,
+ "server/src/services/chat-channels/slack/cards.test.ts": 2156,
"server/src/services/chat-channels/slack/cloud-callback.test.ts": 5968,
"server/src/services/chat-channels/slack/cloud-drain.test.ts": 6585,
- "server/src/services/chat-channels/slack/cloud-enrollment.test.ts": 1840,
+ "server/src/services/chat-channels/slack/cloud-enrollment.test.ts": 2299,
"server/src/services/chat-channels/slack/cloud-event.test.ts": 7407,
- "server/src/services/chat-channels/slack/cloud-ingress.test.ts": 1641,
- "server/src/services/chat-channels/slack/cloud-signing-secret.test.ts": 762,
- "server/src/services/chat-channels/slack/cloud-test-prewire.test.ts": 1160,
- "server/src/services/chat-channels/slack/configured-coverage.test.ts": 1884,
+ "server/src/services/chat-channels/slack/cloud-ingress.test.ts": 2258,
+ "server/src/services/chat-channels/slack/cloud-signing-secret.test.ts": 747,
+ "server/src/services/chat-channels/slack/cloud-test-prewire.test.ts": 1445,
+ "server/src/services/chat-channels/slack/configured-coverage.test.ts": 1934,
"server/src/services/chat-channels/slack/form-ack-work.test.ts": 1521,
- "server/src/services/chat-channels/slack/form-canonical-state.test.ts": 1916,
- "server/src/services/chat-channels/slack/form-enrollment-identity.test.ts": 2248,
+ "server/src/services/chat-channels/slack/form-canonical-state.test.ts": 2369,
+ "server/src/services/chat-channels/slack/form-enrollment-identity.test.ts": 1949,
"server/src/services/chat-channels/slack/form-owner-rearm.test.ts": 7463,
- "server/src/services/chat-channels/slack/form-retirement.test.ts": 1910,
+ "server/src/services/chat-channels/slack/form-retirement.test.ts": 1709,
"server/src/services/chat-channels/slack/idle-history-owner-proof.test.ts": 2696,
"server/src/services/chat-channels/slack/idle-incoming.test.ts": 2089,
- "server/src/services/chat-channels/slack/question-forms.test.ts": 675,
- "server/src/services/chat-channels/slack/receipt-timing.test.ts": 980,
- "server/src/services/chat-channels/slack/signing-secret-preflight.test.ts": 5038,
- "server/src/services/chat-channels/slack/wake-authority.test.ts": 778,
- "server/src/services/chat-communication-guidance.test.ts": 1586,
- "server/src/services/chat-control-admission-retry.test.ts": 5008,
- "server/src/services/chat-discord-adapter-patch.test.ts": 4526,
+ "server/src/services/chat-channels/slack/question-forms.test.ts": 869,
+ "server/src/services/chat-channels/slack/receipt-timing.test.ts": 940,
+ "server/src/services/chat-channels/slack/signing-secret-preflight.test.ts": 7167,
+ "server/src/services/chat-channels/slack/wake-authority.test.ts": 908,
+ "server/src/services/chat-communication-guidance.test.ts": 1886,
+ "server/src/services/chat-control-admission-retry.test.ts": 5391,
+ "server/src/services/chat-discord-adapter-patch.test.ts": 4770,
"server/src/services/chat-discord-command-registration-store.test.ts": 7446,
- "server/src/services/chat-discord-command-registration.test.ts": 1035,
- "server/src/services/chat-discord-modal-wire.test.ts": 3594,
- "server/src/services/chat-discord-native-command.test.ts": 3675,
- "server/src/services/chat-discord-native-commands.test.ts": 1242,
+ "server/src/services/chat-discord-command-registration.test.ts": 975,
+ "server/src/services/chat-discord-modal-wire.test.ts": 3509,
+ "server/src/services/chat-discord-native-command.test.ts": 4244,
+ "server/src/services/chat-discord-native-commands.test.ts": 1583,
"server/src/services/chat-discord-native-interaction.test.ts": 7411,
- "server/src/services/chat-discord-native-modal.test.ts": 3894,
- "server/src/services/chat-discord-question-forms.test.ts": 827,
- "server/src/services/chat-discord.test.ts": 971,
- "server/src/services/chat-github-attachments.test.ts": 4217,
- "server/src/services/chat-github-events.test.ts": 2146,
- "server/src/services/chat-github-management.test.ts": 1909,
- "server/src/services/chat-github-provider-stress.test.ts": 4914,
- "server/src/services/chat-github-receipt-reactions.test.ts": 1164,
- "server/src/services/chat-github-review-policy.test.ts": 1649,
- "server/src/services/chat-github-review-repair.test.ts": 9291,
- "server/src/services/chat-github-sponsor.test.ts": 9091,
- "server/src/services/chat-github-tools.test.ts": 2807,
- "server/src/services/chat-github-webhook-config.test.ts": 1151,
- "server/src/services/chat-github-wizard-origin.test.ts": 7549,
- "server/src/services/chat-inbound-wakeup-publications.test.ts": 6742,
- "server/src/services/chat-interaction-arbitration.test.ts": 2485,
+ "server/src/services/chat-discord-native-modal.test.ts": 3286,
+ "server/src/services/chat-discord-question-forms.test.ts": 647,
+ "server/src/services/chat-discord.test.ts": 1254,
+ "server/src/services/chat-github-attachments.test.ts": 4927,
+ "server/src/services/chat-github-events.test.ts": 1731,
+ "server/src/services/chat-github-management.test.ts": 1930,
+ "server/src/services/chat-github-provider-stress.test.ts": 3329,
+ "server/src/services/chat-github-receipt-reactions.test.ts": 1207,
+ "server/src/services/chat-github-response-comments.test.ts": 6755,
+ "server/src/services/chat-github-review-policy.test.ts": 1804,
+ "server/src/services/chat-github-review-repair.test.ts": 7777,
+ "server/src/services/chat-github-sponsor.test.ts": 9552,
+ "server/src/services/chat-github-tools.test.ts": 2634,
+ "server/src/services/chat-github-webhook-config.test.ts": 861,
+ "server/src/services/chat-github-wizard-origin.test.ts": 5655,
+ "server/src/services/chat-inbound-wakeup-publications.test.ts": 7374,
+ "server/src/services/chat-interaction-arbitration.test.ts": 2365,
"server/src/services/chat-interaction-continuation.test.ts": 8423,
- "server/src/services/chat-interaction-forms.test.ts": 2800,
- "server/src/services/chat-interaction-publications.test.ts": 6135,
+ "server/src/services/chat-interaction-forms.test.ts": 2486,
+ "server/src/services/chat-interaction-publications.test.ts": 6749,
"server/src/services/chat-monitor-continuation.test.ts": 19929,
- "server/src/services/chat-outbound-attachment-hydration.test.ts": 8299,
- "server/src/services/chat-provider-inventory.test.ts": 801,
- "server/src/services/chat-provider-lifecycle.test.ts": 751,
- "server/src/services/chat-provider-links.test.ts": 673,
- "server/src/services/chat-publication-batches.test.ts": 1652,
- "server/src/services/chat-publication-errors.test.ts": 796,
- "server/src/services/chat-publication-projection.test.ts": 803,
- "server/src/services/chat-publication-ready-stream.test.ts": 4895,
- "server/src/services/chat-publication-reconciliation.test.ts": 588,
- "server/src/services/chat-publication-stream.test.ts": 3093,
+ "server/src/services/chat-outbound-attachment-hydration.test.ts": 10080,
+ "server/src/services/chat-provider-inventory.test.ts": 875,
+ "server/src/services/chat-provider-lifecycle.test.ts": 706,
+ "server/src/services/chat-provider-links.test.ts": 810,
+ "server/src/services/chat-publication-batches.test.ts": 1612,
+ "server/src/services/chat-publication-errors.test.ts": 827,
+ "server/src/services/chat-publication-projection.test.ts": 888,
+ "server/src/services/chat-publication-ready-stream.test.ts": 4842,
+ "server/src/services/chat-publication-reconciliation.test.ts": 806,
+ "server/src/services/chat-publication-stream.test.ts": 2574,
"server/src/services/chat-publication-text-parts.test.ts": 25286,
- "server/src/services/chat-question-forms.test.ts": 3025,
- "server/src/services/chat-reply-lineage-context.test.ts": 14144,
- "server/src/services/chat-run-publications.test.ts": 7423,
+ "server/src/services/chat-question-forms.test.ts": 2269,
+ "server/src/services/chat-reply-lineage-context.test.ts": 9708,
+ "server/src/services/chat-run-publications.test.ts": 6617,
"server/src/services/chat-sdk-runtime.adapters.test.ts": 6978,
- "server/src/services/chat-sdk-runtime.test.ts": 3499,
- "server/src/services/chat-sdk-state.test.ts": 739,
- "server/src/services/chat-slack-native-modal.test.ts": 3468,
+ "server/src/services/chat-sdk-runtime.test.ts": 4829,
+ "server/src/services/chat-sdk-state.test.ts": 730,
+ "server/src/services/chat-slack-native-modal.test.ts": 4543,
"server/src/services/chat-slack-receipts.test.ts": 5112,
- "server/src/services/chat-slack-sessions.test.ts": 586,
- "server/src/services/chat-task-url.test.ts": 7399,
- "server/src/services/chat-teams-credentials.test.ts": 1618,
- "server/src/services/chat-teams-file-consent-runtime.test.ts": 3781,
- "server/src/services/chat-teams-file-consent.contract.test.ts": 1665,
- "server/src/services/chat-teams-file-consent.test.ts": 938,
- "server/src/services/chat-teams-file-publication.test.ts": 7058,
- "server/src/services/chat-teams-file-transfers.test.ts": 13927,
- "server/src/services/chat-teams-inline-image-intake.test.ts": 3602,
- "server/src/services/chat-teams-inline-images.test.ts": 3962,
- "server/src/services/chat-teams-native-modal.test.ts": 4291,
- "server/src/services/chat-teams-personal-recipient.test.ts": 1336,
- "server/src/services/chat-telegram-draft-stop.test.ts": 959,
- "server/src/services/chat-telegram-ephemeral-runtime.test.ts": 3003,
- "server/src/services/chat-telegram-ephemeral.test.ts": 829,
- "server/src/services/chat-telegram-media-intake.test.ts": 3812,
- "server/src/services/chat-telegram-photo.test.ts": 1200,
- "server/src/services/chat-telegram-rich-intake.test.ts": 3535,
- "server/src/services/chat-telegram-stop-subscription.test.ts": 610,
- "server/src/services/chat-telegram-video-note.test.ts": 3826,
- "server/src/services/cloud-runtime-identity.test.ts": 1908,
- "server/src/services/cloud-warm-standby.test.ts": 2195,
- "server/src/services/connection-credential-state.test.ts": 6131,
- "server/src/services/connector-runtime.test.ts": 7537,
- "server/src/services/connector-telemetry.test.ts": 1925,
- "server/src/services/connectors/onepassword/onepassword.test.ts": 894,
- "server/src/services/connectors/onepassword/worker.test.ts": 848,
- "server/src/services/connectors/slack-access.test.ts": 1850,
- "server/src/services/connectors/slack-authority.test.ts": 7577,
- "server/src/services/connectors/slack-endpoint-preparation.test.ts": 610,
- "server/src/services/connectors/slack-native-search.test.ts": 1525,
- "server/src/services/connectors/supabase/index.test.ts": 1980,
+ "server/src/services/chat-slack-sessions.test.ts": 770,
+ "server/src/services/chat-task-url.test.ts": 7206,
+ "server/src/services/chat-teams-credentials.test.ts": 1809,
+ "server/src/services/chat-teams-file-consent-runtime.test.ts": 4131,
+ "server/src/services/chat-teams-file-consent.contract.test.ts": 1969,
+ "server/src/services/chat-teams-file-consent.test.ts": 1125,
+ "server/src/services/chat-teams-file-publication.test.ts": 8523,
+ "server/src/services/chat-teams-file-transfers.test.ts": 16392,
+ "server/src/services/chat-teams-inline-image-intake.test.ts": 4539,
+ "server/src/services/chat-teams-inline-images.test.ts": 3776,
+ "server/src/services/chat-teams-native-modal.test.ts": 4095,
+ "server/src/services/chat-teams-personal-recipient.test.ts": 1504,
+ "server/src/services/chat-telegram-draft-stop.test.ts": 1269,
+ "server/src/services/chat-telegram-ephemeral-runtime.test.ts": 3347,
+ "server/src/services/chat-telegram-ephemeral.test.ts": 830,
+ "server/src/services/chat-telegram-media-intake.test.ts": 4403,
+ "server/src/services/chat-telegram-photo.test.ts": 918,
+ "server/src/services/chat-telegram-rich-intake.test.ts": 4354,
+ "server/src/services/chat-telegram-stop-subscription.test.ts": 862,
+ "server/src/services/chat-telegram-video-note.test.ts": 3989,
+ "server/src/services/cloud-runtime-identity.test.ts": 2352,
+ "server/src/services/cloud-warm-standby.test.ts": 1975,
+ "server/src/services/connection-credential-state.test.ts": 6379,
+ "server/src/services/connector-runtime.test.ts": 5331,
+ "server/src/services/connector-telemetry.test.ts": 2444,
+ "server/src/services/connectors/aws/mcp-credentials.test.ts": 1914,
+ "server/src/services/connectors/aws/setup.test.ts": 7387,
+ "server/src/services/connectors/onepassword/onepassword.test.ts": 997,
+ "server/src/services/connectors/onepassword/worker.test.ts": 1004,
+ "server/src/services/connectors/slack-access.test.ts": 2057,
+ "server/src/services/connectors/slack-authority.test.ts": 6152,
+ "server/src/services/connectors/slack-endpoint-preparation.test.ts": 752,
+ "server/src/services/connectors/slack-native-search.test.ts": 1736,
+ "server/src/services/connectors/supabase/index.test.ts": 2250,
"server/src/services/connectors/tailscale/connections.test.ts": 7964,
- "server/src/services/connectors/tailscale/device-login-network.test.ts": 4073,
- "server/src/services/connectors/tailscale/device-login.test.ts": 6990,
- "server/src/services/connectors/tailscale/devices.test.ts": 757,
- "server/src/services/connectors/tailscale/network.test.ts": 3992,
- "server/src/services/connectors/tailscale/pairing.test.ts": 1019,
- "server/src/services/connectors/vercel/index.test.ts": 935,
- "server/src/services/controller-process-identity.test.ts": 7997,
- "server/src/services/controller-process-space-identity.test.ts": 4092,
- "server/src/services/conversation-continuation.test.ts": 2468,
+ "server/src/services/connectors/tailscale/device-login-network.test.ts": 4097,
+ "server/src/services/connectors/tailscale/device-login.test.ts": 6977,
+ "server/src/services/connectors/tailscale/devices.test.ts": 830,
+ "server/src/services/connectors/tailscale/network.test.ts": 4313,
+ "server/src/services/connectors/tailscale/pairing.test.ts": 1287,
+ "server/src/services/connectors/vercel/index.test.ts": 854,
+ "server/src/services/controller-process-identity.test.ts": 7097,
+ "server/src/services/controller-process-space-identity.test.ts": 4861,
+ "server/src/services/conversation-continuation.test.ts": 2622,
"server/src/services/covered-historical-workspace-source.integration.test.ts": 13981,
- "server/src/services/decision-signing.test.ts": 976,
- "server/src/services/deferred-execution-wait.test.ts": 6593,
- "server/src/services/environment-custom-image-terminal-sessions.test.ts": 751,
- "server/src/services/environment-lease-fault-injection.test.ts": 1962,
- "server/src/services/environment-lease-release-deferral.test.ts": 3484,
- "server/src/services/environment-provider-unavailable-error.test.ts": 1654,
+ "server/src/services/decision-signing.test.ts": 811,
+ "server/src/services/deferred-execution-wait.test.ts": 7456,
+ "server/src/services/environment-custom-image-terminal-sessions.test.ts": 760,
+ "server/src/services/environment-lease-attach-deadlock.integration.test.ts": 8221,
+ "server/src/services/environment-lease-fault-injection.test.ts": 2455,
+ "server/src/services/environment-lease-release-deferral.test.ts": 3302,
+ "server/src/services/environment-provider-unavailable-error.test.ts": 1714,
+ "server/src/services/environment-provider-wait.test.ts": 833,
"server/src/services/environment-runtime-reusable-lease-probe.test.ts": 7560,
- "server/src/services/ephemeral-enrollment.test.ts": 6429,
- "server/src/services/execution-allowlist.test.ts": 841,
- "server/src/services/execution-blocker-read.test.ts": 9947,
+ "server/src/services/ephemeral-enrollment.test.ts": 6841,
+ "server/src/services/execution-allowlist.test.ts": 821,
+ "server/src/services/execution-blocker-read.test.ts": 11079,
"server/src/services/execution-continuation-history-read.test.ts": 6235,
"server/src/services/execution-continuation-provenance.test.ts": 7312,
"server/src/services/execution-continuation.test.ts": 6146,
"server/src/services/execution-control-reconciliation.test.ts": 10688,
- "server/src/services/execution-policy-bootstrap.test.ts": 3358,
- "server/src/services/execution-preparation-timing.test.ts": 1906,
- "server/src/services/execution-projection-agent-queue.test.ts": 8326,
- "server/src/services/execution-projection-external-provider.test.ts": 6996,
- "server/src/services/execution-projection-read-retry.test.ts": 8381,
+ "server/src/services/execution-policy-bootstrap.test.ts": 4158,
+ "server/src/services/execution-preparation-timing.test.ts": 1379,
+ "server/src/services/execution-projection-agent-queue.test.ts": 7362,
+ "server/src/services/execution-projection-external-provider.test.ts": 7606,
+ "server/src/services/execution-projection-read-retry.test.ts": 9064,
"server/src/services/execution-projection-recovery.test.ts": 6830,
- "server/src/services/execution-projection.test.ts": 6713,
+ "server/src/services/execution-projection.test.ts": 5684,
"server/src/services/execution-recovery-attempt.test.ts": 5915,
"server/src/services/execution-recovery-dead-controller.test.ts": 6855,
"server/src/services/execution-recovery-resolution.test.ts": 6207,
- "server/src/services/execution-timing-context.test.ts": 2970,
- "server/src/services/execution-transaction-timing.test.ts": 6698,
+ "server/src/services/execution-timing-context.test.ts": 3071,
+ "server/src/services/execution-transaction-timing.test.ts": 7455,
"server/src/services/explicit-native-continuation.test.ts": 108543,
"server/src/services/finalized-workspace-recovery-migration.test.ts": 11370,
- "server/src/services/fireflies-webhook.test.ts": 931,
+ "server/src/services/fireflies-webhook.test.ts": 728,
"server/src/services/fresh-continuation-fallback.test.ts": 89949,
"server/src/services/fresh-continuation-move-forward-offer.test.ts": 24878,
"server/src/services/fresh-continuation-retry-delivery.test.ts": 16226,
"server/src/services/fresh-continuation-schedule-queries.test.ts": 13634,
- "server/src/services/github-connection-events.test.ts": 6267,
- "server/src/services/gmail-archive-tool-policy.test.ts": 829,
- "server/src/services/gmail-tool-governance.test.ts": 6233,
- "server/src/services/google-chat-tool-policy.test.ts": 1895,
- "server/src/services/google-workspace-rest-dispatch.test.ts": 1779,
+ "server/src/services/github-connection-events.test.ts": 6686,
+ "server/src/services/gmail-archive-tool-policy.test.ts": 601,
+ "server/src/services/gmail-tool-governance.test.ts": 6444,
+ "server/src/services/google-chat-tool-policy.test.ts": 1790,
+ "server/src/services/google-workspace-rest-dispatch.test.ts": 1873,
"server/src/services/governed-wait-runner-loss.test.ts": 59275,
- "server/src/services/grok-bot/webhook.test.ts": 634,
- "server/src/services/heartbeat-github-launchers.test.ts": 2107,
- "server/src/services/heartbeat-run-runtime-status.test.ts": 672,
- "server/src/services/heartbeat-runner-provider-config.test.ts": 3077,
- "server/src/services/heartbeat-stop-metadata.test.ts": 2091,
- "server/src/services/heartbeat/agent-directory-busy.test.ts": 5025,
+ "server/src/services/grok-bot/webhook.test.ts": 892,
+ "server/src/services/heartbeat-github-launchers.test.ts": 2246,
+ "server/src/services/heartbeat-run-runtime-status.test.ts": 800,
+ "server/src/services/heartbeat-runner-provider-config.test.ts": 2140,
+ "server/src/services/heartbeat-stop-metadata.test.ts": 1688,
+ "server/src/services/heartbeat/agent-directory-busy.test.ts": 6860,
"server/src/services/heartbeat/agent-status.test.ts": 25170,
- "server/src/services/heartbeat/budget-cancellation.test.ts": 25772,
+ "server/src/services/heartbeat/budget-cancellation.test.ts": 38799,
"server/src/services/heartbeat/dispatch-work.test.ts": 37986,
"server/src/services/heartbeat/environment-selection.test.ts": 22396,
- "server/src/services/heartbeat/external-provider.test.ts": 4994,
+ "server/src/services/heartbeat/external-provider.test.ts": 7077,
"server/src/services/heartbeat/idle-recovery-schedule.test.ts": 6940,
"server/src/services/heartbeat/instruction-working-copy.test.ts": 5974,
- "server/src/services/heartbeat/legacy-process-settlement.test.ts": 2588,
- "server/src/services/heartbeat/live-runner-adoption.test.ts": 581,
- "server/src/services/heartbeat/native-lifecycle.test.ts": 2522,
+ "server/src/services/heartbeat/legacy-process-settlement.test.ts": 2421,
+ "server/src/services/heartbeat/live-runner-adoption.test.ts": 870,
+ "server/src/services/heartbeat/native-lifecycle.test.ts": 2771,
"server/src/services/heartbeat/native-recovery-deadlines.test.ts": 7505,
- "server/src/services/heartbeat/native-stop-evidence-read.test.ts": 12601,
- "server/src/services/heartbeat/native-stop-pending.test.ts": 8931,
- "server/src/services/heartbeat/preparation-timing-context.test.ts": 1983,
- "server/src/services/heartbeat/preparation-timing.test.ts": 2033,
- "server/src/services/heartbeat/process-identity-persistence.test.ts": 9248,
- "server/src/services/heartbeat/process-settlement.test.ts": 2031,
- "server/src/services/heartbeat/queue.test.ts": 92223,
- "server/src/services/heartbeat/queued-run-dispatch-order.test.ts": 2998,
- "server/src/services/heartbeat/queued-run-line.test.ts": 3515,
- "server/src/services/heartbeat/reattach-phase.test.ts": 12092,
- "server/src/services/heartbeat/recovery.test.ts": 41466,
+ "server/src/services/heartbeat/native-stop-evidence-read.test.ts": 13535,
+ "server/src/services/heartbeat/native-stop-pending.test.ts": 10846,
+ "server/src/services/heartbeat/preparation-timing-context.test.ts": 2087,
+ "server/src/services/heartbeat/preparation-timing.test.ts": 1961,
+ "server/src/services/heartbeat/process-identity-persistence.test.ts": 8054,
+ "server/src/services/heartbeat/process-settlement.test.ts": 2143,
+ "server/src/services/heartbeat/queue.test.ts": 99811,
+ "server/src/services/heartbeat/queued-run-dispatch-order.test.ts": 3817,
+ "server/src/services/heartbeat/queued-run-line.test.ts": 3316,
+ "server/src/services/heartbeat/reattach-phase.test.ts": 12060,
+ "server/src/services/heartbeat/recovery.test.ts": 45047,
"server/src/services/heartbeat/remote-workspace-source.test.ts": 6797,
- "server/src/services/heartbeat/retries.test.ts": 9945,
- "server/src/services/heartbeat/run-comment-selection.test.ts": 8951,
+ "server/src/services/heartbeat/retries.test.ts": 11943,
+ "server/src/services/heartbeat/run-comment-selection.test.ts": 8093,
"server/src/services/heartbeat/run-completion-reviewed-chat-report.test.ts": 14349,
"server/src/services/heartbeat/run-completion.test.ts": 151888,
- "server/src/services/heartbeat/run-control-event-failure.test.ts": 9105,
- "server/src/services/heartbeat/run-control-reads.test.ts": 9616,
- "server/src/services/heartbeat/run-control.test.ts": 77061,
- "server/src/services/heartbeat/run-failure-cause.test.ts": 2966,
+ "server/src/services/heartbeat/run-control-event-failure.test.ts": 9514,
+ "server/src/services/heartbeat/run-control-reads.test.ts": 10920,
+ "server/src/services/heartbeat/run-control.test.ts": 82020,
+ "server/src/services/heartbeat/run-failure-cause.test.ts": 2699,
"server/src/services/heartbeat/run-lifecycle.test.ts": 30357,
- "server/src/services/heartbeat/run-log.test.ts": 2197,
- "server/src/services/heartbeat/run-output.test.ts": 15553,
- "server/src/services/heartbeat/run-preparation.review-path.test.ts": 6172,
- "server/src/services/heartbeat/run-preparation.test.ts": 6679,
- "server/src/services/heartbeat/run-state.test.ts": 8786,
- "server/src/services/heartbeat/runtime-execution.test.ts": 42628,
+ "server/src/services/heartbeat/run-log.test.ts": 2509,
+ "server/src/services/heartbeat/run-output.test.ts": 17167,
+ "server/src/services/heartbeat/run-preparation.review-path.test.ts": 6548,
+ "server/src/services/heartbeat/run-preparation.test.ts": 9088,
+ "server/src/services/heartbeat/run-state.test.ts": 8810,
+ "server/src/services/heartbeat/runtime-execution.test.ts": 59034,
"server/src/services/heartbeat/runtime-selection.test.ts": 75268,
- "server/src/services/heartbeat/scheduling.test.ts": 64758,
- "server/src/services/heartbeat/session-fingerprint-inputs.test.ts": 5895,
- "server/src/services/heartbeat/system-notice-response.test.ts": 472,
- "server/src/services/heartbeat/task-markdown.test.ts": 7244,
- "server/src/services/heartbeat/upgrade-readiness-header-memo.test.ts": 7480,
- "server/src/services/heartbeat/upgrade-readiness-post-result.test.ts": 11579,
- "server/src/services/heartbeat/upgrade-readiness.test.ts": 13074,
+ "server/src/services/heartbeat/scheduling.test.ts": 80305,
+ "server/src/services/heartbeat/session-fingerprint-inputs.test.ts": 7491,
+ "server/src/services/heartbeat/system-notice-response.test.ts": 787,
+ "server/src/services/heartbeat/task-markdown.test.ts": 6201,
+ "server/src/services/heartbeat/upgrade-readiness-header-memo.test.ts": 7409,
+ "server/src/services/heartbeat/upgrade-readiness-post-result.test.ts": 12190,
+ "server/src/services/heartbeat/upgrade-readiness.test.ts": 15328,
"server/src/services/heartbeat/workspace-preparation.test.ts": 178931,
- "server/src/services/heartbeat/workspaces.test.ts": 7521,
- "server/src/services/hot-restart.test.ts": 1902,
+ "server/src/services/heartbeat/workspaces.test.ts": 8078,
+ "server/src/services/hot-restart.test.ts": 1840,
"server/src/services/idle-api-activity.test.ts": 861,
"server/src/services/idle-api-wake-admission.test.ts": 773,
"server/src/services/idle-deadline-proof.test.ts": 6083,
"server/src/services/idle-incoming-wake-capability.test.ts": 1842,
"server/src/services/idle-incoming-wake.test.ts": 7303,
- "server/src/services/inbox-mine-read.test.ts": 743,
- "server/src/services/instance-settings-readonly.test.ts": 6178,
+ "server/src/services/inbox-mine-read.test.ts": 950,
+ "server/src/services/instance-settings-readonly.test.ts": 5892,
"server/src/services/isolated-remote-workspace-source-lock.test.ts": 10495,
"server/src/services/isolated-remote-workspace-source.test.ts": 5129,
- "server/src/services/isolated-task-directory.test.ts": 1831,
- "server/src/services/issue-comment-wakeup.test.ts": 585,
- "server/src/services/issue-dependency-wakeups.test.ts": 1461,
- "server/src/services/issue-prefix.test.ts": 2095,
- "server/src/services/issue-question-context.test.ts": 2593,
- "server/src/services/issue-queued-comment-queue.test.ts": 895,
- "server/src/services/issue-read-timing.test.ts": 802,
- "server/src/services/issue-thread-interaction-resolution.test.ts": 1491,
- "server/src/services/issue-thread-interactions.test.ts": 14384,
+ "server/src/services/isolated-task-directory.test.ts": 1839,
+ "server/src/services/issue-comment-wakeup.test.ts": 768,
+ "server/src/services/issue-dependency-wakeups.test.ts": 2037,
+ "server/src/services/issue-prefix.test.ts": 2264,
+ "server/src/services/issue-question-context.test.ts": 2588,
+ "server/src/services/issue-queued-comment-queue.test.ts": 825,
+ "server/src/services/issue-read-timing.test.ts": 911,
+ "server/src/services/issue-thread-interaction-resolution.test.ts": 2078,
+ "server/src/services/issue-thread-interactions.test.ts": 16746,
"server/src/services/legacy-controller-lease.test.ts": 34340,
"server/src/services/legacy-execution-recovery.test.ts": 4882,
"server/src/services/legacy-explicit-continuation-recovery.test.ts": 9358,
- "server/src/services/legacy-preparation-retry-hold.test.ts": 12289,
+ "server/src/services/legacy-preparation-retry-hold.test.ts": 12913,
"server/src/services/legacy-source-unavailable-continuation.test.ts": 10232,
- "server/src/services/local-ai-browser-login.test.ts": 5678,
- "server/src/services/login-command.test.ts": 6475,
- "server/src/services/login-environment.test.ts": 1622,
- "server/src/services/managed-config-capabilities.test.ts": 1620,
- "server/src/services/managed-environments-plugin-entries.test.ts": 6198,
- "server/src/services/managed-environments.test.ts": 7180,
- "server/src/services/managed-resource-drift.test.ts": 904,
- "server/src/services/mcp-tool-names.test.ts": 765,
+ "server/src/services/local-ai-browser-login.test.ts": 4623,
+ "server/src/services/login-command.test.ts": 6346,
+ "server/src/services/login-environment.test.ts": 2586,
+ "server/src/services/managed-config-capabilities.test.ts": 1559,
+ "server/src/services/managed-environments-plugin-entries.test.ts": 5787,
+ "server/src/services/managed-environments.test.ts": 7243,
+ "server/src/services/managed-resource-drift.test.ts": 873,
+ "server/src/services/mcp-tool-names.test.ts": 782,
"server/src/services/muse-maintenance.test.ts": 17264,
- "server/src/services/native-local-process-stop.test.ts": 3397,
+ "server/src/services/native-local-process-stop.test.ts": 3551,
"server/src/services/native-log-archive.integration.test.ts": 23689,
"server/src/services/native-preclaim-continuation.test.ts": 19224,
- "server/src/services/native-runtime/acpx-qualification.test.ts": 3012,
+ "server/src/services/native-runtime/acpx-qualification.test.ts": 3297,
"server/src/services/native-runtime/agent-chat-response-recovery.test.ts": 22254,
"server/src/services/native-runtime/agent-instruction-tools.integration.test.ts": 10416,
- "server/src/services/native-runtime/agent-instruction-tools.test.ts": 5043,
- "server/src/services/native-runtime/antigravity-candidate-admission.test.ts": 2463,
- "server/src/services/native-runtime/antigravity-credential-recovery.test.ts": 2691,
- "server/src/services/native-runtime/antigravity-runner-credentials.test.ts": 6700,
+ "server/src/services/native-runtime/agent-instruction-tools.test.ts": 6003,
+ "server/src/services/native-runtime/antigravity-candidate-admission.test.ts": 3151,
+ "server/src/services/native-runtime/antigravity-credential-recovery.test.ts": 3128,
+ "server/src/services/native-runtime/antigravity-release.test.ts": 8196,
+ "server/src/services/native-runtime/antigravity-runner-credentials.test.ts": 8153,
"server/src/services/native-runtime/artifact-transfer.integration.test.ts": 9481,
- "server/src/services/native-runtime/artifact-transfer.test.ts": 4060,
- "server/src/services/native-runtime/assigned-mcp-tools.test.ts": 15611,
- "server/src/services/native-runtime/case-context-projection.test.ts": 6002,
- "server/src/services/native-runtime/chat-attachment-read.test.ts": 11792,
- "server/src/services/native-runtime/chat-attachment-reuse.test.ts": 8033,
- "server/src/services/native-runtime/codex-model-fallback.test.ts": 1597,
- "server/src/services/native-runtime/codex-runtime-compatibility.test.ts": 738,
- "server/src/services/native-runtime/completion-contracts.test.ts": 7582,
+ "server/src/services/native-runtime/artifact-transfer.test.ts": 4632,
+ "server/src/services/native-runtime/assigned-mcp-tools.test.ts": 24895,
+ "server/src/services/native-runtime/case-context-projection.test.ts": 6463,
+ "server/src/services/native-runtime/chat-attachment-read.test.ts": 21215,
+ "server/src/services/native-runtime/chat-attachment-reuse.test.ts": 8668,
+ "server/src/services/native-runtime/codex-model-fallback.test.ts": 1934,
+ "server/src/services/native-runtime/codex-runtime-compatibility.test.ts": 872,
+ "server/src/services/native-runtime/completion-contracts.test.ts": 5812,
"server/src/services/native-runtime/confirmation-comment-api.integration.test.ts": 24611,
"server/src/services/native-runtime/continuation-contract.test.ts": 7392,
"server/src/services/native-runtime/create-skill.integration.test.ts": 18316,
- "server/src/services/native-runtime/current-wake-comments.test.ts": 8164,
+ "server/src/services/native-runtime/current-wake-comments.test.ts": 9561,
"server/src/services/native-runtime/cursor-cloud-artifact-handoff.test.ts": 6960,
- "server/src/services/native-runtime/cursor-cloud-profile.test.ts": 2677,
- "server/src/services/native-runtime/cursor-cloud-runtime.test.ts": 2861,
- "server/src/services/native-runtime/evidence-classifier.test.ts": 2774,
+ "server/src/services/native-runtime/cursor-cloud-profile.test.ts": 2715,
+ "server/src/services/native-runtime/cursor-cloud-runtime.test.ts": 3478,
+ "server/src/services/native-runtime/evidence-classifier.test.ts": 2641,
"server/src/services/native-runtime/external-chat-wait.integration.test.ts": 181027,
- "server/src/services/native-runtime/external-review-wait.test.ts": 5796,
- "server/src/services/native-runtime/failed-action-chat-feedback.test.ts": 7502,
- "server/src/services/native-runtime/first-turn-queued-input.test.ts": 6718,
- "server/src/services/native-runtime/generate-image-tool.test.ts": 9852,
- "server/src/services/native-runtime/grok-runner-credentials.test.ts": 750,
- "server/src/services/native-runtime/handoff-plan-context.test.ts": 2561,
- "server/src/services/native-runtime/historical-task-questions.test.ts": 12136,
- "server/src/services/native-runtime/managed-native-credentials.test.ts": 798,
- "server/src/services/native-runtime/model-rejected-retry.test.ts": 2731,
+ "server/src/services/native-runtime/external-review-wait.test.ts": 5408,
+ "server/src/services/native-runtime/failed-action-chat-feedback.test.ts": 6491,
+ "server/src/services/native-runtime/failed-before-provider-turn.test.ts": 3026,
+ "server/src/services/native-runtime/first-turn-queued-input.test.ts": 7143,
+ "server/src/services/native-runtime/fresh-session-retry-context.test.ts": 5956,
+ "server/src/services/native-runtime/generate-image-tool.test.ts": 9739,
+ "server/src/services/native-runtime/grok-runner-credentials.test.ts": 1057,
+ "server/src/services/native-runtime/handoff-plan-context.test.ts": 3018,
+ "server/src/services/native-runtime/historical-task-questions.test.ts": 12321,
+ "server/src/services/native-runtime/issue-document-batch.integration.test.ts": 27370,
+ "server/src/services/native-runtime/managed-native-credentials.test.ts": 793,
+ "server/src/services/native-runtime/model-rejected-retry.test.ts": 3930,
"server/src/services/native-runtime/muse-native-follow-up.test.ts": 9157,
"server/src/services/native-runtime/muse-native-visibility.test.ts": 14758,
- "server/src/services/native-runtime/native-agent-runtime-inheritance.test.ts": 2089,
- "server/src/services/native-runtime/native-artifact-preparation.test.ts": 10641,
+ "server/src/services/native-runtime/native-accepted-outcome.test.ts": 1674,
+ "server/src/services/native-runtime/native-agent-blocker.integration.test.ts": 18282,
+ "server/src/services/native-runtime/native-agent-runtime-inheritance.test.ts": 2969,
+ "server/src/services/native-runtime/native-artifact-preparation.test.ts": 7077,
"server/src/services/native-runtime/native-blocked-reply-recovery.test.ts": 7382,
"server/src/services/native-runtime/native-bootstrap-claim-time-proof.integration.test.ts": 5878,
- "server/src/services/native-runtime/native-bootstrap-proof.test.ts": 681,
+ "server/src/services/native-runtime/native-bootstrap-proof.test.ts": 523,
"server/src/services/native-runtime/native-bootstrap-retry.integration.test.ts": 9069,
- "server/src/services/native-runtime/native-cancellation-request.test.ts": 2580,
+ "server/src/services/native-runtime/native-cancellation-request.test.ts": 2963,
"server/src/services/native-runtime/native-cancelled-workspace-preservation-idle.test.ts": 6716,
- "server/src/services/native-runtime/native-cancelled-workspace-preservation.test.ts": 10991,
+ "server/src/services/native-runtime/native-cancelled-workspace-preservation.test.ts": 17893,
"server/src/services/native-runtime/native-case-handoff.test.ts": 7463,
"server/src/services/native-runtime/native-case-tools.integration.test.ts": 41747,
- "server/src/services/native-runtime/native-chat-workspace.test.ts": 6722,
+ "server/src/services/native-runtime/native-chat-workspace.test.ts": 7009,
"server/src/services/native-runtime/native-client-timeout-continuation.integration.test.ts": 9480,
"server/src/services/native-runtime/native-closed-session-retry.integration.test.ts": 11115,
"server/src/services/native-runtime/native-codex-runner.integration.test.ts": 224015,
- "server/src/services/native-runtime/native-codex-runner.test.ts": 7467,
- "server/src/services/native-runtime/native-completion-feedback.test.ts": 15474,
- "server/src/services/native-runtime/native-completion-format-feedback.test.ts": 5680,
- "server/src/services/native-runtime/native-confirmation-replay.test.ts": 11599,
+ "server/src/services/native-runtime/native-codex-runner.test.ts": 6690,
+ "server/src/services/native-runtime/native-completion-feedback.test.ts": 29170,
+ "server/src/services/native-runtime/native-completion-format-feedback.test.ts": 7418,
+ "server/src/services/native-runtime/native-confirmation-replay.test.ts": 11737,
"server/src/services/native-runtime/native-continuation.test.ts": 6062,
"server/src/services/native-runtime/native-controller-host-recovery.test.ts": 8314,
- "server/src/services/native-runtime/native-controller-identity.test.ts": 7251,
+ "server/src/services/native-runtime/native-controller-identity.test.ts": 6429,
"server/src/services/native-runtime/native-controller-migration.integration.test.ts": 40595,
"server/src/services/native-runtime/native-controller-recovery.integration.test.ts": 24304,
"server/src/services/native-runtime/native-controller-recovery.test.ts": 7453,
- "server/src/services/native-runtime/native-controller-source-digest.test.ts": 3848,
+ "server/src/services/native-runtime/native-controller-source-digest.test.ts": 3607,
"server/src/services/native-runtime/native-coordinator-claim-deadlock.integration.test.ts": 8794,
- "server/src/services/native-runtime/native-credential-store.test.ts": 2312,
- "server/src/services/native-runtime/native-credential-update-owner.test.ts": 2890,
- "server/src/services/native-runtime/native-credential-updates.test.ts": 3188,
- "server/src/services/native-runtime/native-current-wake-completion-feedback.test.ts": 10199,
- "server/src/services/native-runtime/native-cut-turn-start-retry.integration.test.ts": 9216,
- "server/src/services/native-runtime/native-deliverable-feedback.test.ts": 7167,
- "server/src/services/native-runtime/native-deliverable-text.test.ts": 771,
+ "server/src/services/native-runtime/native-credential-store.test.ts": 2260,
+ "server/src/services/native-runtime/native-credential-update-owner.test.ts": 2645,
+ "server/src/services/native-runtime/native-credential-updates.test.ts": 3638,
+ "server/src/services/native-runtime/native-current-wake-completion-feedback.test.ts": 7228,
+ "server/src/services/native-runtime/native-cut-turn-start-retry.integration.test.ts": 10180,
+ "server/src/services/native-runtime/native-deliverable-feedback.test.ts": 5472,
+ "server/src/services/native-runtime/native-deliverable-text.test.ts": 829,
"server/src/services/native-runtime/native-environment-blocker.integration.test.ts": 10409,
- "server/src/services/native-runtime/native-exact-resume-failure.test.ts": 729,
- "server/src/services/native-runtime/native-execution-context-worker.test.ts": 3168,
- "server/src/services/native-runtime/native-execution-context.test.ts": 742,
- "server/src/services/native-runtime/native-execution-input.test.ts": 4490,
+ "server/src/services/native-runtime/native-exact-resume-failure.test.ts": 768,
+ "server/src/services/native-runtime/native-execution-context-worker.test.ts": 4632,
+ "server/src/services/native-runtime/native-execution-context.test.ts": 829,
+ "server/src/services/native-runtime/native-execution-input.test.ts": 8237,
"server/src/services/native-runtime/native-execution-lease-batch.test.ts": 9912,
- "server/src/services/native-runtime/native-execution-lease-reacquire.test.ts": 8502,
- "server/src/services/native-runtime/native-execution-lease.test.ts": 7718,
- "server/src/services/native-runtime/native-execution-policy-review-stage-race.test.ts": 7244,
- "server/src/services/native-runtime/native-execution-policy-review-stage.test.ts": 8779,
- "server/src/services/native-runtime/native-failed-run-owner-release.test.ts": 8360,
+ "server/src/services/native-runtime/native-execution-lease-reacquire.test.ts": 9604,
+ "server/src/services/native-runtime/native-execution-lease.test.ts": 7039,
+ "server/src/services/native-runtime/native-execution-policy-review-stage-race.test.ts": 8004,
+ "server/src/services/native-runtime/native-execution-policy-review-stage.test.ts": 9831,
+ "server/src/services/native-runtime/native-failed-run-owner-release.test.ts": 8676,
"server/src/services/native-runtime/native-failed-turn-continuation.integration.test.ts": 14062,
"server/src/services/native-runtime/native-failed-workspace-recovery.test.ts": 24768,
- "server/src/services/native-runtime/native-failure-redaction.test.ts": 732,
+ "server/src/services/native-runtime/native-failure-redaction.test.ts": 740,
"server/src/services/native-runtime/native-failure-write-lock-contention.integration.test.ts": 8216,
- "server/src/services/native-runtime/native-finalization-reconciler-timing.test.ts": 6455,
+ "server/src/services/native-runtime/native-finalization-reconciler-timing.test.ts": 7117,
"server/src/services/native-runtime/native-finalization-recovery-state.test.ts": 6133,
- "server/src/services/native-runtime/native-github-access.test.ts": 26864,
+ "server/src/services/native-runtime/native-github-access.test.ts": 27618,
"server/src/services/native-runtime/native-governed-wait-lost-state-continuation.integration.test.ts": 10705,
- "server/src/services/native-runtime/native-harness-backup-archive.test.ts": 1080,
- "server/src/services/native-runtime/native-harness-backup-cleanup.test.ts": 727,
+ "server/src/services/native-runtime/native-harness-backup-archive.test.ts": 1041,
+ "server/src/services/native-runtime/native-harness-backup-cleanup.test.ts": 881,
"server/src/services/native-runtime/native-harness-backup-download-deadline.integration.test.ts": 16303,
"server/src/services/native-runtime/native-harness-backup-obligations.integration.test.ts": 8992,
- "server/src/services/native-runtime/native-harness-backup-publication.test.ts": 1108,
- "server/src/services/native-runtime/native-harness-backup-stamp.test.ts": 814,
+ "server/src/services/native-runtime/native-harness-backup-publication.test.ts": 1172,
+ "server/src/services/native-runtime/native-harness-backup-stamp.test.ts": 1039,
"server/src/services/native-runtime/native-harness-backup-storage.integration.test.ts": 52555,
"server/src/services/native-runtime/native-harness-backup-throttle.integration.test.ts": 8957,
+ "server/src/services/native-runtime/native-harness-backup-upload-deadline.integration.test.ts": 10256,
"server/src/services/native-runtime/native-harness-filesystem-independence-continuation.integration.test.ts": 9813,
"server/src/services/native-runtime/native-harness-filesystem-independence.integration.test.ts": 98077,
"server/src/services/native-runtime/native-harness-online-preservation.integration.test.ts": 40303,
- "server/src/services/native-runtime/native-harness-original-volume.test.ts": 761,
+ "server/src/services/native-runtime/native-harness-original-volume.test.ts": 984,
"server/src/services/native-runtime/native-human-self-handoff.test.ts": 8019,
"server/src/services/native-runtime/native-idle-sleep-continuation.integration.test.ts": 12300,
- "server/src/services/native-runtime/native-ingress-bootstrap-retry.integration.test.ts": 73631,
- "server/src/services/native-runtime/native-maintenance-no-launch.test.ts": 1532,
- "server/src/services/native-runtime/native-permission-decline.test.ts": 3219,
- "server/src/services/native-runtime/native-permission-projection.test.ts": 7799,
- "server/src/services/native-runtime/native-plan-wait-receipts.test.ts": 727,
- "server/src/services/native-runtime/native-plan-wait.test.ts": 7632,
- "server/src/services/native-runtime/native-plugin-workspace-finalization.test.ts": 967,
- "server/src/services/native-runtime/native-post-result-failure.test.ts": 1776,
+ "server/src/services/native-runtime/native-ingress-bootstrap-retry.integration.test.ts": 93117,
+ "server/src/services/native-runtime/native-maintenance-no-launch.test.ts": 1951,
+ "server/src/services/native-runtime/native-permission-decline.test.ts": 2805,
+ "server/src/services/native-runtime/native-permission-projection.test.ts": 7780,
+ "server/src/services/native-runtime/native-plan-wait-receipts.test.ts": 1055,
+ "server/src/services/native-runtime/native-plan-wait.test.ts": 9112,
+ "server/src/services/native-runtime/native-plugin-workspace-finalization.test.ts": 818,
+ "server/src/services/native-runtime/native-post-result-failure.test.ts": 2172,
"server/src/services/native-runtime/native-preserved-monitor-wait.test.ts": 49316,
- "server/src/services/native-runtime/native-provider-artifact-capture-confinement.test.ts": 3137,
- "server/src/services/native-runtime/native-provider-artifact-capture.test.ts": 2369,
- "server/src/services/native-runtime/native-provider-artifact-gate.test.ts": 3784,
+ "server/src/services/native-runtime/native-provider-artifact-capture-confinement.test.ts": 3600,
+ "server/src/services/native-runtime/native-provider-artifact-capture.test.ts": 3163,
+ "server/src/services/native-runtime/native-provider-artifact-gate.test.ts": 3738,
"server/src/services/native-runtime/native-provider-capacity.integration.test.ts": 16101,
"server/src/services/native-runtime/native-provider-failure.integration.test.ts": 10393,
- "server/src/services/native-runtime/native-provider-failure.test.ts": 1557,
- "server/src/services/native-runtime/native-provider-limit-cooldown.integration.test.ts": 2728,
+ "server/src/services/native-runtime/native-provider-failure.test.ts": 1709,
+ "server/src/services/native-runtime/native-provider-limit-cooldown.integration.test.ts": 2749,
"server/src/services/native-runtime/native-provider-overload.integration.test.ts": 9905,
"server/src/services/native-runtime/native-provider-pack-admission.test.ts": 11771,
- "server/src/services/native-runtime/native-provider-turn-wait.test.ts": 5879,
+ "server/src/services/native-runtime/native-provider-turn-wait.test.ts": 4306,
+ "server/src/services/native-runtime/native-pull-request-completion.test.ts": 8151,
"server/src/services/native-runtime/native-question-bridge.test.ts": 44675,
- "server/src/services/native-runtime/native-reconciliation-timing.test.ts": 854,
+ "server/src/services/native-runtime/native-reconciliation-timing.test.ts": 900,
"server/src/services/native-runtime/native-recoverable-lost-turn.integration.test.ts": 5815,
"server/src/services/native-runtime/native-recovered-owner-followup.test.ts": 20680,
"server/src/services/native-runtime/native-recovery-preparation-failure.test.ts": 6054,
"server/src/services/native-runtime/native-recovery-usage-delivery.test.ts": 6172,
"server/src/services/native-runtime/native-remote-retry-admission.test.ts": 21484,
- "server/src/services/native-runtime/native-replacement-evidence.test.ts": 710,
+ "server/src/services/native-runtime/native-replacement-evidence.test.ts": 835,
"server/src/services/native-runtime/native-response-publication-retry.test.ts": 21924,
- "server/src/services/native-runtime/native-restart-recovery-isolation.test.ts": 10160,
+ "server/src/services/native-runtime/native-restart-recovery-isolation.test.ts": 7932,
"server/src/services/native-runtime/native-restart-recovery.test.ts": 6957,
"server/src/services/native-runtime/native-retired-backup-source.integration.test.ts": 7163,
- "server/src/services/native-runtime/native-review-participant.test.ts": 2189,
- "server/src/services/native-runtime/native-review-prompt.test.ts": 915,
- "server/src/services/native-runtime/native-routine-status.test.ts": 8773,
- "server/src/services/native-runtime/native-run-coordinator-store-intake.test.ts": 6721,
- "server/src/services/native-runtime/native-run-failure-explanation.test.ts": 1908,
- "server/src/services/native-runtime/native-run-finalizer-telemetry.test.ts": 12821,
+ "server/src/services/native-runtime/native-review-participant.test.ts": 1912,
+ "server/src/services/native-runtime/native-review-prompt.test.ts": 551,
+ "server/src/services/native-runtime/native-routine-status.test.ts": 10645,
+ "server/src/services/native-runtime/native-run-coordinator-store-intake.test.ts": 6102,
+ "server/src/services/native-runtime/native-run-failure-explanation.test.ts": 1949,
+ "server/src/services/native-runtime/native-run-finalizer-telemetry.test.ts": 14292,
"server/src/services/native-runtime/native-run-log-recovery.test.ts": 4775,
- "server/src/services/native-runtime/native-run-log-watermark.test.ts": 10432,
- "server/src/services/native-runtime/native-run-trace-context.test.ts": 1925,
- "server/src/services/native-runtime/native-run-trace.test.ts": 2150,
- "server/src/services/native-runtime/native-run-wake-anchor.integration.test.ts": 3132,
- "server/src/services/native-runtime/native-run-wake-anchor.test.ts": 2452,
- "server/src/services/native-runtime/native-runner-attachment-staging.test.ts": 6324,
- "server/src/services/native-runtime/native-runner-checkpoint-authority.integration.test.ts": 8282,
- "server/src/services/native-runtime/native-runner-checkpoint-retirement.test.ts": 734,
- "server/src/services/native-runtime/native-runner-checkpoint-save.test.ts": 4730,
- "server/src/services/native-runtime/native-runner-execution-driver.test.ts": 1523,
+ "server/src/services/native-runtime/native-run-log-watermark.test.ts": 11701,
+ "server/src/services/native-runtime/native-run-payload-too-large.test.ts": 6236,
+ "server/src/services/native-runtime/native-run-trace-context.test.ts": 2069,
+ "server/src/services/native-runtime/native-run-trace.test.ts": 2063,
+ "server/src/services/native-runtime/native-run-wake-anchor.integration.test.ts": 2861,
+ "server/src/services/native-runtime/native-run-wake-anchor.test.ts": 1924,
+ "server/src/services/native-runtime/native-runner-attachment-staging.test.ts": 7138,
+ "server/src/services/native-runtime/native-runner-checkpoint-authority.integration.test.ts": 7776,
+ "server/src/services/native-runtime/native-runner-checkpoint-retirement.test.ts": 861,
+ "server/src/services/native-runtime/native-runner-checkpoint-save.test.ts": 4639,
+ "server/src/services/native-runtime/native-runner-execution-driver.test.ts": 2097,
"server/src/services/native-runtime/native-runner-file-handoff.test.ts": 10846,
- "server/src/services/native-runtime/native-runner-ownership.test.ts": 2881,
+ "server/src/services/native-runtime/native-runner-ownership.test.ts": 2963,
"server/src/services/native-runtime/native-runner-recovery-contract.test.ts": 769,
"server/src/services/native-runtime/native-runner-restart-checkpoint-cost.integration.test.ts": 187000,
"server/src/services/native-runtime/native-runner-restart-diskless.integration.test.ts": 172000,
@@ -1768,146 +1847,158 @@
"server/src/services/native-runtime/native-runner-restart-preparation.integration.test.ts": 155000,
"server/src/services/native-runtime/native-runner-restart-recovery.integration.test.ts": 51000,
"server/src/services/native-runtime/native-safe-replacement.test.ts": 61717,
+ "server/src/services/native-runtime/native-sandbox-disk-full.test.ts": 7211,
"server/src/services/native-runtime/native-scheduled-resume-continuation.integration.test.ts": 8229,
- "server/src/services/native-runtime/native-scheduled-resume-lock.test.ts": 6627,
- "server/src/services/native-runtime/native-session-diagnostics.test.ts": 2627,
+ "server/src/services/native-runtime/native-scheduled-resume-lock.test.ts": 7536,
+ "server/src/services/native-runtime/native-session-diagnostics.test.ts": 2121,
"server/src/services/native-runtime/native-session-executor.test.ts": 145454,
"server/src/services/native-runtime/native-session-handoff.test.ts": 6818,
- "server/src/services/native-runtime/native-session-resume-projection.test.ts": 7170,
- "server/src/services/native-runtime/native-session-resume.test.ts": 18920,
+ "server/src/services/native-runtime/native-session-resume-projection.test.ts": 7997,
+ "server/src/services/native-runtime/native-session-resume.test.ts": 25545,
"server/src/services/native-runtime/native-session-resumption-binding.test.ts": 13387,
- "server/src/services/native-runtime/native-session-root-entries.test.ts": 769,
+ "server/src/services/native-runtime/native-session-root-entries.test.ts": 752,
"server/src/services/native-runtime/native-skill-library-tools.integration.test.ts": 12497,
- "server/src/services/native-runtime/native-skill-test-scope.test.ts": 12812,
- "server/src/services/native-runtime/native-skill-test-status.test.ts": 7211,
- "server/src/services/native-runtime/native-speed-budgets.test.ts": 1950,
- "server/src/services/native-runtime/native-ssh-command-runner.test.ts": 6124,
+ "server/src/services/native-runtime/native-skill-test-scope.test.ts": 16830,
+ "server/src/services/native-runtime/native-skill-test-status.test.ts": 8527,
+ "server/src/services/native-runtime/native-speed-budgets.test.ts": 2080,
+ "server/src/services/native-runtime/native-ssh-command-runner.test.ts": 4822,
"server/src/services/native-runtime/native-staged-attachment-recovery.test.ts": 7781,
- "server/src/services/native-runtime/native-stale-owner-completion.test.ts": 7649,
+ "server/src/services/native-runtime/native-stale-owner-completion.test.ts": 9826,
"server/src/services/native-runtime/native-startup-rejected-retry.integration.test.ts": 9672,
"server/src/services/native-runtime/native-startup-retry.integration.test.ts": 14172,
"server/src/services/native-runtime/native-stop-accounting.integration.test.ts": 8429,
- "server/src/services/native-runtime/native-task-session-publication.test.ts": 7352,
- "server/src/services/native-runtime/native-terminal-status-projection.test.ts": 9374,
+ "server/src/services/native-runtime/native-task-session-publication.test.ts": 8607,
+ "server/src/services/native-runtime/native-terminal-status-projection.test.ts": 10837,
"server/src/services/native-runtime/native-tool-receipt-limit.integration.test.ts": 10117,
- "server/src/services/native-runtime/native-tool-trace.test.ts": 2639,
- "server/src/services/native-runtime/native-usage-accounting.test.ts": 1136,
- "server/src/services/native-runtime/native-usage-delivery.integration.test.ts": 48647,
- "server/src/services/native-runtime/native-warm-capability.test.ts": 3676,
- "server/src/services/native-runtime/native-warm-checkpoint-ownership.integration.test.ts": 49030,
- "server/src/services/native-runtime/native-warm-successor-runner-release.integration.test.ts": 9481,
+ "server/src/services/native-runtime/native-tool-trace.test.ts": 3082,
+ "server/src/services/native-runtime/native-usage-accounting.test.ts": 1543,
+ "server/src/services/native-runtime/native-usage-delivery.integration.test.ts": 52391,
+ "server/src/services/native-runtime/native-warm-capability.test.ts": 3054,
+ "server/src/services/native-runtime/native-warm-checkpoint-ownership.integration.test.ts": 51009,
+ "server/src/services/native-runtime/native-warm-successor-runner-release.integration.test.ts": 10307,
"server/src/services/native-runtime/native-warm-transition-restart.integration.test.ts": 2492,
- "server/src/services/native-runtime/native-workspace-best-effort.test.ts": 1893,
+ "server/src/services/native-runtime/native-workspace-best-effort.test.ts": 2238,
"server/src/services/native-runtime/native-workspace-export-resume.live.test.ts": 2865,
"server/src/services/native-runtime/native-workspace-export-retry.test.ts": 22367,
- "server/src/services/native-runtime/native-workspace-finalization-supersession.test.ts": 6795,
+ "server/src/services/native-runtime/native-workspace-failure-write-deadlock.integration.test.ts": 8106,
+ "server/src/services/native-runtime/native-workspace-finalization-supersession.test.ts": 7796,
"server/src/services/native-runtime/native-workspace-finalizer-failure.test.ts": 7494,
"server/src/services/native-runtime/native-workspace-finalizer.test.ts": 22571,
- "server/src/services/native-runtime/native-workspace-lock-keepalive.test.ts": 626,
+ "server/src/services/native-runtime/native-workspace-lock-keepalive.test.ts": 788,
+ "server/src/services/native-runtime/native-workspace-migration.test.ts": 2106,
"server/src/services/native-runtime/native-workspace-owner-restart-recovery.test.ts": 8020,
- "server/src/services/native-runtime/native-workspace-platform-proof.test.ts": 1605,
+ "server/src/services/native-runtime/native-workspace-platform-proof.test.ts": 2156,
"server/src/services/native-runtime/native-workspace-queued-wake-recovery.test.ts": 6366,
"server/src/services/native-runtime/native-workspace-reconstruction.test.ts": 50395,
- "server/src/services/native-runtime/native-workspace-warm-reuse.test.ts": 8404,
+ "server/src/services/native-runtime/native-workspace-warm-reuse.test.ts": 9421,
"server/src/services/native-runtime/off-loop-file-work.test.ts": 24764,
"server/src/services/native-runtime/paperclip-control-plane-port.test.ts": 43404,
- "server/src/services/native-runtime/paperclip-control-plane-timing.test.ts": 5089,
+ "server/src/services/native-runtime/paperclip-control-plane-timing.test.ts": 7019,
"server/src/services/native-runtime/paperclip-runner-real-server.integration.test.ts": 2492,
- "server/src/services/native-runtime/paperclip-runner-tool-authority.test.ts": 34019,
- "server/src/services/native-runtime/plugin-runner-credentials.test.ts": 1920,
+ "server/src/services/native-runtime/paperclip-runner-tool-authority.test.ts": 25186,
+ "server/src/services/native-runtime/plan-mode-status.test.ts": 3142,
+ "server/src/services/native-runtime/plugin-runner-credentials.test.ts": 1927,
"server/src/services/native-runtime/plugin-runner-eviction.integration.test.ts": 312473,
- "server/src/services/native-runtime/plugin-runner-probe-runner-mismatch.test.ts": 7691,
- "server/src/services/native-runtime/plugin-runner-probe.test.ts": 17478,
+ "server/src/services/native-runtime/plugin-runner-probe-runner-mismatch.test.ts": 6945,
+ "server/src/services/native-runtime/plugin-runner-probe.test.ts": 27899,
"server/src/services/native-runtime/plugin-runner-release-resume.integration.test.ts": 205790,
- "server/src/services/native-runtime/plugin-runner-task-warm.integration.test.ts": 3229,
- "server/src/services/native-runtime/plugin-runner-task.test.ts": 3630,
+ "server/src/services/native-runtime/plugin-runner-task-warm.integration.test.ts": 3047,
+ "server/src/services/native-runtime/plugin-runner-task.test.ts": 7276,
"server/src/services/native-runtime/plugin-task-source-recovery.integration.test.ts": 18697,
"server/src/services/native-runtime/preserved-native-response-wait.integration.test.ts": 106952,
- "server/src/services/native-runtime/provider-api-placement.test.ts": 6240,
+ "server/src/services/native-runtime/provider-api-placement.test.ts": 7041,
"server/src/services/native-runtime/provider-pack-archive.test.ts": 109677,
- "server/src/services/native-runtime/provider-pack-selection-harness.test.ts": 9565,
- "server/src/services/native-runtime/remote-attachment-staging.test.ts": 1693,
- "server/src/services/native-runtime/remote-deliverable-file.test.ts": 1985,
- "server/src/services/native-runtime/remote-launch-assets.test.ts": 2643,
- "server/src/services/native-runtime/remote-mcp-relay.test.ts": 2126,
+ "server/src/services/native-runtime/provider-pack-selection-harness.test.ts": 10769,
+ "server/src/services/native-runtime/remote-attachment-staging.test.ts": 1701,
+ "server/src/services/native-runtime/remote-deliverable-file.test.ts": 1898,
+ "server/src/services/native-runtime/remote-launch-assets.test.ts": 3013,
+ "server/src/services/native-runtime/remote-mcp-relay.test.ts": 1944,
"server/src/services/native-runtime/remote-opencode-artifacts.test.ts": 5149,
- "server/src/services/native-runtime/remote-provider-pack-authority.test.ts": 2582,
- "server/src/services/native-runtime/remote-provider-pack-verification.test.ts": 3567,
- "server/src/services/native-runtime/remote-provider-pack.test.ts": 9463,
- "server/src/services/native-runtime/remote-runner-launch-stderr.test.ts": 10257,
- "server/src/services/native-runtime/remote-runner-lost-launch-ack.test.ts": 8266,
+ "server/src/services/native-runtime/remote-opencode-runtime.test.ts": 1802,
+ "server/src/services/native-runtime/remote-provider-pack-authority.test.ts": 3027,
+ "server/src/services/native-runtime/remote-provider-pack-verification.test.ts": 3860,
+ "server/src/services/native-runtime/remote-provider-pack.test.ts": 9458,
+ "server/src/services/native-runtime/remote-runner-disk-reserve.test.ts": 8146,
+ "server/src/services/native-runtime/remote-runner-launch-stderr.test.ts": 9368,
+ "server/src/services/native-runtime/remote-runner-lost-launch-ack.test.ts": 8060,
"server/src/services/native-runtime/remote-runner-recovery-diagnostics.test.ts": 2182,
"server/src/services/native-runtime/remote-runner-recovery-probe.test.ts": 1601,
- "server/src/services/native-runtime/remote-runner-turn-proof.test.ts": 5366,
+ "server/src/services/native-runtime/remote-runner-turn-proof.test.ts": 6983,
"server/src/services/native-runtime/remote-warm-session-recovery.test.ts": 8796,
- "server/src/services/native-runtime/repeated-tool-failure-guard.test.ts": 6832,
- "server/src/services/native-runtime/retained-provider-pack-source.test.ts": 6652,
+ "server/src/services/native-runtime/repeated-tool-failure-guard.test.ts": 7177,
+ "server/src/services/native-runtime/retained-provider-pack-source.test.ts": 8095,
"server/src/services/native-runtime/runner-api-artifacts.integration.test.ts": 17044,
- "server/src/services/native-runtime/runner-api-artifacts.test.ts": 3247,
- "server/src/services/native-runtime/runner-api-files.test.ts": 892,
- "server/src/services/native-runtime/runner-api-log-redaction.test.ts": 820,
- "server/src/services/native-runtime/runner-api-response.test.ts": 847,
- "server/src/services/native-runtime/runner-api-rollout.test.ts": 941,
- "server/src/services/native-runtime/runner-api.integration.test.ts": 65769,
- "server/src/services/native-runtime/runner-api.test.ts": 5706,
- "server/src/services/native-runtime/runner-bridge-tools.test.ts": 6981,
- "server/src/services/native-runtime/runner-operation-timing.test.ts": 805,
- "server/src/services/native-runtime/runner-prp-coordinator.test.ts": 8471,
- "server/src/services/native-runtime/runner-task-attachments.test.ts": 10798,
- "server/src/services/native-runtime/runner-tool-results.test.ts": 1978,
+ "server/src/services/native-runtime/runner-api-artifacts.test.ts": 3563,
+ "server/src/services/native-runtime/runner-api-files.test.ts": 959,
+ "server/src/services/native-runtime/runner-api-log-redaction.test.ts": 826,
+ "server/src/services/native-runtime/runner-api-reference.test.ts": 2236,
+ "server/src/services/native-runtime/runner-api-response.test.ts": 1030,
+ "server/src/services/native-runtime/runner-api-responsibilities.test.ts": 3953,
+ "server/src/services/native-runtime/runner-api-rollout.test.ts": 897,
+ "server/src/services/native-runtime/runner-api.integration.test.ts": 71669,
+ "server/src/services/native-runtime/runner-api.test.ts": 12682,
+ "server/src/services/native-runtime/runner-bridge-tools.test.ts": 7016,
+ "server/src/services/native-runtime/runner-operation-timing.test.ts": 833,
+ "server/src/services/native-runtime/runner-prp-coordinator.test.ts": 7118,
+ "server/src/services/native-runtime/runner-task-attachments.test.ts": 11093,
+ "server/src/services/native-runtime/runner-tool-results.test.ts": 2050,
"server/src/services/native-runtime/runtime-asset-retention.test.ts": 7656,
- "server/src/services/native-runtime/runtime-context.test.ts": 6461,
- "server/src/services/native-runtime/runtime-mode.test.ts": 2850,
- "server/src/services/native-runtime/runtime-request-resolution-authority.test.ts": 1527,
+ "server/src/services/native-runtime/runtime-context.test.ts": 8104,
+ "server/src/services/native-runtime/runtime-mode.test.ts": 3082,
+ "server/src/services/native-runtime/runtime-request-resolution-authority.test.ts": 1858,
"server/src/services/native-runtime/sandbox-runner-port-holders.integration.test.ts": 9151,
- "server/src/services/native-runtime/sandbox-runner-port-holders.test.ts": 6524,
+ "server/src/services/native-runtime/sandbox-runner-port-holders.test.ts": 7498,
"server/src/services/native-runtime/scheduled-resume-continuation.test.ts": 11093,
- "server/src/services/native-runtime/setup-readiness.test.ts": 6542,
- "server/src/services/native-runtime/status-arbiter.test.ts": 2765,
- "server/src/services/native-runtime/stopped-codex-turn.test.ts": 784,
- "server/src/services/native-runtime/task-creation-backlog.test.ts": 8780,
+ "server/src/services/native-runtime/setup-readiness.test.ts": 8494,
+ "server/src/services/native-runtime/status-arbiter.test.ts": 2595,
+ "server/src/services/native-runtime/stopped-codex-turn.test.ts": 855,
+ "server/src/services/native-runtime/task-creation-backlog.test.ts": 8472,
"server/src/services/native-runtime/task-document-body.integration.test.ts": 16703,
- "server/src/services/native-runtime/task-document-key-contract.test.ts": 7712,
- "server/src/services/native-runtime/task-document-scope.integration.test.ts": 13521,
+ "server/src/services/native-runtime/task-document-key-contract.test.ts": 6543,
+ "server/src/services/native-runtime/task-document-scope.integration.test.ts": 20440,
"server/src/services/native-runtime/task-monitor.integration.test.ts": 11794,
- "server/src/services/native-runtime/task-reassignment.test.ts": 11250,
- "server/src/services/native-runtime/tool-input-variant-admission.test.ts": 6191,
+ "server/src/services/native-runtime/task-reassignment.test.ts": 9564,
+ "server/src/services/native-runtime/tool-input-variant-admission.test.ts": 6729,
"server/src/services/native-runtime/tool-receipt-recovery.integration.test.ts": 9465,
- "server/src/services/native-runtime/unread-steered-messages.test.ts": 3706,
+ "server/src/services/native-runtime/unread-steered-messages.test.ts": 3165,
"server/src/services/native-runtime/update-skill.integration.test.ts": 13979,
- "server/src/services/native-runtime/volume-free-controller-state.test.ts": 941,
- "server/src/services/native-runtime/warm-controller-journal.test.ts": 776,
+ "server/src/services/native-runtime/volume-free-controller-state.test.ts": 1013,
+ "server/src/services/native-runtime/warm-controller-journal.test.ts": 767,
"server/src/services/object-byte-journal.test.ts": 83546,
- "server/src/services/object-run-log-store-tail-read.test.ts": 3185,
- "server/src/services/object-run-log-store.test.ts": 8991,
+ "server/src/services/object-run-log-store-tail-read.test.ts": 3216,
+ "server/src/services/object-run-log-store.test.ts": 9158,
"server/src/services/offline-workspace-operation-reconciliation.test.ts": 8220,
- "server/src/services/onboarding-first-task-assets.test.ts": 2563,
- "server/src/services/onboarding-greeting.test.ts": 3260,
+ "server/src/services/onboarding-first-task-assets.test.ts": 2668,
+ "server/src/services/onboarding-greeting.test.ts": 1943,
+ "server/src/services/online-durable-data-migration-postgres.test.ts": 9418,
+ "server/src/services/online-durable-data-migration.test.ts": 8010,
"server/src/services/online-legacy-workspace-recovery.test.ts": 6018,
"server/src/services/online-remote-workspace-recovery-hold.test.ts": 16840,
- "server/src/services/openrouter-models.test.ts": 981,
- "server/src/services/owner-proof.test.ts": 1859,
- "server/src/services/paperclip-cloud-connector-enrollment.test.ts": 2243,
- "server/src/services/paperclip-cloud-connector-principal.test.ts": 783,
- "server/src/services/paperclip-cloud-connector.test.ts": 2044,
- "server/src/services/plugin-login-credential.test.ts": 939,
- "server/src/services/plugin-task-panels.test.ts": 1809,
- "server/src/services/presentation-ownership-read.test.ts": 11169,
- "server/src/services/protected-environment-keys.test.ts": 1949,
- "server/src/services/provider-fresh-workspace.test.ts": 5566,
- "server/src/services/provider-quota-reset.test.ts": 733,
- "server/src/services/provider-retry-after.test.ts": 4974,
- "server/src/services/provider-trace-object-store.test.ts": 784,
- "server/src/services/provider-trace-workspace-diff-reprojection.test.ts": 2457,
- "server/src/services/public-mcp/client-mirror-ack.test.ts": 2366,
- "server/src/services/public-mcp/client-mirror-envelope.test.ts": 1824,
- "server/src/services/public-mcp/client-mirror-wire.test.ts": 1073,
- "server/src/services/public-mcp/cloud-event-authority.test.ts": 1920,
- "server/src/services/public-mcp/device-cutover.test.ts": 2289,
- "server/src/services/public-mcp/device-status-key-read.test.ts": 915,
- "server/src/services/public-mcp/discovery.test.ts": 2147,
+ "server/src/services/openrouter-models.test.ts": 797,
+ "server/src/services/owner-proof.test.ts": 1945,
+ "server/src/services/paperclip-cloud-connector-enrollment.test.ts": 2419,
+ "server/src/services/paperclip-cloud-connector-principal.test.ts": 822,
+ "server/src/services/paperclip-cloud-connector-revoke.test.ts": 2180,
+ "server/src/services/paperclip-cloud-connector-saved-answers.test.ts": 2199,
+ "server/src/services/paperclip-cloud-connector.test.ts": 4834,
+ "server/src/services/plugin-login-credential.test.ts": 799,
+ "server/src/services/plugin-task-panels.test.ts": 1988,
+ "server/src/services/presentation-ownership-read.test.ts": 12470,
+ "server/src/services/protected-environment-keys.test.ts": 1789,
+ "server/src/services/provider-fresh-workspace.test.ts": 6769,
+ "server/src/services/provider-quota-reset.test.ts": 1712,
+ "server/src/services/provider-retry-after.test.ts": 6342,
+ "server/src/services/provider-trace-object-store.test.ts": 1033,
+ "server/src/services/provider-trace-workspace-diff-reprojection.test.ts": 2652,
+ "server/src/services/public-mcp/client-mirror-ack.test.ts": 2432,
+ "server/src/services/public-mcp/client-mirror-envelope.test.ts": 2356,
+ "server/src/services/public-mcp/client-mirror-wire.test.ts": 1067,
+ "server/src/services/public-mcp/cloud-event-authority.test.ts": 2240,
+ "server/src/services/public-mcp/device-cutover.test.ts": 2205,
+ "server/src/services/public-mcp/device-status-key-read.test.ts": 615,
+ "server/src/services/public-mcp/discovery.test.ts": 1659,
"server/src/services/public-mcp/events-work.test.ts": 32996,
- "server/src/services/public-mcp/idle-authorization-handoffs.test.ts": 1895,
+ "server/src/services/public-mcp/idle-authorization-handoffs.test.ts": 2341,
"server/src/services/public-mcp/idle-client-mirror.test.ts": 2297,
"server/src/services/public-mcp/idle-device-status.test.ts": 2262,
"server/src/services/public-mcp/idle-event-schedule.test.ts": 1615,
@@ -1915,13 +2006,13 @@
"server/src/services/public-mcp/idle-subscription-proof.test.ts": 2275,
"server/src/services/public-mcp/idle-transfer-schedule.test.ts": 1862,
"server/src/services/public-mcp/idle-wake-proof.test.ts": 1661,
- "server/src/services/public-mcp/revocation-index-sync.test.ts": 1970,
- "server/src/services/public-mcp/wake-admission.test.ts": 1018,
- "server/src/services/quarantined-task-retry.test.ts": 14656,
- "server/src/services/question-interaction-answers.test.ts": 4315,
- "server/src/services/question-pattern-validation.test.ts": 2675,
- "server/src/services/queued-comment-history-read.test.ts": 7250,
- "server/src/services/queued-run-dispatch-liveness.test.ts": 7279,
+ "server/src/services/public-mcp/revocation-index-sync.test.ts": 2102,
+ "server/src/services/public-mcp/wake-admission.test.ts": 824,
+ "server/src/services/quarantined-task-retry.test.ts": 38826,
+ "server/src/services/question-interaction-answers.test.ts": 4900,
+ "server/src/services/question-pattern-validation.test.ts": 2895,
+ "server/src/services/queued-comment-history-read.test.ts": 7321,
+ "server/src/services/queued-run-dispatch-liveness.test.ts": 6229,
"server/src/services/recovery/assigned-work-invariant.test.ts": 5474,
"server/src/services/recovery/issue-state-read.test.ts": 8448,
"server/src/services/recovery/legacy-continuation.test.ts": 773,
@@ -1929,6 +2020,7 @@
"server/src/services/recovery/native-runner-routing.test.ts": 7196,
"server/src/services/recovery/provider-failure-classification.test.ts": 8303,
"server/src/services/recovery/reconciliation-run-read.test.ts": 6847,
+ "server/src/services/recovery/restored-configuration.test.ts": 8921,
"server/src/services/recovery/review-path-recovery.test.ts": 5566,
"server/src/services/recovery/run-context-read.test.ts": 7429,
"server/src/services/recovery/run-result-read.test.ts": 6976,
@@ -1936,8 +2028,8 @@
"server/src/services/recovery/status-only-context.test.ts": 579,
"server/src/services/recovery/stranded-notice.test.ts": 1926,
"server/src/services/recovery/successful-run-handoff.test.ts": 1860,
- "server/src/services/remote-agent-profiles.test.ts": 2016,
- "server/src/services/remote-url-credentials.test.ts": 767,
+ "server/src/services/remote-agent-profiles.test.ts": 1949,
+ "server/src/services/remote-url-credentials.test.ts": 856,
"server/src/services/remote-workspace-archive-worker.test.ts": 5150,
"server/src/services/remote-workspace-cohort-migration.test.ts": 65834,
"server/src/services/remote-workspace-migration-concurrency.test.ts": 8274,
@@ -1946,6 +2038,8 @@
"server/src/services/remote-workspace-online-source.test.ts": 61675,
"server/src/services/remote-workspace-original-bare-source.integration.test.ts": 40278,
"server/src/services/remote-workspace-readonly-capture-budget.test.ts": 21512,
+ "server/src/services/remote-workspace-readonly-capture-cause.test.ts": 7019,
+ "server/src/services/remote-workspace-readonly-inventory-entries.test.ts": 30380,
"server/src/services/remote-workspace-readonly-inventory.test.ts": 1027,
"server/src/services/remote-workspace-recovery-receipt-fallback.test.ts": 11646,
"server/src/services/remote-workspace-reservation.test.ts": 7014,
@@ -1959,67 +2053,81 @@
"server/src/services/remote-workspace-transport.test.ts": 49930,
"server/src/services/remote-workspace-unchanged-release.test.ts": 29322,
"server/src/services/remote-workspaces.integration.test.ts": 134113,
- "server/src/services/responsible-user-denial-run-outcomes.test.ts": 1512,
- "server/src/services/retained-google-credential-cleanup.test.ts": 779,
- "server/src/services/retry-workspace-continuity.test.ts": 10510,
- "server/src/services/routines-formatter-cache.test.ts": 9160,
- "server/src/services/run-accounting-contention.test.ts": 9693,
- "server/src/services/run-cancellation.test.ts": 697,
- "server/src/services/run-cost-accounting.test.ts": 23211,
- "server/src/services/run-dispatch-notifications.test.ts": 807,
+ "server/src/services/responsible-user-denial-run-outcomes.test.ts": 2087,
+ "server/src/services/retained-google-credential-cleanup.test.ts": 892,
+ "server/src/services/retry-workspace-continuity.test.ts": 9380,
+ "server/src/services/reusable-sandbox-resume-retry.test.ts": 7261,
+ "server/src/services/routines-formatter-cache.test.ts": 9265,
+ "server/src/services/run-accounting-contention.test.ts": 12056,
+ "server/src/services/run-cancellation.test.ts": 813,
+ "server/src/services/run-cost-accounting.test.ts": 31578,
+ "server/src/services/run-dispatch-notifications.test.ts": 808,
+ "server/src/services/run-evidence-migration-appended.test.ts": 8787,
+ "server/src/services/run-evidence-migration-page.test.ts": 544,
"server/src/services/run-intake-stall-watch.test.ts": 6858,
- "server/src/services/run-log-store-cancellation.test.ts": 2613,
- "server/src/services/run-log-store.test.ts": 3536,
- "server/src/services/run-scratch.test.ts": 690,
- "server/src/services/runner-environment-lifecycle.test.ts": 2598,
- "server/src/services/runner-goal-control-broker.test.ts": 792,
- "server/src/services/runner-goals.test.ts": 6758,
+ "server/src/services/run-log-store-cancellation.test.ts": 2470,
+ "server/src/services/run-log-store.test.ts": 3581,
+ "server/src/services/run-scratch.test.ts": 846,
+ "server/src/services/runner-environment-lifecycle.test.ts": 2844,
+ "server/src/services/runner-goal-control-broker.test.ts": 778,
+ "server/src/services/runner-goals.test.ts": 4971,
"server/src/services/runner-lost-mid-turn-continuation.test.ts": 26927,
- "server/src/services/runtime-accounting-totals.test.ts": 2201,
- "server/src/services/runtime-exposure/broker-client.test.ts": 936,
- "server/src/services/runtime-exposure/exposure-manager.test.ts": 1462,
- "server/src/services/runtime-exposure/loopback-listener.test.ts": 745,
- "server/src/services/runtime-exposure/port-pair.test.ts": 1478,
- "server/src/services/runtime-exposure/port-reservation.test.ts": 1447,
- "server/src/services/runtime-exposure/tailscale-hostname.test.ts": 765,
- "server/src/services/safe-native-chat-progress.test.ts": 775,
- "server/src/services/sandbox-absence-proof.test.ts": 1956,
- "server/src/services/sandbox-disk-full-fault.test.ts": 1964,
+ "server/src/services/runtime-accounting-totals.test.ts": 2536,
+ "server/src/services/runtime-exposure/broker-client.test.ts": 905,
+ "server/src/services/runtime-exposure/exposure-manager.test.ts": 1928,
+ "server/src/services/runtime-exposure/loopback-listener.test.ts": 851,
+ "server/src/services/runtime-exposure/port-pair.test.ts": 1511,
+ "server/src/services/runtime-exposure/port-reservation.test.ts": 1757,
+ "server/src/services/runtime-exposure/tailscale-hostname.test.ts": 777,
+ "server/src/services/safe-native-chat-progress.test.ts": 799,
+ "server/src/services/sandbox-absence-proof.test.ts": 2214,
+ "server/src/services/sandbox-disk-full-fault.test.ts": 2028,
"server/src/services/saved-bootstrap-continuation.test.ts": 11165,
"server/src/services/saved-work-recovery-overdue.test.ts": 13858,
- "server/src/services/saved-work-retry-eligibility.test.ts": 11506,
- "server/src/services/server-replacement-interruption.test.ts": 6088,
- "server/src/services/session-workspace-cwd.test.ts": 1011,
- "server/src/services/setup-token-reaper.test.ts": 5332,
- "server/src/services/setup-token-session.test.ts": 7573,
- "server/src/services/setup-token-transport-binding.test.ts": 4616,
- "server/src/services/skill-local-import-boundary.test.ts": 937,
+ "server/src/services/saved-work-retry-eligibility.test.ts": 13476,
+ "server/src/services/server-replacement-interruption.test.ts": 7543,
+ "server/src/services/session-workspace-cwd.test.ts": 706,
+ "server/src/services/setup-failure-after-work-continuation.test.ts": 15457,
+ "server/src/services/setup-token-reaper.test.ts": 6120,
+ "server/src/services/setup-token-session.test.ts": 19199,
+ "server/src/services/setup-token-transport-binding.test.ts": 6227,
+ "server/src/services/skill-local-import-boundary.test.ts": 854,
"server/src/services/skill-package-recovery.test.ts": 3323,
+ "server/src/services/skill-package-storage-migration-postgres.test.ts": 2735,
+ "server/src/services/skill-package-storage-migration.test.ts": 1895,
"server/src/services/skill-package-work.test.ts": 9936,
"server/src/services/skill-source-idle-schedule.test.ts": 1902,
"server/src/services/skill-source-sync-work.test.ts": 19860,
- "server/src/services/skill-tools.test.ts": 1373,
+ "server/src/services/skill-tools.test.ts": 1914,
"server/src/services/skill-version-cache-lock.test.ts": 7117,
- "server/src/services/slack-mcp-error.test.ts": 562,
+ "server/src/services/slack-mcp-error.test.ts": 803,
+ "server/src/services/ssh-remote-workspace-heartbeat-claude.integration.test.ts": 64218,
+ "server/src/services/ssh-remote-workspace-heartbeat-cli.integration.test.ts": 88895,
+ "server/src/services/ssh-remote-workspace-heartbeat-codex.integration.test.ts": 69357,
+ "server/src/services/ssh-remote-workspace-heartbeat-gemini.integration.test.ts": 61817,
"server/src/services/ssh-remote-workspace.integration.test.ts": 332029,
"server/src/services/superseded-workspace-export-recovery.test.ts": 13089,
"server/src/services/system-recovery-state.test.ts": 6030,
- "server/src/services/task-interruption-presentation.test.ts": 6837,
- "server/src/services/task-retry-refusal.test.ts": 6327,
- "server/src/services/task-retry.test.ts": 42006,
- "server/src/services/tool-access/github-access-errors.test.ts": 742,
- "server/src/services/tool-access/github-default-owner.test.ts": 726,
- "server/src/services/tool-action-replay-intent.test.ts": 889,
- "server/src/services/tool-approval-target.test.ts": 595,
- "server/src/services/tool-discovery-scheduler.test.ts": 1016,
- "server/src/services/tool-profile-binding-precedence.test.ts": 758,
+ "server/src/services/task-interruption-presentation.test.ts": 10237,
+ "server/src/services/task-retry-refusal.test.ts": 6549,
+ "server/src/services/task-retry.test.ts": 57960,
+ "server/src/services/tool-access/catalog/failures.test.ts": 628,
+ "server/src/services/tool-access/connections/google-access-removal.test.ts": 5447,
+ "server/src/services/tool-access/github-access-errors.test.ts": 879,
+ "server/src/services/tool-access/github-default-owner.test.ts": 848,
+ "server/src/services/tool-access/oauth/client-settings.test.ts": 2121,
+ "server/src/services/tool-access/oauth/managed-connector-subject.test.ts": 2451,
+ "server/src/services/tool-action-replay-intent.test.ts": 790,
+ "server/src/services/tool-approval-target.test.ts": 910,
+ "server/src/services/tool-discovery-scheduler.test.ts": 784,
+ "server/src/services/tool-profile-binding-precedence.test.ts": 789,
"server/src/services/unrecoverable-saved-work-retry.test.ts": 14901,
- "server/src/services/usage-receipts-read.test.ts": 6401,
- "server/src/services/vercel-connect.test.ts": 853,
- "server/src/services/verified-preparation-log.test.ts": 3682,
- "server/src/services/workspace-git-operation-scheduler.test.ts": 2337,
+ "server/src/services/usage-receipts-read.test.ts": 9040,
+ "server/src/services/vercel-connect.test.ts": 839,
+ "server/src/services/verified-preparation-log.test.ts": 3334,
+ "server/src/services/workspace-git-operation-scheduler.test.ts": 2675,
"server/src/services/workspace-git-snapshot-streaming.test.ts": 40665,
- "server/src/services/workspace-git-source-roots.test.ts": 2933,
+ "server/src/services/workspace-git-source-roots.test.ts": 2505,
"server/src/services/workspace-recovery-admission.test.ts": 219865,
"server/src/services/workspace-recovery-capture-policy.test.ts": 13345,
"server/src/services/workspace-recovery-dependency-finalize.test.ts": 11990,
@@ -2038,16 +2146,16 @@
"server/src/services/workspace-restore-reconciliation.test.ts": 6919,
"server/src/services/workspace-runtime-exposure-backfill.test.ts": 6047,
"server/src/services/workspace-runtime-exposure.test.ts": 24475,
- "server/src/services/workspace-runtime-read-model.test.ts": 1829,
- "server/src/services/workspace-runtime-readiness.test.ts": 6288,
- "server/src/services/workspace-runtime-ready-comment.test.ts": 5962,
- "server/src/shutdown.test.ts": 848,
+ "server/src/services/workspace-runtime-read-model.test.ts": 1899,
+ "server/src/services/workspace-runtime-readiness.test.ts": 6986,
+ "server/src/services/workspace-runtime-ready-comment.test.ts": 6533,
+ "server/src/shutdown.test.ts": 961,
"server/src/startup-recovery-timing.test.ts": 696,
- "server/src/startup-timeline.test.ts": 808,
- "server/src/storage/config.test.ts": 2013,
- "server/src/storage/file-crypto-pool.test.ts": 1615,
- "server/src/storage/s3-credential-refresh.test.ts": 1512,
- "server/src/storage/storage-unavailable.test.ts": 823,
- "server/src/url-utils.test.ts": 756
+ "server/src/startup-timeline.test.ts": 655,
+ "server/src/storage/config.test.ts": 1716,
+ "server/src/storage/file-crypto-pool.test.ts": 797,
+ "server/src/storage/s3-credential-refresh.test.ts": 1258,
+ "server/src/storage/storage-unavailable.test.ts": 838,
+ "server/src/url-utils.test.ts": 611
}
}
diff --git a/scripts/replay-workspace-postinstall.mjs b/scripts/replay-workspace-postinstall.mjs
new file mode 100644
index 00000000000..71018d4123b
--- /dev/null
+++ b/scripts/replay-workspace-postinstall.mjs
@@ -0,0 +1,86 @@
+#!/usr/bin/env node
+import { spawn } from "node:child_process";
+import { existsSync, readFileSync } from "node:fs";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+import { discoverWorkspacePackagePaths } from "./ensure-workspace-package-links.mjs";
+
+const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
+
+function readPostinstall(dirPath) {
+ const manifestPath = path.join(dirPath, "package.json");
+ if (!existsSync(manifestPath)) return null;
+ const manifest = JSON.parse(readFileSync(manifestPath, "utf8"));
+ const script = manifest.scripts?.postinstall;
+ return typeof script === "string" && script.trim().length > 0 ? script.trim() : null;
+}
+
+export function findWorkspacePostinstallScripts(rootDir = repoRoot) {
+ const workspacePaths = discoverWorkspacePackagePaths(rootDir);
+ const canonicalRoot = path.resolve(rootDir);
+ const workspaceHooks = [];
+ const seenDirs = new Set([canonicalRoot]);
+
+ for (const dirPath of Array.from(workspacePaths.values()).sort()) {
+ const resolved = path.resolve(dirPath);
+ if (seenDirs.has(resolved)) continue;
+ seenDirs.add(resolved);
+ const script = readPostinstall(resolved);
+ if (script) {
+ workspaceHooks.push({
+ dir: resolved,
+ relDir: path.relative(canonicalRoot, resolved).split(path.sep).join("/"),
+ script,
+ });
+ }
+ }
+
+ const rootScript = readPostinstall(canonicalRoot);
+ return {
+ workspaceHooks,
+ rootHook: rootScript ? { dir: canonicalRoot, relDir: ".", script: rootScript } : null,
+ };
+}
+
+function runHook(hook, rootDir, env = process.env) {
+ const binDirs = [
+ path.join(hook.dir, "node_modules", ".bin"),
+ path.join(rootDir, "node_modules", ".bin"),
+ ];
+ const mergedPath = [...binDirs, env.PATH ?? ""].filter(Boolean).join(path.delimiter);
+ return new Promise((resolve, reject) => {
+ const child = spawn(hook.script, {
+ cwd: hook.dir,
+ env: { ...env, PATH: mergedPath },
+ shell: true,
+ stdio: "inherit",
+ });
+ child.once("error", (error) => {
+ reject(new Error(`postinstall in ${hook.relDir} failed to start: ${error.message}`));
+ });
+ child.once("close", (code, signal) => {
+ if (code === 0) resolve();
+ else reject(new Error(`postinstall in ${hook.relDir} exited with ${signal ?? code}`));
+ });
+ });
+}
+
+export async function replayWorkspacePostinstalls(rootDir = repoRoot, env = process.env) {
+ const canonicalRoot = path.resolve(rootDir);
+ const { workspaceHooks, rootHook } = findWorkspacePostinstallScripts(canonicalRoot);
+ // Mirror `pnpm -r --if-present run postinstall && pnpm run postinstall`:
+ // run independent workspace hooks in parallel first, then the root hook.
+ await Promise.all(workspaceHooks.map((hook) => runHook(hook, canonicalRoot, env)));
+ if (rootHook) {
+ await runHook(rootHook, canonicalRoot, env);
+ }
+ return {
+ workspaceCount: workspaceHooks.length,
+ ranRoot: Boolean(rootHook),
+ };
+}
+
+const invokedPath = process.argv[1] ? path.resolve(process.argv[1]) : null;
+if (invokedPath && invokedPath === fileURLToPath(import.meta.url)) {
+ await replayWorkspacePostinstalls();
+}
diff --git a/scripts/serialized-shard-durations.json b/scripts/serialized-shard-durations.json
index 06ae70c20ed..e50feb74fcf 100644
--- a/scripts/serialized-shard-durations.json
+++ b/scripts/serialized-shard-durations.json
@@ -3,196 +3,198 @@
"unit": "ms",
"sources": [
{
- "pull": 22679,
- "run": 45238253588,
+ "run": 45440355579,
"attempt": 1,
- "sha": "8d513d5b1ab8fbfa2905d41be44c165b03a8a320",
- "url": "https://github.com/paperclipai/paperclip/actions/runs/45238253588"
+ "sha": "6ca7a27481e1af45c60069a563632f2b00a008a7",
+ "url": "https://github.com/paperclipai/paperclip/actions/runs/45440355579"
}
],
"coverage": {
"measured": 178,
"withSetup": 178,
- "inventory": 178
+ "inventory": 181
},
"durations": {
- "server/src/__tests__/access-routes-hidden-floor.test.ts": 7709,
- "server/src/__tests__/access-routes-permissions-upgrade.test.ts": 7117,
- "server/src/__tests__/activity-routes.test.ts": 21578,
- "server/src/__tests__/adapter-auth-signal-routes.test.ts": 17029,
- "server/src/__tests__/adapter-model-refresh-routes.test.ts": 6222,
- "server/src/__tests__/adapter-routes-authz.test.ts": 19486,
- "server/src/__tests__/adapter-routes.test.ts": 17941,
- "server/src/__tests__/agent-action-audit-routes.test.ts": 10946,
- "server/src/__tests__/agent-adapter-validation-routes.test.ts": 100370,
- "server/src/__tests__/agent-cross-tenant-authz-routes.test.ts": 6553,
- "server/src/__tests__/agent-device-login-routes.test.ts": 23028,
- "server/src/__tests__/agent-hire-auth-inheritance-routes.test.ts": 23298,
- "server/src/__tests__/agent-hire-idempotency-routes.test.ts": 8900,
- "server/src/__tests__/agent-instructions-routes.test.ts": 7607,
- "server/src/__tests__/agent-live-run-routes.test.ts": 85464,
- "server/src/__tests__/agent-permissions-routes.test.ts": 19196,
- "server/src/__tests__/agent-runner-qualification-routes.test.ts": 8686,
- "server/src/__tests__/agent-secrets-routes.test.ts": 8763,
- "server/src/__tests__/agent-skills-routes.test.ts": 7999,
- "server/src/__tests__/agent-task-hierarchy-depth-routes.test.ts": 10309,
- "server/src/__tests__/agent-test-environment-routes.test.ts": 19471,
- "server/src/__tests__/ai-connection-router.test.ts": 42177,
- "server/src/__tests__/announcements-routes.test.ts": 6400,
- "server/src/__tests__/approval-routes-idempotency.test.ts": 5399,
- "server/src/__tests__/artifact-review-document-routes.test.ts": 9350,
- "server/src/__tests__/assets.test.ts": 9131,
- "server/src/__tests__/auth-routes.test.ts": 7299,
- "server/src/__tests__/auth-session-route.test.ts": 5366,
- "server/src/__tests__/authz-company-access.test.ts": 1619,
- "server/src/__tests__/authz-existence-oracle-guard.test.ts": 569,
- "server/src/__tests__/authz-secret-context.test.ts": 1421,
- "server/src/__tests__/board-bootstrap-routes.test.ts": 5950,
- "server/src/__tests__/board-chat-route-feature-flag.test.ts": 1578,
- "server/src/__tests__/board-route-statement-census.test.ts": 8356,
- "server/src/__tests__/bootstrap-claim-routes.test.ts": 5323,
- "server/src/__tests__/browser-use-route-scope.test.ts": 4166,
- "server/src/__tests__/built-in-agent-routes.test.ts": 14052,
- "server/src/__tests__/cases-routes.test.ts": 15579,
- "server/src/__tests__/cli-auth-routes.test.ts": 26031,
- "server/src/__tests__/cloud-routes.test.ts": 7000,
- "server/src/__tests__/companies-route-cross-company-authz.test.ts": 19290,
- "server/src/__tests__/companies-route-path-guard.test.ts": 4572,
- "server/src/__tests__/company-branding-route.test.ts": 13767,
- "server/src/__tests__/company-default-decision-owner-route.test.ts": 9824,
- "server/src/__tests__/company-import-transfer-routes.test.ts": 7926,
- "server/src/__tests__/company-portability-routes.test.ts": 16020,
- "server/src/__tests__/company-portability.test.ts": 11437,
- "server/src/__tests__/company-search-extract-routes.test.ts": 6767,
- "server/src/__tests__/company-search-rate-limit-routes.test.ts": 6118,
- "server/src/__tests__/company-skill-policy-routes.test.ts": 6222,
- "server/src/__tests__/company-skills-import-authz-routes.test.ts": 7892,
- "server/src/__tests__/company-skills-routes.test.ts": 6446,
- "server/src/__tests__/company-user-directory-route.test.ts": 6130,
- "server/src/__tests__/cost-data-quality-routes.test.ts": 5213,
- "server/src/__tests__/costs-service.test.ts": 5309,
- "server/src/__tests__/decision-queues-routes.test.ts": 6023,
- "server/src/__tests__/document-annotation-routes.test.ts": 10105,
- "server/src/__tests__/email-routes-provider-errors.test.ts": 5765,
- "server/src/__tests__/environment-custom-image-routes.test.ts": 6238,
- "server/src/__tests__/environment-instance-routes.test.ts": 6976,
- "server/src/__tests__/environment-routes.test.ts": 14035,
- "server/src/__tests__/environment-selection-route-guards.test.ts": 7244,
- "server/src/__tests__/execution-workspace-runtime-lease-route.test.ts": 7541,
- "server/src/__tests__/execution-workspaces-routes.test.ts": 5986,
- "server/src/__tests__/express5-auth-wildcard.test.ts": 836,
- "server/src/__tests__/external-object-routes.test.ts": 7481,
- "server/src/__tests__/folders-routes.test.ts": 3807,
- "server/src/__tests__/health-dev-server-token.test.ts": 7458,
- "server/src/__tests__/health.test.ts": 5117,
- "server/src/__tests__/heartbeat-dependency-scheduling.test.ts": 79302,
+ "server/src/__tests__/access-routes-hidden-floor.test.ts": 6639,
+ "server/src/__tests__/access-routes-permissions-upgrade.test.ts": 7741,
+ "server/src/__tests__/activity-routes.test.ts": 17811,
+ "server/src/__tests__/adapter-auth-signal-routes.test.ts": 16169,
+ "server/src/__tests__/adapter-model-refresh-routes.test.ts": 6016,
+ "server/src/__tests__/adapter-routes-authz.test.ts": 17641,
+ "server/src/__tests__/adapter-routes.test.ts": 6099,
+ "server/src/__tests__/agent-action-audit-routes.test.ts": 22215,
+ "server/src/__tests__/agent-adapter-validation-routes.test.ts": 97660,
+ "server/src/__tests__/agent-cross-tenant-authz-routes.test.ts": 6495,
+ "server/src/__tests__/agent-device-login-routes.test.ts": 21994,
+ "server/src/__tests__/agent-hire-auth-inheritance-routes.test.ts": 14680,
+ "server/src/__tests__/agent-hire-idempotency-routes.test.ts": 9000,
+ "server/src/__tests__/agent-instructions-routes.test.ts": 6166,
+ "server/src/__tests__/agent-live-run-routes.test.ts": 83923,
+ "server/src/__tests__/agent-permissions-routes.test.ts": 18181,
+ "server/src/__tests__/agent-runner-qualification-routes.test.ts": 7313,
+ "server/src/__tests__/agent-secrets-routes.test.ts": 7823,
+ "server/src/__tests__/agent-skills-routes.test.ts": 18777,
+ "server/src/__tests__/agent-task-hierarchy-depth-routes.test.ts": 8933,
+ "server/src/__tests__/agent-test-environment-routes.test.ts": 20840,
+ "server/src/__tests__/ai-connection-router.test.ts": 45967,
+ "server/src/__tests__/announcements-routes.test.ts": 6273,
+ "server/src/__tests__/approval-routes-idempotency.test.ts": 6232,
+ "server/src/__tests__/artifact-review-document-routes.test.ts": 10346,
+ "server/src/__tests__/assets.test.ts": 8425,
+ "server/src/__tests__/auth-routes.test.ts": 5953,
+ "server/src/__tests__/auth-session-route.test.ts": 5899,
+ "server/src/__tests__/authz-company-access.test.ts": 1875,
+ "server/src/__tests__/authz-existence-oracle-guard.test.ts": 635,
+ "server/src/__tests__/authz-secret-context.test.ts": 1538,
+ "server/src/__tests__/board-bootstrap-routes.test.ts": 6170,
+ "server/src/__tests__/board-chat-route-feature-flag.test.ts": 1470,
+ "server/src/__tests__/board-route-statement-census.test.ts": 7682,
+ "server/src/__tests__/bootstrap-claim-routes.test.ts": 5985,
+ "server/src/__tests__/browser-use-route-scope.test.ts": 5042,
+ "server/src/__tests__/built-in-agent-routes.test.ts": 14536,
+ "server/src/__tests__/cases-routes.test.ts": 25955,
+ "server/src/__tests__/cli-auth-routes.test.ts": 26802,
+ "server/src/__tests__/cloud-routes.test.ts": 5763,
+ "server/src/__tests__/companies-route-cross-company-authz.test.ts": 19729,
+ "server/src/__tests__/companies-route-path-guard.test.ts": 4382,
+ "server/src/__tests__/company-branding-route.test.ts": 11256,
+ "server/src/__tests__/company-default-decision-owner-route.test.ts": 11016,
+ "server/src/__tests__/company-import-transfer-routes.test.ts": 8458,
+ "server/src/__tests__/company-portability-routes.test.ts": 15373,
+ "server/src/__tests__/company-portability.test.ts": 10750,
+ "server/src/__tests__/company-search-extract-routes.test.ts": 7809,
+ "server/src/__tests__/company-search-rate-limit-routes.test.ts": 6535,
+ "server/src/__tests__/company-skill-policy-routes.test.ts": 7574,
+ "server/src/__tests__/company-skills-import-authz-routes.test.ts": 7772,
+ "server/src/__tests__/company-skills-routes.test.ts": 16144,
+ "server/src/__tests__/company-user-directory-route.test.ts": 6131,
+ "server/src/__tests__/cost-data-quality-routes.test.ts": 5430,
+ "server/src/__tests__/costs-service.test.ts": 5465,
+ "server/src/__tests__/decision-queues-routes.test.ts": 7812,
+ "server/src/__tests__/document-annotation-routes.test.ts": 11792,
+ "server/src/__tests__/email-routes-provider-errors.test.ts": 5673,
+ "server/src/__tests__/environment-custom-image-routes.test.ts": 5783,
+ "server/src/__tests__/environment-instance-routes.test.ts": 5242,
+ "server/src/__tests__/environment-routes.test.ts": 15517,
+ "server/src/__tests__/environment-selection-route-guards.test.ts": 5902,
+ "server/src/__tests__/execution-workspace-runtime-lease-route.test.ts": 6999,
+ "server/src/__tests__/execution-workspaces-routes.test.ts": 5351,
+ "server/src/__tests__/express5-auth-wildcard.test.ts": 738,
+ "server/src/__tests__/external-object-routes.test.ts": 6198,
+ "server/src/__tests__/folders-routes.test.ts": 5714,
+ "server/src/__tests__/health-dev-server-token.test.ts": 6574,
+ "server/src/__tests__/health.test.ts": 5679,
+ "server/src/__tests__/heartbeat-dependency-scheduling.test.ts": 78007,
"server/src/__tests__/heartbeat-issue-liveness-escalation.test.ts": 54768,
"server/src/__tests__/heartbeat-process-recovery.test.ts": 344017,
- "server/src/__tests__/heartbeat-run-privacy-routes.test.ts": 25152,
- "server/src/__tests__/inbox-agent-policy-routes.test.ts": 9188,
- "server/src/__tests__/inbox-archive-routes.test.ts": 8268,
- "server/src/__tests__/inbox-mine-routes.test.ts": 10977,
- "server/src/__tests__/instance-database-backups-routes.test.ts": 6034,
- "server/src/__tests__/instance-server-metrics-routes.test.ts": 16867,
- "server/src/__tests__/instance-settings-routes.test.ts": 5803,
- "server/src/__tests__/invite-accept-existing-member.test.ts": 6558,
- "server/src/__tests__/invite-accept-gateway-defaults.test.ts": 8151,
- "server/src/__tests__/invite-accept-replay.test.ts": 6489,
- "server/src/__tests__/invite-create-route.test.ts": 9982,
- "server/src/__tests__/invite-expiry.test.ts": 4886,
- "server/src/__tests__/invite-join-manager.test.ts": 6003,
- "server/src/__tests__/invite-list-route.test.ts": 5932,
- "server/src/__tests__/invite-logo-route.test.ts": 5533,
- "server/src/__tests__/invite-onboarding-text.test.ts": 7361,
- "server/src/__tests__/invite-rate-limit-route.test.ts": 6103,
- "server/src/__tests__/invite-summary-route.test.ts": 8714,
- "server/src/__tests__/invite-test-resolution-route.test.ts": 6673,
- "server/src/__tests__/invite-url-public-base-url.test.ts": 6521,
- "server/src/__tests__/issue-access-grants-routes.test.ts": 9735,
- "server/src/__tests__/issue-activity-events-routes.test.ts": 15122,
- "server/src/__tests__/issue-agent-mutation-ownership-routes.test.ts": 17814,
- "server/src/__tests__/issue-assigned-backlog-contract-routes.test.ts": 7165,
- "server/src/__tests__/issue-assignee-invokability-routes.test.ts": 7237,
- "server/src/__tests__/issue-attachment-routes.test.ts": 17644,
- "server/src/__tests__/issue-blocker-diagnostics-routes.test.ts": 9650,
- "server/src/__tests__/issue-chat-bootstrap-routes.test.ts": 10756,
- "server/src/__tests__/issue-closed-workspace-routes.test.ts": 7089,
- "server/src/__tests__/issue-comment-attribution-audit-routes.test.ts": 8446,
- "server/src/__tests__/issue-comment-cancel-routes.test.ts": 6164,
- "server/src/__tests__/issue-comment-reopen-routes.test.ts": 19442,
- "server/src/__tests__/issue-confirm-run-stopped-routes.test.ts": 9839,
- "server/src/__tests__/issue-create-deduplication-routes.test.ts": 9136,
- "server/src/__tests__/issue-created-from-routes.test.ts": 7614,
- "server/src/__tests__/issue-creation-source-routes.test.ts": 10770,
- "server/src/__tests__/issue-dependency-wakeups-routes.test.ts": 12551,
- "server/src/__tests__/issue-document-restore-routes.test.ts": 10496,
- "server/src/__tests__/issue-execution-policy-routes.test.ts": 8945,
- "server/src/__tests__/issue-feedback-routes.test.ts": 5778,
- "server/src/__tests__/issue-identifier-routes.test.ts": 7007,
- "server/src/__tests__/issue-list-assignee-filter-routes.test.ts": 27792,
- "server/src/__tests__/issue-list-updatedsince-filter-routes.test.ts": 8596,
- "server/src/__tests__/issue-onboarding-first-task-routes.test.ts": 14748,
- "server/src/__tests__/issue-queued-comments-routes.test.ts": 99424,
- "server/src/__tests__/issue-scheduled-retry-routes.test.ts": 22055,
- "server/src/__tests__/issue-stale-execution-lock-routes.test.ts": 9935,
- "server/src/__tests__/issue-stalled-review-decision-routes.test.ts": 17957,
- "server/src/__tests__/issue-status-version-route-service.test.ts": 8577,
- "server/src/__tests__/issue-subtree-diagnostics-routes.test.ts": 7841,
- "server/src/__tests__/issue-summaries-routes.test.ts": 9355,
- "server/src/__tests__/issue-telemetry-routes.test.ts": 10283,
- "server/src/__tests__/issue-thread-interaction-routes.test.ts": 17322,
- "server/src/__tests__/issue-tree-control-routes.test.ts": 6060,
- "server/src/__tests__/issue-update-comment-wakeup-routes.test.ts": 7306,
- "server/src/__tests__/issue-wake-diagnostics-routes.test.ts": 15170,
- "server/src/__tests__/issue-watchdogs-routes.test.ts": 15822,
- "server/src/__tests__/issue-workspace-command-authz.test.ts": 6275,
- "server/src/__tests__/issues-checkout-wakeup.test.ts": 1065,
- "server/src/__tests__/issues-goal-context-routes.test.ts": 6658,
- "server/src/__tests__/issues-service.test.ts": 35882,
- "server/src/__tests__/link-preview-routes.test.ts": 6145,
- "server/src/__tests__/llms-routes.test.ts": 6553,
- "server/src/__tests__/low-trust-red-team-routes.test.ts": 51564,
+ "server/src/__tests__/heartbeat-run-privacy-routes.test.ts": 28486,
+ "server/src/__tests__/inbox-agent-policy-routes.test.ts": 6628,
+ "server/src/__tests__/inbox-archive-routes.test.ts": 11396,
+ "server/src/__tests__/inbox-mine-routes.test.ts": 14968,
+ "server/src/__tests__/instance-database-backups-routes.test.ts": 4882,
+ "server/src/__tests__/instance-server-metrics-routes.test.ts": 15308,
+ "server/src/__tests__/instance-settings-routes.test.ts": 16324,
+ "server/src/__tests__/invite-accept-existing-member.test.ts": 5994,
+ "server/src/__tests__/invite-accept-gateway-defaults.test.ts": 7591,
+ "server/src/__tests__/invite-accept-replay.test.ts": 7498,
+ "server/src/__tests__/invite-create-route.test.ts": 9844,
+ "server/src/__tests__/invite-expiry.test.ts": 6932,
+ "server/src/__tests__/invite-join-manager.test.ts": 6848,
+ "server/src/__tests__/invite-list-route.test.ts": 5908,
+ "server/src/__tests__/invite-logo-route.test.ts": 5411,
+ "server/src/__tests__/invite-onboarding-text.test.ts": 6448,
+ "server/src/__tests__/invite-rate-limit-route.test.ts": 7713,
+ "server/src/__tests__/invite-summary-route.test.ts": 10599,
+ "server/src/__tests__/invite-test-resolution-route.test.ts": 7340,
+ "server/src/__tests__/invite-url-public-base-url.test.ts": 6951,
+ "server/src/__tests__/issue-access-grants-routes.test.ts": 10374,
+ "server/src/__tests__/issue-activity-events-routes.test.ts": 14295,
+ "server/src/__tests__/issue-agent-mutation-ownership-routes.test.ts": 20902,
+ "server/src/__tests__/issue-assigned-backlog-contract-routes.test.ts": 6256,
+ "server/src/__tests__/issue-assignee-invokability-routes.test.ts": 6983,
+ "server/src/__tests__/issue-attachment-routes.test.ts": 6170,
+ "server/src/__tests__/issue-blocker-diagnostics-routes.test.ts": 7132,
+ "server/src/__tests__/issue-chat-bootstrap-routes.test.ts": 11029,
+ "server/src/__tests__/issue-closed-workspace-routes.test.ts": 6547,
+ "server/src/__tests__/issue-comment-attribution-audit-routes.test.ts": 8661,
+ "server/src/__tests__/issue-comment-cancel-routes.test.ts": 6428,
+ "server/src/__tests__/issue-comment-reopen-routes.test.ts": 19146,
+ "server/src/__tests__/issue-confirm-run-stopped-routes.test.ts": 10495,
+ "server/src/__tests__/issue-create-deduplication-routes.test.ts": 9592,
+ "server/src/__tests__/issue-created-from-routes.test.ts": 7346,
+ "server/src/__tests__/issue-creation-source-routes.test.ts": 10757,
+ "server/src/__tests__/issue-dependency-wakeups-routes.test.ts": 11829,
+ "server/src/__tests__/issue-document-restore-routes.test.ts": 10834,
+ "server/src/__tests__/issue-execution-policy-routes.test.ts": 6791,
+ "server/src/__tests__/issue-feedback-routes.test.ts": 6080,
+ "server/src/__tests__/issue-identifier-routes.test.ts": 7464,
+ "server/src/__tests__/issue-list-assignee-filter-routes.test.ts": 19013,
+ "server/src/__tests__/issue-list-updatedsince-filter-routes.test.ts": 8205,
+ "server/src/__tests__/issue-onboarding-first-task-routes.test.ts": 17178,
+ "server/src/__tests__/issue-queued-comments-routes.test.ts": 127744,
+ "server/src/__tests__/issue-scheduled-retry-routes.test.ts": 37853,
+ "server/src/__tests__/issue-stale-execution-lock-routes.test.ts": 10115,
+ "server/src/__tests__/issue-stalled-review-decision-routes.test.ts": 9355,
+ "server/src/__tests__/issue-status-version-route-service.test.ts": 8442,
+ "server/src/__tests__/issue-subtree-diagnostics-routes.test.ts": 8416,
+ "server/src/__tests__/issue-summaries-routes.test.ts": 8058,
+ "server/src/__tests__/issue-telemetry-routes.test.ts": 8844,
+ "server/src/__tests__/issue-thread-interaction-routes.test.ts": 22774,
+ "server/src/__tests__/issue-tree-control-routes.test.ts": 5288,
+ "server/src/__tests__/issue-update-comment-wakeup-routes.test.ts": 9045,
+ "server/src/__tests__/issue-wake-diagnostics-routes.test.ts": 8382,
+ "server/src/__tests__/issue-watchdogs-routes.test.ts": 15246,
+ "server/src/__tests__/issue-workspace-command-authz.test.ts": 7758,
+ "server/src/__tests__/issues-checkout-wakeup.test.ts": 497,
+ "server/src/__tests__/issues-goal-context-routes.test.ts": 6560,
+ "server/src/__tests__/issues-service.test.ts": 31680,
+ "server/src/__tests__/link-preview-routes.test.ts": 5601,
+ "server/src/__tests__/llms-routes.test.ts": 6340,
+ "server/src/__tests__/low-trust-red-team-routes.test.ts": 49466,
"server/src/__tests__/maintenance-server-routes.test.ts": 276429,
- "server/src/__tests__/managed-agent-profile-routes-authz.test.ts": 6245,
- "server/src/__tests__/multilingual-issues-routes.test.ts": 8186,
- "server/src/__tests__/muse-qualification-routes.test.ts": 5311,
- "server/src/__tests__/native-child-task-read-routes.test.ts": 8905,
- "server/src/__tests__/onboarding-seed-route.test.ts": 7929,
- "server/src/__tests__/openapi-routes.test.ts": 19600,
- "server/src/__tests__/openclaw-invite-prompt-route.test.ts": 6484,
- "server/src/__tests__/opencode-local-adapter-environment.test.ts": 7463,
- "server/src/__tests__/openrouter-attribution.test.ts": 1697,
- "server/src/__tests__/openrouter-catalog-error-handler.test.ts": 3983,
- "server/src/__tests__/permissions-upgrade-boundary-routes.test.ts": 8104,
- "server/src/__tests__/plugin-install-route-security.test.ts": 8271,
- "server/src/__tests__/plugin-routes-authz.test.ts": 14858,
- "server/src/__tests__/plugin-scoped-api-routes.test.ts": 13393,
- "server/src/__tests__/project-decision-owner-route.test.ts": 10045,
- "server/src/__tests__/project-goal-telemetry-routes.test.ts": 5925,
- "server/src/__tests__/project-routes-env.test.ts": 8038,
- "server/src/__tests__/project-workspace-managed-sandbox-routes.test.ts": 9106,
- "server/src/__tests__/projects-list-archived-routes.test.ts": 7611,
- "server/src/__tests__/redaction.test.ts": 654,
- "server/src/__tests__/resource-memberships-routes.test.ts": 7719,
- "server/src/__tests__/routine-document-annotation-routes.test.ts": 6388,
- "server/src/__tests__/routines-e2e.test.ts": 42624,
- "server/src/__tests__/routines-routes.test.ts": 25919,
- "server/src/__tests__/secret-proposals-routes.test.ts": 34207,
- "server/src/__tests__/secrets-routes-claude-oauth-service.test.ts": 8198,
- "server/src/__tests__/secrets-routes.test.ts": 6718,
- "server/src/__tests__/sidebar-preferences-routes.test.ts": 7854,
- "server/src/__tests__/skill-update-diff-routes.test.ts": 7253,
- "server/src/__tests__/subscription-routes.test.ts": 5517,
- "server/src/__tests__/summary-slot-routes.test.ts": 13804,
- "server/src/__tests__/tailscale-connection-routes.test.ts": 5215,
- "server/src/__tests__/task-connector-read-routes.test.ts": 10338,
- "server/src/__tests__/task-title-routes.test.ts": 25360,
- "server/src/__tests__/teams-catalog-routes.test.ts": 12771,
- "server/src/__tests__/user-profile-routes.test.ts": 6490,
- "server/src/__tests__/workspace-command-authz.test.ts": 668,
- "server/src/__tests__/workspace-preferences-routes.test.ts": 5757,
- "server/src/__tests__/workspace-restore-repair-route.test.ts": 9418,
- "server/src/__tests__/workspace-runtime-routes-authz.test.ts": 6436,
- "server/src/__tests__/workspace-runtime-service-authz.test.ts": 2659
+ "server/src/__tests__/managed-agent-profile-routes-authz.test.ts": 5362,
+ "server/src/__tests__/multilingual-issues-routes.test.ts": 7327,
+ "server/src/__tests__/muse-qualification-routes.test.ts": 5898,
+ "server/src/__tests__/native-child-task-read-routes.test.ts": 7995,
+ "server/src/__tests__/onboarding-chat-route.test.ts": 9811,
+ "server/src/__tests__/onboarding-seed-route.test.ts": 9784,
+ "server/src/__tests__/openapi-routes.test.ts": 17551,
+ "server/src/__tests__/openclaw-invite-prompt-route.test.ts": 5307,
+ "server/src/__tests__/opencode-local-adapter-environment.test.ts": 7743,
+ "server/src/__tests__/openrouter-attribution.test.ts": 1044,
+ "server/src/__tests__/openrouter-catalog-error-handler.test.ts": 4947,
+ "server/src/__tests__/permissions-upgrade-boundary-routes.test.ts": 9124,
+ "server/src/__tests__/plugin-install-route-security.test.ts": 6716,
+ "server/src/__tests__/plugin-routes-authz.test.ts": 5222,
+ "server/src/__tests__/plugin-scoped-api-routes.test.ts": 4743,
+ "server/src/__tests__/project-decision-owner-route.test.ts": 8979,
+ "server/src/__tests__/project-goal-telemetry-routes.test.ts": 6838,
+ "server/src/__tests__/project-routes-env.test.ts": 7737,
+ "server/src/__tests__/project-workspace-managed-sandbox-routes.test.ts": 10278,
+ "server/src/__tests__/projects-list-archived-routes.test.ts": 8670,
+ "server/src/__tests__/redaction.test.ts": 789,
+ "server/src/__tests__/resource-memberships-routes.test.ts": 8448,
+ "server/src/__tests__/responsibility-summaries-routes.test.ts": 7816,
+ "server/src/__tests__/routine-document-annotation-routes.test.ts": 6516,
+ "server/src/__tests__/routines-e2e.test.ts": 44403,
+ "server/src/__tests__/routines-routes.test.ts": 16810,
+ "server/src/__tests__/secret-proposals-routes.test.ts": 37160,
+ "server/src/__tests__/secrets-routes-claude-oauth-service.test.ts": 18513,
+ "server/src/__tests__/secrets-routes.test.ts": 9060,
+ "server/src/__tests__/sidebar-preferences-routes.test.ts": 7858,
+ "server/src/__tests__/skill-update-diff-routes.test.ts": 7339,
+ "server/src/__tests__/subscription-routes.test.ts": 5335,
+ "server/src/__tests__/summary-slot-routes.test.ts": 13724,
+ "server/src/__tests__/tailscale-connection-routes.test.ts": 5240,
+ "server/src/__tests__/task-connector-read-routes.test.ts": 9301,
+ "server/src/__tests__/task-title-routes.test.ts": 23892,
+ "server/src/__tests__/teams-catalog-routes.test.ts": 9516,
+ "server/src/__tests__/tool-policy-list-authz.integration.test.ts": 15182,
+ "server/src/__tests__/user-profile-routes.test.ts": 6524,
+ "server/src/__tests__/workspace-command-authz.test.ts": 688,
+ "server/src/__tests__/workspace-preferences-routes.test.ts": 6332,
+ "server/src/__tests__/workspace-restore-repair-route.test.ts": 10409,
+ "server/src/__tests__/workspace-runtime-routes-authz.test.ts": 5944,
+ "server/src/__tests__/workspace-runtime-service-authz.test.ts": 2669
}
}
diff --git a/scripts/typecheck-test-programs.mjs b/scripts/typecheck-test-programs.mjs
index ef03bb1a969..837196824ab 100644
--- a/scripts/typecheck-test-programs.mjs
+++ b/scripts/typecheck-test-programs.mjs
@@ -30,11 +30,43 @@ export const PROVIDER_WORKSPACE = "scripts/typecheck-sandbox-providers";
export function defaultConcurrency({ cpus = availableParallelism(), totalMemoryBytes = totalmem() } = {}) {
const memGiB = totalMemoryBytes / 1024 ** 3;
if (cpus <= 2 || memGiB < 12) return 1;
- if (cpus <= 4) return 2;
- if (memGiB < 24) return Math.min(3, cpus);
+ if (cpus <= 4) return 3;
+ if (memGiB < 24) return Math.min(4, cpus);
return Math.min(4, cpus);
}
+// Measured CI durations (seconds, run 45440355579 / 45444347449) so concurrent
+// execution starts the heaviest programs first instead of leaving 26s tails at the end.
+export const PROGRAM_DURATION_WEIGHTS = {
+ "tests/tsconfig.playwright.json": 26.3,
+ "packages/paperclip-runner/tsconfig.test.json": 25.9,
+ "packages/db/tsconfig.test.json": 23.7,
+ "packages/paperclip-runner/tsconfig.browser.test.json": 9.6,
+ "packages/paperclip-runner/tsconfig.surfaces.test.json": 8.8,
+ "packages/plugins/sandbox-providers/daytona/tsconfig.test.json": 7.5,
+ "tests/runner-acceptance/tsconfig.json": 7.3,
+ "packages/plugins/plugin-workspace-diff/tsconfig.test.json": 7.2,
+ "packages/plugins/sdk/tsconfig.test.json": 6.8,
+ "packages/plugins/sandbox-providers/kubernetes/tsconfig.test.json": 6.6,
+ "packages/plugins/sandbox-providers/e2b/tsconfig.test.json": 5.7,
+ "packages/plugins/sandbox-providers/exe-dev/tsconfig.test.json": 5.6,
+ "packages/plugins/sandbox-providers/modal/tsconfig.test.json": 4.4,
+ "packages/plugins/sandbox-providers/createos/tsconfig.test.json": 4.2,
+ "packages/plugins/sandbox-providers/novita/tsconfig.test.json": 3.9,
+ "packages/plugins/sandbox-providers/cloudflare/tsconfig.test.json": 3.8,
+ "packages/plugins/sandbox-providers/boxd/tsconfig.test.json": 3.7,
+ "packages/plugins/examples/plugin-orchestration-smoke-example/tsconfig.test.json": 1.6,
+ "packages/kv-demo-mcp-server/tsconfig.test.json": 1.5,
+ "scripts/scale-ramp/tsconfig.json": 0.4,
+ "packages/plugins/sandbox-providers/cloudflare/bridge-template/tsconfig.test.json": 0.4,
+};
+
+export function orderProgramsLpt(programs = PROGRAMS) {
+ return [...programs].sort(
+ (left, right) => (PROGRAM_DURATION_WEIGHTS[right] ?? 5) - (PROGRAM_DURATION_WEIGHTS[left] ?? 5),
+ );
+}
+
export const SANDBOX_PROVIDERS = [
"packages/plugins/sandbox-providers/boxd",
"packages/plugins/sandbox-providers/cloudflare",
@@ -319,11 +351,22 @@ function listTrackedFiles(root) {
return result.stdout.split("\0").filter(Boolean);
}
+function projectCoverageConfigs(root, projects = PROJECTS) {
+ const hasServerDeclarations = existsSync(
+ path.join(root, "server", "node_modules", ".cache", "paperclip-typecheck", "tsconfig.declarations.json"),
+ );
+ return projects.map((project) => {
+ const layered = `${project}/tsconfig.layers.json`;
+ return hasServerDeclarations && existsSync(path.join(root, layered)) ? layered : `${project}/tsconfig.json`;
+ });
+}
+
/** Returns the test files in no program, or null if a program could not be listed. */
export function checkCoverage({
root,
env = process.env,
programs = PROGRAMS,
+ projects = PROJECTS,
workspaceConfigs = listWorkspaceConfigs,
trackedFiles = listTrackedFiles,
listFiles = listProgramFiles,
@@ -332,7 +375,7 @@ export function checkCoverage({
const checkedFiles = [];
// `pnpm build` and `typecheck:build-gaps` check each workspace's tsconfig.json.
// scripts/typecheck-test-projects.mjs checks these same files through tsconfig.layers.json.
- const projectConfigs = PROJECTS.map((project) => `${project}/tsconfig.json`);
+ const projectConfigs = projectCoverageConfigs(root, projects);
for (const config of [...workspaceConfigs(root), ...projectConfigs, ...programs]) {
const listing = listFiles(config, { cwd: root, env });
if (listing.status !== 0) {
@@ -352,6 +395,7 @@ export async function checkCoverageAsync({
root,
env = process.env,
programs = PROGRAMS,
+ projects = PROJECTS,
includeProviders = true,
onlyFiles = null,
concurrency = Math.max(1, Math.min(6, availableParallelism())),
@@ -379,7 +423,7 @@ export async function checkCoverageAsync({
const providerSet = new Set(SANDBOX_PROVIDER_PROGRAMS);
const coveragePrograms = includeProviders ? programs : programs.filter((program) => !providerSet.has(program));
- const projectConfigs = PROJECTS.map((project) => `${project}/tsconfig.json`);
+ const projectConfigs = projectCoverageConfigs(root, projects);
let configs = [...workspaceConfigs(root), ...projectConfigs, ...coveragePrograms];
if (remaining) {
@@ -560,7 +604,7 @@ export async function typecheckTestProgramsAsync({
const checkerArgs = Number.isInteger(checkers) && checkers >= 1 ? ["--checkers", String(checkers)] : [];
let exitCode = 0;
let aborted = false;
- const queue = [...programs];
+ const queue = orderProgramsLpt(programs);
const workerCount = Math.max(1, Math.min(concurrency, queue.length));
async function worker() {
while (!aborted) {
diff --git a/scripts/typecheck-test-programs.test.mjs b/scripts/typecheck-test-programs.test.mjs
index 218bccb9439..f3369ed9707 100644
--- a/scripts/typecheck-test-programs.test.mjs
+++ b/scripts/typecheck-test-programs.test.mjs
@@ -1,6 +1,6 @@
import assert from "node:assert/strict";
import { execFileSync, spawnSync } from "node:child_process";
-import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
+import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import path from "node:path";
import { test } from "node:test";
@@ -11,6 +11,7 @@ import {
defaultConcurrency,
findUncheckedTests,
LOCKED_PROVIDERS,
+ orderProgramsLpt,
PROGRAMS,
prepareTestPrograms,
PROVIDER_WORKSPACE,
@@ -244,6 +245,7 @@ test("checkCoverage uses the compiler's file list, so a dropped sibling is caugh
const unchecked = checkCoverage({
root,
programs: [`${relative}/tsconfig.json`],
+ projects: [],
workspaceConfigs: () => [],
trackedFiles: () => [`${relative}/foo.test.ts`, `${relative}/foo.test.tsx`],
});
@@ -420,7 +422,64 @@ test("checkCoverageAsync checks targeted files with early exit and skips uninsta
test("defaultConcurrency scales safely with CPU count and memory", () => {
const GiB = 1024 ** 3;
assert.equal(defaultConcurrency({ cpus: 2, totalMemoryBytes: 8 * GiB }), 1);
- assert.equal(defaultConcurrency({ cpus: 4, totalMemoryBytes: 16 * GiB }), 2);
- assert.equal(defaultConcurrency({ cpus: 8, totalMemoryBytes: 16 * GiB }), 3);
+ assert.equal(defaultConcurrency({ cpus: 4, totalMemoryBytes: 16 * GiB }), 3);
+ assert.equal(defaultConcurrency({ cpus: 8, totalMemoryBytes: 16 * GiB }), 4);
assert.equal(defaultConcurrency({ cpus: 8, totalMemoryBytes: 32 * GiB }), 4);
});
+
+test("orderProgramsLpt schedules heaviest test programs first while preserving unknown order", () => {
+ const ordered = orderProgramsLpt([
+ "packages/plugins/sdk/tsconfig.test.json",
+ "packages/db/tsconfig.test.json",
+ "tests/tsconfig.playwright.json",
+ "packages/paperclip-runner/tsconfig.test.json",
+ ]);
+ assert.equal(ordered[0], "tests/tsconfig.playwright.json");
+ assert.equal(ordered[1], "packages/paperclip-runner/tsconfig.test.json");
+ assert.equal(ordered[2], "packages/db/tsconfig.test.json");
+ assert.equal(ordered[3], "packages/plugins/sdk/tsconfig.test.json");
+});
+
+test("checkCoverageAsync prefers tsconfig.layers.json for test projects when server declarations exist", async () => {
+ const tmpRoot = mkdtempSync(path.join(tmpdir(), "coverage-layers-"));
+ try {
+ mkdirSync(path.join(tmpRoot, "tests", "e2e"), { recursive: true });
+ writeFileSync(path.join(tmpRoot, "tests", "e2e", "tsconfig.json"), "{}\n");
+ writeFileSync(path.join(tmpRoot, "tests", "e2e", "tsconfig.layers.json"), "{}\n");
+
+ const listedWithoutDecls = [];
+ await checkCoverageAsync({
+ root: tmpRoot,
+ programs: [],
+ projects: ["tests/e2e"],
+ workspaceConfigs: () => [],
+ trackedFiles: () => [],
+ listFilesAsync: async (config) => {
+ listedWithoutDecls.push(config);
+ return { status: 0, output: "", files: [] };
+ },
+ });
+ assert.deepEqual(listedWithoutDecls, ["tests/e2e/tsconfig.json"]);
+
+ mkdirSync(path.join(tmpRoot, "server", "node_modules", ".cache", "paperclip-typecheck"), { recursive: true });
+ writeFileSync(
+ path.join(tmpRoot, "server", "node_modules", ".cache", "paperclip-typecheck", "tsconfig.declarations.json"),
+ "{}\n",
+ );
+ const listedWithDecls = [];
+ await checkCoverageAsync({
+ root: tmpRoot,
+ programs: [],
+ projects: ["tests/e2e"],
+ workspaceConfigs: () => [],
+ trackedFiles: () => [],
+ listFilesAsync: async (config) => {
+ listedWithDecls.push(config);
+ return { status: 0, output: "", files: [] };
+ },
+ });
+ assert.deepEqual(listedWithDecls, ["tests/e2e/tsconfig.layers.json"]);
+ } finally {
+ rmSync(tmpRoot, { recursive: true, force: true });
+ }
+});
diff --git a/scripts/typecheck-test-projects.mjs b/scripts/typecheck-test-projects.mjs
index 8748f166b2d..239574d6cb8 100644
--- a/scripts/typecheck-test-projects.mjs
+++ b/scripts/typecheck-test-projects.mjs
@@ -32,6 +32,23 @@ export const PROJECTS = [
"tests/speko-native",
];
+// Measured CI durations (seconds, run 45440355579 / 45444347449) used to schedule
+// the slowest test projects first so they never land at the end of a lane wave.
+export const PROJECT_DURATION_WEIGHTS = {
+ "tests/runner-e2e": 21.3,
+ "server/src/__tests__/helpers/maintenance": 11.0,
+ "tests/e2e": 10.8,
+ "tests/restart-chaos": 10.7,
+ "tests/lifecycle-baseline": 7.6,
+ "tests/speko-native": 5.0,
+};
+
+export function orderProjectsLpt(projects = PROJECTS) {
+ return [...projects].sort(
+ (left, right) => (PROJECT_DURATION_WEIGHTS[right] ?? 10) - (PROJECT_DURATION_WEIGHTS[left] ?? 10),
+ );
+}
+
const GLOBAL_PROJECT_INPUTS = new Set([
"package.json",
"pnpm-lock.yaml",
diff --git a/server/scripts/typecheck-layers-incremental.test.mjs b/server/scripts/typecheck-layers-incremental.test.mjs
new file mode 100644
index 00000000000..06462583acb
--- /dev/null
+++ b/server/scripts/typecheck-layers-incremental.test.mjs
@@ -0,0 +1,196 @@
+import { spawnSync } from "node:child_process";
+import {
+ existsSync,
+ mkdirSync,
+ mkdtempSync,
+ readdirSync,
+ rmSync,
+ statSync,
+ utimesSync,
+ writeFileSync,
+} from "node:fs";
+import { tmpdir } from "node:os";
+import path from "node:path";
+import { fileURLToPath } from "node:url";
+import { afterEach, describe, expect, it } from "vitest";
+import { typecheckLayers } from "./typecheck-layers.mjs";
+
+const serverRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
+const realTsc = path.join(serverRoot, "node_modules", "typescript", "bin", "tsc");
+const outputDir = (root) => path.join(root, "node_modules", ".cache", "paperclip-typecheck");
+
+describe("typecheckLayers incremental cache soundness", () => {
+ const roots = [];
+
+ afterEach(() => {
+ for (const root of roots.splice(0)) rmSync(root, { recursive: true, force: true });
+ });
+
+ function compilerFixture() {
+ const root = mkdtempSync(path.join(tmpdir(), "typecheck-layers-inc-"));
+ roots.push(root);
+ mkdirSync(path.join(root, "src", "__tests__"), { recursive: true });
+ writeFileSync(path.join(root, "package.json"), `${JSON.stringify({ type: "module" })}\n`);
+ writeFileSync(
+ path.join(root, "tsconfig.json"),
+ `${JSON.stringify({
+ compilerOptions: {
+ target: "ES2023",
+ module: "NodeNext",
+ moduleResolution: "NodeNext",
+ strict: true,
+ skipLibCheck: true,
+ types: [],
+ },
+ include: ["src"],
+ exclude: ["src/__tests__"],
+ })}\n`,
+ );
+ writeFileSync(
+ path.join(root, "src", "__tests__", "tsconfig.json"),
+ `${JSON.stringify({
+ extends: "../../tsconfig.json",
+ compilerOptions: { noEmit: true, rootDir: "../.." },
+ include: ["."],
+ })}\n`,
+ );
+ writeFileSync(path.join(root, "src", "leaf.ts"), `export const leaf = (): number => 1;\n`);
+ writeFileSync(
+ path.join(root, "src", "one.ts"),
+ `import { leaf } from "./leaf.js";\nimport { two } from "./two.js";\nexport const one = (n = 0): number => (n > 0 ? two(n - 1) : leaf());\n`,
+ );
+ writeFileSync(
+ path.join(root, "src", "two.ts"),
+ `import { one } from "./one.js";\nexport const two = (n = 0): number => (n > 0 ? one(n - 1) : 1);\n`,
+ );
+ writeFileSync(
+ path.join(root, "src", "route.ts"),
+ `import { one } from "./one.js";\nexport const route = (): number => one();\n`,
+ );
+ writeFileSync(
+ path.join(root, "src", "route.test.ts"),
+ `import { route } from "./route.js";\nexport const routeCheck: number = route();\n`,
+ );
+ writeFileSync(
+ path.join(root, "src", "__tests__", "tree.test.ts"),
+ `import { route } from "../route.js";\nexport const treeCheck: number = route();\n`,
+ );
+ return root;
+ }
+
+ function runReal(root, options = {}) {
+ const chunks = [];
+ const status = typecheckLayers({
+ serverRoot: root,
+ log: () => {},
+ logError: (msg) => chunks.push(`${msg}\n`),
+ run: (args, { cwd }) => {
+ const result = spawnSync(process.execPath, [realTsc, ...args, "--pretty", "false"], {
+ cwd,
+ encoding: "utf8",
+ });
+ if (result.error) throw result.error;
+ chunks.push(result.stdout, result.stderr);
+ return { status: result.status ?? 1, signal: result.signal };
+ },
+ ...options,
+ });
+ return { status, output: chunks.join("") };
+ }
+
+ function backdateDirectory(dir, ageSeconds = 3600) {
+ const past = new Date(Date.now() - ageSeconds * 1000);
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
+ const fullPath = path.join(dir, entry.name);
+ if (entry.isDirectory()) backdateDirectory(fullPath, ageSeconds);
+ else utimesSync(fullPath, past, past);
+ }
+ }
+
+ it("preserves tsbuildinfo across warm runs and avoids rewriting unchanged layer configs", () => {
+ const root = compilerFixture();
+ expect(runReal(root)).toEqual({ status: 0, output: "" });
+
+ const out = outputDir(root);
+ const buildInfos = readdirSync(out).filter((name) => name.endsWith(".tsbuildinfo")).sort();
+ expect(buildInfos).toEqual(
+ expect.arrayContaining(["above.tsbuildinfo", "below.tsbuildinfo", "cycle.tsbuildinfo", "tests.tsbuildinfo"]),
+ );
+ expect(buildInfos.some((name) => name.startsWith("test-tree-"))).toBe(true);
+ expect(existsSync(path.join(out, "layer-map.json"))).toBe(true);
+
+ backdateDirectory(out, 3600);
+ const beforeMtime = statSync(path.join(out, "tsconfig.below.json")).mtimeMs;
+
+ expect(runReal(root)).toEqual({ status: 0, output: "" });
+ expect(statSync(path.join(out, "tsconfig.below.json")).mtimeMs).toBe(beforeMtime);
+ }, 60_000);
+
+ it("catches export type regressions across layers and test trees even when restored cache mtimes are older", () => {
+ const root = compilerFixture();
+ expect(runReal(root)).toEqual({ status: 0, output: "" });
+
+ // Simulate restoring a master cache onto a fresh git checkout whose source files are newer.
+ backdateDirectory(outputDir(root), 3600);
+
+ // Change route() return type from number to string; tests + test-tree must fail.
+ writeFileSync(
+ path.join(root, "src", "route.ts"),
+ `import { one } from "./one.js";\nexport const route = (): string => String(one());\n`,
+ );
+ const failed = runReal(root);
+ expect(failed.status).not.toBe(0);
+ expect(failed.output).toMatch(/route\.test\.ts.*TS2322/);
+ expect(failed.output).toMatch(/tree\.test\.ts.*TS2322/);
+ }, 60_000);
+
+ it("prunes stale declarations for deleted source files so dangling imports fail with TS2307", () => {
+ const root = compilerFixture();
+ writeFileSync(path.join(root, "src", "extra.ts"), `export const extra = 42;\n`);
+ writeFileSync(
+ path.join(root, "src", "route.ts"),
+ `import { one } from "./one.js";\nimport { extra } from "./extra.js";\nexport const route = (): number => one() + extra;\n`,
+ );
+ expect(runReal(root)).toEqual({ status: 0, output: "" });
+ expect(existsSync(path.join(outputDir(root), "dts", "extra.d.ts"))).toBe(true);
+
+ rmSync(path.join(root, "src", "extra.ts"));
+ const failed = runReal(root);
+ expect(failed.status).not.toBe(0);
+ expect(existsSync(path.join(outputDir(root), "dts", "extra.d.ts"))).toBe(false);
+ expect(failed.output).toMatch(/route\.ts.*TS2307/);
+ }, 60_000);
+
+ it("invalidates affected layers when a file moves from below to above", () => {
+ const root = compilerFixture();
+ writeFileSync(path.join(root, "src", "mover.ts"), `export const moved = (): number => 1;\n`);
+ expect(runReal(root)).toEqual({ status: 0, output: "" });
+
+ // Adding an import on `one.ts` moves `mover.ts` from `below` into `above`.
+ writeFileSync(
+ path.join(root, "src", "mover.ts"),
+ `import { one } from "./one.js";\nexport const moved = (): number => one() + 1;\n`,
+ );
+ const result = runReal(root);
+ expect(result).toEqual({ status: 0, output: "" });
+ }, 60_000);
+
+ it("starts clean when dts exists without layer-map.json or when clean is requested", () => {
+ const root = compilerFixture();
+ expect(runReal(root)).toEqual({ status: 0, output: "" });
+
+ const out = outputDir(root);
+ const orphanDts = path.join(out, "dts", "phantom.d.ts");
+ writeFileSync(orphanDts, "export declare const phantom: number;\n");
+ rmSync(path.join(out, "layer-map.json"));
+
+ expect(runReal(root)).toEqual({ status: 0, output: "" });
+ expect(existsSync(orphanDts)).toBe(false);
+ expect(existsSync(path.join(out, "layer-map.json"))).toBe(true);
+
+ const marker = path.join(out, "marker.txt");
+ writeFileSync(marker, "stale");
+ expect(runReal(root, { clean: true })).toEqual({ status: 0, output: "" });
+ expect(existsSync(marker)).toBe(false);
+ }, 60_000);
+});
diff --git a/server/scripts/typecheck-layers.mjs b/server/scripts/typecheck-layers.mjs
index dbd7a634d72..b6581f50d07 100644
--- a/server/scripts/typecheck-layers.mjs
+++ b/server/scripts/typecheck-layers.mjs
@@ -25,7 +25,7 @@
// `tsconfig.layers.json` that references tsconfig.declarations.json in the output
// directory. --declarations-only builds those layers and skips the test layers.
//
-// Usage: node scripts/typecheck-layers.mjs [--declarations-only | --layer ] [--checkers ]
+// Usage: node scripts/typecheck-layers.mjs [--declarations-only | --layer ] [--checkers ] [--clean]
import { existsSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import path from "node:path";
@@ -214,6 +214,10 @@ export function layerConfig(layer, { emptyLayers = new Set() } = {}) {
if (layer.testTree) {
return {
extends: fromOutput("src/__tests__/tsconfig.json"),
+ compilerOptions: {
+ incremental: true,
+ tsBuildInfoFile: `./${layer.name}.tsbuildinfo`,
+ },
files: layer.files.map(fromOutput),
include: [],
references,
@@ -221,7 +225,15 @@ export function layerConfig(layer, { emptyLayers = new Set() } = {}) {
}
const output =
layer.name === "tests"
- ? { composite: false, declaration: false, declarationMap: false, sourceMap: false, noEmit: true }
+ ? {
+ composite: false,
+ incremental: true,
+ tsBuildInfoFile: `./${layer.name}.tsbuildinfo`,
+ declaration: false,
+ declarationMap: false,
+ sourceMap: false,
+ noEmit: true,
+ }
: {
composite: true,
declaration: true,
@@ -279,11 +291,124 @@ function checkOneLayer({ serverRoot, name, checkers, run, log, logError }) {
return status;
}
+function writeIfChanged(filePath, content) {
+ try {
+ if (existsSync(filePath) && readFileSync(filePath, "utf8") === content) return false;
+ } catch {}
+ writeFileSync(filePath, content);
+ return true;
+}
+
+function sourceToDtsRelative(sourceFile) {
+ return sourceFile.replace(/^src\//, "").replace(/\.tsx?$/, ".d.ts");
+}
+
+function pruneStaleDeclarations(dtsRoot, expectedDts) {
+ if (!existsSync(dtsRoot)) return;
+ const walk = (directory, relativePrefix) => {
+ for (const entry of readdirSync(directory, { withFileTypes: true })) {
+ const fullPath = path.join(directory, entry.name);
+ const relative = relativePrefix ? `${relativePrefix}/${entry.name}` : entry.name;
+ if (entry.isDirectory()) {
+ walk(fullPath, relative);
+ try {
+ if (readdirSync(fullPath).length === 0) rmSync(fullPath, { recursive: true, force: true });
+ } catch {}
+ } else if (!expectedDts.has(relative)) {
+ rmSync(fullPath, { force: true });
+ }
+ }
+ };
+ walk(dtsRoot, "");
+}
+
+function syncOutputDirectory({ outputRoot, layers, emptyLayers, clean }) {
+ const layerMapPath = path.join(outputRoot, "layer-map.json");
+ const dtsRoot = path.join(outputRoot, "dts");
+ let previousLayerMap = null;
+
+ if (clean) {
+ rmSync(outputRoot, { recursive: true, force: true });
+ } else if (existsSync(outputRoot)) {
+ try {
+ previousLayerMap = JSON.parse(readFileSync(layerMapPath, "utf8"));
+ if (!previousLayerMap || typeof previousLayerMap !== "object" || Array.isArray(previousLayerMap)) {
+ previousLayerMap = null;
+ }
+ } catch {
+ previousLayerMap = null;
+ }
+ // Untracked/corrupt cache without a valid layer map starts clean to prevent stale .d.ts reuse.
+ if (previousLayerMap === null && existsSync(dtsRoot)) {
+ rmSync(outputRoot, { recursive: true, force: true });
+ }
+ }
+
+ mkdirSync(outputRoot, { recursive: true });
+
+ const currentLayerMap = {};
+ const expectedDts = new Set();
+ for (const layer of layers) {
+ if (!emitsDeclarations(layer)) continue;
+ for (const sourceFile of layer.sourceFiles) {
+ currentLayerMap[sourceFile] = layer.name;
+ expectedDts.add(sourceToDtsRelative(sourceFile));
+ }
+ }
+
+ // Invalidate any layer whose file ownership shifted, and remove stale .d.ts files for deleted/moved sources.
+ if (previousLayerMap) {
+ const invalidatedLayers = new Set();
+ for (const [sourceFile, prevLayer] of Object.entries(previousLayerMap)) {
+ const nextLayer = currentLayerMap[sourceFile];
+ if (nextLayer !== prevLayer) {
+ rmSync(path.join(dtsRoot, sourceToDtsRelative(sourceFile)), { force: true });
+ invalidatedLayers.add(prevLayer);
+ if (nextLayer) invalidatedLayers.add(nextLayer);
+ }
+ }
+ for (const layerName of invalidatedLayers) {
+ rmSync(path.join(outputRoot, `${layerName}.tsbuildinfo`), { force: true });
+ }
+ }
+ pruneStaleDeclarations(dtsRoot, expectedDts);
+
+ // Remove stale configs/tsbuildinfo for layers that no longer exist.
+ const planned = new Set(layers.map((layer) => layer.name));
+ for (const entry of readdirSync(outputRoot, { withFileTypes: true })) {
+ if (!entry.isFile()) continue;
+ const configMatch = entry.name.match(/^tsconfig\.(.+)\.json$/);
+ if (configMatch && configMatch[1] !== "declarations" && !planned.has(configMatch[1])) {
+ rmSync(path.join(outputRoot, entry.name), { force: true });
+ continue;
+ }
+ const buildInfoMatch = entry.name.match(/^(.+)\.tsbuildinfo$/);
+ if (buildInfoMatch && !planned.has(buildInfoMatch[1])) {
+ rmSync(path.join(outputRoot, entry.name), { force: true });
+ }
+ }
+
+ // Without this, the path under node_modules would make the declarations CommonJS.
+ writeIfChanged(path.join(outputRoot, "package.json"), `${JSON.stringify({ type: "module" })}\n`);
+ for (const layer of layers) {
+ writeIfChanged(
+ path.join(outputRoot, `tsconfig.${layer.name}.json`),
+ `${JSON.stringify(layerConfig(layer, { emptyLayers }), null, 2)}\n`,
+ );
+ }
+ writeIfChanged(
+ path.join(outputRoot, "tsconfig.declarations.json"),
+ `${JSON.stringify(declarationsConfig(layers), null, 2)}\n`,
+ );
+ writeIfChanged(layerMapPath, `${JSON.stringify(currentLayerMap, null, 2)}\n`);
+}
+
export function typecheckLayers({
serverRoot,
declarationsOnly = false,
layer: only,
checkers,
+ clean = false,
run = runTsc,
log = console.log,
logError = console.error,
@@ -294,21 +419,7 @@ export function typecheckLayers({
const emptyLayers = new Set(["below", "cycle", "above", "tests"].filter((name) => !planned.has(name)));
const outputRoot = path.join(serverRoot, OUTPUT_DIRECTORY);
- rmSync(outputRoot, { recursive: true, force: true });
- mkdirSync(outputRoot, { recursive: true });
- // Without this, the path under node_modules would make the declarations CommonJS.
- writeFileSync(path.join(outputRoot, "package.json"), `${JSON.stringify({ type: "module" })}\n`);
- for (const layer of layers) {
- writeFileSync(
- path.join(outputRoot, `tsconfig.${layer.name}.json`),
- `${JSON.stringify(layerConfig(layer, { emptyLayers }), null, 2)}\n`,
- );
- }
-
- writeFileSync(
- path.join(outputRoot, "tsconfig.declarations.json"),
- `${JSON.stringify(declarationsConfig(layers), null, 2)}\n`,
- );
+ syncOutputDirectory({ outputRoot, layers, emptyLayers, clean });
const extraArgs = checkerTscArgs(checkers);
let exitCode = 0;
@@ -332,6 +443,7 @@ export function typecheckLayers({
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
const args = process.argv.slice(2);
let declarationsOnly = false;
+ let clean = false;
let layer;
let checkers;
let valid = true;
@@ -339,6 +451,8 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
const arg = args[i];
if (arg === "--declarations-only") {
declarationsOnly = true;
+ } else if (arg === "--clean") {
+ clean = true;
} else if (arg === "--layer") {
layer = args[++i];
if (!layer || layer.startsWith("--")) valid = false;
@@ -351,7 +465,7 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
}
if (declarationsOnly && layer) valid = false;
if (!valid) {
- console.error("Usage: node scripts/typecheck-layers.mjs [--declarations-only | --layer ] [--checkers ]");
+ console.error("Usage: node scripts/typecheck-layers.mjs [--declarations-only | --layer ] [--checkers ] [--clean]");
process.exitCode = 2;
} else {
process.exitCode = typecheckLayers({
@@ -359,6 +473,7 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
declarationsOnly,
layer,
checkers,
+ clean,
});
}
}
diff --git a/server/scripts/typecheck-layers.test.mjs b/server/scripts/typecheck-layers.test.mjs
index 86baa6b3a3d..58d8e41ce0b 100644
--- a/server/scripts/typecheck-layers.test.mjs
+++ b/server/scripts/typecheck-layers.test.mjs
@@ -180,7 +180,12 @@ describe("layerConfig", () => {
{ emptyLayers: new Set(["cycle"]) },
);
- expect(config.compilerOptions).toMatchObject({ composite: false, noEmit: true });
+ expect(config.compilerOptions).toMatchObject({
+ composite: false,
+ incremental: true,
+ tsBuildInfoFile: "./tests.tsbuildinfo",
+ noEmit: true,
+ });
expect(config.references).toEqual([{ path: "./tsconfig.below.json" }]);
});
});
@@ -195,7 +200,10 @@ describe("layerConfig for the test tree", () => {
});
expect(config.extends).toBe("../../../src/__tests__/tsconfig.json");
- expect(config.compilerOptions).toBeUndefined();
+ expect(config.compilerOptions).toEqual({
+ incremental: true,
+ tsBuildInfoFile: "./test-tree-0.tsbuildinfo",
+ });
expect(config.files).toEqual(["../../../src/__tests__/a.test.ts"]);
expect(config.references).toEqual([{ path: "./tsconfig.below.json" }]);
});
diff --git a/server/src/__tests__/chat-channels.integration.test.ts b/server/src/__tests__/chat-channels.integration.test.ts
index 3b43fae37df..08d7ad11389 100644
--- a/server/src/__tests__/chat-channels.integration.test.ts
+++ b/server/src/__tests__/chat-channels.integration.test.ts
@@ -3240,7 +3240,12 @@ describeEmbeddedPostgres("chat channel control-plane integration", () => {
presentationDecision: { schema: "paperclip.run_presentation_decision.v1", chosenSource: "none",
commentAction: "none", reasonCodes: ["yielded_control_plane_wait"] },
} }).where(eq(heartbeatRuns.id, f.run.id));
- await githubResponseCommentService(db, f.providerFetch).processPending();
+ const responses = githubResponseCommentService(db, f.providerFetch);
+ await responses.processPending();
+ // The run waits on purpose and the task is open: the request keeps waiting.
+ expect([...f.responseComments.values()][0].body).toContain("Working on this");
+ await db.update(issues).set({ status: "done" }).where(eq(issues.id, f.conversation.issueId!));
+ await responses.processPending();
expect([...f.responseComments.values()][0].body).toContain("without publishing a final response");
});
it.each(["same_head", "new_head"] as const)("reuses one main GitHub PR comment across review requests: %s", async headCase => {
@@ -3360,6 +3365,91 @@ describeEmbeddedPostgres("chat channel control-plane integration", () => {
await responses.processPending();
expect(f.responseWrites).toHaveLength(writes);
});
+ const passiveWait = (key: string) => ({ status: "succeeded" as const, runtimeMode: "native" as const, nativePhase: "committed", resultJson: {
+ finalizationPhase: "committed", finalizationReasonCode: "external_chat_response_waiting",
+ nativeResult: { schema: "paperclip.run_result.v1", reportedWorkDisposition: "yielded",
+ continuation: { kind: "response_wake", idempotencyKey: key } },
+ presentationDecision: { schema: "paperclip.run_presentation_decision.v1", chosenSource: "none",
+ commentAction: "none", reasonCodes: ["yielded_control_plane_wait"] } } });
+ it("links a GitHub thread whose run waited to the response a later run published", async () => {
+ const f = await toolReplyFixture("github:paperclipai/paperclip:418:rc:4100");
+ const [firstId] = [...f.responseComments.keys()];
+ await db.update(heartbeatRuns).set(passiveWait("first-wait")).where(eq(heartbeatRuns.id, f.run.id));
+ const responses = githubResponseCommentService(db, f.providerFetch);
+ await responses.processPending();
+ // The run waits on purpose and the task is still open, so the thread waits too.
+ expect(f.responseComments.get(firstId)?.body).toContain("Working on this");
+ // A response on another pull request bound to the same task is not linked.
+ const [other] = await db.insert(chatConversations).values({ companyId: f.companyId, endpointId: f.endpoint.id,
+ issueId: f.conversation.issueId, externalConversationId: "github:paperclipai/paperclip",
+ externalLabel: "paperclipai/paperclip", externalThreadId: "github:paperclipai/paperclip:4180" }).returning();
+ await db.insert(chatActions).values({ companyId: f.companyId, endpointId: f.endpoint.id, conversationId: other.id,
+ kind: "github_review_publication", providerActionId: `github_publication:${randomUUID()}`, status: "processed",
+ payload: { operation: "comment", session: { companyId: f.companyId, issueId: f.conversation.issueId, runId: f.run.id } },
+ result: { id: "77", url: "https://github.com/paperclipai/paperclip/pull/4180#issuecomment-77" } });
+ await db.update(issues).set({ status: "in_progress" }).where(eq(issues.id, f.conversation.issueId!));
+ await responses.processPending();
+ expect(f.responseComments.get(firstId)?.body).toContain("Working on this");
+ const thread = makeThread({ channelId: "paperclipai/paperclip", id: f.conversation.externalThreadId }).thread;
+ await deliverMessage({ callbacks: f.callbacks, endpointId: f.endpoint.id, provider: "github", thread,
+ trigger: "mention", message: makeMessage({ id: "41802", text: "Fixed this one too", userId: "42", userName: "octocat", mentioned: true }) });
+ const [next] = await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.assignedAgentId,
+ status: "running", runtimeMode: "native", contextSnapshot: await chatWakeContext({
+ endpointId: f.endpoint.id, issueId: f.conversation.issueId, provider: "github", providerMessageId: "41802",
+ }) }).returning();
+ await githubChatReviewService(db, f.providerFetch).execute({ ...f.session, runId: next.id }, "comment",
+ { body: "Re-reviewed both threads", idempotencyKey: "later-response" });
+ await db.update(heartbeatRuns).set({ status: "succeeded" }).where(eq(heartbeatRuns.id, next.id));
+ await responses.processPending();
+ expect(f.responseComments.get(firstId)?.body).toMatch(/See the \[latest response\]\(https:\/\/github\.com\//);
+ });
+ it("links a waiting GitHub thread to a later review published only as inline findings", async () => {
+ const f = await toolReplyFixture("github:paperclipai/paperclip:418:rc:4100");
+ const [firstId] = [...f.responseComments.keys()];
+ await db.update(heartbeatRuns).set(passiveWait("inline-only-wait")).where(eq(heartbeatRuns.id, f.run.id));
+ const responses = githubResponseCommentService(db, f.providerFetch);
+ await responses.processPending();
+ expect(f.responseComments.get(firstId)?.body).toContain("Working on this");
+ const reviewId = randomUUID();
+ await db.insert(chatGitHubReviews).values({ id: reviewId, companyId: f.companyId, endpointId: f.endpoint.id,
+ issueId: f.conversation.issueId!, repositoryId: "42", repository: "paperclipai/paperclip", pullNumber: 418,
+ headSha: "b".repeat(40), deliveryId: "inline-only", configurationRevision: 1, policySnapshot: {} as never, event: {} as never,
+ state: "completed", publicationReceipts: { "finding:1": { id: "88",
+ url: "https://github.com/paperclipai/paperclip/pull/418#discussion_r88", digest: "d" } } });
+ await db.insert(chatActions).values({ companyId: f.companyId, endpointId: f.endpoint.id, conversationId: f.conversation.id,
+ kind: "github_review_publication", providerActionId: `github_publication:${randomUUID()}`, status: "processed",
+ payload: { operation: "assessment", reviewId, session: { companyId: f.companyId, issueId: f.conversation.issueId, runId: f.run.id } },
+ result: { reviewId, summaryUrl: null } });
+ await db.update(issues).set({ status: "done" }).where(eq(issues.id, f.conversation.issueId!));
+ await responses.processPending();
+ // The outgoing-text projection drops URL fragments, so the link names the pull request.
+ expect(f.responseComments.get(firstId)?.body).toContain("See the [latest response](https://github.com/paperclipai/paperclip/pull/418)");
+ expect(f.responseComments.get(firstId)?.body).not.toContain("ended without publishing");
+ });
+ it("settles a waiting GitHub thread once the task finishes without a later response", async () => {
+ const f = await toolReplyFixture("github:paperclipai/paperclip:418:rc:4100");
+ const [firstId] = [...f.responseComments.keys()];
+ await db.update(heartbeatRuns).set(passiveWait("only-wait")).where(eq(heartbeatRuns.id, f.run.id));
+ const responses = githubResponseCommentService(db, f.providerFetch);
+ await responses.processPending();
+ expect(f.responseComments.get(firstId)?.body).toContain("Working on this");
+ await db.update(issues).set({ status: "done" }).where(eq(issues.id, f.conversation.issueId!));
+ await responses.processPending();
+ expect(f.responseComments.get(firstId)?.body).toContain("ended without publishing a final response");
+ });
+ it("settles a GitHub thread whose run's final reply could not be published", async () => {
+ const f = await toolReplyFixture("github:paperclipai/paperclip:418:rc:4100");
+ const [firstId] = [...f.responseComments.keys()];
+ await db.update(heartbeatRuns).set({ status: "succeeded", runtimeMode: "native", nativePhase: "committed", resultJson: {
+ finalizationPhase: "committed", finalizationReasonCode: "governed_gate_pending",
+ responsePublication: { schema: "paperclip.native_response_publication.v1", state: "failed", attempts: 6,
+ reasonCode: "native_response_publication_failed", lastReason: "publication_refused", nextAttemptAt: null } } })
+ .where(eq(heartbeatRuns.id, f.run.id));
+ await db.update(issues).set({ status: "done" }).where(eq(issues.id, f.conversation.issueId!));
+ const responses = githubResponseCommentService(db, f.providerFetch);
+ for (let pass = 0; pass < 2; pass++) await responses.processPending();
+ expect(f.responseComments.get(firstId)?.body).toContain("reply could not be published");
+ });
it("ignores a review request addressed to an external GitHub bot", async () => {
const f = await subscribedGitHubFixture("github:paperclipai/paperclip:419");
const wakeCount = f.wakeup.mock.calls.length;
diff --git a/server/src/__tests__/google-workspace-mcp-transport.test.ts b/server/src/__tests__/google-workspace-mcp-transport.test.ts
new file mode 100644
index 00000000000..2e55d43f3a7
--- /dev/null
+++ b/server/src/__tests__/google-workspace-mcp-transport.test.ts
@@ -0,0 +1,430 @@
+import { randomUUID } from "node:crypto";
+import { and, eq } from "drizzle-orm";
+import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
+import {
+ agents, companies, companyMemberships, createDb, heartbeatRuns, issues, issueThreadInteractions,
+ toolAccessAuditEvents, toolActionRequests, toolCatalogEntries, toolInvocations,
+} from "@paperclipai/db";
+import {
+ GOOGLE_WORKSPACE_DEFAULT_SELECTION, GOOGLE_WORKSPACE_TOOL_TRANSPORT, googleWorkspaceServiceToolNames,
+ type GoogleWorkspaceService, type GoogleWorkspaceToolTransport,
+} from "@paperclipai/shared";
+import * as restDispatch from "../services/google-workspace-rest-dispatch.js";
+import { issueThreadInteractionService } from "../services/issue-thread-interactions.js";
+import { forgetMcpHttpSessions, MCP_MODERN_PROTOCOL_VERSION } from "../services/mcp-http.js";
+import { toolAccessService } from "../services/tool-access.js";
+import { createToolGatewayService } from "../services/tool-gateway.js";
+import { instanceSettingsService } from "../services/instance-settings.js";
+import { initializeRunIdentity } from "../services/run-identity.js";
+import type { PaperclipCloudConnector } from "../services/paperclip-cloud-connector.js";
+import { getEmbeddedPostgresTestSupport, startEmbeddedPostgresTestDatabase } from "./helpers/embedded-postgres.js";
+
+vi.mock("../services/google-sign-in-availability.js", () => ({ paperclipGoogleSignInAvailable: () => true }));
+
+vi.mock("../services/google-workspace-rest-dispatch.js", async (importOriginal) => {
+ const actual = await importOriginal();
+ return {
+ ...actual,
+ callGoogleWorkspaceRest: vi.fn(actual.callGoogleWorkspaceRest),
+ probeGoogleWorkspaceRest: vi.fn(actual.probeGoogleWorkspaceRest),
+ };
+});
+
+const scope = (value: string) => `https://www.googleapis.com/auth/${value}`;
+const LAUNCH_SERVICES = ["gmail", "drive", "docs", "sheets", "slides", "calendar"] as const;
+const HOSTS: Record<(typeof LAUNCH_SERVICES)[number], string> = {
+ gmail: "gmailmcp.googleapis.com", drive: "drivemcp.googleapis.com", docs: "docsmcp.googleapis.com",
+ sheets: "sheetsmcp.googleapis.com", slides: "slidesmcp.googleapis.com", calendar: "calendarmcp.googleapis.com",
+};
+const FORBIDDEN: Record = {
+ "gmailmcp.googleapis.com": ["send_message", "send_draft", "unlabel_thread", "modify_labels", "trash_message"],
+ "drivemcp.googleapis.com": ["delete_file", "trash_file", "share_file", "update_permissions"],
+ "calendarmcp.googleapis.com": ["delete_calendar"],
+ "docsmcp.googleapis.com": ["delete_doc"],
+};
+const SCHEMAS: Record> = {
+ get_message: { type: "object", properties: { messageId: { type: "string" }, messageFormat: { type: "string" } }, required: ["messageId"] },
+ list_threads: { type: "object", properties: { pageSize: { type: "integer" }, pageToken: { type: "string" }, query: { type: "string" }, labelIds: { type: "array", items: { type: "string" } } } },
+ create_draft: { type: "object", properties: { to: { type: "array", items: { type: "string" } }, subject: { type: "string" }, body: { type: "string" } } },
+ get_file_metadata: { type: "object", properties: { fileId: { type: "string" } }, required: ["fileId"] },
+ update_doc: {
+ type: "object",
+ properties: {
+ documentId: { type: "string" },
+ requests: { type: "array", items: { type: "object" } },
+ writeControl: { type: "object", additionalProperties: false, properties: { requiredRevisionId: { type: "string" }, targetRevisionId: { type: "string" } } },
+ },
+ required: ["documentId", "requests"],
+ },
+ update_presentation: { type: "object", properties: { presentationId: { type: "string" }, requests: { type: "array", items: { type: "object" } } } },
+};
+const DEFAULT_PERMISSIONS = ["gmail.readonly", "gmail.compose", "drive.readonly", "drive.file", "documents.readonly", "documents",
+ "spreadsheets.readonly", "spreadsheets", "presentations.readonly", "presentations", "calendar.calendarlist.readonly", "calendar.events",
+ "calendar.events.freebusy"];
+const READ_ONLY_PERMISSIONS = ["gmail.readonly", "drive.readonly", "documents.readonly", "spreadsheets.readonly", "presentations.readonly",
+ "calendar.calendarlist.readonly", "calendar.events.freebusy", "calendar.events.readonly"];
+const allowlisted = (keep: (name: string) => boolean = () => true) => LAUNCH_SERVICES
+ .flatMap((service) => googleWorkspaceServiceToolNames(service).map((name) => `${service}__${name}`)).filter(keep).sort();
+const names = (catalog: Array<{ toolName: string }>) => catalog.map((entry) => entry.toolName).sort();
+
+type Confirmation = "none" | "legacy" | "modern";
+
+interface Recorded { host: string; method: string; name?: string; body: Record }
+
+function fakeGoogle(options: { confirm?: Confirmation } = {}) {
+ const requests: Recorded[] = [];
+ const replies: Array> = [];
+ const waiting = new Map) => void>();
+ const restHosts: string[] = [];
+ let sessions = 0;
+ let asks = 0;
+ const sse = (message: unknown) => new TextEncoder().encode(`data: ${JSON.stringify(message)}\n\n`);
+ const confirmation = { message: "Apply 2 edits to the document \"Plan\"?", requestedSchema: { type: "object", properties: {} } };
+ const outcome = (accepted: boolean) => accepted
+ ? { content: [{ type: "text", text: "Applied 2 edits." }] }
+ : { isError: true, content: [{ type: "text", text: "The user did not confirm the edit. Nothing was changed." }] };
+ const handle = async (href: string, init: RequestInit): Promise => {
+ const url = new URL(href);
+ if (!url.hostname.endsWith("mcp.googleapis.com")) {
+ restHosts.push(`${url.hostname}${url.pathname}`);
+ if (url.pathname === "/gmail/v1/users/me/profile") return Response.json({ emailAddress: "owner@example.test" });
+ if (url.pathname === "/gmail/v1/users/me/messages/msg1") {
+ return Response.json({ id: "msg1", threadId: "t1", payload: { mimeType: "text/plain", headers: [], body: { size: 2, data: "aGk" } } });
+ }
+ return Response.json({ error: { code: 404, message: "Not found" } }, { status: 404 });
+ }
+ const body = JSON.parse(String(init.body));
+ const headers = new Headers(init.headers);
+ requests.push({ host: url.hostname, method: body.method ?? "(reply)", name: body.params?.name, body });
+ if (body.method === "server/discover" && options.confirm === "modern") {
+ return Response.json({ jsonrpc: "2.0", id: body.id, result: { supportedVersions: [MCP_MODERN_PROTOCOL_VERSION], capabilities: { tools: {} } } });
+ }
+ if (body.method === "initialize") {
+ return Response.json({ jsonrpc: "2.0", id: body.id, result: { protocolVersion: "2025-06-18", capabilities: { tools: {} }, serverInfo: { name: "google-fixture", version: "1" } } },
+ { headers: { "Mcp-Session-Id": `google-${++sessions}` } });
+ }
+ if (options.confirm === "legacy" && !headers.get("mcp-session-id")) {
+ return Response.json({ jsonrpc: "2.0", id: null, error: { code: -32000, message: "Bad Request: No valid session ID provided" } }, { status: 400 });
+ }
+ if (body.method === "notifications/initialized") return new Response(null, { status: 202 });
+ if (!body.method && body.id) {
+ replies.push(body);
+ waiting.get(String(body.id))?.(body);
+ return new Response(null, { status: 202 });
+ }
+ if (body.method === "tools/list") {
+ const service = (Object.keys(HOSTS) as Array).find((key) => HOSTS[key] === url.hostname)!;
+ const tools = [...googleWorkspaceServiceToolNames(service), ...(FORBIDDEN[url.hostname] ?? [])].map((name) => ({
+ name, description: `Google's ${name}.`, inputSchema: SCHEMAS[name] ?? { type: "object" },
+ annotations: { readOnlyHint: /^(get|list|search|read|download|suggest)_/.test(name) },
+ }));
+ return Response.json({ jsonrpc: "2.0", id: body.id, result: { tools } });
+ }
+ if (body.method !== "tools/call") return Response.json({ jsonrpc: "2.0", id: body.id, error: { code: -32601, message: "Method not found" } });
+ const asksConfirmation = body.params.name === "update_doc" && options.confirm && options.confirm !== "none";
+ if (asksConfirmation && options.confirm === "modern") {
+ const answer = body.params.inputResponses?.confirm;
+ if (!answer) {
+ return Response.json({ jsonrpc: "2.0", id: body.id, result: { resultType: "input_required", requestState: "edit-1",
+ inputRequests: { confirm: { method: "elicitation/create", params: { mode: "form", ...confirmation } } } } });
+ }
+ return Response.json({ jsonrpc: "2.0", id: body.id, result: outcome(answer.action === "accept") });
+ }
+ if (asksConfirmation) {
+ const stream = new ReadableStream({
+ async start(controller) {
+ const askId = `ask-${++asks}`;
+ const reply = new Promise>((resolve) => waiting.set(askId, resolve));
+ controller.enqueue(sse({ jsonrpc: "2.0", id: askId, method: "elicitation/create", params: confirmation }));
+ const answer = await reply;
+ controller.enqueue(sse({ jsonrpc: "2.0", id: body.id, result: outcome(answer.result?.action === "accept") }));
+ controller.close();
+ },
+ });
+ return new Response(stream, { headers: { "content-type": "text/event-stream" } });
+ }
+ if (body.params.name === "get_event") {
+ const eventId = String(body.params.arguments?.eventId ?? "");
+ if (eventId === "missing") return Response.json({ jsonrpc: "2.0", id: body.id, result: { isError: true, content: [{ type: "text", text: "Not found" }] } });
+ const event = eventId === "series1" ? { id: eventId, summary: "Standup", recurrence: ["RRULE:FREQ=WEEKLY"] }
+ : eventId.startsWith("series1_") ? { id: eventId, summary: "Standup", recurringEventId: "series1" }
+ : { id: eventId, summary: "Lunch" };
+ return Response.json({ jsonrpc: "2.0", id: body.id, result: { content: [{ type: "text", text: JSON.stringify(event) }], structuredContent: event } });
+ }
+ return Response.json({ jsonrpc: "2.0", id: body.id, result: { content: [{ type: "text", text: `ok from Google MCP ${body.params.name}` }] } });
+ };
+ return {
+ handle, requests, replies, restHosts,
+ calls: () => requests.filter((request) => request.method === "tools/call").map((request) => `${request.host} ${request.name}`),
+ edits: () => replies.filter((reply) => reply.result?.action === "accept").length,
+ };
+}
+
+const support = await getEmbeddedPostgresTestSupport();
+(support.supported ? describe : describe.skip)("Google Workspace tools on Google's MCP servers", () => {
+ let db: ReturnType;
+ let database: Awaited>;
+ const savedTransport = { ...GOOGLE_WORKSPACE_TOOL_TRANSPORT };
+
+ beforeAll(async () => {
+ database = await startEmbeddedPostgresTestDatabase("paperclip-google-mcp-transport-");
+ db = createDb(database.connectionString);
+ await instanceSettingsService(db).updateExperimental({ enableGoogleWorkspaceConnector: true });
+ }, 90_000);
+ afterAll(async () => {
+ await database?.cleanup();
+ });
+ afterEach(() => {
+ Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, savedTransport);
+ vi.mocked(restDispatch.callGoogleWorkspaceRest).mockClear();
+ vi.mocked(restDispatch.probeGoogleWorkspaceRest).mockClear();
+ });
+
+ function useTransport(transport: GoogleWorkspaceToolTransport) {
+ for (const service of LAUNCH_SERVICES) GOOGLE_WORKSPACE_TOOL_TRANSPORT[service as GoogleWorkspaceService] = transport;
+ }
+
+ async function connectWorkspace(options: { permissions?: string[]; askFirst?: string[]; off?: string[]; confirm?: Confirmation } = {}) {
+ const google = fakeGoogle({ confirm: options.confirm });
+ const permissions = (options.permissions ?? DEFAULT_PERMISSIONS).map(scope);
+ const [company] = await db.insert(companies).values({ name: `Google MCP ${randomUUID()}`, issuePrefix: `GM${randomUUID().slice(0, 6).toUpperCase()}` }).returning();
+ const userId = `google-mcp-${randomUUID()}`;
+ await db.insert(companyMemberships).values({ companyId: company!.id, principalType: "user", principalId: userId, status: "active", membershipRole: "owner" });
+ const actor = { actorType: "user" as const, actorId: userId };
+ const credentials = () => ({
+ v: 1 as const, accessToken: "workspace-access", refreshToken: "workspace-refresh", tokenType: "Bearer",
+ accessTokenExpiresAt: new Date(Date.now() + 86_400_000).toISOString(), refreshTokenExpiresAt: null, scopes: permissions,
+ subject: userId, companyId: company!.id, instanceId: "test-instance", environment: "development" as const,
+ provider: "google" as const, profile: "workspace.all" as const,
+ });
+ const connector = {
+ getCapabilities: vi.fn(async () => ["workspace.all"]),
+ startAuthorization: vi.fn(async ({ returnState }: { returnState: string }) => ({
+ authorizationUrl: `https://accounts.google.com/o/oauth2/v2/auth?state=${encodeURIComponent(returnState)}`,
+ expiresAt: new Date(Date.now() + 600_000).toISOString(),
+ })),
+ claim: vi.fn(async () => credentials()),
+ refresh: vi.fn(async () => credentials()),
+ revoke: vi.fn(async () => undefined),
+ } as unknown as PaperclipCloudConnector;
+ const remoteHttpRequest = vi.fn(google.handle);
+ const service = toolAccessService(db, {
+ paperclipCloudConnector: connector,
+ remoteHttpEndpointLookup: async () => [{ address: "8.8.8.8", family: 4 }],
+ remoteHttpRequest,
+ });
+ const connected = await service.connectGalleryApp(company!.id, {
+ galleryKey: "google-workspace", grantKind: "organization", connectionMethodKey: "paperclip-workspace",
+ }, actor);
+ const started = await service.startOAuth(company!.id, connected.connectionId, {
+ redirectUri: "https://paperclip.example/api/tools/oauth/cloud-connector/callback", actor, workspaceServices: GOOGLE_WORKSPACE_DEFAULT_SELECTION,
+ });
+ const completed = await service.completePaperclipCloudConnectorCallback({
+ state: new URL(started.authorizationUrl).searchParams.get("state")!, claimId: "fixture", actor,
+ });
+ const [agent] = await db.insert(agents).values({ companyId: company!.id, name: `Workspace ${randomUUID()}`, role: "engineer",
+ adapterType: "process", adapterConfig: {}, runtimeConfig: {} }).returning();
+ await service.finishGalleryAppConnection(company!.id, connected.connectionId, {
+ enabledCatalogEntryIds: completed.catalog.filter((entry) => !options.off?.includes(entry.toolName)).map((entry) => entry.id),
+ askFirstCatalogEntryIds: completed.catalog.filter((entry) => options.askFirst?.includes(entry.toolName)).map((entry) => entry.id),
+ access: { agentIds: [agent!.id] },
+ }, actor);
+ const [issue] = await db.insert(issues).values({ companyId: company!.id, title: "Tidy the plan", status: "in_progress", assigneeAgentId: agent!.id }).returning();
+ const [run] = await db.insert(heartbeatRuns).values({ companyId: company!.id, agentId: agent!.id, invocationSource: "assignment",
+ status: "running", contextSnapshot: { issueId: issue!.id } }).returning();
+ await initializeRunIdentity(db, { companyId: company!.id, runId: run!.id, issueId: issue!.id, responsibleUserId: null, cause: "company_default" });
+ const gateway = createToolGatewayService(db, { toolActionSigningSecret: "google-mcp-signing", remoteHttpRequest, oauthGrantRefresher: service.refreshOAuthGrantCredentials });
+ const session = await gateway.createSession({ companyId: company!.id, agentId: agent!.id, runId: run!.id });
+ const listed = async () => (await gateway.listToolsForSession(session.token)).filter((tool) => tool.connectionId === connected.connectionId);
+ const toolNamed = async (name: string) => {
+ const tool = (await listed()).find((item) => item.upstreamToolName === name);
+ expect(tool, name).toBeTruthy();
+ return tool!;
+ };
+ const call = async (name: string, parameters: unknown) =>
+ gateway.executeTool({ sessionToken: session.token, tool: (await toolNamed(name)).name, parameters, timeoutMs: 5_000 });
+ const interactions = issueThreadInteractionService(db);
+ return {
+ company: company!, actor, agent: agent!, issue: issue!, service, gateway, connectionId: connected.connectionId, catalog: completed.catalog,
+ google, listed, toolNamed, call,
+ cards: () => db.select().from(issueThreadInteractions)
+ .where(and(eq(issueThreadInteractions.companyId, company!.id), eq(issueThreadInteractions.issueId, issue!.id))),
+ skip: (cardId: string) => interactions.skipInteraction({ id: issue!.id, companyId: company!.id }, cardId, {}, { userId }),
+ confirm: (cardId: string) => interactions.answerQuestions({ id: issue!.id, companyId: company!.id }, cardId,
+ { answers: [{ questionId: "continue", optionIds: ["continue"] }] }, { userId }),
+ invocations: () => db.select().from(toolInvocations).where(eq(toolInvocations.companyId, company!.id)),
+ audit: (action: string) => db.select().from(toolAccessAuditEvents).where(and(eq(toolAccessAuditEvents.companyId, company!.id), eq(toolAccessAuditEvents.action, action))),
+ };
+ }
+
+ it("ships Gmail, Drive, Docs, Sheets, Slides and Calendar on Google's MCP servers", () => {
+ expect(Object.fromEntries(LAUNCH_SERVICES.map((service) => [service, GOOGLE_WORKSPACE_TOOL_TRANSPORT[service]])))
+ .toEqual(Object.fromEntries(LAUNCH_SERVICES.map((service) => [service, "google_mcp"])));
+ });
+
+ it("offers agents only the allowlisted actions, whatever Google's servers list", async () => {
+ const f = await connectWorkspace();
+ expect(names(f.catalog.filter((entry) => entry.status === "active"))).toEqual(allowlisted());
+ const offered = (await f.listed()).map((tool) => tool.upstreamToolName ?? "").sort();
+ expect(offered).toEqual(allowlisted());
+ for (const forbidden of Object.values(FORBIDDEN).flat()) expect(offered.some((name) => name.endsWith(`__${forbidden}`))).toBe(false);
+ expect(offered.some((name) => /^(chat|people|search)__/.test(name))).toBe(false);
+ expect(f.google.calls()).toEqual([]);
+ expect(f.google.restHosts).toEqual([]);
+ expect(restDispatch.probeGoogleWorkspaceRest).not.toHaveBeenCalled();
+ });
+
+ it("discovers a read-only grant with tools/list only, from the granted services, and offers only reads", async () => {
+ const f = await connectWorkspace({ permissions: READ_ONLY_PERMISSIONS });
+ const writes = new Set(["gmail__create_draft", "drive__create_file", "drive__copy_file", "docs__update_doc", "sheets__update_spreadsheet",
+ "sheets__update_values", "sheets__update_formulas", "sheets__insert_dimension", "slides__update_presentation",
+ "calendar__create_event", "calendar__update_event", "calendar__delete_event", "calendar__respond_to_event"]);
+ expect(names(f.catalog)).toEqual(allowlisted((name) => !writes.has(name)));
+ expect(f.catalog.every((entry) => entry.riskLevel === "read")).toBe(true);
+ const listing = new Set(["server/discover", "initialize", "notifications/initialized", "tools/list"]);
+ expect(f.google.requests.filter((request) => !listing.has(request.method))).toEqual([]);
+ expect(f.google.calls()).toEqual([]);
+
+ const gmailOnly = await connectWorkspace({ permissions: ["gmail.readonly"] });
+ expect(new Set(gmailOnly.google.requests.map((request) => request.host))).toEqual(new Set(["gmailmcp.googleapis.com"]));
+ expect(gmailOnly.google.calls()).toEqual([]);
+ });
+
+ it("keeps readable action names, Off, Ask first and the activity log for MCP calls", async () => {
+ const f = await connectWorkspace({ askFirst: ["gmail__create_draft"], off: ["gmail__search_threads"] });
+ const read = await f.toolNamed("gmail__get_message");
+ expect(read.displayName).toBe("Gmail: Read a message");
+ expect(f.catalog.find((entry) => entry.toolName === "docs__update_doc")?.title).toBe("Docs: Edit a document");
+ expect((await f.listed()).map((tool) => tool.upstreamToolName)).not.toContain("gmail__search_threads");
+
+ await expect(f.call("gmail__get_message", { messageId: "msg1" })).resolves.toMatchObject({ status: "completed" });
+ expect(f.google.calls()).toEqual(["gmailmcp.googleapis.com get_message"]);
+ const [completed] = await f.audit("call_completed");
+ expect(JSON.stringify(completed)).toContain("https://gmailmcp.googleapis.com/mcp/v1");
+ expect(JSON.stringify(completed)).not.toContain("workspace-access");
+
+ const draft = { to: ["sam@example.test"], subject: "Thursday", body: "Thursday works." };
+ await expect(f.call("gmail__create_draft", draft)).rejects.toMatchObject({ reasonCode: "approval_required" });
+ expect(f.google.calls()).toEqual(["gmailmcp.googleapis.com get_message"]);
+ const [action] = await db.select().from(toolActionRequests).where(eq(toolActionRequests.companyId, f.company.id));
+ await expect(f.gateway.approveActionRequest({ companyId: f.company.id, actionRequestId: action!.id, actor: { userId: f.actor.actorId } }))
+ .resolves.toMatchObject({ status: "executed" });
+ expect(f.google.calls()).toEqual(["gmailmcp.googleapis.com get_message", "gmailmcp.googleapis.com create_draft"]);
+ expect(restDispatch.callGoogleWorkspaceRest).not.toHaveBeenCalled();
+ });
+
+ describe("argument checks before anything is sent to Google", () => {
+ it.each([
+ ["an argument the tool does not list", "gmail__list_threads", { q: "subject:marker-123" }, "unknown argument \"q\". Accepted arguments: query, labelIds, pageSize, pageToken."],
+ ["an unknown field in a closed structured argument", "docs__update_doc",
+ { documentId: "doc1", requests: [{ insertText: { text: "Hi", location: { index: 1 } } }], writeControl: { revision: "r1" } }, "unknown argument \"revision\" in writeControl."],
+ ["a list of Drive file IDs", "drive__get_file_metadata", { fileId: "file1,file2" }, "fileId must be one Google file ID"],
+ ["a Drive link in place of a file ID", "drive__get_file_metadata", { fileId: "https://drive.google.com/file/d/file1/view" }, "fileId must be one Google file ID"],
+ ["a Docs edit that reads another file", "docs__update_doc",
+ { documentId: "doc1", requests: [{ insertRichLink: { uri: "https://docs.google.com/document/d/other", location: { index: 1 } } }] }, "insertRichLink inserts a smart chip"],
+ ["a Docs image from a Drive link", "docs__update_doc",
+ { documentId: "doc1", requests: [{ insertInlineImage: { uri: "https://drive.google.com/uc?id=secret", location: { index: 1 } } }] }, "takes its picture from a Google Drive or Docs link"],
+ ["a Docs request kind not on the closed list", "docs__update_doc",
+ { documentId: "doc1", requests: [{ futureKind: {} }] }, "futureKind is not a request kind this tool accepts"],
+ ["a Slides import from another presentation", "slides__update_presentation",
+ { presentationId: "deck1", requests: [{ importSlides: { presentationId: "other" } }] }, "importSlides copies slides from another presentation"],
+ ])("refuses %s", async (_label, tool, parameters, reason) => {
+ const f = await connectWorkspace();
+ await expect(f.call(tool, parameters)).rejects.toMatchObject({ status: 502, reasonCode: "tool_error", message: expect.stringContaining(reason) });
+ expect(f.google.calls()).toEqual([]);
+ const failed = (await f.invocations()).filter((invocation) => invocation.status === "failed");
+ expect(failed).toEqual([expect.objectContaining({ errorCode: "tool_error", errorMessage: expect.stringContaining("Nothing was sent to Google.") })]);
+ const audit = await f.audit("call_failed");
+ expect(audit).toHaveLength(1);
+ expect(JSON.stringify(audit[0])).toContain("\"dispatched\":false");
+ });
+
+ it("reads the event first and refuses to delete a whole recurring series", async () => {
+ const f = await connectWorkspace();
+ await expect(f.call("calendar__delete_event", { calendarId: "primary", eventId: "series1" })).rejects.toMatchObject({
+ status: 502, reasonCode: "tool_error", message: expect.stringContaining("This ID is a whole recurring series"),
+ });
+ await expect(f.call("calendar__delete_event", { calendarId: "primary", eventId: "missing" })).rejects.toMatchObject({
+ status: 502, reasonCode: "tool_error", message: expect.stringContaining("Nothing was deleted."),
+ });
+ expect(f.google.calls()).toEqual(["calendarmcp.googleapis.com get_event", "calendarmcp.googleapis.com get_event"]);
+ const audit = await f.audit("call_failed");
+ expect(audit).toHaveLength(2);
+ expect(JSON.stringify(audit)).toContain("\"dispatched\":false");
+
+ await expect(f.call("calendar__delete_event", { calendarId: "primary", eventId: "series1_20261124T100000Z" })).resolves.toMatchObject({ status: "completed" });
+ await expect(f.call("calendar__delete_event", { eventId: "lunch1" })).resolves.toMatchObject({ status: "completed" });
+ expect(f.google.calls().slice(2)).toEqual(["calendarmcp.googleapis.com get_event", "calendarmcp.googleapis.com delete_event",
+ "calendarmcp.googleapis.com get_event", "calendarmcp.googleapis.com delete_event"]);
+ expect(f.google.requests.filter((request) => request.name === "get_event").map((request) => request.body.params.arguments))
+ .toEqual([{ calendarId: "primary", eventId: "series1" }, { calendarId: "primary", eventId: "missing" },
+ { calendarId: "primary", eventId: "series1_20261124T100000Z" }, { eventId: "lunch1" }]);
+ });
+
+ it("sends a valid edit and a public image link unchanged", async () => {
+ const f = await connectWorkspace();
+ const edit = { documentId: "doc1", requests: [{ insertInlineImage: { uri: "https://example.test/logo.png", location: { index: 1 } } }],
+ writeControl: { requiredRevisionId: "rev-1" } };
+ await expect(f.call("docs__update_doc", edit)).resolves.toMatchObject({ status: "completed" });
+ await expect(f.call("drive__get_file_metadata", { fileId: "file_1-A" })).resolves.toMatchObject({ status: "completed" });
+ expect(f.google.calls()).toEqual(["docsmcp.googleapis.com update_doc", "drivemcp.googleapis.com get_file_metadata"]);
+ expect(f.google.requests.find((request) => request.name === "update_doc")!.body.params.arguments).toEqual(edit);
+ });
+ });
+
+ describe.each(["legacy", "modern"] as const)("a confirmation Google's %s server asks for", (confirm) => {
+ const edit = { documentId: "doc1", requests: [{ insertText: { text: "Hi", location: { index: 1 } } }, { insertText: { text: "There", location: { index: 3 } } }] };
+
+ it("reaches a person on a question card, and a declined confirmation fails cleanly with nothing changed", async () => {
+ const f = await connectWorkspace({ confirm });
+ await expect(f.call("docs__update_doc", edit)).rejects.toMatchObject({ reasonCode: "elicitation_required" });
+ const [card] = await f.cards();
+ expect(card).toMatchObject({ kind: "ask_user_questions", status: "pending", requestedResolverPolicy: "human_only" });
+ expect(card!.payload).toMatchObject({ questionSet: { description: "Apply 2 edits to the document \"Plan\"?" } });
+ expect(f.google.edits()).toBe(0);
+
+ await expect(f.call("docs__update_doc", edit)).rejects.toMatchObject({ reasonCode: "elicitation_required" });
+ expect(await f.cards()).toHaveLength(1);
+ expect(f.google.edits()).toBe(0);
+
+ await f.skip(card!.id);
+ await expect(f.call("docs__update_doc", edit)).rejects.toMatchObject({ status: 502, reasonCode: "tool_error",
+ message: expect.stringContaining("did not confirm the edit") });
+ expect(f.google.edits()).toBe(0);
+ const responses = confirm === "legacy"
+ ? f.google.replies.map((reply) => reply.result.action)
+ : f.google.requests.filter((request) => request.body.params?.inputResponses).map((request) => request.body.params.inputResponses.confirm.action);
+ expect(responses.at(-1)).toBe("decline");
+ expect(responses).not.toContain("accept");
+ });
+
+ it("completes the edit once the person confirms", async () => {
+ const f = await connectWorkspace({ confirm });
+ await expect(f.call("docs__update_doc", edit)).rejects.toMatchObject({ reasonCode: "elicitation_required" });
+ const [card] = await f.cards();
+ await f.confirm(card!.id);
+ await expect(f.call("docs__update_doc", edit)).resolves.toMatchObject({ status: "completed" });
+ });
+ });
+
+ it("moves a connection saved on REST back to Google's MCP servers with no action held for review, keeping Off and Ask first", async () => {
+ useTransport("paperclip_rest");
+ const f = await connectWorkspace({ permissions: ["gmail.readonly", "gmail.compose", "documents.readonly"],
+ off: ["gmail__search_threads"], askFirst: ["gmail__create_draft"] });
+ expect(f.google.restHosts).toContain("gmail.googleapis.com/gmail/v1/users/me/profile");
+ useTransport("google_mcp");
+ forgetMcpHttpSessions(f.connectionId);
+
+ const refreshed = await f.service.refreshCatalog(f.connectionId, f.actor);
+ expect(refreshed.catalog.filter((entry) => entry.status !== "active")).toEqual([]);
+ const saved = await db.select().from(toolCatalogEntries).where(eq(toolCatalogEntries.connectionId, f.connectionId));
+ expect(saved.find((entry) => entry.toolName === "gmail__get_message")?.inputSchema).toEqual(SCHEMAS.get_message);
+ const offered = (await f.listed()).map((tool) => tool.upstreamToolName);
+ expect(offered).toContain("gmail__get_message");
+ expect(offered).not.toContain("gmail__search_threads");
+ await expect(f.call("gmail__get_message", { messageId: "msg1" })).resolves.toMatchObject({ status: "completed" });
+ expect(f.google.calls()).toEqual(["gmailmcp.googleapis.com get_message"]);
+ await expect(f.call("gmail__create_draft", { to: ["sam@example.test"], subject: "Thursday", body: "Thursday works." }))
+ .rejects.toMatchObject({ reasonCode: "approval_required" });
+ });
+});
diff --git a/server/src/__tests__/google-workspace-rest-transport.test.ts b/server/src/__tests__/google-workspace-rest-transport.test.ts
index c603cbe9fc7..202fe66f3e1 100644
--- a/server/src/__tests__/google-workspace-rest-transport.test.ts
+++ b/server/src/__tests__/google-workspace-rest-transport.test.ts
@@ -1,6 +1,6 @@
import { randomUUID } from "node:crypto";
import { and, eq, inArray } from "drizzle-orm";
-import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
+import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import {
agents, companies, companyMemberships, connectionGrants, createDb, heartbeatRuns, issues,
toolAccessAuditEvents, toolActionRequests, toolCallEvents, toolCatalogEntries, toolInvocations,
@@ -84,6 +84,10 @@ const GOOGLE_MCP_SCHEMAS: Record> = {
},
required: ["documentId", "requests"],
},
+ create_draft: {
+ type: "object",
+ properties: { to: { type: "array", items: { type: "string" } }, subject: { type: "string" }, body: { type: "string" } },
+ },
get_message: {
type: "object",
properties: { messageId: { type: "string" }, messageFormat: { type: "string", enum: ["MINIMAL", "FULL_CONTENT", "METADATA_ONLY"] } },
@@ -96,6 +100,14 @@ const support = await getEmbeddedPostgresTestSupport();
let db: ReturnType;
let database: Awaited>;
const savedTransport = { ...GOOGLE_WORKSPACE_TOOL_TRANSPORT };
+ const REST_TRANSPORT: Record = {
+ ...savedTransport, gmail: "paperclip_rest", drive: "paperclip_rest", docs: "paperclip_rest",
+ sheets: "paperclip_rest", slides: "paperclip_rest", calendar: "paperclip_rest",
+ };
+
+ beforeEach(() => {
+ Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, REST_TRANSPORT);
+ });
beforeAll(async () => {
database = await startEmbeddedPostgresTestDatabase("paperclip-google-rest-transport-");
@@ -503,10 +515,11 @@ const support = await getEmbeddedPostgresTestSupport();
["calendar__create_event", { summary: "Planning", startTime: "2026-11-24T10:00:00Z", endTime: "2026-11-24T10:30:00Z", timeZone: "UTC" }, "www.googleapis.com POST /calendar/v3/calendars/primary/events"],
];
- it("puts exactly the six launch services on paperclip_rest and leaves the rest on google_mcp", () => {
+ it("ships every service on google_mcp, and the REST fallback still covers the six launch services", () => {
+ expect(Object.values(savedTransport).every((transport) => transport === "google_mcp")).toBe(true);
expect(Object.entries(GOOGLE_WORKSPACE_TOOL_TRANSPORT).filter(([, transport]) => transport === "paperclip_rest").map(([service]) => service).sort())
.toEqual([...LAUNCH_SERVICES].sort());
- expect(GOOGLE_WORKSPACE_TOOL_TRANSPORT).toMatchObject({ chat: "google_mcp", people: "google_mcp", search: "google_mcp" });
+ expect(restDispatch.googleWorkspaceRestTransportGaps(REST_TRANSPORT)).toEqual([]);
});
it("lists all 36 allowlisted actions for a full read & write grant without contacting a Google MCP server", async () => {
@@ -586,7 +599,7 @@ const support = await getEmbeddedPostgresTestSupport();
for (const service of LAUNCH_SERVICES) useTransport(service, "google_mcp");
const f = await connectWorkspace();
expect(names(f.catalog)).toEqual(["docs__read_doc", "gmail__create_draft", "gmail__get_message", "gmail__search_threads"]);
- Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, savedTransport);
+ Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, REST_TRANSPORT);
const refreshed = await f.service.refreshCatalog(f.connectionId, f.actor);
expect(names(refreshed.catalog)).toEqual(gmailCatalog(true));
expect(refreshed.catalog.filter((entry) => entry.status !== "active")).toEqual([]);
@@ -603,7 +616,7 @@ const support = await getEmbeddedPostgresTestSupport();
expect(saved.inputSchema).toEqual(GOOGLE_MCP_SCHEMAS.update_doc);
const before = await f.toolNamed("docs__update_doc");
expect(before.parametersSchema).toMatchObject({ required: ["documentId", "requests"] });
- Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, savedTransport);
+ Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, REST_TRANSPORT);
f.restRequests.length = 0;
const refreshesBefore = f.mcpRequests.length;
@@ -667,7 +680,7 @@ const support = await getEmbeddedPostgresTestSupport();
.filter((tool) => tool.connectionId === f.connectionId).map((tool) => tool.upstreamToolName).sort();
expect(await listed()).toEqual(["docs__read_doc", "gmail__create_draft"]);
- Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, savedTransport);
+ Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, REST_TRANSPORT);
const refreshed = await f.service.refreshCatalog(f.connectionId, f.actor);
expect(refreshed.catalog.find((entry) => entry.toolName === "gmail__get_message")).toMatchObject({ status: "active", quarantineReason: null });
expect(refreshed.catalog.filter((entry) => entry.status !== "active")).toEqual([]);
@@ -690,7 +703,7 @@ const support = await getEmbeddedPostgresTestSupport();
.filter((tool) => tool.connectionId === f.connectionId).map((tool) => tool.upstreamToolName).sort();
const draft = { to: ["sam@example.test"], subject: "Thursday", body: "Thursday works." };
- Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, savedTransport);
+ Object.assign(GOOGLE_WORKSPACE_TOOL_TRANSPORT, REST_TRANSPORT);
expect(await listed()).toEqual(["docs__read_doc", "gmail__search_threads"]);
for (let refresh = 0; refresh < 2; refresh += 1) {
const refreshed = await f.service.refreshCatalog(f.connectionId, f.actor);
diff --git a/server/src/__tests__/heartbeat-issue-liveness-escalation.test.ts b/server/src/__tests__/heartbeat-issue-liveness-escalation.test.ts
index 079942f9e60..ee0c51be0c9 100644
--- a/server/src/__tests__/heartbeat-issue-liveness-escalation.test.ts
+++ b/server/src/__tests__/heartbeat-issue-liveness-escalation.test.ts
@@ -1314,6 +1314,174 @@ describeEmbeddedPostgres("heartbeat resolved dependency wake reconciliation", ()
expect(result.existingWakeSkipped).toBe(1);
});
+ async function seedFailedDependencyWakes(input: {
+ companyId: string;
+ agentId: string;
+ blockedIssueId: string;
+ blockerIssueId: string;
+ count: number;
+ lastFinishedAt: Date;
+ contextOnly?: boolean;
+ }) {
+ // Production shape: the blocker finished long ago, then each woken run failed
+ // and left the task blocked in a new cycle, so every wake carries a different
+ // cycle-aware idempotency key.
+ const blockerChangedAt = new Date(input.lastFinishedAt.getTime() - 60 * 60_000);
+ await db.update(issues).set({ status: "done", completedAt: blockerChangedAt })
+ .where(eq(issues.id, input.blockerIssueId));
+ await db.update(issueRelations).set({ createdAt: blockerChangedAt })
+ .where(eq(issueRelations.relatedIssueId, input.blockedIssueId));
+ for (let index = input.count - 1; index >= 0; index -= 1) {
+ const finishedAt = new Date(input.lastFinishedAt.getTime() - index * 20_000);
+ const requestedAt = new Date(finishedAt.getTime() - 15_000);
+ const [run] = await db.insert(heartbeatRuns).values({
+ companyId: input.companyId,
+ agentId: input.agentId,
+ // Promoted wakes bind the task only in the context snapshot.
+ issueId: input.contextOnly ? null : input.blockedIssueId,
+ status: "failed",
+ errorCode: "native_session_interrupted",
+ startedAt: requestedAt,
+ finishedAt,
+ contextSnapshot: { issueId: input.blockedIssueId, wakeReason: "issue_blockers_resolved" },
+ }).returning();
+ await db.insert(agentWakeupRequests).values({
+ companyId: input.companyId,
+ agentId: input.agentId,
+ source: "automation",
+ triggerDetail: "system",
+ reason: "issue_blockers_resolved",
+ payload: {
+ issueId: input.blockedIssueId,
+ resolvedBlockerIssueId: input.blockerIssueId,
+ blockerIssueIds: [input.blockerIssueId],
+ },
+ status: "completed",
+ runId: run.id,
+ requestedAt,
+ finishedAt,
+ idempotencyKey: buildIssueBlockersResolvedWakeStateKey({
+ dependentIssueId: input.blockedIssueId,
+ blockerIssueIds: [input.blockerIssueId],
+ blockedTransitionAt: new Date(requestedAt.getTime() - 1_000),
+ }),
+ });
+ }
+ await db.update(issues).set({ blockedTransitionAt: new Date(input.lastFinishedAt.getTime() + 1_000) })
+ .where(eq(issues.id, input.blockedIssueId));
+ }
+
+ async function countDependencyWakes(companyId: string) {
+ const rows = await db.select({ id: agentWakeupRequests.id }).from(agentWakeupRequests)
+ .where(and(eq(agentWakeupRequests.companyId, companyId), eq(agentWakeupRequests.reason, "issue_blockers_resolved")));
+ return rows.length;
+ }
+
+ it("backs off re-waking a blocked task whose resolved-dependency runs keep failing", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
+ await seedFailedDependencyWakes({ ...fixture, count: 3, lastFinishedAt: new Date(Date.now() - 30_000) });
+ const deadlines: number[] = [];
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({
+ issueId: fixture.blockedIssueId, onDeferredDeadline: (at: number) => deadlines.push(at),
+ });
+
+ expect(result.healed).toBe(0);
+ expect(result.failedWakeBackoffSkipped).toBe(1);
+ expect(result.repeatedFailureIssueIds).toEqual([fixture.blockedIssueId]);
+ expect(deadlines).toHaveLength(1);
+ expect(deadlines[0]).toBeGreaterThan(Date.now() + 20 * 60_000);
+ expect(await countDependencyWakes(fixture.companyId)).toBe(3);
+ });
+
+ it("counts failed runs bound to the task only through their context", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
+ await seedFailedDependencyWakes({ ...fixture, count: 2, lastFinishedAt: new Date(Date.now() - 30_000), contextOnly: true });
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({ issueId: fixture.blockedIssueId });
+
+ expect(result.healed).toBe(0);
+ expect(result.failedWakeBackoffSkipped).toBe(1);
+ });
+
+ it("wakes again once the failure backoff has passed", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
+ await seedFailedDependencyWakes({ ...fixture, count: 1, lastFinishedAt: new Date(Date.now() - 10 * 60_000) });
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({ issueId: fixture.blockedIssueId });
+
+ expect(result.healed).toBe(1);
+ });
+
+ it("resets the failure backoff after a later successful run on the task", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
+ await seedFailedDependencyWakes({ ...fixture, count: 3, lastFinishedAt: new Date(Date.now() - 60_000) });
+ await db.insert(heartbeatRuns).values({
+ companyId: fixture.companyId, agentId: fixture.agentId, issueId: fixture.blockedIssueId, status: "succeeded",
+ startedAt: new Date(Date.now() - 30_000), finishedAt: new Date(Date.now() - 20_000),
+ contextSnapshot: { issueId: fixture.blockedIssueId, wakeReason: "issue_assigned" },
+ });
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({ issueId: fixture.blockedIssueId });
+
+ expect(result.healed).toBe(1);
+ });
+
+ it("resets the failure backoff when the blocker set is edited", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
+ await seedFailedDependencyWakes({ ...fixture, count: 3, lastFinishedAt: new Date(Date.now() - 60_000) });
+ await db.insert(activityLog).values({
+ companyId: fixture.companyId, actorType: "user", actorId: "board-user", action: "issue.blockers_updated",
+ entityType: "issue", entityId: fixture.blockedIssueId,
+ details: { blockedByIssueIds: [fixture.blockerIssueId], removedBlockedByIssueIds: [randomUUID()] },
+ createdAt: new Date(Date.now() - 10_000),
+ });
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({ issueId: fixture.blockedIssueId });
+
+ expect(result.healed).toBe(1);
+ });
+
+ it("resets the failure backoff when a blocker finalizes newer work", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "finalized" });
+ await seedFailedDependencyWakes({ ...fixture, count: 3, lastFinishedAt: new Date(Date.now() - 60_000) });
+ await db.update(workspaceOperations).set({ finishedAt: new Date(Date.now() - 2 * 60 * 60_000) })
+ .where(eq(workspaceOperations.issueId, fixture.blockerIssueId));
+ await db.insert(workspaceOperations).values({
+ companyId: fixture.companyId, executionWorkspaceId: fixture.executionWorkspaceId, issueId: fixture.blockerIssueId,
+ phase: "workspace_finalize", status: "succeeded", startedAt: new Date(Date.now() - 20_000),
+ finishedAt: new Date(Date.now() - 10_000),
+ });
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({ issueId: fixture.blockedIssueId });
+
+ expect(result.healed).toBe(1);
+ });
+
+ it("resets the failure backoff when workspace recovery saves newer blocker work", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
+ await seedFailedDependencyWakes({ ...fixture, count: 3, lastFinishedAt: new Date(Date.now() - 60_000) });
+ await db.insert(workspaceOperations).values({
+ companyId: fixture.companyId, executionWorkspaceId: null, issueId: fixture.blockerIssueId,
+ phase: "workspace_finalize", status: "succeeded", metadata: { owningService: "workspace_recovery" },
+ startedAt: new Date(Date.now() - 20_000), finishedAt: new Date(Date.now() - 10_000),
+ });
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({ issueId: fixture.blockedIssueId });
+
+ expect(result.healed).toBe(1);
+ });
+
+ it("resets the failure backoff when a blocker produces a newer result", async () => {
+ const fixture = await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
+ await seedFailedDependencyWakes({ ...fixture, count: 3, lastFinishedAt: new Date(Date.now() - 60_000) });
+ await db.update(issues).set({ completedAt: new Date(Date.now() - 10_000) }).where(eq(issues.id, fixture.blockerIssueId));
+
+ const result = await heartbeatService(db).reconcileResolvedDependencyWakes({ issueId: fixture.blockedIssueId });
+
+ expect(result.healed).toBe(1);
+ });
+
it("does not re-wake an assignee agent that opened the current blocked cycle itself", async () => {
const { companyId, agentId, blockedIssueId } =
await seedResolvedDependencyBackstopFixture({ workspaceState: "none" });
diff --git a/server/src/__tests__/heartbeat-provider-limit-wait.test.ts b/server/src/__tests__/heartbeat-provider-limit-wait.test.ts
index 3a778c6003d..53a267155e8 100644
--- a/server/src/__tests__/heartbeat-provider-limit-wait.test.ts
+++ b/server/src/__tests__/heartbeat-provider-limit-wait.test.ts
@@ -4,18 +4,32 @@ import { tmpdir } from "node:os";
import path from "node:path";
import { eq } from "drizzle-orm";
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
-import { agents, authUsers, companies, companyMemberships, createDb, heartbeatRunEvents, heartbeatRuns, issues } from "@paperclipai/db";
+import {
+ activityLog, agents, authUsers, companies, companyMemberships, connectionGrants, createDb, heartbeatRunEvents, heartbeatRuns, issues,
+ aiProviderDefaults, toolApplications, toolConnectionInstalls, toolConnections,
+} from "@paperclipai/db";
import { registerServerAdapter, unregisterServerAdapter } from "../adapters/index.js";
import { heartbeatService } from "../services/heartbeat.js";
-import { createProviderLimitWait } from "../services/heartbeat/provider-limit-wait.js";
+import { createProviderLimitWait, releaseProviderLimitWaits } from "../services/heartbeat/provider-limit-wait.js";
+import { agentService } from "../services/agents.js";
+import { aiConnectionService } from "../services/ai-connections.js";
+import { toolAccessService } from "../services/tool-access.js";
import { executionProjectionsForRuns } from "../services/execution-projection.js";
import { recoveryPostgresSupport, startRecoveryPostgres } from "./helpers/recovery-postgres.js";
const providerLimitCancellation = vi.hoisted(() => ({ after: null as null | (() => Promise) }));
+const releaseFailure = vi.hoisted(() => ({ next: false }));
vi.mock("../services/heartbeat/provider-limit-wait.js", async importOriginal => {
const actual = await importOriginal();
return {
...actual,
+ releaseProviderLimitWaits: async (...args: Parameters) => {
+ if (releaseFailure.next) {
+ releaseFailure.next = false;
+ throw new Error("release step failed");
+ }
+ return actual.releaseProviderLimitWaits(...args);
+ },
createProviderLimitWait: (...[database, deps]: Parameters) =>
actual.createProviderLimitWait(database, {
...deps,
@@ -28,6 +42,18 @@ vi.mock("../services/heartbeat/provider-limit-wait.js", async importOriginal =>
};
});
+const retryDispatchNotice = vi.hoisted(() => ({ before: null as null | ((transaction: object) => Promise) }));
+vi.mock("../services/run-dispatch-notifications.js", async importOriginal => {
+ const actual = await importOriginal();
+ return {
+ ...actual,
+ notifyScheduledRetryDispatch: async (...args: Parameters) => {
+ await retryDispatchNotice.before?.(args[0]);
+ return actual.notifyScheduledRetryDispatch(...args);
+ },
+ };
+});
+
const describePostgres = recoveryPostgresSupport.supported ? describe : describe.skip;
if (!recoveryPostgresSupport.supported) console.warn(`Skipping provider limit wait tests: ${recoveryPostgresSupport.reason}`);
@@ -232,4 +258,370 @@ describePostgres("heartbeat provider usage limit wait", () => {
retryability: "unknown", message: "ACP agent reported a terminal limit failure." } } }]);
expect(dispatched.has((await wake(unrelated)).id)).toBe(true);
}, 60_000);
+
+ /**
+ * A usage limit belongs to the account it was reported on. Connecting a
+ * different account, or revoking the limited one, ends the hold; the same
+ * account stays held.
+ */
+ describe("account-scoped holds", () => {
+ type Account = { connectionId: string; grantId: string };
+
+ async function accounts(companyId: string, count: number): Promise {
+ const [application] = await db.insert(toolApplications)
+ .values({ companyId, name: `AI accounts ${randomUUID()}`, type: "mcp_http" }).returning();
+ const created: Account[] = [];
+ for (let index = 0; index < count; index += 1) {
+ const [connection] = await db.insert(toolConnections).values({ companyId, applicationId: application.id, uid: randomUUID(),
+ name: `AI account ${index}`, connectionPurpose: "ai", transport: "runtime_auth", authKind: "none" }).returning();
+ const [grant] = await db.insert(connectionGrants).values({ companyId, connectionId: connection.id, kind: "organization" }).returning();
+ created.push({ connectionId: connection.id, grantId: grant.id });
+ }
+ return created;
+ }
+
+ const binding = (account: Account) => ({ mode: "shared", provider: "google", method: "subscription", ...account });
+
+ /** A turn on `account` that the provider refused with a quota reset days away. */
+ const quotaOn = (account: Account) => ({
+ status: "failed",
+ startedAt: new Date(Date.now() - 7 * 60_000),
+ finishedAt: new Date(Date.now() - 5 * 60_000),
+ errorCode: "native_provider_usage_limit",
+ contextSnapshot: { aiConnection: { mode: "shared", provider: "google", method: "subscription", ...account } },
+ resultJson: { providerFailure: { schema: "paperclip.provider-failure.v1", provider: "antigravity", phase: "turn",
+ category: "quota_exhausted", httpStatus: 429, providerCode: "RESOURCE_EXHAUSTED", retryability: "requires_action",
+ retryAt: new Date(Date.now() + 6 * 24 * 60 * 60_000).toISOString(), message: "Usage limit reached for this account." } },
+ });
+
+ /** An agent bound to `bound`, whose earlier turn hit the quota on `limited`. */
+ async function heldFixture(options: { count?: number } = {}) {
+ const f = await seed([]);
+ const list = await accounts(f.companyId, options.count ?? 2);
+ await db.update(agents).set({ runtimeConfig: { aiConnection: binding(list[0]) } }).where(eq(agents.id, f.agentId));
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, invocationSource: "automation",
+ triggerDetail: "system", ...quotaOn(list[0]) });
+ return { ...f, accounts: list };
+ }
+
+ async function deferDirect(f: { companyId: string; agentId: string; issueId: string }, environment: {
+ early?: () => Promise<"host" | "managed" | null | "undecided">; dispatch?: "host" | "managed" | null;
+ } = {}) {
+ const [agent] = await db.select().from(agents).where(eq(agents.id, f.agentId));
+ const [run] = await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, status: "running",
+ invocationSource: "automation", triggerDetail: "system", contextSnapshot: { issueId: f.issueId } }).returning();
+ const deps = {
+ setRunStatusIfRunning: vi.fn(async () => ({ updated: true, run: { ...run, status: "cancelled" } })),
+ setWakeupStatus: vi.fn(async () => undefined),
+ appendRunEvent: vi.fn(async () => undefined),
+ scheduleBoundedRetryForRun: vi.fn(async () => ({ outcome: "scheduled" })),
+ releaseIssueExecutionAndPromote: vi.fn(async () => undefined),
+ finalizeAgentStatus: vi.fn(async () => undefined),
+ ...(environment.early ? { sshAuthentication: environment.early } : {}),
+ };
+ const deferred = await createProviderLimitWait(db, deps as never)
+ .deferRunForProviderLimit(run, agent, { resumingAdmittedRun: false, conversation: false,
+ ...(environment.dispatch !== undefined ? { sshAuthentication: environment.dispatch } : {}) });
+ return { deferred, deps };
+ }
+
+ async function scheduledRetry(agentId: string) {
+ const rows = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.agentId, agentId));
+ return rows.find(row => row.status === "scheduled_retry") ?? null;
+ }
+
+ it("keeps holding the account that reported the limit, with the plain message", async () => {
+ const f = await heldFixture();
+ const finished = await wake(f);
+ expect(dispatched.has(finished.id)).toBe(false);
+ expect(finished).toMatchObject({ status: "cancelled", errorCode: "provider_limit_wait",
+ resultJson: { providerLimitWait: { resetReported: true, category: "quota_exhausted", grantId: f.accounts[0].grantId } } });
+ expect(finished.error).toMatch(/^This agent's provider usage limit has a reported reset at .+ Work is held/);
+ }, 60_000);
+
+ it("starts a run whose agent now uses a different connected account", async () => {
+ const f = await heldFixture();
+ await db.update(agents).set({ runtimeConfig: { aiConnection: binding(f.accounts[1]) } }).where(eq(agents.id, f.agentId));
+ const { deferred, deps } = await deferDirect(f);
+ expect(deferred).toBe(false);
+ expect(deps.setRunStatusIfRunning).not.toHaveBeenCalled();
+ });
+
+ it("follows the user's default account when the agent uses its responsible user's default", async () => {
+ const f = await seed([]);
+ const userId = `limit-user-${f.companyId}`;
+ const [application] = await db.insert(toolApplications)
+ .values({ companyId: f.companyId, name: `Personal AI ${randomUUID()}`, type: "mcp_http" }).returning();
+ const personal: Account[] = [];
+ for (const name of ["Personal A", "Personal B"]) {
+ const [connection] = await db.insert(toolConnections).values({ companyId: f.companyId, applicationId: application.id,
+ uid: randomUUID(), name, connectionPurpose: "ai", transport: "runtime_auth", authKind: "none", enabled: true,
+ status: "active", healthStatus: "ok", config: { ai: { provider: "google", method: "subscription" }, aiIsolatedSubscription: true } }).returning();
+ const [grant] = await db.insert(connectionGrants).values({ companyId: f.companyId, connectionId: connection.id,
+ kind: "user", subjectUserId: userId }).returning();
+ await db.insert(toolConnectionInstalls).values({ companyId: f.companyId, connectionId: connection.id,
+ targetType: "company", targetId: f.companyId });
+ personal.push({ connectionId: connection.id, grantId: grant.id });
+ }
+ // The agent names no account; each run uses its responsible user's default.
+ await db.update(agents).set({ adapterType: "paperclip_runner", adapterConfig: { provider: "acpx", acpxAgent: "antigravity" },
+ runtimeConfig: { aiConnection: { mode: "responsible_user", provider: "google", method: "subscription" } } })
+ .where(eq(agents.id, f.agentId));
+ await db.insert(aiProviderDefaults).values({ companyId: f.companyId, userId, provider: "google", grantId: personal[0].grantId });
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, invocationSource: "automation",
+ triggerDetail: "system", ...quotaOn(personal[0]) });
+ const deferAs = async () => {
+ const [agent] = await db.select().from(agents).where(eq(agents.id, f.agentId));
+ const [run] = await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, status: "running",
+ invocationSource: "automation", triggerDetail: "system", responsibleUserId: userId,
+ contextSnapshot: { issueId: f.issueId } }).returning();
+ return createProviderLimitWait(db, {
+ setRunStatusIfRunning: async () => ({ updated: true, run: { ...run, status: "cancelled" } }),
+ setWakeupStatus: async () => undefined, appendRunEvent: async () => undefined,
+ scheduleBoundedRetryForRun: async () => ({ outcome: "scheduled" }),
+ releaseIssueExecutionAndPromote: async () => undefined, finalizeAgentStatus: async () => undefined,
+ } as never).deferRunForProviderLimit(run, agent, { resumingAdmittedRun: false, conversation: false });
+ };
+ expect(await deferAs()).toBe(true);
+ // A task already waiting on account A, saved by an earlier hold.
+ const [wait] = await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, status: "cancelled",
+ invocationSource: "automation", triggerDetail: "system", errorCode: "provider_limit_wait",
+ startedAt: new Date(Date.now() - 60_000), finishedAt: new Date(Date.now() - 60_000),
+ resultJson: { providerLimitWait: { grantId: personal[0].grantId } }, contextSnapshot: { issueId: f.issueId } }).returning();
+ const [waiting] = await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, status: "scheduled_retry",
+ invocationSource: "automation", triggerDetail: "system", retryOfRunId: wait.id, scheduledRetryAttempt: 1,
+ scheduledRetryReason: "ai_connection_pool_wait", scheduledRetryAt: new Date(Date.now() + 24 * 60 * 60_000),
+ contextSnapshot: { issueId: f.issueId } }).returning();
+
+ // The user picks account B as their default; the route then releases
+ // waits whose limit was on the previous default.
+ const { previousGrantId } = await aiConnectionService(db).setDefault(f.companyId, userId, personal[1].grantId);
+ expect(previousGrantId).toBe(personal[0].grantId);
+ expect(await deferAs()).toBe(false);
+ expect(await releaseProviderLimitWaits(db, { companyId: f.companyId, reason: "ai_connection_changed",
+ grantIds: [previousGrantId!] })).toEqual([waiting.id]);
+ const [released] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, waiting.id));
+ expect(released.scheduledRetryAt!.getTime()).toBeLessThanOrEqual(Date.now());
+ });
+
+ it("ignores a limit on an account that expired or needs a new sign-in", async () => {
+ for (const status of ["expired", "needs_reauthorization"] as const) {
+ const f = await heldFixture();
+ await db.update(connectionGrants).set({ status }).where(eq(connectionGrants.id, f.accounts[0].grantId));
+ expect((await deferDirect(f)).deferred).toBe(false);
+ }
+ });
+
+ it("keeps holding the bound account when another account later reports a billing refusal", async () => {
+ const f = await heldFixture();
+ // Account B's newer refusal needs billing action and names no reset.
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, invocationSource: "automation",
+ triggerDetail: "system", ...quotaOn(f.accounts[1]), startedAt: new Date(Date.now() - 2 * 60_000), finishedAt: new Date(Date.now() - 60_000),
+ resultJson: { providerFailure: { schema: "paperclip.provider-failure.v1", provider: "antigravity", phase: "turn",
+ category: "quota_exhausted", retryability: "requires_action", message: "Check your plan and billing details." } } });
+ expect((await deferDirect(f)).deferred).toBe(true);
+ });
+
+ it("checks the host's own account when the harness signs in with a preconfigured home", async () => {
+ const f = await heldFixture();
+ await db.update(agents).set({ adapterType: "paperclip_runner", adapterConfig: { provider: "acpx", acpxAgent: "antigravity", homeMode: "preconfigured" } })
+ .where(eq(agents.id, f.agentId));
+ // The saved account's limit does not hold a run that will use the host sign-in.
+ expect((await deferDirect(f)).deferred).toBe(false);
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, invocationSource: "automation",
+ triggerDetail: "system", ...quotaOn(f.accounts[0]), contextSnapshot: {} });
+ // A limit reported on the host sign-in does.
+ expect((await deferDirect(f)).deferred).toBe(true);
+ });
+
+ it("checks a task's own environment only once dispatch knows which account it signs in with", async () => {
+ // Account A (the agent's binding) is limited; the host sign-in is not.
+ const f = await heldFixture();
+ // Before preparation the task's environment is undecided, so nothing is held yet.
+ expect((await deferDirect(f, { early: async () => "undecided" })).deferred).toBe(false);
+ // A low-trust environment with managed credentials uses account A: held.
+ expect((await deferDirect(f, { dispatch: "managed" })).deferred).toBe(true);
+ // One that keeps the host's login does not use account A: not held.
+ expect((await deferDirect(f, { dispatch: "host" })).deferred).toBe(false);
+ });
+
+ it("holds a host limit when the task's environment keeps the host login, and not when it uses managed credentials", async () => {
+ const f = await heldFixture();
+ await db.delete(heartbeatRuns).where(eq(heartbeatRuns.agentId, f.agentId));
+ // Only the host sign-in is limited.
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, invocationSource: "automation",
+ triggerDetail: "system", ...quotaOn(f.accounts[0]), contextSnapshot: {} });
+ expect((await deferDirect(f, { dispatch: "host" })).deferred).toBe(true);
+ expect((await deferDirect(f, { dispatch: "managed" })).deferred).toBe(false);
+ });
+
+ it("clears a limit only after a success on the same account", async () => {
+ const f = await heldFixture();
+ const succeededOn = (account: Account) => ({ status: "succeeded", startedAt: new Date(Date.now() - 2 * 60_000),
+ finishedAt: new Date(Date.now() - 60_000), contextSnapshot: { aiConnection: { grantId: account.grantId } } });
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, invocationSource: "automation",
+ triggerDetail: "system", ...succeededOn(f.accounts[1]) });
+ expect((await deferDirect(f)).deferred).toBe(true);
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, invocationSource: "automation",
+ triggerDetail: "system", ...succeededOn(f.accounts[0]) });
+ expect((await deferDirect(f)).deferred).toBe(false);
+ });
+
+ it("stops holding work once the limited account is revoked", async () => {
+ const f = await heldFixture();
+ expect((await deferDirect(f)).deferred).toBe(true);
+ await db.update(connectionGrants).set({ status: "revoked", revokedAt: new Date() })
+ .where(eq(connectionGrants.id, f.accounts[0].grantId));
+ expect((await deferDirect(f)).deferred).toBe(false);
+ });
+
+ it("releases the waiting retry when the agent is moved to another account", async () => {
+ const f = await heldFixture();
+ const held = await wake(f);
+ expect(held.errorCode).toBe("provider_limit_wait");
+ const retry = await scheduledRetry(f.agentId);
+ expect(retry!.scheduledRetryAt!.getTime()).toBeGreaterThan(Date.now() + 60 * 60_000);
+
+ // Dispatch hears of the due retry before the write that makes it due.
+ const seenAtNotice: number[] = [];
+ retryDispatchNotice.before = async transaction => {
+ const [row] = await (transaction as typeof db).select({ at: heartbeatRuns.scheduledRetryAt }).from(heartbeatRuns)
+ .where(eq(heartbeatRuns.id, retry!.id));
+ seenAtNotice.push(row!.at!.getTime());
+ };
+ try {
+ await agentService(db).update(f.agentId, { runtimeConfig: { aiConnection: binding(f.accounts[1]) } });
+ } finally {
+ retryDispatchNotice.before = null;
+ }
+ expect(seenAtNotice).toEqual([retry!.scheduledRetryAt!.getTime()]);
+ const [released] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, retry!.id));
+ expect(released.status).toBe("scheduled_retry");
+ expect(released.scheduledRetryAt!.getTime()).toBeLessThanOrEqual(Date.now());
+ expect((await heartbeat.promoteDueScheduledRetries(new Date())).runIds).toContain(retry!.id);
+ const activity = await db.select().from(activityLog).where(eq(activityLog.runId, retry!.id));
+ expect(activity).toContainEqual(expect.objectContaining({ action: "issue.scheduled_retry_retry_now", entityId: f.issueId,
+ details: expect.objectContaining({ reason: "ai_connection_changed" }) }));
+ }, 60_000);
+
+ it("releases a wait saved before the account was recorded on it when that account is revoked", async () => {
+ const f = await heldFixture();
+ const held = await wake(f);
+ // Waits saved by the previous release name only the run that reported the limit.
+ const { grantId: _recorded, ...previousShape } = (held.resultJson as { providerLimitWait: Record }).providerLimitWait;
+ await db.update(heartbeatRuns).set({ resultJson: { ...held.resultJson, providerLimitWait: previousShape } })
+ .where(eq(heartbeatRuns.id, held.id));
+ const retry = await scheduledRetry(f.agentId);
+
+ // Another account's revocation leaves the wait alone.
+ expect(await releaseProviderLimitWaits(db, { companyId: f.companyId, reason: "ai_connection_revoked",
+ grantIds: [f.accounts[1].grantId] })).toEqual([]);
+ await db.update(connectionGrants).set({ status: "revoked", revokedAt: new Date() })
+ .where(eq(connectionGrants.id, f.accounts[0].grantId));
+ expect(await releaseProviderLimitWaits(db, { companyId: f.companyId, reason: "ai_connection_revoked",
+ grantIds: [f.accounts[0].grantId] })).toEqual([retry!.id]);
+ expect((await heartbeat.promoteDueScheduledRetries(new Date())).runIds).toContain(retry!.id);
+ }, 60_000);
+
+ it("commits a revocation and its release together, so a revoked account never leaves work waiting", async () => {
+ const f = await heldFixture();
+ await wake(f);
+ const retry = await scheduledRetry(f.agentId);
+ const actor = { actorType: "user" as const, actorId: `limit-user-${f.companyId}` };
+ const retryAt = async () => (await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, retry!.id)))[0].scheduledRetryAt!.getTime();
+ const grantStatus = async () => (await db.select().from(connectionGrants).where(eq(connectionGrants.id, f.accounts[0].grantId)))[0].status;
+
+ // If the release fails, the revocation fails with it: never revoked with work still waiting.
+ releaseFailure.next = true;
+ await expect(toolAccessService(db).revokeConnectionGrant(f.accounts[0].connectionId, f.accounts[0].grantId, actor))
+ .rejects.toThrow("release step failed");
+ expect(await grantStatus()).toBe("active");
+ expect(await retryAt()).toBe(retry!.scheduledRetryAt!.getTime());
+
+ // A committed revocation has already made the waiting work due.
+ await toolAccessService(db).revokeConnectionGrant(f.accounts[0].connectionId, f.accounts[0].grantId, actor);
+ expect(await grantStatus()).toBe("revoked");
+ expect(await retryAt()).toBeLessThanOrEqual(Date.now());
+ expect((await heartbeat.promoteDueScheduledRetries(new Date())).runIds).toContain(retry!.id);
+ }, 60_000);
+
+ it("keeps holding every agent that still shares the limited account", async () => {
+ const first = await heldFixture();
+ // Two agents in one company share account A; both reported its limit.
+ const sharedCompany = first.companyId;
+ const [secondAgent] = await db.insert(agents).values({ id: randomUUID(), companyId: sharedCompany, name: "Second shared agent",
+ adapterType, status: "idle", adapterConfig: {}, runtimeConfig: { aiConnection: binding(first.accounts[0]) } }).returning();
+ const [secondIssue] = await db.insert(issues).values({ id: randomUUID(), companyId: sharedCompany, title: "Second task",
+ status: "todo", assigneeAgentId: secondAgent.id, issueNumber: 2 }).returning();
+ await db.insert(heartbeatRuns).values({ companyId: sharedCompany, agentId: secondAgent.id, invocationSource: "automation",
+ triggerDetail: "system", ...quotaOn(first.accounts[0]) });
+ const shared = { companyId: sharedCompany, agentId: secondAgent.id as typeof first.agentId, issueId: secondIssue.id as typeof first.issueId };
+ expect((await wake(first)).errorCode).toBe("provider_limit_wait");
+ expect((await wake(shared)).errorCode).toBe("provider_limit_wait");
+ const sharedRetry = await scheduledRetry(secondAgent.id);
+
+ // Moving one agent to account B leaves the other's account A hold intact.
+ await agentService(db).update(first.agentId, { runtimeConfig: { aiConnection: binding(first.accounts[1]) } });
+ const [stillWaiting] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, sharedRetry!.id));
+ expect(stillWaiting.scheduledRetryAt!.getTime()).toBe(sharedRetry!.scheduledRetryAt!.getTime());
+ expect((await deferDirect(shared)).deferred).toBe(true);
+ }, 60_000);
+
+ it("starts the waiting work on Check now once the agent already uses another account", async () => {
+ // The state saved before this fix: the task is todo, its run was held
+ // for account A, its recheck is a day away, and the agent was moved to
+ // account B without releasing the wait.
+ const f = await heldFixture();
+ const held = await wake(f);
+ expect(held.errorCode).toBe("provider_limit_wait");
+ const retry = await scheduledRetry(f.agentId);
+ await db.update(agents).set({ runtimeConfig: { aiConnection: binding(f.accounts[1]) } }).where(eq(agents.id, f.agentId));
+ const [task] = await db.select().from(issues).where(eq(issues.id, f.issueId));
+ expect(task).toMatchObject({ status: "todo", monitorNextCheckAt: null, executionRunId: retry!.id });
+
+ // "Check now" on this task starts its waiting retry.
+ const checked = await heartbeat.retryScheduledRetryNow({ issueId: f.issueId, actor: { actorType: "user", actorId: `limit-user-${f.companyId}` } });
+ expect(checked.outcome).toBe("promoted");
+ await heartbeat.resumeQueuedRuns();
+ await heartbeat.drainActiveRunExecutions();
+ const [started] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, retry!.id));
+ // Account A's limit no longer holds the run. This fixture has no stored
+ // credential for account B, so the run goes on to that setup check.
+ expect(started.status).not.toBe("scheduled_retry");
+ expect(started.errorCode).not.toBe("provider_limit_wait");
+ const waits = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.retryOfRunId, retry!.id));
+ expect(waits.filter(run => run.scheduledRetryReason === "ai_connection_pool_wait")).toEqual([]);
+ }, 60_000);
+
+ it("rechecks the wait at once when the user replies, and holds again while the account is still limited", async () => {
+ const f = await heldFixture();
+ await wake(f);
+ const retry = await scheduledRetry(f.agentId);
+ const userId = `limit-user-${f.companyId}`;
+ const commentId = randomUUID();
+
+ // Another agent's comment keeps the scheduled recheck.
+ await heartbeat.wakeup(f.agentId, { source: "automation", triggerDetail: "system", reason: "issue_commented",
+ payload: { issueId: f.issueId, commentId: randomUUID() }, requestedByActorType: "agent", requestedByActorId: randomUUID(),
+ contextSnapshot: { issueId: f.issueId, wakeReason: "issue_commented" } });
+ expect((await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, retry!.id)))[0].scheduledRetryAt!.getTime())
+ .toBe(retry!.scheduledRetryAt!.getTime());
+
+ await heartbeat.wakeup(f.agentId, { source: "automation", triggerDetail: "system", reason: "issue_commented",
+ payload: { issueId: f.issueId, commentId }, requestedByActorType: "user", requestedByActorId: userId,
+ contextSnapshot: { issueId: f.issueId, commentId, wakeCommentId: commentId, wakeReason: "issue_commented" } });
+ const [rechecking] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, retry!.id));
+ expect(rechecking.scheduledRetryAt!.getTime()).toBeLessThanOrEqual(Date.now());
+ expect((await heartbeat.promoteDueScheduledRetries(new Date())).runIds).toContain(retry!.id);
+ await heartbeat.resumeQueuedRuns();
+ await heartbeat.drainActiveRunExecutions();
+
+ const [rechecked] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, retry!.id));
+ expect(dispatched.has(retry!.id)).toBe(false);
+ expect(rechecked).toMatchObject({ status: "cancelled", errorCode: "provider_limit_wait" });
+ const [successor] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.retryOfRunId, retry!.id));
+ expect(successor).toMatchObject({ status: "scheduled_retry", scheduledRetryReason: "ai_connection_pool_wait" });
+ expect(successor.contextSnapshot).toMatchObject({ wakeCommentId: commentId });
+ }, 60_000);
+ });
});
diff --git a/server/src/__tests__/issue-execution-policy-routes.test.ts b/server/src/__tests__/issue-execution-policy-routes.test.ts
index bda24c1dfee..c3fdac21a55 100644
--- a/server/src/__tests__/issue-execution-policy-routes.test.ts
+++ b/server/src/__tests__/issue-execution-policy-routes.test.ts
@@ -17,6 +17,7 @@ const mockIssueService = vi.hoisted(() => ({
getRelationSummaries: vi.fn(),
listWakeableBlockedDependents: vi.fn(),
getWakeableParentAfterChildCompletion: vi.fn(),
+ getCurrentScheduledRetry: vi.fn(async (): Promise<{ status: string } | null> => null),
}));
const mockHeartbeatService = vi.hoisted(() => ({
@@ -27,6 +28,8 @@ const mockHeartbeatService = vi.hoisted(() => ({
getActiveRunForAgent: vi.fn(async () => null),
getQueuedAssignmentRunForIssue: vi.fn(async () => null),
cancelRun: vi.fn(async () => null),
+ retryScheduledRetryNow: vi.fn(async (): Promise<{ outcome: string; message: string; scheduledRetry: null }> =>
+ ({ outcome: "promoted", message: "Scheduled retry was promoted to the queued run pool", scheduledRetry: null })),
}));
const mockAccessService = vi.hoisted(() => ({
@@ -1214,6 +1217,34 @@ describe("issue execution policy routes", () => {
);
});
+ it("checks a waiting usage retry now when the task has no monitor", async () => {
+ // A todo task whose run waits for provider usage: no issue monitor, one scheduled retry.
+ mockIssueService.getById.mockResolvedValue({
+ id: "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa", companyId: "company-1", status: "todo", monitorNextCheckAt: null,
+ assigneeAgentId: "33333333-3333-4333-8333-333333333333", assigneeUserId: null, executionPolicy: null, executionState: null,
+ });
+ mockIssueService.getCurrentScheduledRetry.mockResolvedValueOnce({ status: "scheduled_retry" });
+ mockHeartbeatService.triggerIssueMonitor.mockClear();
+ const res = await request(await createApp())
+ .post("/api/issues/aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa/monitor/check-now").send({});
+ expect(res.status).toBe(200);
+ expect(res.body).toMatchObject({ ok: true, outcome: "promoted" });
+ expect(mockHeartbeatService.retryScheduledRetryNow).toHaveBeenCalledWith(expect.objectContaining({
+ issueId: "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa" }));
+ expect(mockHeartbeatService.triggerIssueMonitor).not.toHaveBeenCalled();
+ expect(mockLogActivity).toHaveBeenCalledWith(expect.anything(), expect.objectContaining({
+ action: "issue.scheduled_retry_retry_now", details: expect.objectContaining({ source: "monitor_check_now" }) }));
+
+ // A check that cannot start says why, in plain words.
+ mockIssueService.getCurrentScheduledRetry.mockResolvedValueOnce({ status: "scheduled_retry" });
+ mockHeartbeatService.retryScheduledRetryNow.mockResolvedValueOnce({ outcome: "gate_suppressed",
+ message: "Scheduled retry suppressed because the agent no longer exists", scheduledRetry: null });
+ const refused = await request(await createApp())
+ .post("/api/issues/aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa/monitor/check-now").send({});
+ expect(refused.status).toBe(409);
+ expect(refused.body.error).toBe("The check could not start because the task changed. Refresh the task to see its current state.");
+ });
+
it.each(["execution_reconciliation_required", "monitor_dispatch_deferred", "monitor_replaced"])("does not claim success for a skipped monitor check: %s", async (reason) => {
mockIssueService.getById.mockResolvedValue({
id: "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa", companyId: "company-1", status: "blocked",
diff --git a/server/src/__tests__/issue-scheduled-retry-routes.test.ts b/server/src/__tests__/issue-scheduled-retry-routes.test.ts
index e052eba5b62..274acc9be1e 100644
--- a/server/src/__tests__/issue-scheduled-retry-routes.test.ts
+++ b/server/src/__tests__/issue-scheduled-retry-routes.test.ts
@@ -826,13 +826,26 @@ describeEmbeddedPostgres("issue scheduled retry routes", () => {
const retry = await request(app).post(`/api/issues/${f.issueId}/retry`)
.send({ idempotencyKey: randomUUID(), observedRunId: f.retryRunId });
const retryNow = await request(app).post(`/api/issues/${f.issueId}/scheduled-retry/retry-now`).send({});
+ // The banner's Check now starts the same retry, so it needs the same access.
+ const checkNow = await request(app).post(`/api/issues/${f.issueId}/monitor/check-now`).send({});
expect(retry.status, JSON.stringify(retry.body)).toBe(404);
expect(retryNow.status, JSON.stringify(retryNow.body)).toBe(404);
+ expect(checkNow.status, JSON.stringify(checkNow.body)).toBe(404);
const [run] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, f.retryRunId));
expect(run!.status).toBe("scheduled_retry");
});
+ it("starts the waiting retry from Check now for a member who can see the task", async () => {
+ const f = await seedIssueWithRetry();
+ const app = createApp(boardActor(f.companyId));
+ const checkNow = await request(app).post(`/api/issues/${f.issueId}/monitor/check-now`).send({});
+ expect(checkNow.status, JSON.stringify(checkNow.body)).toBe(200);
+ expect(checkNow.body).toMatchObject({ ok: true, outcome: "promoted" });
+ const [run] = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.id, f.retryRunId));
+ expect(run!.status).toBe("queued");
+ });
+
it("promotes the existing scheduled retry and treats duplicate clicks as idempotent", async () => {
const { companyId, issueId, retryRunId } = await seedIssueWithRetry();
const app = createApp(boardActor(companyId));
diff --git a/server/src/__tests__/plugin-connector-tool-definitions.test.ts b/server/src/__tests__/plugin-connector-tool-definitions.test.ts
new file mode 100644
index 00000000000..d76926676a7
--- /dev/null
+++ b/server/src/__tests__/plugin-connector-tool-definitions.test.ts
@@ -0,0 +1,104 @@
+import { randomUUID } from "node:crypto";
+import { mkdtemp, rm } from "node:fs/promises";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
+import { eq } from "drizzle-orm";
+import { agents, companies, companyMemberships, createDb, heartbeatRuns, issues, plugins, toolCatalogEntries, toolConnections } from "@paperclipai/db";
+import { pluginAppSlug, pluginManifestV1Schema, type PaperclipPluginManifestV1 } from "@paperclipai/shared";
+import { toolAccessService } from "../services/tool-access.js";
+import { createToolGatewayService } from "../services/tool-gateway.js";
+import { setPluginConnectorWorkers } from "../services/plugin-connector-runtime.js";
+import { paperclipDefinedTool } from "../services/connectors/paperclip-defined-tools.js";
+import type { PluginWorkerManager } from "../services/plugin-worker-manager.js";
+import { getEmbeddedPostgresTestSupport, startEmbeddedPostgresTestDatabase } from "./helpers/embedded-postgres.js";
+
+const actor = { actorType: "user" as const, actorId: "plugin-definitions-admin" };
+const PLUGIN_KEY = "example.reports";
+const APP = "reports";
+const SLUG = pluginAppSlug(PLUGIN_KEY, APP);
+
+function reportsManifest(buildReportSchema: Record = { type: "object" }, description = "Build a report.") {
+ return pluginManifestV1Schema.parse({
+ id: PLUGIN_KEY, apiVersion: 1, version: "1.0.0", displayName: "Reports", description: "Reports connector",
+ author: "Tests", categories: ["connector"], capabilities: ["connectors.provide"], entrypoints: { worker: "worker.js" },
+ apps: [{
+ schemaVersion: 1, slug: APP, name: "Reports", description: "Build reports", categories: ["data"],
+ branding: { logoUrl: "/brands/apps/api-key-generic.svg" }, urlPatterns: [],
+ methods: [{
+ key: "none", transport: "plugin", auth: "none", ownershipModes: ["customer"], whenToUse: "No sign-in.",
+ guidanceMd: "Nothing to set up.", riskTier: "S1",
+ tools: { kind: "static", list: [{ name: "build_report", description, risk: "read", parametersSchema: buildReportSchema }] },
+ }],
+ }],
+ }) as PaperclipPluginManifestV1;
+}
+
+const UPGRADED_SCHEMA = { type: "object", properties: { order: { type: "string", enum: ["newest", "oldest"] } } };
+
+const support = await getEmbeddedPostgresTestSupport();
+(support.supported ? describe : describe.skip)("plugin connector tool definitions", () => {
+ let db: ReturnType;
+ let temp: Awaited>;
+ let keyDir: string;
+ beforeAll(async () => {
+ keyDir = await mkdtemp(join(tmpdir(), "plugin-definitions-secrets-"));
+ vi.stubEnv("PAPERCLIP_SECRETS_MASTER_KEY_FILE", join(keyDir, "key"));
+ temp = await startEmbeddedPostgresTestDatabase("paperclip-plugin-definitions-");
+ db = createDb(temp.connectionString);
+ }, 60_000);
+ afterAll(async () => { await temp?.cleanup(); vi.unstubAllEnvs(); if (keyDir) await rm(keyDir, { recursive: true, force: true }); });
+ afterEach(async () => { setPluginConnectorWorkers(null); await db.delete(plugins); });
+
+ async function connectedReports() {
+ const [company] = await db.insert(companies).values({ name: "Plugin definitions", issuePrefix: `PD${randomUUID().slice(0, 6)}` }).returning();
+ await db.insert(companyMemberships).values({ companyId: company.id, principalType: "user", principalId: actor.actorId, status: "active", membershipRole: "admin" });
+ const [agent] = await db.insert(agents).values({ companyId: company.id, name: "Reporter", role: "engineer", adapterType: "process" }).returning();
+ await db.insert(plugins).values({ pluginKey: PLUGIN_KEY, packageName: `@test/${PLUGIN_KEY}`, version: "1.0.0", manifestJson: reportsManifest(), status: "ready" });
+ setPluginConnectorWorkers({ isRunning: () => true, getWorker: () => ({ status: "running" }), call: vi.fn() } as unknown as PluginWorkerManager);
+ const service = toolAccessService(db);
+ const gateway = createToolGatewayService(db, { toolActionSigningSecret: "plugin-definitions-signing" });
+ const [issue] = await db.insert(issues).values({ companyId: company.id, title: "Report", assigneeAgentId: agent.id }).returning();
+ const [run] = await db.insert(heartbeatRuns).values({ companyId: company.id, agentId: agent.id, issueId: issue.id, scopeKind: "issue",
+ invocationSource: "on_demand", status: "running", responsibleUserId: actor.actorId, contextSnapshot: { issueId: issue.id } }).returning();
+ const session = await gateway.createSession({ companyId: company.id, agentId: agent.id, runId: run.id, issueId: issue.id });
+ const connected = await service.connectGalleryApp(company.id, { galleryKey: SLUG, connectionMethodKey: "none" }, actor);
+ await service.finishGalleryAppConnection(company.id, connected.connectionId, {
+ enabledCatalogEntryIds: connected.catalog.map(entry => entry.id), askFirstCatalogEntryIds: [], access: { agentIds: [agent.id] } }, actor);
+ const buildReport = async () => (await gateway.listToolsForSession(session.token))
+ .find(tool => tool.providerType === "paperclip_plugin_connection" && tool.upstreamToolName === "build_report")!;
+ return { connectionId: connected.connectionId, buildReport, service };
+ }
+
+ async function upgradePlugin() {
+ await db.update(plugins).set({ version: "1.1.0", manifestJson: reportsManifest(UPGRADED_SCHEMA, "Build a report, newest first.") as never });
+ }
+
+ it("gives agents the installed plugin's current tool schema after an upgrade, without a catalog refresh", async () => {
+ const reports = await connectedReports();
+ expect((await reports.buildReport()).parametersSchema).toEqual({ type: "object" });
+ await upgradePlugin();
+ const current = await reports.buildReport();
+ expect(current.parametersSchema).toMatchObject({ properties: { order: { enum: ["newest", "oldest"] } } });
+ expect(current.description).toContain("newest first");
+ });
+
+ it("keeps the reviewed schema while changed tools await review, and the catalog refresh quarantines them", async () => {
+ const reports = await connectedReports();
+ const [connection] = await db.select().from(toolConnections).where(eq(toolConnections.id, reports.connectionId));
+ await db.update(toolConnections).set({ config: { ...connection.config, quarantineNewEntries: true } })
+ .where(eq(toolConnections.id, reports.connectionId));
+ await upgradePlugin();
+ expect((await reports.buildReport()).parametersSchema).toEqual({ type: "object" });
+ await reports.service.refreshCatalog(reports.connectionId, actor);
+ const [entry] = await db.select().from(toolCatalogEntries).where(eq(toolCatalogEntries.connectionId, reports.connectionId));
+ expect(entry.status).toBe("quarantined");
+ expect(await reports.buildReport()).toBeUndefined();
+ });
+
+ it("never treats a plugin's tools as Paperclip-trusted for catalog review", async () => {
+ const reports = await connectedReports();
+ const [connection] = await db.select().from(toolConnections).where(eq(toolConnections.id, reports.connectionId));
+ expect(paperclipDefinedTool(connection, "build_report")).toBeNull();
+ });
+});
diff --git a/server/src/__tests__/tool-gateway-service.test.ts b/server/src/__tests__/tool-gateway-service.test.ts
index 4aeadc56de2..396392a861d 100644
--- a/server/src/__tests__/tool-gateway-service.test.ts
+++ b/server/src/__tests__/tool-gateway-service.test.ts
@@ -3458,7 +3458,7 @@ describeEmbeddedPostgres("tool gateway service", () => {
parameters: {},
})).rejects.toMatchObject({
reasonCode: "tool_error",
- message: expect.stringContaining("enroll the signed-in Workspace account and this OAuth client's Google Cloud project"),
+ message: expect.stringContaining("accept only an OAuth client marked \"Use this client for an AI-powered agent\""),
});
});
diff --git a/server/src/google-workspace-rest-tools/README.md b/server/src/google-workspace-rest-tools/README.md
index 9e40a4468c8..1b483bc9a05 100644
--- a/server/src/google-workspace-rest-tools/README.md
+++ b/server/src/google-workspace-rest-tools/README.md
@@ -17,13 +17,22 @@ all eight allowlisted Drive tools (see "Drive tools" below), both Docs tools
and both Slides tools (see "Docs and Slides tools" below), and all six
allowlisted Sheets tools (see "Sheets tools" below).
-## Why this exists, and why it is temporary
+## Why this exists, and why it is the fallback now
-Google's Workspace MCP servers are a Developer Preview and cannot be offered to
-the public. On 2026-11-17 the owner decided that Paperclip will launch on its
-own tools over the REST APIs. The tools are built so Paperclip can switch to
-Google's MCP servers later without a rewrite, and they live in this one folder
-so they can be deleted cleanly when that happens.
+On 2026-11-17 Google's Workspace MCP servers were a Developer Preview and could
+not be offered to the public, so the owner decided that Paperclip would launch
+on its own tools over the REST APIs. All six services ran on this folder from
+2026-11-23 to 2026-11-24.
+
+On 2026-11-24 Google made its Workspace MCP servers generally available and
+published the Workspace AI Tools Addendum
+(): a tool that is, or is driven
+by, an AI agent must use a Google MCP, not the REST APIs. The owner decided the
+same day to switch all six services back to Google's MCP servers. This folder
+and the switch stay in the code as the fallback; do not delete them.
+
+`argument-guards.ts` is the one part of this folder that also runs on the
+`google_mcp` path (see "Argument checks on Google's MCP path").
## Boundary rules
@@ -155,10 +164,12 @@ deployment is ever needed; the gateway does not use it.
One setting per service, `GOOGLE_WORKSPACE_TOOL_TRANSPORT` in
`packages/shared/src/google-workspace-connectors.ts`:
-- `paperclip_rest`: calls go to this folder. Gmail, Drive, Docs, Sheets,
- Slides and Calendar use it since 2026-11-23.
- `google_mcp`: calls go to Google's hosted MCP server for that service.
- Chat, People and Search use it; they are not offered for new setup.
+ Every service uses it since 2026-11-24. Chat, People and Search are not
+ offered for new setup.
+- `paperclip_rest`: calls go to this folder. Gmail, Drive, Docs, Sheets,
+ Slides and Calendar used it from 2026-11-23 to 2026-11-24. It is the
+ fallback.
`googleWorkspaceToolTarget(name)` returns the setting as `transport`. It is a
plain constant: no environment variable, instance setting or database row.
@@ -219,6 +230,49 @@ plain constant: no environment variable, instance setting or database row.
the others stay usable. Health checks use the same branch.
MCP Tasks, MCP resources and elicitation only exist on the `google_mcp` path.
+Google's MCP servers ask a person to confirm some actions (MCP elicitation).
+The gateway puts the question on the task's question card, as for any MCP
+server (`server/src/services/mcp-elicitation.ts`); skipping the card sends
+"decline". `server/src/__tests__/google-workspace-mcp-transport.test.ts`
+covers this with a fake Google server, for a server that asks over a session
+stream and for a stateless one.
+
+### Argument checks on Google's MCP path
+
+Before the gateway sends a call to Google's MCP server for Gmail, Drive,
+Docs, Sheets, Slides or Calendar, it runs `googleWorkspaceArgumentRefusal`
+(`argument-guards.ts`, through `googleWorkspaceMcpPreflightRefusal` in the
+adapter). A refusal is a tool error that ends with "Nothing was sent to
+Google.", recorded and audited like a REST refusal. It checks only what an
+argument shows, with no request to Google:
+
+- An argument that the action's saved schema does not list. The top level is
+ always checked; a nested object only when its schema has
+ `additionalProperties: false`. A schema with `additionalProperties` open at
+ the top level, or with neither `properties` nor `additionalProperties:
+ false`, is not checked.
+- `fileId` and `parentId` (Drive), `documentId`, `spreadsheetId` and
+ `presentationId` must each be one file ID: no link, no list.
+- Docs `update_doc` and Slides `update_presentation`: each request names
+ exactly one kind, and the kind is on the closed list in
+ `docs/request-kinds.ts` or `slides/request-kinds.ts` (so kinds that read
+ another file, and images from Drive or Docs links, are refused).
+
+For Calendar `delete_event`, `googleWorkspaceMcpPreflightRefusal` in the
+adapter first reads the event with the connection's own `calendar__get_event`
+(only `calendarId` and `eventId`), through a callback the gateway passes, and
+gives the answer to `googleCalendarSeriesRefusal`. The gateway only looks up
+and runs that action, with the grant and scope checks, inside the delete's
+own deadline. The read action's Off or Ask first setting does not apply: the
+read is part of a delete that the policy already allowed, and its answer never
+reaches the agent. The REST `delete_event` makes the same read. A whole recurring series is
+refused, as on REST. If the read does not return the event, nothing is
+deleted.
+
+The REST tools' other checks describe a REST limit or a stricter REST rule, so
+they do not run on MCP: mandatory `requiredRevisionId`, the Sheets comment and
+data-source refusals, the result size budget, and the Drive search query
+rules.
Measured with a stubbed fetch, the adapter adds about 15 µs per call. A full
`gmail__get_message` through `executeTool` (policy, records, screening) took a
@@ -274,6 +328,20 @@ that JSON escapes, and non-ASCII characters, count more):
The check costs one `JSON.stringify` of the result: about 5 µs for a 4 KB
result and 0.24 ms for a 700 KB one.
+### Connections saved on REST, after the switch back
+
+A connection whose catalog was refreshed while its services were on
+`paperclip_rest` has this folder's definitions saved. After the switch back,
+agents see those saved definitions until the next catalog refresh, and the
+argument checks use them. That refresh saves Google's definitions. It does not
+hold an action for review when the saved row is this folder's definition
+(`formerPaperclipDefinedTool` in
+`server/src/services/connectors/paperclip-defined-tools.ts` and the hold rule
+in `server/src/services/tool-access/catalog/publication.ts`), and it keeps Off
+and Ask first. An action that Google's server does not list (for example Gmail
+`get_draft`, `list_threads` or `search_messages`, if Google does not have
+them) is removed by that refresh.
+
### Flipping a service
1. Implement every tool in that service's allowlist (`toolScopes` in the
@@ -1176,9 +1244,10 @@ says `false`.
## Open questions
- Whether an OAuth client marked as an AI-powered agent may call the REST APIs.
+ The AI Tools Addendum says an agent must use a Google MCP, so the fallback
+ is for an outage or a Google problem, not for normal use.
- Each Google Cloud project behind a connection needs the REST APIs enabled
- (Gmail now; Drive, Docs, Sheets, Slides and Calendar as their tools land).
- Without that, calls return the `api_disabled` tool error.
+ for the fallback. Without that, calls return the `api_disabled` tool error.
- `freeBusy.query` does not accept `calendar.events`, and the read & write
Calendar selection grants `calendar.calendarlist.readonly` and
`calendar.events` only (the `calendar.events` → `calendar.events.freebusy`
@@ -1193,7 +1262,12 @@ says `false`.
## Removal procedure
-1. Set every service in `GOOGLE_WORKSPACE_TOOL_TRANSPORT` to `google_mcp`.
+The owner decided on 2026-11-24 to keep this folder as the fallback. Remove it
+only on a new decision.
+
+1. Check that every service in `GOOGLE_WORKSPACE_TOOL_TRANSPORT` is
+ `google_mcp`. Move `argument-guards.ts` and the request-kind lists it uses
+ out of this folder first, because the MCP path uses them.
2. Delete this folder, `server/src/google-workspace-rest-tools/`.
3. Delete `server/src/services/google-workspace-rest-dispatch.ts` and its
test, and the two call sites: the `paperclip_rest` branch in
diff --git a/server/src/google-workspace-rest-tools/argument-guards.test.ts b/server/src/google-workspace-rest-tools/argument-guards.test.ts
new file mode 100644
index 00000000000..f08eab3f60a
--- /dev/null
+++ b/server/src/google-workspace-rest-tools/argument-guards.test.ts
@@ -0,0 +1,71 @@
+import { describe, expect, it } from "vitest";
+import { googleCalendarSeriesRefusal, googleWorkspaceArgumentRefusal } from "./argument-guards.js";
+
+const schema = {
+ type: "object",
+ properties: {
+ fileId: { type: "string" },
+ options: { type: "object", properties: { fields: { type: "string" } } },
+ closed: { type: "object", additionalProperties: false, properties: { fields: { type: "string" } } },
+ },
+};
+
+describe("googleWorkspaceArgumentRefusal", () => {
+ it("refuses an unknown top-level argument and names the accepted ones", () => {
+ expect(googleWorkspaceArgumentRefusal({ service: "drive", toolName: "get_file_metadata", arguments: { fileId: "f1", fields: "*" }, inputSchema: schema }))
+ .toBe("Invalid arguments for get_file_metadata: unknown argument \"fields\". Accepted arguments: fileId, options, closed. Nothing was sent to Google.");
+ });
+
+ it("checks a nested object only when its schema closes it", () => {
+ expect(googleWorkspaceArgumentRefusal({ service: "drive", toolName: "get_file_metadata", arguments: { fileId: "f1", options: { extra: 1 } }, inputSchema: schema })).toBeNull();
+ expect(googleWorkspaceArgumentRefusal({ service: "drive", toolName: "get_file_metadata", arguments: { fileId: "f1", closed: { extra: 1 } }, inputSchema: schema }))
+ .toContain("unknown argument \"extra\" in closed.");
+ });
+
+ it("checks a closed object below an open one", () => {
+ const nested = { type: "object", properties: { options: { type: "object", properties: {
+ filter: { type: "object", additionalProperties: false, properties: { label: { type: "string" } } },
+ } } } };
+ expect(googleWorkspaceArgumentRefusal({ service: "gmail", toolName: "list_threads", arguments: { options: { other: 1, filter: { label: "a", color: "red" } } }, inputSchema: nested }))
+ .toBe("Invalid arguments for list_threads: unknown argument \"color\" in options.filter. Accepted in options.filter: label. Nothing was sent to Google.");
+ });
+
+ it("refuses every argument for a closed schema that lists none", () => {
+ expect(googleWorkspaceArgumentRefusal({ service: "calendar", toolName: "list_calendars", arguments: { pageSize: 5 }, inputSchema: { type: "object", additionalProperties: false } }))
+ .toBe("Invalid arguments for list_calendars: unknown argument \"pageSize\". Accepted arguments: none. Nothing was sent to Google.");
+ });
+
+ it("leaves a schema that allows more arguments, or lists none, to the server", () => {
+ expect(googleWorkspaceArgumentRefusal({ service: "gmail", toolName: "get_message", arguments: { any: 1 }, inputSchema: { type: "object", properties: {}, additionalProperties: true } })).toBeNull();
+ expect(googleWorkspaceArgumentRefusal({ service: "gmail", toolName: "get_message", arguments: { any: 1 }, inputSchema: { type: "object" } })).toBeNull();
+ });
+
+ it("requires one file ID for Drive, Docs, Sheets and Slides, and leaves Gmail and Calendar IDs alone", () => {
+ expect(googleWorkspaceArgumentRefusal({ service: "sheets", toolName: "get_values", arguments: { spreadsheetId: "a b" }, inputSchema: {} }))
+ .toContain("spreadsheetId must be one Google file ID");
+ expect(googleWorkspaceArgumentRefusal({ service: "calendar", toolName: "get_event", arguments: { eventId: "a b" }, inputSchema: {} })).toBeNull();
+ });
+
+ it("refuses Slides and Docs requests outside the closed lists, and requests with more than one kind", () => {
+ expect(googleWorkspaceArgumentRefusal({ service: "slides", toolName: "update_presentation",
+ arguments: { presentationId: "p1", requests: [{ createVideo: { source: "DRIVE", id: "v1" } }] }, inputSchema: {} }))
+ .toContain("a DRIVE video is another file");
+ expect(googleWorkspaceArgumentRefusal({ service: "docs", toolName: "update_doc",
+ arguments: { documentId: "d1", requests: [{ insertText: {}, deleteContentRange: {} }] }, inputSchema: {} }))
+ .toContain("each request names exactly one kind of update");
+ expect(googleWorkspaceArgumentRefusal({ service: "docs", toolName: "update_doc",
+ arguments: { documentId: "d1", requests: [{ insertText: { text: "Hi", location: { index: 1 } } }] }, inputSchema: {} })).toBeNull();
+ });
+});
+
+describe("googleCalendarSeriesRefusal", () => {
+ it("refuses a series, allows an occurrence or a single event, and refuses when the read shows no event", () => {
+ const read = (event: unknown, text: string | null = null) => ({ isError: false, structuredContent: event, text });
+ expect(googleCalendarSeriesRefusal(read({ id: "s1", recurrence: ["RRULE:FREQ=DAILY"] }))).toContain("whole recurring series");
+ expect(googleCalendarSeriesRefusal(read(null, JSON.stringify({ event: { id: "s1", recurrence: ["RRULE:FREQ=DAILY"] } })))).toContain("whole recurring series");
+ expect(googleCalendarSeriesRefusal(read({ id: "s1_20261124", recurrence: ["RRULE:FREQ=DAILY"], recurringEventId: "s1" }))).toBeNull();
+ expect(googleCalendarSeriesRefusal(read({ id: "e1", summary: "Lunch" }))).toBeNull();
+ expect(googleCalendarSeriesRefusal(read(null, "Event: Lunch"))).toContain("Nothing was deleted.");
+ expect(googleCalendarSeriesRefusal({ isError: true, structuredContent: { id: "e1" }, text: null })).toContain("Nothing was deleted.");
+ });
+});
diff --git a/server/src/google-workspace-rest-tools/argument-guards.ts b/server/src/google-workspace-rest-tools/argument-guards.ts
new file mode 100644
index 00000000000..5dfb4f54e5e
--- /dev/null
+++ b/server/src/google-workspace-rest-tools/argument-guards.ts
@@ -0,0 +1,96 @@
+import { assertRequestKinds, type RequestKindRules } from "./documents-shared.js";
+import { DOCS_REQUEST_KINDS } from "./docs/request-kinds.js";
+import { GoogleToolError } from "./errors.js";
+import { SLIDES_REQUEST_KINDS } from "./slides/request-kinds.js";
+import { unknownArgumentProblems, type JsonSchemaNode } from "./tool.js";
+import type { GoogleWorkspaceRestService } from "./tools.js";
+
+const FILE_ID = /^[A-Za-z0-9_-]{1,256}$/;
+const FILE_ID_ARGUMENTS: Partial> = {
+ drive: ["fileId", "parentId"],
+ docs: ["documentId"],
+ sheets: ["spreadsheetId"],
+ slides: ["presentationId"],
+};
+const REQUEST_KINDS: Partial>>> = {
+ docs: { update_doc: DOCS_REQUEST_KINDS },
+ slides: { update_presentation: SLIDES_REQUEST_KINDS },
+};
+
+const isRecord = (value: unknown): value is Record => typeof value === "object" && value !== null && !Array.isArray(value);
+
+function closedAtTopOrDeclared(schema: JsonSchemaNode, path: string): schema is JsonSchemaNode & { properties: Record } {
+ if (!isRecord(schema.properties)) return false;
+ return schema.additionalProperties === false || (path === "" && schema.additionalProperties === undefined);
+}
+
+export interface GoogleWorkspaceArgumentCheck {
+ service: GoogleWorkspaceRestService;
+ toolName: string;
+ arguments: unknown;
+ inputSchema: unknown;
+}
+
+export function googleWorkspaceArgumentRefusal(check: GoogleWorkspaceArgumentCheck): string | null {
+ const args = check.arguments ?? {};
+ if (!isRecord(args)) return refusal(check.toolName, "arguments must be an object.");
+ const schema = isRecord(check.inputSchema) && check.inputSchema.additionalProperties === false && !isRecord(check.inputSchema.properties)
+ ? { ...check.inputSchema, properties: {} } : check.inputSchema;
+ const unknown = unknownArgumentProblems(args, schema, "", closedAtTopOrDeclared);
+ if (unknown.length > 0) return refusal(check.toolName, unknown.join(" "));
+ for (const name of FILE_ID_ARGUMENTS[check.service] ?? []) {
+ const value = args[name];
+ if (value !== undefined && (typeof value !== "string" || !FILE_ID.test(value))) {
+ return refusal(check.toolName, `${name} must be one Google file ID (letters, digits, - and _), not a link or a list.`);
+ }
+ }
+ const rules = REQUEST_KINDS[check.service]?.[check.toolName];
+ if (rules && args.requests !== undefined) {
+ const requests = args.requests;
+ if (!Array.isArray(requests) || requests.some((request) => !isRecord(request) || Object.keys(request).length !== 1)) {
+ return refusal(check.toolName, "requests must be a list in which each request names exactly one kind of update, such as insertText.");
+ }
+ try {
+ assertRequestKinds(requests as Array>, rules);
+ } catch (error) {
+ if (error instanceof GoogleToolError) return refusal(check.toolName, error.message);
+ throw error;
+ }
+ }
+ return null;
+}
+
+function refusal(toolName: string, detail: string): string {
+ return `Invalid arguments for ${toolName}: ${detail} Nothing was sent to Google.`;
+}
+
+export interface GoogleCalendarEventRead {
+ isError: boolean;
+ structuredContent: unknown;
+ text: string | null;
+}
+
+const SERIES_REFUSAL = "This ID is a whole recurring series. This tool deletes single events or single occurrences only. Pass one occurrence's ID (from list_events). Nothing was deleted.";
+
+function eventFrom(read: GoogleCalendarEventRead): Record | null {
+ const structured = isRecord(read.structuredContent) ? read.structuredContent : null;
+ let candidate: unknown = structured;
+ if (!structured && read.text) {
+ try {
+ candidate = JSON.parse(read.text);
+ } catch {
+ return null;
+ }
+ }
+ if (!isRecord(candidate)) return null;
+ return isRecord(candidate.event) ? candidate.event : candidate;
+}
+
+export function googleCalendarSeriesRefusal(read: GoogleCalendarEventRead): string | null {
+ const event = read.isError ? null : eventFrom(read);
+ if (!event || (event.id === undefined && event.eventId === undefined && event.start === undefined)) {
+ return "Paperclip reads an event before it deletes it, to make sure the ID is not a whole recurring series, and that read did not return the event. Check the eventId and calendarId with get_event. Nothing was deleted.";
+ }
+ const recurrence = event.recurrence;
+ return Array.isArray(recurrence) && recurrence.length > 0 && !event.recurringEventId ? SERIES_REFUSAL : null;
+}
diff --git a/server/src/google-workspace-rest-tools/index.ts b/server/src/google-workspace-rest-tools/index.ts
index b6c772612f5..3d694701662 100644
--- a/server/src/google-workspace-rest-tools/index.ts
+++ b/server/src/google-workspace-rest-tools/index.ts
@@ -14,3 +14,9 @@ export {
export { createGoogleWorkspaceRestServer, type GoogleWorkspaceRestServerOptions } from "./server.js";
export { GOOGLE_AUTH_ERROR_CODE, GoogleWorkspaceAuthError, type GoogleAuthFailure } from "./errors.js";
export type { GoogleFetch } from "./google-http.js";
+export {
+ googleCalendarSeriesRefusal,
+ googleWorkspaceArgumentRefusal,
+ type GoogleCalendarEventRead,
+ type GoogleWorkspaceArgumentCheck,
+} from "./argument-guards.js";
diff --git a/server/src/google-workspace-rest-tools/tool.ts b/server/src/google-workspace-rest-tools/tool.ts
index 96d8bd64e6e..54e9faa43e9 100644
--- a/server/src/google-workspace-rest-tools/tool.ts
+++ b/server/src/google-workspace-rest-tools/tool.ts
@@ -60,7 +60,7 @@ export function defineTool(spec: RestToolSpec): RestTool {
};
}
-type JsonSchemaNode = Record;
+export type JsonSchemaNode = Record;
const isRecord = (value: unknown): value is Record => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -98,14 +98,17 @@ export function closedObjectSchema(schema: unknown): unknown {
return copy;
}
-function unknownArgumentProblems(value: unknown, schema: unknown, path: string): string[] {
+export type ClosedObjectTest = (schema: JsonSchemaNode, path: string) => schema is JsonSchemaNode & { properties: Record };
+
+export function unknownArgumentProblems(value: unknown, schema: unknown, path: string, closed: ClosedObjectTest = isClosedObjectSchema): string[] {
if (!isRecord(schema)) return [];
if (Array.isArray(value)) {
- return isRecord(schema.items) ? value.flatMap((item, index) => unknownArgumentProblems(item, schema.items, `${path}[${index}]`)) : [];
+ return isRecord(schema.items) ? value.flatMap((item, index) => unknownArgumentProblems(item, schema.items, `${path}[${index}]`, closed)) : [];
}
- if (!isRecord(value) || !isClosedObjectSchema(schema)) return [];
- const accepted = Object.keys(schema.properties);
- const unknown = Object.keys(value).filter((key) => value[key] !== undefined && !Object.hasOwn(schema.properties, key));
+ if (!isRecord(value) || !isRecord(schema.properties)) return [];
+ const properties = schema.properties;
+ const accepted = Object.keys(properties);
+ const unknown = closed(schema, path) ? Object.keys(value).filter((key) => value[key] !== undefined && !Object.hasOwn(properties, key)) : [];
const problems: string[] = [];
if (unknown.length > 0) {
const names = unknown.map((key) => JSON.stringify(key)).join(", ");
@@ -114,7 +117,7 @@ function unknownArgumentProblems(value: unknown, schema: unknown, path: string):
problems.push(`unknown ${unknown.length === 1 ? "argument" : "arguments"} ${names}${where}. ${path ? `Accepted in ${path}` : "Accepted arguments"}: ${list}.`);
}
for (const key of accepted) {
- if (value[key] !== undefined) problems.push(...unknownArgumentProblems(value[key], schema.properties[key], path ? `${path}.${key}` : key));
+ if (value[key] !== undefined) problems.push(...unknownArgumentProblems(value[key], properties[key], path ? `${path}.${key}` : key, closed));
}
return problems;
}
diff --git a/server/src/maintenance/ephemeral-migration-service.test.ts b/server/src/maintenance/ephemeral-migration-service.test.ts
index 4f11ca250cc..f5cb89bd7ed 100644
--- a/server/src/maintenance/ephemeral-migration-service.test.ts
+++ b/server/src/maintenance/ephemeral-migration-service.test.ts
@@ -1,9 +1,9 @@
import { randomBytes, randomUUID } from "node:crypto";
-import { afterEach, expect, it } from "vitest";
-import { startEphemeralMigrationService, type EphemeralMigrationResult } from "./ephemeral-migration-service.js";
+import { afterEach, expect, it, vi } from "vitest";
+import { ownerRefusalCode, startEphemeralMigrationService, type EphemeralMigrationResult } from "./ephemeral-migration-service.js";
let service: Awaited> | undefined;
-afterEach(async () => { await service?.close(); service = undefined; });
+afterEach(async () => { await service?.close(); service = undefined; vi.restoreAllMocks(); });
const result = (): EphemeralMigrationResult => ({ counts: { files: 2 }, eligibility: { eligible: true, blockers: [] }, decisionSigningSecret: randomBytes(32).toString("base64") });
async function start(migrate: Parameters[0]["migrate"], timeoutMs?: number) {
const id = randomUUID(), token = randomBytes(32).toString("base64url"), commit = "a".repeat(40);
@@ -41,6 +41,51 @@ it("fails closed without exposing owner errors or credentials", async () => {
expect((await request("/export", "POST")).status).toBe(409);
});
+it("reports an owner's structured refusal and the workspace it was moving, in the receipt and the deployment log", async () => {
+ const logged = vi.spyOn(console, "error").mockImplementation(() => {});
+ const workspaceId = randomUUID();
+ const refusal = "remote_workspace_migration_blocked:archived_git_source_unavailable,local_source_unsafe_or_missing";
+ const { request } = await start(async (_signal, phase) => {
+ phase(`workspace:${workspaceId}`);
+ throw new Error(refusal);
+ });
+ await service!.finished;
+ expect(await (await request("/status")).json()).toMatchObject({ state: "blocked", phase: `workspace:${workspaceId}`, failure: refusal });
+ expect(logged.mock.calls.map(call => JSON.parse(String(call[0]))))
+ .toEqual([{ event: "ephemeral_migration_blocked", phase: `workspace:${workspaceId}`, failure: refusal }]);
+});
+
+it("logs only the sanitized code for an arbitrary owner error", async () => {
+ const logged = vi.spyOn(console, "error").mockImplementation(() => {});
+ await start(async () => { throw new Error("provider rejected secret-value at https://private.invalid"); });
+ await service!.finished;
+ expect(logged.mock.calls.map(call => JSON.parse(String(call[0]))))
+ .toEqual([{ event: "ephemeral_migration_blocked", phase: "configuration", failure: "owner_migration_failed" }]);
+});
+
+it.each([
+ ["remote_workspace_migration_blocked:workspace_recovery_unresolved", "remote_workspace_migration_blocked:workspace_recovery_unresolved"],
+ ["active_execution_requires_drain", "active_execution_requires_drain"],
+ // Only known reason-list owners may carry text after a colon.
+ ["provider:secretvalue", "owner_migration_failed"],
+ ["a:b:c", "owner_migration_failed"],
+ // A known owner keeps its code when its reasons are malformed.
+ ["remote_workspace_migration_blocked:", "remote_workspace_migration_blocked"],
+ ["remote_workspace_migration_blocked:Secret", "remote_workspace_migration_blocked"],
+ ["remote_workspace_migration_blocked:a:b", "remote_workspace_migration_blocked"],
+ ["x".repeat(81), "owner_migration_failed"],
+])("reports %s as %s", (message, expected) => {
+ expect(ownerRefusalCode(new Error(message))).toBe(expected);
+});
+
+it("keeps the owner and its first reasons when a refusal names too many", () => {
+ const reasons = Array.from({ length: 40 }, (_, index) => `reason_${String.fromCharCode(97 + index % 26)}${index >= 26 ? "_again" : ""}`);
+ const code = ownerRefusalCode(new Error(`remote_workspace_migration_blocked:${reasons.join(",")}`));
+ expect(code).toBe(`remote_workspace_migration_blocked:${[...reasons.slice(0, 31), "more_reasons_truncated"].join(",")}`);
+ expect(ownerRefusalCode(new Error(`remote_workspace_migration_blocked:${reasons.slice(0, 17).join(",")}`)))
+ .toBe(`remote_workspace_migration_blocked:${reasons.slice(0, 17).join(",")}`);
+});
+
it("rejects incomplete eligibility even when a key was recovered", async () => {
const { request } = await start(async () => ({ ...result(), eligibility: { eligible: false, blockers: ["legacy_data"] } }));
await service!.finished;
diff --git a/server/src/maintenance/ephemeral-migration-service.ts b/server/src/maintenance/ephemeral-migration-service.ts
index e4cfd957790..f2bb9ab8d5e 100644
--- a/server/src/maintenance/ephemeral-migration-service.ts
+++ b/server/src/maintenance/ephemeral-migration-service.ts
@@ -7,6 +7,27 @@ export interface EphemeralMigrationResult {
decisionSigningSecret: string;
}
+const OWNER_CODE = /^[a-z_]{1,80}$/;
+// Owners that refuse with their fixed reason list as `owner_code:reason,...`.
+// Only these may carry reasons; any other colon message is not an owner code.
+const OWNER_REASON_LISTS = new Set(["remote_workspace_migration_blocked"]);
+const MAX_REPORTED_REASONS = 32;
+
+/** Reports an owner's refusal without echoing arbitrary error text. A known
+ * owner keeps its code when its reason list is malformed or too long. */
+export function ownerRefusalCode(error: unknown) {
+ const message = error instanceof Error ? error.message : "";
+ if (OWNER_CODE.test(message)) return message;
+ const separator = message.indexOf(":");
+ const owner = message.slice(0, separator);
+ if (separator < 0 || !OWNER_REASON_LISTS.has(owner)) return "owner_migration_failed";
+ const reasons = message.slice(separator + 1).split(",");
+ if (!reasons.every(reason => OWNER_CODE.test(reason))) return owner;
+ return reasons.length > MAX_REPORTED_REASONS
+ ? `${owner}:${[...reasons.slice(0, MAX_REPORTED_REASONS - 1), "more_reasons_truncated"].join(",")}`
+ : `${owner}:${reasons.join(",")}`;
+}
+
/** A dedicated maintenance process, never mounted on the ordinary app router.
* Cloud supplies a fresh attempt token and keeps tenant routing closed. Only
* the authenticated export transfers the original key to its durable vault. */
@@ -59,9 +80,11 @@ export async function startEphemeralMigrationService(input: {
} catch (error) {
// Owner codes are safe diagnostics. Never echo arbitrary SDK errors,
// credential-bearing URLs, file contents or stack traces through HTTP.
- const code = error instanceof Error ? error.message : "owner_migration_failed";
- failure = /^[a-z_]{1,80}$/.test(code) ? code : "owner_migration_failed";
+ failure = ownerRefusalCode(error);
state = "blocked";
+ // The maintenance process has no other log. Record the same fixed codes
+ // so the provider's deployment log names the refusal too.
+ console.error(JSON.stringify({ event: "ephemeral_migration_blocked", phase, failure }));
} finally {
// Successful export authority expires at the original deadline too.
// A failed migration has no export authority to retain.
diff --git a/server/src/routes/ai-connections.ts b/server/src/routes/ai-connections.ts
index 23203f7ad9f..43256c347b0 100644
--- a/server/src/routes/ai-connections.ts
+++ b/server/src/routes/ai-connections.ts
@@ -32,6 +32,8 @@ import { assertBoard, assertBoardOrAgent, assertCompanyAccess, getActorInfo } fr
import { forbidden, notFound, unprocessable } from "../errors.js";
import { accessService } from "../services/access.js";
import { logActivity } from "../services/activity-log.js";
+import { logger } from "../middleware/logger.js";
+import { releaseProviderLimitWaits } from "../services/heartbeat/provider-limit-wait.js";
import { aiConnectionRouterService } from "../services/ai-connection-router.js";
import { aiConnectionService } from "../services/ai-connections.js";
import { validate } from "../middleware/validate.js";
@@ -383,7 +385,7 @@ export function aiConnectionRoutes(db: Db, options: Parameters logger.warn({ err, companyId }, "failed to release usage waits after a default change"));
+ }
res.json({ ok: true });
},
);
diff --git a/server/src/routes/issues.ts b/server/src/routes/issues.ts
index fdb454a04a4..3ab19fe35b3 100644
--- a/server/src/routes/issues.ts
+++ b/server/src/routes/issues.ts
@@ -14094,6 +14094,40 @@ export function issueRoutes(
);
const actor = getActorInfo(req);
+ const waitingRetry = issue.monitorNextCheckAt
+ ? null
+ : await svc.getCurrentScheduledRetry?.(issue.id, { companyId: issue.companyId });
+ if (waitingRetry?.status === "scheduled_retry") {
+ // The banner also shows "Check now" for a scheduled retry, such as a
+ // usage wait. With no monitor, the check is that retry: it starts now
+ // and rechecks availability before any work. It needs the same access
+ // as starting that retry directly.
+ assertBoard(req);
+ if (!(await assertIssueReadAllowed(req, res, issue))) return;
+ const decision = await decideIssueAccess(req, issue, "issue:mutate");
+ if (!decision.allowed) throw forbidden(decision.explanation, authorizationDeniedDetails(decision));
+ const retry = await heartbeat.retryScheduledRetryNow({
+ issueId: issue.id,
+ actor: { actorType: actor.actorType, actorId: actor.actorId },
+ });
+ await logActivity(db, {
+ companyId: issue.companyId, actorType: actor.actorType, actorId: actor.actorId,
+ action: "issue.scheduled_retry_retry_now", entityType: "issue", entityId: issue.id,
+ agentId: retry.scheduledRetry?.agentId ?? issue.assigneeAgentId ?? null,
+ runId: retry.scheduledRetry?.runId ?? null,
+ details: { outcome: retry.outcome, message: retry.message, source: "monitor_check_now" },
+ });
+ if (retry.outcome === "no_scheduled_retry") {
+ throw conflict("Nothing is waiting to be checked on this task anymore. Refresh the task to see its current state.",
+ { code: "issue_monitor_check_deferred", reason: "no_scheduled_check" });
+ }
+ if (retry.outcome === "gate_suppressed") {
+ throw conflict("The check could not start because the task changed. Refresh the task to see its current state.",
+ { code: "issue_monitor_check_deferred", reason: "gate_suppressed" });
+ }
+ res.json({ ok: true, outcome: retry.outcome, message: retry.message });
+ return;
+ }
const result = await heartbeat.triggerIssueMonitor(issue.id, {
actorType: actor.actorType,
actorId: actor.actorId,
diff --git a/server/src/services/agent-configuration.ts b/server/src/services/agent-configuration.ts
index 7cda733a3d0..caaa776c708 100644
--- a/server/src/services/agent-configuration.ts
+++ b/server/src/services/agent-configuration.ts
@@ -25,6 +25,7 @@ import { secretService, assertClaudeOAuthBindingInvariant } from "./secrets.js";
import { agentCredentialService } from "./agent-credentials.js";
import { clearPrimaryAgent } from "./primary-agent.js";
import { budgetServiceInTransaction } from "./budgets.js";
+import { releaseProviderLimitWaits } from "./heartbeat/provider-limit-wait.js";
export async function lockAgentConfigurationInteractions(tx: Db, id: string, data: AgentConfigurationPatch, options?: UpdateAgentOptions) {
const pluginOrigin = currentPluginInteractionOrigin();
@@ -193,6 +194,19 @@ export async function completeAgentConfiguration(txDb: Db, existing: AgentConfig
);
}
+ const priorRuntime = isPlainRecord(existing.runtimeConfig) ? existing.runtimeConfig : {};
+ const nextRuntime = isPlainRecord(updated.runtimeConfig) ? updated.runtimeConfig : {};
+ if (!isDeepStrictEqual(priorRuntime.aiConnection, nextRuntime.aiConnection)) {
+ // A usage limit belongs to the account it was reported on. Work held for
+ // it rechecks now, against the account the agent uses from here on.
+ const actorAgentId = options?.recordRevision?.createdByAgentId;
+ const actorUserId = options?.recordRevision?.createdByUserId;
+ await releaseProviderLimitWaits(txDb, {
+ companyId: existing.companyId, agentId: id, reason: "ai_connection_changed", publications,
+ actor: actorAgentId ? { actorType: "agent", actorId: actorAgentId } : actorUserId ? { actorType: "user", actorId: actorUserId } : undefined,
+ });
+ }
+
if (normalizedPatch.budgetMonthlyCents !== undefined) {
await budgetServiceInTransaction(txDb, publications).upsertPolicy(existing.companyId, {
scopeType: "agent", scopeId: id, amount: normalizedPatch.budgetMonthlyCents,
diff --git a/server/src/services/ai-connections.ts b/server/src/services/ai-connections.ts
index 58a199f2cc5..ca3d8713e00 100644
--- a/server/src/services/ai-connections.ts
+++ b/server/src/services/ai-connections.ts
@@ -181,6 +181,7 @@ export function aiConnectionService(db: Db) {
userId: string,
grantId: string,
) {
+ /** The grant that was the default before this change, if any. */
return db.transaction(async (tx) => {
const [row] = await tx
.select({ connection: toolConnections, grant: connectionGrants })
@@ -211,12 +212,17 @@ export function aiConnectionService(db: Db) {
);
const metadata = aiConnectionMetadataSchema.parse(row.connection.config.ai);
if (metadata.routing) throw unprocessable("Custom providers use an explicit connection selection on the agent.");
+ const [previous] = await tx.select({ grantId: aiProviderDefaults.grantId }).from(aiProviderDefaults).where(and(
+ eq(aiProviderDefaults.companyId, companyId), eq(aiProviderDefaults.userId, userId),
+ eq(aiProviderDefaults.provider, metadata.provider),
+ ));
await tx.insert(aiProviderDefaults)
.values({ companyId, userId, provider: metadata.provider, grantId })
.onConflictDoUpdate({
target: [aiProviderDefaults.companyId, aiProviderDefaults.userId, aiProviderDefaults.provider],
set: { grantId, updatedAt: new Date() },
});
+ return { previousGrantId: previous?.grantId ?? null };
});
}
async function readableAccount(companyId: string, userId: string, connectionId: string, grantId?: string) {
diff --git a/server/src/services/chat-channels/github/response-execution.ts b/server/src/services/chat-channels/github/response-execution.ts
index 1be29f7fae5..8156dae9561 100644
--- a/server/src/services/chat-channels/github/response-execution.ts
+++ b/server/src/services/chat-channels/github/response-execution.ts
@@ -1,5 +1,6 @@
import type { Db } from "@paperclipai/db";
-import { githubRunReplyState } from "../../chat-run-publications.js";
+import { githubLatestTaskResponseUrl, githubRunReplyState } from "../../chat-run-publications.js";
+import { baseThreadId, isMainPullThread } from "./response-target.js";
import { FINISHED_RUN_STATUSES, readGitHubResponseRun, type GitHubResponseRunRead, type GitHubResponseRunState } from "./response-run-state.js";
export { responseRunColumns as githubResponseRunColumns } from "./response-run-state.js";
@@ -12,8 +13,18 @@ export type GitHubResponseExecutionInput = {
sourceMessageId: string | null;
issueStatus: string;
deliveryCreatedAt: Date;
+ /** The request's conversation thread, such as `github:owner/repo:12` or `github:owner/repo:12:rc:34`. */
+ threadId: string;
};
+const STATUS_TEXT = {
+ handled: "This request has been handled. See the response in this conversation.",
+ paused: "Work is paused. Your request is saved. See the Paperclip task for details.",
+ publish_failed: "This turn's reply could not be published. See the Paperclip task for details.",
+ ended: "This turn ended without publishing a final response. See the Paperclip task for details.",
+ stopped: "This turn stopped before completing. See the Paperclip task for details.",
+} as const;
+
const finished = (status: string | undefined) => (FINISHED_RUN_STATUSES as readonly string[]).includes(status ?? "");
/** Whether the task is idle and this request settles from the earlier run that
@@ -43,13 +54,26 @@ export async function githubResponseExecution(db: Db, input: GitHubResponseExecu
: input.issueStatus === "blocked" && latestRun?.status !== "running";
const presentationPending = !!run && answersRequest && run.nativePresentationPending && reply === "none";
const passiveResponseWait = !!run && answersRequest && run.passiveResponseWait && reply === "none";
- const body = presentationPending ? undefined : run ? reply === "confirmed" ? "This request has been handled. See the response in this conversation."
- : paused ? "Work is paused. Your request is saved. See the Paperclip task for details."
- : run.status === "succeeded" ? "This turn ended without publishing a final response. See the Paperclip task for details."
- : "This turn stopped before completing. See the Paperclip task for details."
- : paused ? "Work is paused. Your request is saved. See the Paperclip task for details." : undefined;
+ const unanswered = !!run && !presentationPending && reply === "none" && !paused;
+ const latestResponse = unanswered ? await githubLatestTaskResponseUrl(db, { companyId: input.companyId,
+ endpointId: input.endpointId, issueId: input.issueId, since: input.deliveryCreatedAt, baseThreadId: baseThreadId(input.threadId) })
+ : null;
+ const taskFinished = ["done", "cancelled"].includes(input.issueStatus);
+ // Precedence: a later published response is more useful to the reader than
+ // any notice about this request's own run, including a refused reply.
+ const outcome: keyof typeof STATUS_TEXT | "link" | "waiting" | null =
+ presentationPending ? null
+ : !run ? paused ? "paused" : null
+ : reply === "confirmed" ? "handled"
+ : paused ? "paused"
+ : latestResponse ? "link"
+ : run.passiveResponseWait && !isMainPullThread(input.threadId) && !taskFinished ? "waiting"
+ : run.responsePublicationFailed ? "publish_failed"
+ : run.status === "succeeded" ? "ended" : "stopped";
+ const body = outcome === null || outcome === "waiting" ? undefined
+ : outcome === "link" ? `See the [latest response](${latestResponse}).` : STATUS_TEXT[outcome];
return {
- body, paused, reply, running: requestRunning, presentationPending, passiveResponseWait,
+ body, outcome, paused, reply, running: requestRunning, presentationPending, passiveResponseWait,
versionAt: run ? new Date(Math.max(run.updatedAt.getTime(), input.deliveryCreatedAt.getTime()))
: paused ? input.deliveryCreatedAt : undefined,
version: JSON.stringify([latestRun?.id ?? null, latestRun?.status ?? null,
diff --git a/server/src/services/chat-channels/github/response-run-state.ts b/server/src/services/chat-channels/github/response-run-state.ts
index 71a34839ebb..0f023d3f3a6 100644
--- a/server/src/services/chat-channels/github/response-run-state.ts
+++ b/server/src/services/chat-channels/github/response-run-state.ts
@@ -24,6 +24,7 @@ export const responseRunColumns = {
nativePresentationPending: sql`coalesce(
${heartbeatRuns.status} = 'succeeded'
and ${heartbeatRuns.runtimeMode} = 'native'
+ and ${heartbeatRuns.resultJson} #>> '{responsePublication,state}' is distinct from 'failed'
and (${heartbeatRuns.nativePhase} is distinct from 'committed'
or ${heartbeatRuns.resultJson}->'presentationDecision'->>'schema' is distinct from 'paperclip.run_presentation_decision.v1'
or coalesce(${heartbeatRuns.resultJson}->'presentationDecision'->>'commentAction', '') not in ('none', 'create', 'reuse')),
@@ -31,6 +32,7 @@ export const responseRunColumns = {
)`,
// Project only the server-committed no-publication decision, never the
// potentially large native result or model-authored summary.
+ responsePublicationFailed: sql`coalesce(${heartbeatRuns.resultJson} #>> '{responsePublication,state}' = 'failed', false)`,
passiveResponseWait: sql`coalesce(
${heartbeatRuns.status} = 'succeeded'
and ${heartbeatRuns.runtimeMode} = 'native'
diff --git a/server/src/services/chat-channels/github/response-target.ts b/server/src/services/chat-channels/github/response-target.ts
index b45ef3c8d81..f80b416ffe5 100644
--- a/server/src/services/chat-channels/github/response-target.ts
+++ b/server/src/services/chat-channels/github/response-target.ts
@@ -14,8 +14,14 @@ export type GitHubResponseSource = {
repositoryId?: string;
};
+/** A pull request's main conversation; inline review threads add `:rc:`. */
+const MAIN_PULL_THREAD = "^github:[^:]+:[1-9][0-9]*$";
+export const isMainPullThread = (threadId: string) => new RegExp(MAIN_PULL_THREAD).test(threadId);
+/** The conversation thread the request's pull request or issue starts from. */
+export const baseThreadId = (threadId: string) => threadId.replace(/:rc:[1-9][0-9]*$/, "");
+
export const isMainPullResponse = (source: GitHubResponseSource) =>
- !source.replyId && /^github:[^:]+:[1-9][0-9]*$/.test(source.conversation.externalThreadId);
+ !source.replyId && isMainPullThread(source.conversation.externalThreadId);
export const requestResponseMarker = (source: GitHubResponseSource) => ``;
diff --git a/server/src/services/chat-channels/github/terminal-response-work.test.ts b/server/src/services/chat-channels/github/terminal-response-work.test.ts
index f5781c0daaf..ef4d8c9f33c 100644
--- a/server/src/services/chat-channels/github/terminal-response-work.test.ts
+++ b/server/src/services/chat-channels/github/terminal-response-work.test.ts
@@ -237,6 +237,48 @@ describe.skipIf(!support.supported)("GitHub terminal response sweep backlog", ()
expect(new Set(acknowledged)).toEqual(new Set(f.stale.map(request => request.deliveryId)));
}, 300_000);
+ it("reads a waiting inline request again once a reply is published, without a hint", async () => {
+ vi.useFakeTimers({ toFake: ["Date", "setTimeout", "clearTimeout"], shouldAdvanceTime: true });
+ const f = await seed();
+ const client = db.$client, issueId = f.runs[0]!.issueId;
+ const [{ main, resource }] = await client.unsafe(`select id as main, resource_id as resource from chat_conversations
+ where issue_id = $1 and external_thread_id = 'github:paperclipai/paperclip:1'`, [issueId]);
+ const [{ conversation }] = await client.unsafe(`insert into chat_conversations (company_id, endpoint_id, issue_id, resource_id,
+ external_conversation_id, external_label, external_thread_id)
+ values ($1, $2, $3, $4, 'github:paperclipai/paperclip:1:rc:5001', 'thread', 'github:paperclipai/paperclip:1:rc:5001')
+ returning id as conversation`, [f.companyId, f.endpointId, issueId, resource]);
+ const [{ delivery }] = await client.unsafe(`insert into chat_deliveries (company_id, endpoint_id, provider_event_id,
+ deduplication_key, event_kind, normalized_event, conversation_id, state)
+ values ($1, $2, 'inline-wait', 'inline-wait', 'message', '{}', $3, 'processed') returning id as delivery`,
+ [f.companyId, f.endpointId, conversation]);
+ const [{ comment }] = await client.unsafe(`insert into issue_comments (company_id, issue_id, body)
+ values ($1, $2, 'Fixed') returning id as comment`, [f.companyId, issueId]);
+ await client.unsafe(`insert into chat_message_links (company_id, endpoint_id, conversation_id, delivery_id, comment_id,
+ provider_message_id, direction) values ($1, $2, $3, $4, $5, 'inline-wait-in', 'inbound')`,
+ [f.companyId, f.endpointId, conversation, delivery, comment]);
+ await db.insert(chatActions).values({ companyId: f.companyId, endpointId: f.endpointId, conversationId: conversation,
+ deliveryId: delivery, kind: "github_response_comment", providerActionId: `github_response:${delivery}`,
+ payload: { agentId: f.agentId }, status: "processed",
+ result: { id: "9001", url: "https://github.com/paperclipai/paperclip/pull/1#discussion_r9001", final: false,
+ versionAt: new Date(Date.UTC(2026, 9, 28)).toISOString() } });
+ await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, nativeIssueId: issueId, issueId,
+ scopeKind: "issue", status: "succeeded", runtimeMode: "native", nativePhase: "committed",
+ contextSnapshot: { issueId, wakeCommentId: comment }, createdAt: new Date(Date.UTC(2026, 9, 28) + 3_000_000),
+ resultJson: { finalizationPhase: "committed", finalizationReasonCode: "external_chat_response_waiting",
+ nativeResult: { schema: "paperclip.run_result.v1", reportedWorkDisposition: "yielded",
+ continuation: { kind: "response_wake", idempotencyKey: "inline-wait" } },
+ presentationDecision: { schema: "paperclip.run_presentation_decision.v1", chosenSource: "none",
+ commentAction: "none", reasonCodes: ["yielded_control_plane_wait"] } } });
+ await start(); await advance(5_000);
+ expect(acknowledged).not.toContain(delivery);
+ await db.insert(chatActions).values({ companyId: f.companyId, endpointId: f.endpointId, conversationId: main,
+ kind: "github_review_publication", providerActionId: `github_publication:${randomUUID()}`, status: "processed",
+ payload: { operation: "comment", session: { companyId: f.companyId, issueId, runId: f.runs[0]!.runId } },
+ result: { id: "9002", url: "https://github.com/paperclipai/paperclip/pull/1#issuecomment-9002" } });
+ await companyHint(f.companyId); await advance(31_000);
+ expect(acknowledged).toContain(delivery);
+ }, 300_000);
+
it("acknowledges every owed request of a page when one run's requester provenance changed", async () => {
vi.useFakeTimers({ toFake: ["Date", "setTimeout", "clearTimeout"], shouldAdvanceTime: true });
const f = await seed("received");
diff --git a/server/src/services/chat-channels/github/terminal-response-work.ts b/server/src/services/chat-channels/github/terminal-response-work.ts
index 0915d04239f..5195a749c35 100644
--- a/server/src/services/chat-channels/github/terminal-response-work.ts
+++ b/server/src/services/chat-channels/github/terminal-response-work.ts
@@ -8,7 +8,7 @@ import { githubResponseExecution } from "./response-execution.js";
import { readGitHubResponseRuns, type GitHubResponseRunRead } from "./response-run-state.js";
import { githubResponseReconstructionIntervalMs, type GitHubResponseSweepScope as Scope } from "./response-sweep-scope.js";
import { HttpError } from "../../../errors.js";
-export const GITHUB_TERMINAL_RESPONSE_DECISION_VERSION = "v2";
+export const GITHUB_TERMINAL_RESPONSE_DECISION_VERSION = "v3";
type Entry = { id: string; companyId: string; endpointId: string; deliveryId: string;
issueId: string; conversationId: string; repositoryId: string | null; number: number | null; dueAt: number };
@@ -49,14 +49,19 @@ export function registerGitHubTerminalResponseWork(
// the request's own row changes. Such a request records this key, and a broad
// rebuild skips it until one of them changes. A targeted load still reads it.
const actionVersion = sql`extract(epoch from ${chatActions.updatedAt})::text`;
+ const latestPublication = sql`coalesce((select extract(epoch from max(p.updated_at))::text from ${chatActions} p
+ where p.company_id = ${chatActions.companyId} and p.endpoint_id = ${chatActions.endpointId}
+ and p.kind = 'github_review_publication' and p.status = 'processed'
+ and p.payload->'session'->>'issueId' = ${issues.id}::text), 'none')`;
const waitKey = sql`${GITHUB_TERMINAL_RESPONSE_DECISION_VERSION} || '|' || coalesce(${latestIssueRun.version}, 'none')
- || '|' || ${issues.status} || '|' || ${actionVersion}`;
+ || '|' || ${issues.status} || '|' || ${actionVersion} || '|' || ${latestPublication}`;
async function page(scope?: Scope, cursor?: string, actionId?: string) {
return db.select({
id: chatActions.id, companyId: chatActions.companyId, endpointId: chatActions.endpointId,
deliveryId: chatActions.deliveryId, conversationId: chatConversations.id, issueId: issues.id,
agentId: chatEndpoints.assignedAgentId, issueStatus: issues.status,
- deliveryCreatedAt: chatDeliveries.createdAt, repositoryId, number, result: chatActions.result, actionVersion, waitKey,
+ deliveryCreatedAt: chatDeliveries.createdAt, repositoryId, number,
+ threadId: chatConversations.externalThreadId, result: chatActions.result, actionVersion, waitKey,
sourceMessageId: sql`(select l.comment_id from ${chatMessageLinks} l
where l.company_id = ${chatActions.companyId} and l.endpoint_id = ${chatActions.endpointId}
and l.delivery_id = ${chatActions.deliveryId} and l.direction = 'inbound' limit 1)`,
diff --git a/server/src/services/chat-github-response-comments.ts b/server/src/services/chat-github-response-comments.ts
index b3f439f75c5..52fbcea3f4a 100644
--- a/server/src/services/chat-github-response-comments.ts
+++ b/server/src/services/chat-github-response-comments.ts
@@ -246,7 +246,7 @@ export function githubResponseCommentService(db: Db, fetchImpl = fetch) {
companyId: source.endpoint.companyId, endpointId: source.endpoint.id,
agentId: source.endpoint.assignedAgentId!, issueId: source.conversation.issueId!, deliveryId,
sourceMessageId: source.sourceMessageId, issueStatus: source.issueStatus,
- deliveryCreatedAt: source.delivery.createdAt,
+ deliveryCreatedAt: source.delivery.createdAt, threadId: source.conversation.externalThreadId,
});
if (execution.reply === "unsettled") {
// An acknowledged request waits for its reply to settle without
diff --git a/server/src/services/chat-run-publications.ts b/server/src/services/chat-run-publications.ts
index 9dfae17c724..6ee49861800 100644
--- a/server/src/services/chat-run-publications.ts
+++ b/server/src/services/chat-run-publications.ts
@@ -4,19 +4,7 @@ import { enqueueSafeNativeChatProgress } from "./chat-native-progress.js";
export { enqueueSafeNativeChatProgress } from "./chat-native-progress.js";
import type { ChatRunMilestoneScope } from "./chat-run-milestone-notifications.js";
import { notifyChatPublicationWork } from "./chat-work-notifications.js";
-import {
- and,
- asc,
- eq,
- gt,
- gte,
- inArray,
- isNull,
- ne,
- notExists,
- or,
- sql,
-} from "drizzle-orm";
+import { and, asc, eq, gt, gte, inArray, isNull, ne, notExists, or, sql, desc } from "drizzle-orm";
import type { Db } from "@paperclipai/db";
import {
agents,
@@ -117,6 +105,43 @@ export async function resolveChatRunPresentationAuthorizationReason(
return CHAT_RUN_PRESENTATION_AUTHORIZATION_REASON;
}
+/** The latest response the agent published on GitHub for the task after
+ * `since`, in a conversation of the same pull request or issue. A processed
+ * publication's updated time is when GitHub accepted it. */
+export async function githubLatestTaskResponseUrl(
+ db: Db,
+ input: { companyId: string; endpointId: string; issueId: string; since: Date; baseThreadId: string },
+): Promise {
+ // An assessment published only as inline findings has no summary URL; its
+ // finding receipts on the saved review hold the published comment URLs.
+ const url = sql`coalesce(${chatActions.result}->>'summaryUrl', ${chatActions.result}->>'url',
+ (select receipt.value->>'url' from ${chatGitHubReviews} review, jsonb_each(review.publication_receipts) receipt
+ where review.company_id = ${chatActions.companyId} and review.endpoint_id = ${chatActions.endpointId}
+ and review.issue_id = ${input.issueId}::uuid
+ and review.id = (case when coalesce(${chatActions.payload}->>'reviewId', ${chatActions.result}->>'reviewId')
+ ~* '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$'
+ then coalesce(${chatActions.payload}->>'reviewId', ${chatActions.result}->>'reviewId')::uuid end)
+ and receipt.value->>'url' like 'https://github.com/%'
+ order by receipt.key limit 1))`;
+ const [latest] = await db.select({ url }).from(chatActions).innerJoin(chatConversations, and(
+ eq(chatConversations.id, chatActions.conversationId), eq(chatConversations.companyId, chatActions.companyId),
+ eq(chatConversations.endpointId, chatActions.endpointId),
+ sql`(${chatConversations.externalThreadId} = ${input.baseThreadId}
+ or ${chatConversations.externalThreadId} like ${input.baseThreadId.replace(/[\\%_]/g, "\\$&") + ":rc:%"})`,
+ )).where(and(
+ eq(chatActions.companyId, input.companyId),
+ eq(chatActions.endpointId, input.endpointId),
+ eq(chatActions.kind, "github_review_publication"),
+ eq(chatActions.status, "processed"),
+ sql`${chatActions.payload}->'session'->>'companyId' = ${input.companyId}`,
+ sql`${chatActions.payload}->'session'->>'issueId' = ${input.issueId}`,
+ sql`${chatActions.payload}->>'operation' in ('comment', 'formal_review', 'assessment')`,
+ sql`${url} like 'https://github.com/%'`,
+ sql`${chatActions.updatedAt} > ${input.since.toISOString()}::timestamptz`,
+ )).orderBy(desc(chatActions.updatedAt)).limit(1);
+ return latest?.url ?? null;
+}
+
/** A missing receipt is not proof that a provider write never arrived. */
export async function githubRunReplyState(
db: Db,
diff --git a/server/src/services/connectors/paperclip-defined-tools.ts b/server/src/services/connectors/paperclip-defined-tools.ts
index 673c5d4c408..b4a948341e8 100644
--- a/server/src/services/connectors/paperclip-defined-tools.ts
+++ b/server/src/services/connectors/paperclip-defined-tools.ts
@@ -1,16 +1,43 @@
-import { googleWorkspaceRestToolDefinition, type GoogleWorkspaceRestToolDefinition } from "../google-workspace-rest-dispatch.js";
+import { googleWorkspaceRestFallbackDefinition, googleWorkspaceRestToolDefinition } from "../google-workspace-rest-dispatch.js";
+import type { toolConnections } from "@paperclipai/db";
+import { pluginConnectionMethod, pluginConnectionToolDefinition } from "../plugin-connector-runtime.js";
+import { shouldQuarantineNewEntries } from "../tool-access/catalog/descriptors.js";
-export type PaperclipDefinedTool = GoogleWorkspaceRestToolDefinition;
+export interface PaperclipDefinedToolDefinition {
+ name: string;
+ title: string | null;
+ description: string | null;
+ inputSchema: Record;
+ outputSchema: Record | null;
+ annotations: Record;
+}
type Connection = { config: Record };
const PAPERCLIP_DEFINED_TOOL_SOURCES: ReadonlyArray<{
matches: (connection: Connection) => boolean;
- definition: (toolName: string) => PaperclipDefinedTool | null;
+ definition: (toolName: string) => PaperclipDefinedToolDefinition | null;
+ formerDefinition: (toolName: string) => PaperclipDefinedToolDefinition | null;
}> = [
- { matches: (connection) => connection.config.sourceTemplateKey === "google-workspace", definition: googleWorkspaceRestToolDefinition },
+ {
+ matches: (connection) => connection.config.sourceTemplateKey === "google-workspace",
+ definition: googleWorkspaceRestToolDefinition,
+ formerDefinition: googleWorkspaceRestFallbackDefinition,
+ },
];
-export function paperclipDefinedTool(connection: Connection, toolName: string): PaperclipDefinedTool | null {
+export function paperclipDefinedTool(connection: Connection, toolName: string): PaperclipDefinedToolDefinition | null {
return PAPERCLIP_DEFINED_TOOL_SOURCES.find((source) => source.matches(connection))?.definition(toolName) ?? null;
}
+
+export function formerPaperclipDefinedTool(connection: Connection, toolName: string): PaperclipDefinedToolDefinition | null {
+ return PAPERCLIP_DEFINED_TOOL_SOURCES.find((source) => source.matches(connection))?.formerDefinition(toolName) ?? null;
+}
+
+export function currentConnectionToolDefinition(connection: typeof toolConnections.$inferSelect, toolName: string): PaperclipDefinedToolDefinition | null {
+ const trusted = paperclipDefinedTool(connection, toolName);
+ if (trusted) return trusted;
+ if (shouldQuarantineNewEntries(connection)) return null;
+ if (pluginConnectionMethod(connection)?.method.tools?.kind !== "static") return null;
+ return pluginConnectionToolDefinition(connection, toolName);
+}
diff --git a/server/src/services/google-workspace-rest-dispatch.test.ts b/server/src/services/google-workspace-rest-dispatch.test.ts
index 05af29aa319..884ba3d1c0a 100644
--- a/server/src/services/google-workspace-rest-dispatch.test.ts
+++ b/server/src/services/google-workspace-rest-dispatch.test.ts
@@ -1,9 +1,10 @@
import { GOOGLE_WORKSPACE_TOOL_TRANSPORT, googleWorkspaceServiceToolNames } from "@paperclipai/shared";
-import { describe, expect, it, vi } from "vitest";
+import { describe, expect, it, onTestFinished, vi } from "vitest";
import {
callGoogleWorkspaceRest,
googleWorkspaceRestToolDefinition,
googleWorkspaceCatalogToolTitle,
+ googleWorkspaceMcpPreflightRefusal,
googleWorkspaceRestTransportGaps,
listGoogleWorkspaceRest,
probeGoogleWorkspaceRest,
@@ -12,6 +13,8 @@ import {
describe("Google Workspace REST transport eligibility", () => {
it("switches no service to paperclip_rest unless the REST tools cover its whole allowlist", () => {
expect(googleWorkspaceRestTransportGaps()).toEqual([]);
+ expect(googleWorkspaceRestTransportGaps({ ...GOOGLE_WORKSPACE_TOOL_TRANSPORT, gmail: "paperclip_rest", drive: "paperclip_rest",
+ docs: "paperclip_rest", sheets: "paperclip_rest", slides: "paperclip_rest", calendar: "paperclip_rest" })).toEqual([]);
});
it("finds Gmail and Calendar fully implemented and Chat not", () => {
@@ -27,6 +30,9 @@ describe("Google Workspace REST transport eligibility", () => {
describe("googleWorkspaceRestToolDefinition", () => {
it("returns this folder's definition for a tool of a service on paperclip_rest, and nothing otherwise", () => {
+ const savedDocs = GOOGLE_WORKSPACE_TOOL_TRANSPORT.docs;
+ GOOGLE_WORKSPACE_TOOL_TRANSPORT.docs = "paperclip_rest";
+ onTestFinished(() => { GOOGLE_WORKSPACE_TOOL_TRANSPORT.docs = savedDocs; });
const rest = listGoogleWorkspaceRest("docs").find((tool) => tool.name === "update_doc")!;
expect(googleWorkspaceRestToolDefinition("docs__update_doc")).toEqual({ name: rest.name, title: "Docs: Edit a document", description: rest.description,
inputSchema: rest.inputSchema, outputSchema: rest.outputSchema, annotations: rest.annotations });
@@ -134,3 +140,28 @@ describe("probeGoogleWorkspaceRest", () => {
await expect(probe(403, { error: { errors: [{ reason: "accessNotConfigured" }] } })).resolves.toMatchObject({ ok: false, authFailure: null });
});
});
+
+describe("googleWorkspaceMcpPreflightRefusal", () => {
+ const eventResult = (event: Record) => ({ content: JSON.stringify(event), data: { isError: false, structuredContent: event } });
+
+ it("reads the event through the gateway's callback before a Calendar delete, and refuses a recurring series", async () => {
+ const callTool = vi.fn(async () => eventResult({ id: "s1", recurrence: ["RRULE:FREQ=WEEKLY"] }));
+ await expect(googleWorkspaceMcpPreflightRefusal({ toolName: "calendar__delete_event", arguments: { calendarId: "primary", eventId: "s1", sendUpdates: "none" },
+ inputSchema: {}, callTool })).resolves.toContain("whole recurring series");
+ expect(callTool).toHaveBeenCalledWith("calendar__get_event", { calendarId: "primary", eventId: "s1" });
+ });
+
+ it("passes one occurrence, refuses when the callback has no event, and reads nothing for other tools", async () => {
+ await expect(googleWorkspaceMcpPreflightRefusal({ toolName: "calendar__delete_event", arguments: { eventId: "s1_20261124" }, inputSchema: {},
+ callTool: async () => eventResult({ id: "s1_20261124", recurringEventId: "s1" }) })).resolves.toBeNull();
+ await expect(googleWorkspaceMcpPreflightRefusal({ toolName: "calendar__delete_event", arguments: { eventId: "e1" }, inputSchema: {},
+ callTool: async () => null })).resolves.toContain("Nothing was deleted.");
+ const callTool = vi.fn(async () => null);
+ await expect(googleWorkspaceMcpPreflightRefusal({ toolName: "calendar__update_event", arguments: { eventId: "e1" }, inputSchema: {}, callTool })).resolves.toBeNull();
+ await expect(googleWorkspaceMcpPreflightRefusal({ toolName: "drive__get_file_metadata", arguments: { fileId: "a,b" }, inputSchema: {}, callTool }))
+ .resolves.toContain("fileId must be one Google file ID");
+ await expect(googleWorkspaceMcpPreflightRefusal({ toolName: "chat__list_messages", arguments: { anything: 1 }, inputSchema: { type: "object", properties: {} }, callTool }))
+ .resolves.toBeNull();
+ expect(callTool).not.toHaveBeenCalled();
+ });
+});
diff --git a/server/src/services/google-workspace-rest-dispatch.ts b/server/src/services/google-workspace-rest-dispatch.ts
index 1876809efe5..8b888852e2b 100644
--- a/server/src/services/google-workspace-rest-dispatch.ts
+++ b/server/src/services/google-workspace-rest-dispatch.ts
@@ -2,6 +2,7 @@ import type { CallToolResult, Tool } from "@modelcontextprotocol/sdk/types.js";
import {
GOOGLE_WORKSPACE_TOOL_TRANSPORT,
googleWorkspaceServiceToolNames,
+ googleWorkspaceToolName,
googleWorkspaceToolTarget,
googleWorkspaceToolTitle,
type GoogleWorkspaceService,
@@ -10,6 +11,8 @@ import {
import {
GoogleWorkspaceAuthError,
callGoogleWorkspaceRestTool,
+ googleCalendarSeriesRefusal,
+ googleWorkspaceArgumentRefusal,
isGoogleWorkspaceRestService,
listGoogleWorkspaceRestTools,
probeGoogleWorkspaceRestService,
@@ -53,8 +56,12 @@ export interface GoogleWorkspaceRestToolDefinition {
}
export function googleWorkspaceRestToolDefinition(toolName: string): GoogleWorkspaceRestToolDefinition | null {
+ return googleWorkspaceTransport(toolName) === "paperclip_rest" ? googleWorkspaceRestFallbackDefinition(toolName) : null;
+}
+
+export function googleWorkspaceRestFallbackDefinition(toolName: string): GoogleWorkspaceRestToolDefinition | null {
const target = googleWorkspaceToolTarget(toolName);
- if (!target || target.transport !== "paperclip_rest" || !isGoogleWorkspaceRestService(target.service)) return null;
+ if (!target || !isGoogleWorkspaceRestService(target.service)) return null;
const tool = listGoogleWorkspaceRestTools(target.service).find((candidate) => candidate.name === target.leaf);
return tool ? {
name: tool.name,
@@ -66,6 +73,10 @@ export function googleWorkspaceRestToolDefinition(toolName: string): GoogleWorks
} : null;
}
+function googleWorkspaceTransport(toolName: string): GoogleWorkspaceToolTransport | null {
+ return googleWorkspaceToolTarget(toolName)?.transport ?? null;
+}
+
export function googleWorkspaceCatalogToolTitle(
sourceTemplateKey: unknown,
name: string,
@@ -79,6 +90,29 @@ export function googleWorkspaceCatalogToolTitle(
return googleWorkspaceToolTitle(name, restTitle ?? title);
}
+export interface GoogleWorkspaceMcpPreflight {
+ toolName: string;
+ arguments: unknown;
+ inputSchema: unknown;
+ callTool: (toolName: string, args: Record) => Promise;
+}
+
+export async function googleWorkspaceMcpPreflightRefusal(input: GoogleWorkspaceMcpPreflight): Promise {
+ const target = googleWorkspaceToolTarget(input.toolName);
+ if (!target || !isGoogleWorkspaceRestService(target.service)) return null;
+ const refusal = googleWorkspaceArgumentRefusal({ service: target.service, toolName: target.leaf, arguments: input.arguments, inputSchema: input.inputSchema });
+ if (refusal || target.service !== "calendar" || target.leaf !== "delete_event") return refusal;
+ const args = (input.arguments ?? {}) as Record;
+ const lookup = Object.fromEntries(["calendarId", "eventId"].filter((key) => args[key] !== undefined).map((key) => [key, args[key]]));
+ const result = await input.callTool(googleWorkspaceToolName("calendar", "get_event"), lookup);
+ const record = (result && typeof result === "object" ? result : {}) as { content?: unknown; data?: { isError?: unknown; structuredContent?: unknown } };
+ return googleCalendarSeriesRefusal({
+ isError: record.data?.isError === true,
+ structuredContent: record.data?.structuredContent ?? null,
+ text: typeof record.content === "string" ? record.content : null,
+ });
+}
+
export async function callGoogleWorkspaceRest(
input: GoogleWorkspaceRestContext & { toolName: string; arguments: unknown; maxResultBytes: number },
): Promise {
diff --git a/server/src/services/heartbeat.ts b/server/src/services/heartbeat.ts
index af4ed40565d..e3a896d0cd1 100644
--- a/server/src/services/heartbeat.ts
+++ b/server/src/services/heartbeat.ts
@@ -1973,6 +1973,18 @@ export function heartbeatService(
scheduleBoundedRetryForRun,
releaseIssueExecutionAndPromote,
finalizeAgentStatus,
+ // A task that names its own environment may run there as a low-trust
+ // review; only workspace preparation decides that, so dispatch checks then.
+ sshAuthentication: async (agent, run) => {
+ const issueId = readNonEmptyString(parseObject(run.contextSnapshot).issueId);
+ const [task] = issueId ? await db.select({ settings: issues.executionWorkspaceSettings }).from(issues)
+ .where(and(eq(issues.companyId, run.companyId), eq(issues.id, issueId))) : [];
+ if (parseIssueExecutionWorkspaceSettings(task?.settings, { includeEnvironmentId: true })?.environmentId) return "undecided";
+ return resolveSshAuthenticationBeforeRouting({
+ agentDefaultEnvironmentId: agent.defaultEnvironmentId, lowTrustIssueEnvironmentId: null,
+ environmentsSvc, instanceSettings,
+ });
+ },
});
async function executeRunAttempt(
@@ -2754,12 +2766,19 @@ export function heartbeatService(
if ("homeMode" in homeConfig) config = { ...config, homeMode: homeConfig.homeMode };
}
const persistedRouterPoolId = routerHasPersistedInput ? readNonEmptyString(parseObject(context.aiRouterSelection).poolId) : null;
+ const taskEnvironmentId = parseIssueExecutionWorkspaceSettings(issueContext?.executionWorkspaceSettings, { includeEnvironmentId: true })?.environmentId ?? null;
const sshAuthentication = routerHasPersistedInput ? null : await resolveSshAuthenticationBeforeRouting({
agentDefaultEnvironmentId: agent.defaultEnvironmentId,
- lowTrustIssueEnvironmentId: trustPreset.kind === "low_trust_review"
- ? parseIssueExecutionWorkspaceSettings(issueContext?.executionWorkspaceSettings, { includeEnvironmentId: true })?.environmentId ?? null : null,
+ lowTrustIssueEnvironmentId: trustPreset.kind === "low_trust_review" ? taskEnvironmentId : null,
environmentsSvc, instanceSettings,
});
+ // A task that names its own environment left the usage-limit check
+ // undecided before workspace preparation. Its account is known now.
+ if (taskEnvironmentId && !routerHasPersistedInput && await deferRunForProviderLimit(run, agent, {
+ resumingAdmittedRun: !!runOptions.nativeLeaseOwner,
+ conversation: isConversation(conversationIdentity),
+ sshAuthentication,
+ })) return;
if (agent.adapterType === "paperclip_runner" && sshAuthentication) {
config = { ...config, homeMode: sshAuthentication === "host" ? "preconfigured" : "isolated" };
}
diff --git a/server/src/services/heartbeat/provider-limit-wait.ts b/server/src/services/heartbeat/provider-limit-wait.ts
index 1d11df95ded..88b1be10b87 100644
--- a/server/src/services/heartbeat/provider-limit-wait.ts
+++ b/server/src/services/heartbeat/provider-limit-wait.ts
@@ -1,9 +1,18 @@
+import { and, eq, gt, inArray, sql } from "drizzle-orm";
+import { alias } from "drizzle-orm/pg-core";
import type { Db } from "@paperclipai/db";
import { agents, heartbeatRuns } from "@paperclipai/db";
import { logger } from "../../middleware/logger.js";
import { AI_CONNECTION_POOL_WAIT_RETRY_REASON } from "../../modules/run-dispatch/index.js";
-import { agentProviderLimitCooldown } from "../native-runtime/native-startup-retry.js";
+import { aiRuntimeConnectionBindingSchema } from "@paperclipai/shared";
+import {
+ agentHasProviderLimitEvidence, agentProviderLimitCooldown, runProviderLimitCredential, type ProviderLimitCredential,
+} from "../native-runtime/native-startup-retry.js";
+import { aiConnectionService } from "../ai-connections.js";
import { parseObject } from "../../adapters/utils.js";
+import { logActivity, publishActivity } from "../activity-log.js";
+import { notifyScheduledRetryDispatch } from "../run-dispatch-notifications.js";
+import type { ActivityPublication } from "../../types/activity-publication.js";
type HeartbeatRun = typeof heartbeatRuns.$inferSelect;
type Agent = typeof agents.$inferSelect;
@@ -21,8 +30,17 @@ export interface ProviderLimitWaitDependencies {
}) => Promise<{ outcome: string }>;
releaseIssueExecutionAndPromote: (run: HeartbeatRun) => Promise;
finalizeAgentStatus: (agentId: string, outcome: "cancelled") => Promise;
+ /**
+ * How the run's SSH environment signs the harness in, as run admission
+ * decides it, or "undecided" when only later preparation knows the
+ * environment (a low-trust task's own environment).
+ */
+ sshAuthentication?: (agent: Agent, run: HeartbeatRun) => Promise;
}
+/** How an SSH environment signs the harness in; null when no SSH environment applies. */
+export type SshAuthentication = "host" | "managed" | null;
+
/** Holds new work while the agent's provider account is out of allowance. */
export function createProviderLimitWait(db: Db, deps: ProviderLimitWaitDependencies) {
const {
@@ -40,14 +58,31 @@ export function createProviderLimitWait(db: Db, deps: ProviderLimitWaitDependenc
async function deferRunForProviderLimit(
run: HeartbeatRun,
agent: Agent,
- options: { resumingAdmittedRun: boolean; conversation: boolean },
+ options: {
+ resumingAdmittedRun: boolean; conversation: boolean;
+ /** Set once dispatch has chosen the run's environment. */
+ sshAuthentication?: SshAuthentication;
+ },
): Promise {
if (options.resumingAdmittedRun || options.conversation) return false;
if (run.invocationSource === "on_demand" && run.triggerDetail === "manual") return false;
if (parseObject(parseObject(agent.runtimeConfig).aiConnection).mode === "router") return false;
const now = new Date();
- const cooldown = await agentProviderLimitCooldown(db, {
+ // The limit belongs to the credential it was reported on. A run that would
+ // use another account, or whose limited account was revoked, is not held.
+ // Most agents have no live limit, so resolving the account waits for one.
+ const cooldown = await agentHasProviderLimitEvidence(db, {
companyId: run.companyId, agentId: run.agentId, runId: run.id, now,
+ }).then(async limited => {
+ if (!limited) return null;
+ const ssh = options.sshAuthentication !== undefined ? options.sshAuthentication
+ : deps.sshAuthentication ? await deps.sshAuthentication(agent, run) : null;
+ // Dispatch checks again once the environment, and so the account, is known.
+ if (ssh === "undecided") return null;
+ return agentProviderLimitCooldown(db, {
+ companyId: run.companyId, agentId: run.agentId, runId: run.id, now,
+ credential: await agentProviderLimitCredential(db, agent, run.responsibleUserId, ssh),
+ });
}).catch((err: unknown) => {
// Missing evidence must not stop work; the provider still reports its own limit.
logger.warn({ err, runId: run.id }, "provider limit evidence unavailable before dispatch");
@@ -64,7 +99,7 @@ export function createProviderLimitWait(db: Db, deps: ProviderLimitWaitDependenc
executionRecovery: { kind: "ai_connection_wait", providerWorkStarted: false },
providerLimitWait: {
resetAt, resetReported: cooldown.resetReported, category: cooldown.category,
- sourceRunId: cooldown.sourceRunId, actionUrl: `/agents/${agent.id}/runtime`,
+ sourceRunId: cooldown.sourceRunId, grantId: cooldown.grantId, actionUrl: `/agents/${agent.id}/runtime`,
},
cancellation: {
source: "control_plane", expected: true, initiator: { type: "system" },
@@ -115,3 +150,145 @@ export function createProviderLimitWait(db: Db, deps: ProviderLimitWaitDependenc
return { deferRunForProviderLimit };
}
+
+/**
+ * The account the agent's next run would use, chosen by the same selection a
+ * run makes when it starts.
+ */
+async function agentProviderLimitCredential(
+ db: Db, agent: Agent, responsibleUserId: string | null, ssh: SshAuthentication,
+): Promise {
+ const saved = parseObject(agent.runtimeConfig).aiConnection;
+ if (saved === undefined || saved === null) return { kind: "host" };
+ // Run admission ignores the saved account when the harness uses the host's
+ // own sign-in: an SSH host that keeps its login, or a preconfigured home.
+ if (ssh === "host" || (ssh !== "managed" && agent.adapterType === "paperclip_runner"
+ && parseObject(agent.adapterConfig).homeMode === "preconfigured")) return { kind: "host" };
+ const parsed = aiRuntimeConnectionBindingSchema.safeParse(saved);
+ if (!parsed.success || parsed.data.mode === "router") return { kind: "unresolved" };
+ const binding = parsed.data;
+ const config = parseObject(agent.adapterConfig);
+ try {
+ const selection = await aiConnectionService(db).select({
+ companyId: agent.companyId, agentId: agent.id, userId: responsibleUserId, adapterType: agent.adapterType,
+ model: config.model, runnerProvider: config.provider, acpxAgent: config.acpxAgent, binding,
+ });
+ return { kind: "grants", grantIds: [selection.grant.id] };
+ } catch {
+ // A run that cannot select an account fails on its own setup check. An
+ // explicit binding still names the account that check would use.
+ return binding.mode === "responsible_user" ? { kind: "unresolved" } : { kind: "grants", grantIds: [binding.grantId] };
+ }
+}
+
+export type ProviderLimitWaitRelease =
+ /** The agent's AI connection changed, so its next run may use another account. */
+ | "ai_connection_changed"
+ /** An account was revoked or removed, so limits reported on it no longer apply. */
+ | "ai_connection_revoked"
+ /** Someone replied on the task; the reply rechecks the wait now. */
+ | "user_reply";
+
+/**
+ * Makes waiting provider limit retries due now, so each rechecks availability
+ * through the normal dispatch path. The recheck reads only saved evidence and
+ * holds the run again, with no provider work, when the same account is still
+ * out of allowance. A user reply also rechecks a connection pool wait.
+ */
+export async function releaseProviderLimitWaits(db: Db, input: {
+ companyId: string;
+ reason: ProviderLimitWaitRelease;
+ agentId?: string;
+ /** A specific waiting retry. */
+ runId?: string;
+ /** Only waits whose limit was reported on one of these grants. */
+ grantIds?: readonly string[];
+ actor?: { actorType: "user" | "agent" | "system" | "plugin"; actorId: string };
+ publications?: ActivityPublication[];
+ now?: Date;
+}): Promise {
+ if (input.grantIds && input.grantIds.length === 0) return [];
+ const now = input.now ?? new Date();
+ const waitRun = alias(heartbeatRuns, "provider_limit_wait_run");
+ const candidates = await db
+ .select({
+ id: heartbeatRuns.id,
+ agentId: heartbeatRuns.agentId,
+ issueId: sql`${heartbeatRuns.contextSnapshot} ->> 'issueId'`,
+ limitGrantId: sql`${waitRun.resultJson} #>> '{providerLimitWait,grantId}'`,
+ sourceRunId: sql`${waitRun.resultJson} #>> '{providerLimitWait,sourceRunId}'`,
+ })
+ .from(heartbeatRuns)
+ .innerJoin(waitRun, and(eq(waitRun.id, heartbeatRuns.retryOfRunId), eq(waitRun.companyId, heartbeatRuns.companyId)))
+ .where(and(
+ eq(heartbeatRuns.companyId, input.companyId),
+ eq(heartbeatRuns.status, "scheduled_retry"),
+ eq(heartbeatRuns.scheduledRetryReason, AI_CONNECTION_POOL_WAIT_RETRY_REASON),
+ gt(heartbeatRuns.scheduledRetryAt, now),
+ ...(input.agentId ? [eq(heartbeatRuns.agentId, input.agentId)] : []),
+ ...(input.runId ? [eq(heartbeatRuns.id, input.runId)] : []),
+ // A pool wait rechecks only on a reply; an account change cannot free a pool.
+ input.reason === "user_reply"
+ ? inArray(waitRun.errorCode, ["provider_limit_wait", "ai_connection_pool_exhausted"])
+ : eq(waitRun.errorCode, "provider_limit_wait"),
+ ));
+ let released = candidates;
+ if (input.grantIds) {
+ // Waits saved before the grant was recorded on them name their evidence run.
+ const sourceRunIds = candidates.flatMap(row => !row.limitGrantId && row.sourceRunId && UUID.test(row.sourceRunId) ? [row.sourceRunId] : []);
+ const sources = sourceRunIds.length === 0 ? [] : await db
+ .select({ id: heartbeatRuns.id, contextSnapshot: heartbeatRuns.contextSnapshot }).from(heartbeatRuns)
+ .where(and(eq(heartbeatRuns.companyId, input.companyId), inArray(heartbeatRuns.id, sourceRunIds)));
+ const sourceGrant = new Map(sources.map(source => {
+ const credential = runProviderLimitCredential(source.contextSnapshot);
+ return [source.id, credential.kind === "grants" ? credential.grantIds[0] : null] as const;
+ }));
+ released = candidates.filter(row => {
+ const grantId = row.limitGrantId ?? (row.sourceRunId ? sourceGrant.get(row.sourceRunId) : null);
+ return Boolean(grantId && input.grantIds!.includes(grantId));
+ });
+ }
+ if (released.length === 0) return [];
+ const recheck = { reason: input.reason, requestedAt: now.toISOString() };
+ // Inside a caller's transaction its publications commit with it; otherwise
+ // this release publishes its own after its commit.
+ const publications = input.publications ?? [];
+ const releasedIds = await db.transaction(async tx => {
+ // Dispatch learns of the due retries before they are written, so drain and
+ // sleep account for them; the notice commits only with the write.
+ await notifyScheduledRetryDispatch(tx, { companyId: input.companyId });
+ const updated = await tx.update(heartbeatRuns)
+ .set({
+ scheduledRetryAt: now,
+ contextSnapshot: sql`coalesce(${heartbeatRuns.contextSnapshot}, '{}'::jsonb) || ${JSON.stringify({ scheduledRetryAt: now.toISOString(), providerLimitRecheck: recheck })}::jsonb`,
+ updatedAt: now,
+ })
+ .where(and(
+ eq(heartbeatRuns.companyId, input.companyId),
+ inArray(heartbeatRuns.id, released.map(row => row.id)),
+ eq(heartbeatRuns.status, "scheduled_retry"),
+ gt(heartbeatRuns.scheduledRetryAt, now),
+ ))
+ .returning({ id: heartbeatRuns.id });
+ if (updated.length === 0) return [];
+ const updatedIds = new Set(updated.map(row => row.id));
+ for (const row of released.filter(candidate => updatedIds.has(candidate.id))) {
+ await logActivity(tx as unknown as Db, {
+ companyId: input.companyId,
+ actorType: input.actor?.actorType ?? "system",
+ actorId: input.actor?.actorId ?? "provider-limit-wait",
+ agentId: row.agentId,
+ runId: row.id,
+ action: "issue.scheduled_retry_retry_now",
+ entityType: row.issueId ? "issue" : "heartbeat_run",
+ entityId: row.issueId ?? row.id,
+ details: { source: "provider_limit_recheck", reason: input.reason },
+ }, publications);
+ }
+ return [...updatedIds];
+ });
+ if (!input.publications) publications.forEach(publishActivity);
+ return releasedIds;
+}
+
+const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
diff --git a/server/src/services/heartbeat/queue.ts b/server/src/services/heartbeat/queue.ts
index 0c85d4f75b9..ca4d5e99111 100644
--- a/server/src/services/heartbeat/queue.ts
+++ b/server/src/services/heartbeat/queue.ts
@@ -191,7 +191,8 @@ import {
WORKSPACE_WORKTREE_REQUIRES_PROJECT_REMEDIATION,
} from "../execution-workspace-policy.js";
import { readContinuationAttempt } from "../recovery/index.js";
-import { allowsDependencyBlockedWake, extractWakeCommentIds, wakeChatConversationsConflict } from "../../modules/run-dispatch/index.js";
+import { AI_CONNECTION_POOL_WAIT_RETRY_REASON, allowsDependencyBlockedWake, extractWakeCommentIds, wakeChatConversationsConflict } from "../../modules/run-dispatch/index.js";
+import { releaseProviderLimitWaits } from "./provider-limit-wait.js";
import { dispatchForAgent, outsideAgentDispatch } from "../agent-start-lock.js";
import { AgentRunSlotsFull, assertAgentRunSlotFree } from "./run-slot-admission.js";
import {
@@ -3508,6 +3509,22 @@ export function createHeartbeatQueue(db: Db, dependencies: HeartbeatQueueDepende
}
}
+ /**
+ * A user's wake folded into a usage wait rechecks it now instead of at its
+ * scheduled time. The recheck reads saved evidence only and holds the work
+ * again, without provider work, while the same account is still limited.
+ */
+ const recheckUsageWaitOnReply = async (run: Run | null) => {
+ if (run?.status === "scheduled_retry" && run.scheduledRetryReason === AI_CONNECTION_POOL_WAIT_RETRY_REASON &&
+ opts.requestedByActorType === "user") {
+ await releaseProviderLimitWaits(db, {
+ companyId: agent.companyId, runId: run.id, reason: "user_reply",
+ ...(opts.requestedByActorId ? { actor: { actorType: "user" as const, actorId: opts.requestedByActorId } } : {}),
+ }).catch((err: unknown) => logger.warn({ err, runId: run.id }, "failed to recheck a usage wait after a reply"));
+ }
+ return run;
+ };
+
if (issueId) {
const agentNameKey = normalizeAgentNameKey(agent.name);
@@ -3515,7 +3532,7 @@ export function createHeartbeatQueue(db: Db, dependencies: HeartbeatQueueDepende
const issueActivityPublications: ActivityPublication[] = [];
const issuePostCommitActions: IssuePostCommitAction[] = [];
- return wakeQueue.admitIssueWake(
+ return recheckUsageWaitOnReply(await wakeQueue.admitIssueWake(
{ companyId: agent.companyId, issueId, durableChatRequest: durableRequest },
async (tx, { lockedIssue, lockIssue, prepareRecovery }) => {
if (executionWaitRequestId) {
@@ -5049,7 +5066,7 @@ export function createHeartbeatQueue(db: Db, dependencies: HeartbeatQueueDepende
attachSetupRequest: () => attachQueuedSetupRequest(agent),
dispatch: () => startNextQueuedRunForAgent(agent.id),
},
- );
+ ));
}
if (durableRequest) throw new Error("chat_inbound_wakeup_binding_denied");
@@ -5143,7 +5160,7 @@ export function createHeartbeatQueue(db: Db, dependencies: HeartbeatQueueDepende
runId: mergedRun.id,
finishedAt: new Date(),
});
- return mergedRun;
+ return recheckUsageWaitOnReply(mergedRun);
}
const queuedRunId = randomUUID();
diff --git a/server/src/services/native-runtime/agent-chat-response-recovery.test.ts b/server/src/services/native-runtime/agent-chat-response-recovery.test.ts
index 6057de9f613..829cbdbe6f2 100644
--- a/server/src/services/native-runtime/agent-chat-response-recovery.test.ts
+++ b/server/src/services/native-runtime/agent-chat-response-recovery.test.ts
@@ -14,8 +14,15 @@ import { instanceSettingsService } from "../instance-settings.js";
import { issueService } from "../issues.js";
import * as nativeResponseNotifications from "../native-response-presentation-notifications.js";
import { compactRunLogChunk } from "../heartbeat/run-log.js";
+import { CHAT_RUN_PRESENTATION_AUTHORIZATION_REASON } from "../heartbeat-run-summary.js";
const runLogReads = vi.hoisted(() => [] as unknown[]);
+const presentationAuthorization = vi.hoisted(() => ({ override: null as string | null }));
+vi.mock("../chat-run-publications.js", async (importOriginal) => {
+ const actual = await importOriginal();
+ return { ...actual, resolveChatRunPresentationAuthorizationReason: (async (...args: Parameters) =>
+ presentationAuthorization.override ?? actual.resolveChatRunPresentationAuthorizationReason(...args)) as typeof actual.resolveChatRunPresentationAuthorizationReason };
+});
vi.mock("../run-log-store.js", async (importOriginal) => {
const actual = await importOriginal();
return { ...actual, getRunLogStore: () => {
@@ -703,6 +710,78 @@ describe.skipIf(!support.supported)("committed Agent Chat reply recovery", () =>
expect(await comments(f.runId)).toEqual([expect.objectContaining({ body: f.reply })]);
expect((await issue(f.issueId)).conversationAgentId).toBeNull();
});
+ it.each([
+ ["done", { source: "chat:github" }],
+ ["needs_review", { source: "chat:github" }],
+ ["done", { source: "automation", externalChatContinuation: true }],
+ ] as const)("publishes an external-chat task's %s reply when copy-back failure skipped the live path (%j)", async (disposition, context) => {
+ // A run woken by an external chat message reaches its accepted final reply,
+ // then workspace copy-back fails, so the live completion path never posts
+ // it. Presentation recovery must still put that reply on the task.
+ const f = await fixture(false, { disposition });
+ await db.update(heartbeatRuns).set({ contextSnapshot: { issueId: f.issueId, wakeCommentId: f.wakeId, ...context } })
+ .where(eq(heartbeatRuns.id, f.runId));
+ const work = nativeResponsePresentationWork(db), entries = await work.load(f.input);
+ expect(entries).toEqual([expect.objectContaining({ id: f.runId })]);
+ await expect(work.check(entries[0])).resolves.toBeNull();
+ expect(await comments(f.runId)).toEqual([expect.objectContaining({ body: f.reply, createdByRunId: f.runId })]);
+ const [run] = await db.select({ resultJson: heartbeatRuns.resultJson }).from(heartbeatRuns).where(eq(heartbeatRuns.id, f.runId));
+ expect(run.resultJson).toMatchObject({ presentationDecision: { reasonCodes: expect.arrayContaining(["committed_task_response_recovered"]) } });
+ expect((run.resultJson as Record).responsePublication).not.toMatchObject({ state: "failed" });
+ expect(await work.load(f.input)).toEqual([]);
+ await expect(recoverCommittedNativeChatResponse(db, f.input)).resolves.toBe(false);
+ expect(await comments(f.runId)).toHaveLength(1);
+ });
+ it("posts a non-GitHub external-chat task reply once with the provider presentation authorization", async () => {
+ const f = await fixture(false);
+ await db.update(heartbeatRuns).set({ contextSnapshot: { issueId: f.issueId, wakeCommentId: f.wakeId, source: "chat:slack" } })
+ .where(eq(heartbeatRuns.id, f.runId));
+ presentationAuthorization.override = CHAT_RUN_PRESENTATION_AUTHORIZATION_REASON;
+ try {
+ await expect(recoverCommittedNativeChatResponse(db, f.input)).resolves.toBe(true);
+ await expect(recoverCommittedNativeChatResponse(db, f.input)).resolves.toBe(false);
+ } finally { presentationAuthorization.override = null; }
+ expect(await comments(f.runId)).toEqual([expect.objectContaining({ body: f.reply,
+ metadata: expect.objectContaining({ authorizationReason: CHAT_RUN_PRESENTATION_AUTHORIZATION_REASON }) })]);
+ });
+ it.each([false, true])("reuses an external-chat task reply the live path saved without recording it (deleted=%s)", async deleted => {
+ const f = await fixture(false);
+ await db.update(heartbeatRuns).set({ contextSnapshot: { issueId: f.issueId, wakeCommentId: f.wakeId, source: "chat:github" } })
+ .where(eq(heartbeatRuns.id, f.runId));
+ const [saved] = await db.insert(issueComments).values({ companyId: f.companyId, issueId: f.issueId, authorAgentId: f.agentId,
+ createdByRunId: f.runId, body: f.reply, ...(deleted ? { deletedAt: new Date("2020-01-01T00:03:00Z") } : {}) }).returning();
+ await expect(recoverCommittedNativeChatResponse(db, f.input)).resolves.toBe(false);
+ expect(await comments(f.runId)).toEqual([saved]);
+ const [run] = await db.select({ resultJson: heartbeatRuns.resultJson }).from(heartbeatRuns).where(eq(heartbeatRuns.id, f.runId));
+ expect(run.resultJson).toMatchObject({ presentationDecision: { commentAction: "reuse", commentId: saved.id } });
+ expect(await nativeResponsePresentationWork(db).load(f.input)).toEqual([]);
+ });
+ it.each([false, true])("posts an external-chat task's final answer after an earlier progress comment (deleted=%s)", async deleted => {
+ const f = await fixture(false);
+ await db.update(heartbeatRuns).set({ contextSnapshot: { issueId: f.issueId, wakeCommentId: f.wakeId, source: "chat:github" } })
+ .where(eq(heartbeatRuns.id, f.runId));
+ const [progress] = await db.insert(issueComments).values({ companyId: f.companyId, issueId: f.issueId, authorAgentId: f.agentId,
+ createdByRunId: f.runId, body: "Looking into the review comment now.",
+ ...(deleted ? { deletedAt: new Date("2020-01-01T00:03:00Z") } : {}) }).returning();
+ await expect(recoverCommittedNativeChatResponse(db, f.input)).resolves.toBe(true);
+ await expect(recoverCommittedNativeChatResponse(db, f.input)).resolves.toBe(false);
+ const saved = await comments(f.runId);
+ expect(saved).toHaveLength(2);
+ expect(saved).toEqual(expect.arrayContaining([progress, expect.objectContaining({ body: f.reply, deletedAt: null })]));
+ });
+ it("reuses the summary the live path saved when the final message is a structured result", async () => {
+ const summary = "A completed hire, with its final message preserved separately.";
+ const reply = JSON.stringify({ schema: "paperclip.run_result.v1", reportedWorkDisposition: "done", summary });
+ const f = await fixture(false, { reply });
+ await db.update(heartbeatRuns).set({ contextSnapshot: { issueId: f.issueId, wakeCommentId: f.wakeId, source: "chat:github" } })
+ .where(eq(heartbeatRuns.id, f.runId));
+ const [saved] = await db.insert(issueComments).values({ companyId: f.companyId, issueId: f.issueId, authorAgentId: f.agentId,
+ createdByRunId: f.runId, body: summary }).returning();
+ await expect(recoverCommittedNativeChatResponse(db, f.input)).resolves.toBe(false);
+ expect(await comments(f.runId)).toEqual([saved]);
+ const [run] = await db.select({ resultJson: heartbeatRuns.resultJson }).from(heartbeatRuns).where(eq(heartbeatRuns.id, f.runId));
+ expect(run.resultJson).toMatchObject({ presentationDecision: { commentAction: "reuse", commentId: saved.id } });
+ });
it("recovers a deferred review reply once without resolving the review or rerunning work", async () => {
const f = await fixture(false, { disposition: "needs_review" });
const before = await issue(f.issueId);
diff --git a/server/src/services/native-runtime/native-blocked-reply-recovery.test.ts b/server/src/services/native-runtime/native-blocked-reply-recovery.test.ts
index d2cd9016ad0..1706720ca4e 100644
--- a/server/src/services/native-runtime/native-blocked-reply-recovery.test.ts
+++ b/server/src/services/native-runtime/native-blocked-reply-recovery.test.ts
@@ -137,6 +137,20 @@ describe.skipIf(!support.supported)("blocked task reply after a retried workspac
expect(await comments(f.issueId)).toHaveLength(1);
});
+ it("reuses a channel task's blocked reply that the live path saved without recording it", async () => {
+ const f = await blockedRun({ source: "chat:slack", finalReply: true });
+ await retryCopyBack(f.runId, { skipNativeResponsePresentation: true });
+ const [saved] = await db.insert(issueComments).values({ companyId: f.companyId, issueId: f.issueId, authorAgentId: f.agentId,
+ createdByRunId: f.runId, body: finalReply }).returning();
+ const work = nativeResponsePresentationWork(db);
+ const [entry] = await work.load({ companyId: f.companyId, issueId: f.issueId });
+ expect(entry).toMatchObject({ id: f.runId });
+ await expect(work.check(entry)).resolves.toBeNull();
+ expect(await comments(f.issueId)).toEqual([saved]);
+ expect(((await run(f.runId)).resultJson as Record).presentationDecision)
+ .toMatchObject({ commentAction: "reuse", commentId: saved.id });
+ });
+
it("does not present a stale blocker after a later status decision or once the task moved on", async () => {
const f = await blockedRun();
await retryCopyBack(f.runId, { skipNativeResponsePresentation: true });
diff --git a/server/src/services/native-runtime/native-provider-limit-cooldown.integration.test.ts b/server/src/services/native-runtime/native-provider-limit-cooldown.integration.test.ts
index 020d115662f..a0de2a577a7 100644
--- a/server/src/services/native-runtime/native-provider-limit-cooldown.integration.test.ts
+++ b/server/src/services/native-runtime/native-provider-limit-cooldown.integration.test.ts
@@ -6,6 +6,8 @@ import { startEmbeddedPostgresTestDatabase } from "../../__tests__/helpers/embed
import { agentProviderLimitCooldown, planNativeStartupRetry } from "./native-startup-retry.js";
const HOUR_MS = 60 * 60_000;
+/** These agents sign in with the host's own account. */
+const HOST = { kind: "host" } as const;
const DAY_MS = 24 * HOUR_MS;
/** Claude ACP wording for an exhausted weekly allowance, such as "resets Nov 10, 3pm (UTC)". */
@@ -71,7 +73,7 @@ describe("native provider limit cooldown", () => {
it("holds an agent until a dated weekly-limit reset instead of the one-hour default", async () => {
const resetAt = new Date(Math.ceil((Date.now() + 20 * HOUR_MS) / HOUR_MS) * HOUR_MS);
const agentId = await limitedAgent(resetAt);
- expect(await agentProviderLimitCooldown(db, { companyId, agentId, now: new Date() }))
+ expect(await agentProviderLimitCooldown(db, { companyId, agentId, credential: HOST, now: new Date() }))
.toMatchObject({ resetAt, resetReported: true, category: "quota_exhausted" });
});
@@ -85,7 +87,7 @@ describe("native provider limit cooldown", () => {
category: "quota_exhausted", providerCode: "insufficient_quota",
message: "Check your plan and billing details.", retryability: "requires_action",
} } });
- expect(await agentProviderLimitCooldown(db, { companyId, agentId, now: new Date() })).toBeNull();
+ expect(await agentProviderLimitCooldown(db, { companyId, agentId, credential: HOST, now: new Date() })).toBeNull();
});
it("keeps the default cooldown for a rate limit without a reset", async () => {
@@ -94,7 +96,7 @@ describe("native provider limit cooldown", () => {
schema: "paperclip.provider-failure.v1", provider: "anthropic", phase: "startup",
category: "rate_limit", message: "Try again later.", retryability: "unknown",
} } }).where(eq(heartbeatRuns.agentId, agentId));
- expect(await agentProviderLimitCooldown(db, { companyId, agentId, now: new Date() }))
+ expect(await agentProviderLimitCooldown(db, { companyId, agentId, credential: HOST, now: new Date() }))
.toMatchObject({ resetReported: false, category: "rate_limit" });
});
@@ -111,7 +113,7 @@ describe("native provider limit cooldown", () => {
it("re-checks a dated reset days away within one day", async () => {
const agentId = await limitedAgent(new Date(Math.ceil((Date.now() + 3 * DAY_MS) / HOUR_MS) * HOUR_MS));
const now = new Date();
- const cooldown = await agentProviderLimitCooldown(db, { companyId, agentId, now });
+ const cooldown = await agentProviderLimitCooldown(db, { companyId, agentId, credential: HOST, now });
expect(cooldown).toMatchObject({ resetReported: true });
expect(cooldown!.resetAt.getTime()).toBe(now.getTime() + DAY_MS);
});
diff --git a/server/src/services/native-runtime/native-run-finalizer.ts b/server/src/services/native-runtime/native-run-finalizer.ts
index 90b200f63a1..dc7f0cca8cb 100644
--- a/server/src/services/native-runtime/native-run-finalizer.ts
+++ b/server/src/services/native-runtime/native-run-finalizer.ts
@@ -1210,8 +1210,12 @@ async function recoverCommittedNativeChatResponseInScope(
&& run.contextSnapshot.conversationSessionGeneration === issue.conversationSessionGeneration;
// A deferred ordinary-task review still needs its recorded final reply.
// Publishing that reply must not resolve the interaction or the task.
- const ordinaryTaskReply = (!conversation || currentConversation) &&
- !isExternalChatPresentationContext(run.contextSnapshot) &&
+ // A task woken by an external chat message (for example a GitHub review
+ // comment) gets the same final reply as on the live completion path,
+ // which a post-result failure such as copy-back can skip.
+ const externalChatContext = isExternalChatPresentationContext(run.contextSnapshot);
+ const externalChatTaskReply = !conversation && externalChatContext;
+ const ordinaryTaskReply = (!conversation || (currentConversation && !externalChatContext)) &&
((result.reportedWorkDisposition === "done" && terminal.reportedWorkDisposition === "done") ||
(!conversation && result.reportedWorkDisposition === "needs_review" && terminal.reportedWorkDisposition === "needs_review") ||
// A conversation turn can yield while an approval, an execution
@@ -1223,9 +1227,10 @@ async function recoverCommittedNativeChatResponseInScope(
terminal.turnTerminalState === "completed" &&
(ordinaryTaskReply || blockedTaskReply);
const replyAuthorization = taskReplyEligible ? await resolveChatRunPresentationAuthorizationReason(tx, input) : null;
- const externalChatReply = blockedTaskReply &&
+ const externalChatBlockedReply = blockedTaskReply &&
isExternalChatPresentationContext(run.contextSnapshot, replyAuthorization === CHAT_RUN_PRESENTATION_AUTHORIZATION_REASON);
- if (taskReplyEligible && replyAuthorization && (blockedTaskReply || replyAuthorization === "internal_agent_write")) {
+ if (taskReplyEligible && replyAuthorization &&
+ (blockedTaskReply || externalChatTaskReply || replyAuthorization === "internal_agent_write")) {
const rows = await tx.select({ seq: heartbeatRunEvents.seq, payload: heartbeatRunEvents.payload })
.from(heartbeatRunEvents).where(and(
eq(heartbeatRunEvents.companyId, input.companyId),
@@ -1259,7 +1264,8 @@ async function recoverCommittedNativeChatResponseInScope(
eq(issueComments.issueId, input.issueId),
eq(issueComments.createdByRunId, run.id),
)).orderBy(desc(issueComments.createdAt), desc(issueComments.id));
- const resolved = resolveHeartbeatRunResponse({
+ const existingComment = findHeartbeatRunCompletionComment(comments, run.resultJson);
+ const responseInput = {
resultJson: { ...record(run.resultJson), nativeResult: result },
nativeConversationFinalResponse: conversation,
// The same answered rule as live run completion.
@@ -1267,9 +1273,20 @@ async function recoverCommittedNativeChatResponseInScope(
db: tx, ...input, finalizationPhase: coordinator.phase, finalizationReasonCode: decision.reasonCode,
}),
interactionOwnsResponse: conversation && await hasChatRunOwnedProviderInteraction(tx, input),
- existingComment: findHeartbeatRunCompletionComment(comments, run.resultJson),
+ existingComment,
finalAgentMessage,
- preferFinalResponseOverExistingComment: externalChatReply,
+ };
+ // An external-chat reply presents its final answer, as on the live
+ // path, over an earlier run comment such as a progress note. A saved
+ // copy of the text that answer resolves to, including a deleted one, is
+ // reused instead, so recovery never posts the same reply twice.
+ const preferredText = externalChatTaskReply || externalChatBlockedReply
+ ? resolveHeartbeatRunResponse({ ...responseInput, existingComment: null, preferFinalResponseOverExistingComment: true }).text
+ : null;
+ const resolved = resolveHeartbeatRunResponse({
+ ...responseInput,
+ preferFinalResponseOverExistingComment: Boolean(preferredText) &&
+ existingComment?.body.trim() !== preferredText?.trim(),
});
if (resolved.decision.commentAction === "reuse" && typeof resolved.decision.commentId === "string") {
// The reply is already on the task (for example, the live path wrote
diff --git a/server/src/services/native-runtime/native-startup-retry.integration.test.ts b/server/src/services/native-runtime/native-startup-retry.integration.test.ts
index 56315052149..d5c79aad686 100644
--- a/server/src/services/native-runtime/native-startup-retry.integration.test.ts
+++ b/server/src/services/native-runtime/native-startup-retry.integration.test.ts
@@ -1039,7 +1039,7 @@ describe("native provider startup retry", () => {
await failStartup(seeded, sessionOpenFailure());
const state = await read(seeded);
expect(state.coordinator.failureDetail).toMatchObject({ providerCooldownAt: expected.toISOString() });
- expect(await agentProviderLimitCooldown(db, { companyId, agentId, now: new Date() }))
+ expect(await agentProviderLimitCooldown(db, { companyId, agentId, credential: { kind: "host" }, now: new Date() }))
.toMatchObject({ resetAt: expected, resetReported: true });
});
diff --git a/server/src/services/native-runtime/native-startup-retry.ts b/server/src/services/native-runtime/native-startup-retry.ts
index 1ce96c08656..627d33d049e 100644
--- a/server/src/services/native-runtime/native-startup-retry.ts
+++ b/server/src/services/native-runtime/native-startup-retry.ts
@@ -1,6 +1,6 @@
import { createHash } from "node:crypto";
import { and, desc, eq, gte, inArray, ne, or, sql } from "drizzle-orm";
-import { heartbeatRuns, type Db } from "@paperclipai/db";
+import { connectionGrants, heartbeatRuns, type Db } from "@paperclipai/db";
import { readProviderFailure, type ProviderFailure } from "@paperclipai/shared";
import { logger } from "../../middleware/logger.js";
import { infrastructureRetryDelayMs, PROVIDER_LIMIT_DEFAULT_COOLDOWN_MS } from "../system-recovery-state.js";
@@ -14,7 +14,7 @@ const PROVIDER_LIMIT_ERROR_CODES = ["native_provider_usage_limit", "provider_quo
const NATIVE_PROVIDER_LIMIT_WINDOW_MS = 24 * 60 * 60_000;
const LIMIT_EVIDENCE_ROWS = 20;
-type ProviderLimitEvidence = { resetAt: number; resetReported: boolean; category: string; sourceRunId: string | null };
+type ProviderLimitEvidence = { resetAt: number; resetReported: boolean; category: string; sourceRunId: string | null; grantId?: string | null };
function limitEvidence(failure: ProviderFailure | null, observedAt: Date, sourceRunId: string | null): ProviderLimitEvidence | null {
if (!failure || !PROVIDER_LIMIT_CATEGORIES.includes(failure.category)) return null;
@@ -28,6 +28,74 @@ function limitEvidence(failure: ProviderFailure | null, observedAt: Date, source
: { resetAt: observedAt.getTime() + PROVIDER_LIMIT_DEFAULT_COOLDOWN_MS, resetReported: false, category: failure.category, sourceRunId };
}
+/**
+ * The AI credential a provider limit is checked against. A limit belongs to
+ * the credential it was reported on, so evidence from another credential, or
+ * from one that was revoked or removed, does not hold work.
+ */
+export type ProviderLimitCredential =
+ /** No managed AI connection: the harness signs in with the host's own account. */
+ | { kind: "host" }
+ /** The managed connection grants the next run may use. */
+ | { kind: "grants"; grantIds: readonly string[] }
+ /** A managed connection whose account is chosen only when the run starts. */
+ | { kind: "unresolved" };
+
+const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
+
+/** The credential a run used, from the account it recorded when it started. */
+export function runProviderLimitCredential(contextSnapshot: unknown): ProviderLimitCredential {
+ const grantId = recordedGrantId(contextSnapshot);
+ return grantId ? { kind: "grants", grantIds: [grantId] } : { kind: "host" };
+}
+
+function recordedGrantId(contextSnapshot: unknown): string | null {
+ const snapshot = contextSnapshot && typeof contextSnapshot === "object" ? contextSnapshot as Record : {};
+ const connection = snapshot.aiConnection && typeof snapshot.aiConnection === "object"
+ ? snapshot.aiConnection as Record : {};
+ return typeof connection.grantId === "string" && UUID_PATTERN.test(connection.grantId) ? connection.grantId : null;
+}
+
+/**
+ * Whether evidence recorded on `evidenceGrantId` (null: the host's account)
+ * still describes the credential the agent would use now.
+ */
+function evidenceApplies(evidenceGrantId: string | null, credential: ProviderLimitCredential, activeGrantIds: ReadonlySet) {
+ if (evidenceGrantId === null) return credential.kind === "host";
+ if (!activeGrantIds.has(evidenceGrantId)) return false;
+ if (credential.kind === "grants") return credential.grantIds.includes(evidenceGrantId);
+ return credential.kind === "unresolved";
+}
+
+/** Narrows the evidence read to the checked credential, so other accounts never crowd it out. */
+function credentialEvidenceFilter(credential: ProviderLimitCredential) {
+ const recorded = sql`${heartbeatRuns.contextSnapshot} -> 'aiConnection' ->> 'grantId'`;
+ if (credential.kind === "host") return [sql`${recorded} is null`];
+ if (credential.kind === "grants") return [inArray(recorded, [...credential.grantIds])];
+ return [];
+}
+
+/**
+ * Whether any recent run of the agent recorded a provider limit, on any
+ * account. Without one no account can be held, so callers skip resolving the
+ * account the next run would use. Never decides that a limit applies.
+ */
+export async function agentHasProviderLimitEvidence(db: Db, input: {
+ companyId: string; agentId: string; runId?: string; now: Date;
+}): Promise {
+ const [row] = await db.select({ id: heartbeatRuns.id }).from(heartbeatRuns).where(and(
+ eq(heartbeatRuns.companyId, input.companyId),
+ eq(heartbeatRuns.agentId, input.agentId),
+ gte(heartbeatRuns.startedAt, new Date(input.now.getTime() - NATIVE_PROVIDER_LIMIT_WINDOW_MS)),
+ ...(input.runId ? [ne(heartbeatRuns.id, input.runId)] : []),
+ or(
+ inArray(heartbeatRuns.errorCode, PROVIDER_LIMIT_ERROR_CODES),
+ inArray(sql`${heartbeatRuns.resultJson} #>> '{providerFailure,category}'`, PROVIDER_LIMIT_CATEGORIES),
+ ),
+ )).limit(1);
+ return Boolean(row);
+}
+
export type AgentProviderLimitCooldown = {
/** When the agent's provider allowance is expected to return. */
resetAt: Date;
@@ -36,11 +104,15 @@ export type AgentProviderLimitCooldown = {
category: string;
/** The run whose failure recorded the latest reset. */
sourceRunId: string | null;
+ /** The connection grant the limit was reported on; null for the host's own account. */
+ grantId: string | null;
};
/**
- * The latest known provider limit for this agent, from the current failure or
- * from the agent's recent runs. A later successful run clears older evidence.
+ * The latest known provider limit for this agent's credential, from the
+ * current failure or from the agent's recent runs on that same credential. A
+ * later successful run on the credential clears older evidence. Evidence from
+ * another credential, or from a revoked or removed one, never applies.
*/
export async function agentProviderLimitCooldown(db: Db, input: {
companyId: string;
@@ -48,6 +120,8 @@ export async function agentProviderLimitCooldown(db: Db, input: {
/** Excluded from the evidence; the caller supplies its own failure. */
runId?: string;
failure?: ProviderFailure | null;
+ /** The credential being checked. The caller's failure was reported on it. */
+ credential: ProviderLimitCredential;
now: Date;
}): Promise {
if (isProviderQuotaActionRequired({ resultJson: { providerFailure: input.failure } }, input.now)) return null;
@@ -61,6 +135,7 @@ export async function agentProviderLimitCooldown(db: Db, input: {
observedAt: sql`coalesce(${heartbeatRuns.finishedAt}, ${heartbeatRuns.updatedAt})`.mapWith(heartbeatRuns.updatedAt),
providerFailure: sql`${heartbeatRuns.resultJson} -> 'providerFailure'`,
retryNotBefore: sql`${heartbeatRuns.resultJson} ->> 'retryNotBefore'`,
+ contextSnapshot: sql`jsonb_build_object('aiConnection', ${heartbeatRuns.contextSnapshot} -> 'aiConnection')`,
})
.from(heartbeatRuns)
.where(and(
@@ -68,6 +143,7 @@ export async function agentProviderLimitCooldown(db: Db, input: {
eq(heartbeatRuns.agentId, input.agentId),
gte(heartbeatRuns.startedAt, new Date(now - NATIVE_PROVIDER_LIMIT_WINDOW_MS)),
...(input.runId ? [ne(heartbeatRuns.id, input.runId)] : []),
+ ...credentialEvidenceFilter(input.credential),
or(
eq(heartbeatRuns.status, "succeeded"),
inArray(heartbeatRuns.errorCode, PROVIDER_LIMIT_ERROR_CODES),
@@ -76,7 +152,16 @@ export async function agentProviderLimitCooldown(db: Db, input: {
))
.orderBy(desc(sql`coalesce(${heartbeatRuns.finishedAt}, ${heartbeatRuns.updatedAt})`))
.limit(LIMIT_EVIDENCE_ROWS);
+ const recordedGrantIds = [...new Set(rows.flatMap(row => recordedGrantId(row.contextSnapshot) ?? []))];
+ const activeGrantIds = new Set(recordedGrantIds.length === 0 ? [] : (await db
+ .select({ id: connectionGrants.id }).from(connectionGrants).where(and(
+ eq(connectionGrants.companyId, input.companyId),
+ inArray(connectionGrants.id, recordedGrantIds),
+ eq(connectionGrants.status, "active"),
+ ))).map(row => row.id));
for (const row of rows) {
+ // Another credential's outcome says nothing about this one.
+ if (!evidenceApplies(recordedGrantId(row.contextSnapshot), input.credential, activeGrantIds)) continue;
// The provider accepted work after this point, so its allowance was restored.
if (row.status === "succeeded") break;
const failure = readProviderFailure(row.providerFailure);
@@ -89,6 +174,7 @@ export async function agentProviderLimitCooldown(db: Db, input: {
? { resetAt: reset, resetReported: true, category: "quota_exhausted", sourceRunId: row.id }
: { resetAt: row.observedAt.getTime() + PROVIDER_LIMIT_DEFAULT_COOLDOWN_MS, resetReported: false, category: "quota_exhausted", sourceRunId: row.id };
}
+ if (recorded) recorded.grantId = recordedGrantId(row.contextSnapshot);
if (recorded && (!latest || recorded.resetAt > latest.resetAt)) latest = recorded;
}
if (!latest || latest.resetAt <= now) return null;
@@ -97,6 +183,8 @@ export async function agentProviderLimitCooldown(db: Db, input: {
resetReported: latest.resetReported,
category: latest.category,
sourceRunId: latest.sourceRunId,
+ grantId: latest.grantId !== undefined ? latest.grantId
+ : input.credential.kind === "grants" && input.credential.grantIds.length === 1 ? input.credential.grantIds[0] : null,
};
}
@@ -117,13 +205,18 @@ export async function planNativeStartupRetry(input: {
return { nextAttemptAt: null, providerCooldownAt: null };
// Limit evidence only refines the schedule. A failed read must not stop the
// failure from settling, so the retry falls back to plain backoff.
- const providerCooldownAt = await agentProviderLimitCooldown(input.db, {
- companyId: input.binding.companyId,
- agentId: input.binding.agentId,
- runId: input.binding.runId,
- failure: input.failure,
- now: input.now,
- }).then((cooldown) => cooldown?.resetAt ?? null, (error: unknown) => {
+ const providerCooldownAt = await input.db
+ .select({ contextSnapshot: heartbeatRuns.contextSnapshot }).from(heartbeatRuns)
+ .where(and(eq(heartbeatRuns.companyId, input.binding.companyId), eq(heartbeatRuns.id, input.binding.runId)))
+ .then(([run]) => agentProviderLimitCooldown(input.db, {
+ companyId: input.binding.companyId,
+ agentId: input.binding.agentId,
+ runId: input.binding.runId,
+ failure: input.failure,
+ // The failure was reported on the account this run started with.
+ credential: runProviderLimitCredential(run?.contextSnapshot),
+ now: input.now,
+ })).then((cooldown) => cooldown?.resetAt ?? null, (error: unknown) => {
logger.warn({ err: error, runId: input.binding.runId }, "native provider limit evidence unavailable");
return null;
});
diff --git a/server/src/services/native-runtime/runner-bridge-tools.test.ts b/server/src/services/native-runtime/runner-bridge-tools.test.ts
index 8a1e22fa73f..847eb728b1e 100644
--- a/server/src/services/native-runtime/runner-bridge-tools.test.ts
+++ b/server/src/services/native-runtime/runner-bridge-tools.test.ts
@@ -192,6 +192,13 @@ if sys.argv[1] != "completion":
const context = { skills: [{ key: "assigned", runtimeName: "assigned", versionId: "version-1", bundle }] } as any;
expect(await readAssignedSkill(context, { skill: "assigned" })).toMatchObject({ versionId: "version-1", text: "# Assigned skill\nUse the pinned instructions." });
await expect(readAssignedSkill(context, { skill: "not-assigned" })).rejects.toThrow("not_assigned");
+ const saved = { skills: [{ key: "company/company-1/qa-saved-skill", runtimeName: "qa-saved-skill--33910b3ce6", versionId: "version-1", bundle }] } as any;
+ expect(await readAssignedSkill(saved, { skill: "qa-saved-skill" })).toMatchObject({ skill: "company/company-1/qa-saved-skill", versionId: "version-1" });
+ expect(await readAssignedSkill(saved, { skill: "/qa-saved-skill" })).toMatchObject({ skill: "company/company-1/qa-saved-skill" });
+ expect(await readAssignedSkill(saved, { skill: " /QA-Saved-Skill " })).toMatchObject({ skill: "company/company-1/qa-saved-skill" });
+ const twins = { skills: [saved.skills[0], { ...saved.skills[0], key: "paperclipai/paperclip/qa-saved-skill", runtimeName: "qa-saved-skill--aa" }] } as any;
+ await expect(readAssignedSkill(twins, { skill: "qa-saved-skill" })).rejects.toThrow("not_assigned");
+ expect(await readAssignedSkill(twins, { skill: "qa-saved-skill--aa" })).toMatchObject({ skill: "paperclipai/paperclip/qa-saved-skill" });
await expect(readAssignedSkill(context, { skill: "assigned", path: "../private" })).rejects.toThrow();
await expect(readAssignedSkill(context, { skill: "assigned", path: "not-pinned.txt" })).rejects.toThrow("not_pinned");
await expect(readAssignedSkill({ ...context, skills: [{ ...context.skills[0], bundle: { ...bundle, manifestDigest: createHash("sha256").update("different").digest("hex") } }] }, { skill: "assigned" })).rejects.toThrow("manifest_digest");
diff --git a/server/src/services/native-runtime/runner-bridge-tools.ts b/server/src/services/native-runtime/runner-bridge-tools.ts
index ec1e5e2fc69..c0f18983678 100644
--- a/server/src/services/native-runtime/runner-bridge-tools.ts
+++ b/server/src/services/native-runtime/runner-bridge-tools.ts
@@ -4,6 +4,7 @@ import { constants, existsSync } from "node:fs";
import * as fs from "node:fs/promises";
import path from "node:path";
import { z } from "zod";
+import { resolvePaperclipSkillReference } from "@paperclipai/adapter-utils/server-utils";
import type { NativeRuntimeContextSnapshot } from "../../vendor/paperclip-runner/index.js";
import { taskDocumentKeySchema } from "../../vendor/paperclip-runner/index.js";
import { openRunnerApiWorkspaceFile, openRunnerWorkspaceFile } from "./runner-api-files.js";
@@ -122,7 +123,8 @@ async function readFilePage(file: string, offset: number) {
}
export async function readAssignedSkill(context: NativeRuntimeContextSnapshot, raw: unknown) {
const args = RUNNER_BRIDGE_SCHEMAS.get("read_assigned_skill")!.parse(raw) as { skill: string; path: string; offset: number };
- const skill = context.skills.find(skill => skill.key === args.skill || skill.runtimeName === args.skill);
+ const key = resolvePaperclipSkillReference(args.skill, context.skills);
+ const skill = key ? context.skills.find(entry => entry.key === key) : undefined;
if (!skill) throw new Error("runner_skill_not_assigned");
const manifestText = await fs.readFile(path.join(path.dirname(path.dirname(skill.bundle.rootPath)), "manifests", `${skill.bundle.digest}.json`), "utf8");
if (digest(manifestText) !== skill.bundle.manifestDigest) throw new Error("runner_skill_manifest_digest_mismatch");
diff --git a/server/src/services/plugin-connector-runtime.ts b/server/src/services/plugin-connector-runtime.ts
index 563f3c34a69..dc3f86c0826 100644
--- a/server/src/services/plugin-connector-runtime.ts
+++ b/server/src/services/plugin-connector-runtime.ts
@@ -23,6 +23,7 @@ import type {
ToolResult,
ToolRunContext,
} from "@paperclipai/plugin-sdk";
+import type { PaperclipDefinedToolDefinition } from "./connectors/paperclip-defined-tools.js";
import type { PluginWorkerManager } from "./plugin-worker-manager.js";
import { PluginWorkerUnavailableError } from "./plugin-worker-unavailable-error.js";
@@ -131,12 +132,13 @@ export async function assertPluginConnectionWorker(
await runningWorker(db, identity.pluginKey);
}
-function toolDescriptor(tool: ConnectorToolDescriptor | PluginConnectorToolDef) {
+function toolDescriptor(tool: ConnectorToolDescriptor | PluginConnectorToolDef): PaperclipDefinedToolDefinition {
return {
name: tool.name,
- ...(tool.displayName ? { title: tool.displayName } : {}),
+ title: tool.displayName ?? null,
description: tool.description ?? tool.displayName ?? tool.name,
inputSchema: tool.parametersSchema,
+ outputSchema: null,
// The declared risk travels with the catalog entry; the connector tool
// policy reads it (see `connectors/tool-policy.ts`).
annotations: {
@@ -147,6 +149,16 @@ function toolDescriptor(tool: ConnectorToolDescriptor | PluginConnectorToolDef)
};
}
+export function pluginConnectionToolDefinition(
+ connection: { config: Record },
+ toolName: string,
+): PaperclipDefinedToolDefinition | null {
+ const tools = pluginConnectionMethod(connection)?.method.tools;
+ if (tools?.kind !== "static") return null;
+ const tool = tools.list.find((candidate) => candidate.name === toolName);
+ return tool ? toolDescriptor(tool) : null;
+}
+
/** The tools of one plugin connection, for its catalog. */
export async function listPluginConnectionTools(
db: Db,
diff --git a/server/src/services/recovery/dependency-wake-circuit-breaker.test.ts b/server/src/services/recovery/dependency-wake-circuit-breaker.test.ts
new file mode 100644
index 00000000000..4d8ba9cb8c7
--- /dev/null
+++ b/server/src/services/recovery/dependency-wake-circuit-breaker.test.ts
@@ -0,0 +1,70 @@
+import { describe, expect, it } from "vitest";
+import {
+ DEPENDENCY_WAKE_MAX_BACKOFF_MS,
+ decideDependencyWakeCircuit,
+ dependencyWakeBackoffMs,
+ type DependencyWakeRunSample,
+} from "./dependency-wake-circuit-breaker.js";
+
+const now = Date.parse("2099-01-01T12:00:00.000Z");
+let nextId = 0;
+
+function run(status: string, minutesAgo: number, id = `run-${nextId++}`): DependencyWakeRunSample {
+ return { id, status, finishedAt: new Date(now - minutesAgo * 60_000) };
+}
+
+function decide(runs: DependencyWakeRunSample[], latestBlockerChangeAt: Date | null = null) {
+ return decideDependencyWakeCircuit({ runs, latestBlockerChangeAt, now });
+}
+
+describe("dependencyWakeBackoffMs", () => {
+ it("grows by five per failure and is capped", () => {
+ expect([1, 2, 3, 4].map(dependencyWakeBackoffMs)).toEqual([60_000, 300_000, 1_500_000, 7_500_000]);
+ expect(dependencyWakeBackoffMs(50)).toBe(DEPENDENCY_WAKE_MAX_BACKOFF_MS);
+ });
+});
+
+describe("decideDependencyWakeCircuit", () => {
+ it("stays closed with no failed runs", () => {
+ expect(decide([])).toEqual({ state: "closed", consecutiveFailures: 0 });
+ expect(decide([run("succeeded", 0)])).toEqual({ state: "closed", consecutiveFailures: 0 });
+ });
+
+ it("backs off after a recent failure and closes once the backoff has passed", () => {
+ expect(decide([run("failed", 0)])).toEqual({ state: "backoff", consecutiveFailures: 1, retryAt: now + 60_000 });
+ expect(decide([run("failed", 2)]).state).toBe("closed");
+ expect(decide([run("failed", 2), run("timed_out", 3)])).toMatchObject({ state: "backoff", consecutiveFailures: 2 });
+ });
+
+ it("probes again after the capped backoff, however long the streak", () => {
+ const streak = Array.from({ length: 12 }, (_, index) => run("failed", 24 * 60 + 1 + index));
+ expect(decide(streak)).toEqual({ state: "closed", consecutiveFailures: 12 });
+ });
+
+ it("counts a failed run once even when several wake receipts point to it", () => {
+ expect(decide([run("failed", 3, "same"), run("failed", 3, "same"), run("failed", 3, "same")]))
+ .toEqual({ state: "closed", consecutiveFailures: 1 });
+ });
+
+ it("treats interrupted runs as neutral", () => {
+ expect(decide([run("interrupted", 0), run("failed", 1), run("failed", 2)]))
+ .toMatchObject({ state: "backoff", consecutiveFailures: 2 });
+ });
+
+ it("resets on a run that did not fail, whatever woke it", () => {
+ expect(decide([run("failed", 0), run("succeeded", 1), run("failed", 2), run("failed", 3)]))
+ .toMatchObject({ state: "backoff", consecutiveFailures: 1 });
+ expect(decide([run("cancelled", 0), run("failed", 1)])).toEqual({ state: "closed", consecutiveFailures: 0 });
+ });
+
+ it("orders runs by finish time", () => {
+ expect(decide([run("failed", 2), run("succeeded", 3), run("failed", 0)]))
+ .toMatchObject({ state: "backoff", consecutiveFailures: 2 });
+ });
+
+ it("ignores failures from before the latest blocker change", () => {
+ const runs = [run("failed", 0), run("failed", 2), run("failed", 3)];
+ expect(decide(runs, new Date(now - 90_000))).toMatchObject({ state: "backoff", consecutiveFailures: 1 });
+ expect(decide(runs, new Date(now))).toEqual({ state: "closed", consecutiveFailures: 0 });
+ });
+});
diff --git a/server/src/services/recovery/dependency-wake-circuit-breaker.ts b/server/src/services/recovery/dependency-wake-circuit-breaker.ts
new file mode 100644
index 00000000000..8d62030921c
--- /dev/null
+++ b/server/src/services/recovery/dependency-wake-circuit-breaker.ts
@@ -0,0 +1,160 @@
+import { and, desc, eq, inArray, isNull, max, or, sql } from "drizzle-orm";
+import type { Db } from "@paperclipai/db";
+import { activityLog, heartbeatRuns, issueRelations, issues, workspaceOperations } from "@paperclipai/db";
+import { boundRunIssueIdSql } from "../run-task-binding.js";
+
+/**
+ * Circuit breaker for the resolved-dependency wake backstop.
+ *
+ * The backstop wakes the assignee of a blocked task whose blockers are all done.
+ * Its idempotency key includes the task's blocked cycle, so a woken run that
+ * fails and leaves the task blocked again starts a new cycle and a new key. When
+ * that failure is deterministic, every sweep woke the task again: one production
+ * task ran 11,000+ failed runs this way. The failed run has its own recovery
+ * (retry scheduling, permanent failure classification); the blockers have not
+ * changed, so the backstop must not keep re-delivering the same news.
+ *
+ * Policy: count the consecutive failed runs of this agent on this task, newest
+ * first, that finished after the latest blocker change (a blocker result, or an
+ * edit of the blocker set). Each failure multiplies
+ * the wait before the next dependency wake by 5 (1m, 5m, 25m, ...), capped at
+ * DEPENDENCY_WAKE_MAX_BACKOFF_MS. The breaker never closes for good: after the
+ * wait, one wake probes again, so a fix that ships later is picked up. A run
+ * that did not fail (any wake reason) or a newer blocker change resets it.
+ * Interrupted runs (server restart, deploy) are neutral.
+ */
+export const DEPENDENCY_WAKE_BASE_BACKOFF_MS = 60_000;
+export const DEPENDENCY_WAKE_BACKOFF_FACTOR = 5;
+export const DEPENDENCY_WAKE_MAX_BACKOFF_MS = 24 * 60 * 60_000;
+/** Streak at which the backstop reports the task as repeatedly failing. */
+export const DEPENDENCY_WAKE_REPEATED_FAILURE_STREAK = 3;
+const RUN_SAMPLE_LIMIT = 12;
+
+const FAILED_RUN_STATUSES = new Set(["failed", "timed_out"]);
+const NEUTRAL_RUN_STATUSES = new Set(["interrupted"]);
+
+export type DependencyWakeRunSample = {
+ id: string;
+ status: string;
+ finishedAt: Date | null;
+};
+
+export type DependencyWakeCircuitDecision =
+ | { state: "closed"; consecutiveFailures: number }
+ | { state: "backoff"; consecutiveFailures: number; retryAt: number };
+
+export function dependencyWakeBackoffMs(consecutiveFailures: number): number {
+ if (consecutiveFailures <= 0) return 0;
+ const exponent = Math.min(consecutiveFailures - 1, 16);
+ return Math.min(DEPENDENCY_WAKE_BASE_BACKOFF_MS * DEPENDENCY_WAKE_BACKOFF_FACTOR ** exponent,
+ DEPENDENCY_WAKE_MAX_BACKOFF_MS);
+}
+
+/** `runs` are this agent's recent runs on the task, in any order. */
+export function decideDependencyWakeCircuit(input: {
+ runs: DependencyWakeRunSample[];
+ latestBlockerChangeAt: Date | null;
+ now: number;
+}): DependencyWakeCircuitDecision {
+ const seen = new Set();
+ let consecutiveFailures = 0;
+ let latestFailureAt: number | null = null;
+ const runs = [...input.runs].sort((a, b) => (b.finishedAt?.getTime() ?? 0) - (a.finishedAt?.getTime() ?? 0));
+ for (const run of runs) {
+ if (seen.has(run.id)) continue;
+ seen.add(run.id);
+ if (!run.finishedAt) continue;
+ // Only attempts made against the current blockers and their results count.
+ if (input.latestBlockerChangeAt && run.finishedAt.getTime() <= input.latestBlockerChangeAt.getTime()) break;
+ if (NEUTRAL_RUN_STATUSES.has(run.status)) continue;
+ if (!FAILED_RUN_STATUSES.has(run.status)) break;
+ consecutiveFailures += 1;
+ latestFailureAt ??= run.finishedAt.getTime();
+ }
+ if (consecutiveFailures === 0 || latestFailureAt === null) return { state: "closed", consecutiveFailures };
+ const retryAt = latestFailureAt + dependencyWakeBackoffMs(consecutiveFailures);
+ if (retryAt > input.now) return { state: "backoff", consecutiveFailures, retryAt };
+ return { state: "closed", consecutiveFailures };
+}
+
+export async function readDependencyWakeCircuit(
+ db: Db,
+ input: { companyId: string; issueId: string; agentId: string; blockerIssueIds: string[]; now?: number },
+): Promise {
+ // Match the canonical run-task binding. The OR over the three indexed binding
+ // paths (issue_id, native_issue_id, context issueId) lets the planner use
+ // their company-scoped indexes; the coalesced binding keeps the match exact.
+ // Unfinished runs are skipped.
+ const runs = await db
+ .select({ id: heartbeatRuns.id, status: heartbeatRuns.status, finishedAt: heartbeatRuns.finishedAt })
+ .from(heartbeatRuns)
+ .where(and(
+ eq(heartbeatRuns.companyId, input.companyId),
+ or(
+ eq(heartbeatRuns.issueId, input.issueId),
+ eq(heartbeatRuns.nativeIssueId, input.issueId),
+ sql`${heartbeatRuns.contextSnapshot} ->> 'issueId' = ${input.issueId}`,
+ ),
+ sql`${boundRunIssueIdSql()} = ${input.issueId}`,
+ eq(heartbeatRuns.agentId, input.agentId),
+ ))
+ .orderBy(desc(heartbeatRuns.createdAt), desc(heartbeatRuns.id))
+ .limit(RUN_SAMPLE_LIMIT);
+ if (!runs.some((run) => FAILED_RUN_STATUSES.has(run.status))) return { state: "closed", consecutiveFailures: 0 };
+
+ const changeTimes: unknown[] = [];
+ if (input.blockerIssueIds.length > 0) {
+ const [completed] = await db.select({ at: max(issues.completedAt) }).from(issues).where(and(
+ eq(issues.companyId, input.companyId),
+ inArray(issues.id, input.blockerIssueIds),
+ ));
+ // Join through each blocker's execution workspace so the read uses
+ // workspace_operations_company_workspace_issue_started_idx.
+ const [finalized] = await db.select({ at: max(workspaceOperations.finishedAt) })
+ .from(issues)
+ .innerJoin(workspaceOperations, and(
+ eq(workspaceOperations.companyId, issues.companyId),
+ eq(workspaceOperations.executionWorkspaceId, issues.executionWorkspaceId),
+ eq(workspaceOperations.issueId, issues.id),
+ ))
+ .where(and(
+ eq(issues.companyId, input.companyId),
+ inArray(issues.id, input.blockerIssueIds),
+ eq(workspaceOperations.phase, "workspace_finalize"),
+ eq(workspaceOperations.status, "succeeded"),
+ ));
+ // Workspace recovery saves blocker work without an execution workspace. The
+ // null workspace still matches the leading columns of the same index.
+ const [recovered] = await db.select({ at: max(workspaceOperations.finishedAt) }).from(workspaceOperations).where(and(
+ eq(workspaceOperations.companyId, input.companyId),
+ isNull(workspaceOperations.executionWorkspaceId),
+ inArray(workspaceOperations.issueId, input.blockerIssueIds),
+ eq(workspaceOperations.phase, "workspace_finalize"),
+ eq(workspaceOperations.status, "succeeded"),
+ sql`${workspaceOperations.metadata}->>'owningService' = 'workspace_recovery'`,
+ ));
+ changeTimes.push(completed?.at, finalized?.at, recovered?.at);
+ }
+ // A changed blocker set is a new attempt: an added blocker leaves a relation
+ // row, and every add or removal through the API records issue.blockers_updated.
+ const [related] = await db.select({ at: max(issueRelations.createdAt) }).from(issueRelations).where(and(
+ eq(issueRelations.companyId, input.companyId),
+ eq(issueRelations.relatedIssueId, input.issueId),
+ eq(issueRelations.type, "blocks"),
+ ));
+ const [edited] = await db.select({ at: max(activityLog.createdAt) }).from(activityLog).where(and(
+ eq(activityLog.companyId, input.companyId),
+ eq(activityLog.entityType, "issue"),
+ eq(activityLog.entityId, input.issueId),
+ eq(activityLog.action, "issue.blockers_updated"),
+ ));
+ changeTimes.push(related?.at, edited?.at);
+ let latestBlockerChangeAt: Date | null = null;
+ for (const value of changeTimes) {
+ if (value == null) continue;
+ const at = value instanceof Date ? value : new Date(value as string);
+ if (Number.isNaN(at.getTime())) continue;
+ if (!latestBlockerChangeAt || at > latestBlockerChangeAt) latestBlockerChangeAt = at;
+ }
+ return decideDependencyWakeCircuit({ runs, latestBlockerChangeAt, now: input.now ?? Date.now() });
+}
diff --git a/server/src/services/recovery/service.ts b/server/src/services/recovery/service.ts
index 6c0964a1b41..ffb7302cf87 100644
--- a/server/src/services/recovery/service.ts
+++ b/server/src/services/recovery/service.ts
@@ -1,5 +1,6 @@
import { wakeWaitersOfStalledIssues, type BlockerStallWakeup } from "./blocker-stall-wakeups.js";
import { ANTIGRAVITY_SWARM_UNAVAILABLE } from "../antigravity-swarm-refusal.js";
+import { DEPENDENCY_WAKE_REPEATED_FAILURE_STREAK, readDependencyWakeCircuit } from "./dependency-wake-circuit-breaker.js";
import { INTERACTION_DELIVERY_DENIED, isInteractionDeliveryDeniedRun } from "../agent-interaction-delivery.js";
import { notifyScheduledRetryDispatch } from "../run-dispatch-notifications.js";
import { OWNER_UNPROVABLE_CAUSE } from "./owner-gone-attestation.js";
@@ -6169,6 +6170,7 @@ export function recoveryService(
healed: 0,
existingWakeSkipped: 0,
selfBlockedSkipped: 0,
+ failedWakeBackoffSkipped: 0,
livePathSkipped: 0,
interactionSkipped: 0,
pauseHoldSkipped: 0,
@@ -6177,6 +6179,7 @@ export function recoveryService(
deferredOrFailed: 0,
enqueueFailed: 0,
issueIds: [] as string[],
+ repeatedFailureIssueIds: [] as string[],
};
const source = opts?.source ?? "issue_graph_liveness.backstop";
@@ -6370,6 +6373,24 @@ export function recoveryService(
continue;
}
+ // A woken run that fails can leave the task blocked again, which starts a
+ // new blocked cycle and a new idempotency key. Without this breaker a
+ // deterministic failure re-woke the task on every sweep, forever.
+ const circuit = await readDependencyWakeCircuit(db, {
+ companyId,
+ issueId: candidate.id,
+ agentId,
+ blockerIssueIds: readiness.blockerIssueIds,
+ });
+ if (circuit.state === "backoff") {
+ result.failedWakeBackoffSkipped += 1;
+ if (circuit.consecutiveFailures >= DEPENDENCY_WAKE_REPEATED_FAILURE_STREAK) {
+ result.repeatedFailureIssueIds.push(candidate.id);
+ }
+ opts?.onDeferredDeadline?.(circuit.retryAt);
+ continue;
+ }
+
try {
const wake = await deps.enqueueWakeup(agentId, {
source: "automation",
@@ -6443,6 +6464,15 @@ export function recoveryService(
"issue graph liveness backstop healed resolved blocked dependency wakes",
);
}
+ if (result.repeatedFailureIssueIds.length > 0) {
+ logger.warn(
+ {
+ issueIds: result.repeatedFailureIssueIds,
+ source,
+ },
+ "issue graph liveness backstop is backing off blocked tasks whose resolved-dependency runs keep failing",
+ );
+ }
// A stalled child or blocker: tell whoever waits on it, once per stall
// (blocker-stall-wakeups.ts). This sweep visits each blocked issue, which
diff --git a/server/src/services/tool-access/catalog/publication.ts b/server/src/services/tool-access/catalog/publication.ts
index d2ea419ff96..35dede36fb1 100644
--- a/server/src/services/tool-access/catalog/publication.ts
+++ b/server/src/services/tool-access/catalog/publication.ts
@@ -12,7 +12,7 @@ import { connectionMethodForConnection } from "../connection-methods.js";
import { stableHash, descriptorHash } from "../../tool-catalog-hash.js";
import { nativeProviderCatalogFor } from "../../native-provider-catalogs.js";
import { restConnectorFor } from "../../connectors/rest-registry.js";
-import { paperclipDefinedTool } from "../../connectors/paperclip-defined-tools.js";
+import { formerPaperclipDefinedTool, paperclipDefinedTool } from "../../connectors/paperclip-defined-tools.js";
import { googleWorkspaceToolTarget, googleWorkspaceGrantedScopes, isGoogleWorkspaceToolGranted } from "@paperclipai/shared";
import { retainMcpConnectionFailure } from "../../mcp-connection-failure.js";
import { isRemoteMcpConnectorMethod } from "@paperclipai/shared";
@@ -236,9 +236,12 @@ export function createToolCatalogPublication(db: Db, { now, audit, getConnection
(existing.versionHash !== hash || existing.schemaHash !== schemaHash);
const paperclipDefined = paperclipDefinedTool(connection, descriptor.name) !== null;
if (paperclipDefined && existing?.status === "quarantined") releasedNames.add(descriptor.name);
+ const former = !paperclipDefined && existing ? formerPaperclipDefinedTool(connection, descriptor.name) : null;
+ const leavingPaperclipDefinition = Boolean(former && existing && stableHash(former.inputSchema) === existing.schemaHash);
const shouldQuarantine =
quarantineOnRefresh &&
!paperclipDefined &&
+ !leavingPaperclipDefinition &&
(!existing || changed) &&
existing?.status !== "disabled" &&
(!safeDefault || riskLevel !== "read" || nativeProvider);
diff --git a/server/src/services/tool-access/connections/grants.ts b/server/src/services/tool-access/connections/grants.ts
index c45625b06a3..b1e8828ab36 100644
--- a/server/src/services/tool-access/connections/grants.ts
+++ b/server/src/services/tool-access/connections/grants.ts
@@ -16,6 +16,9 @@ import type { ConnectionGrantRevocationResult } from "@paperclipai/shared";
import { vercelTokenRequest, type VercelConnectClient } from "../../vercel-connect.js";
import type { createConnectionCredentialValidation } from "./credential-validation.js";
+import { releaseProviderLimitWaits } from "../../heartbeat/provider-limit-wait.js";
+import { publishActivity } from "../../activity-log.js";
+import type { ActivityPublication } from "../../../types/activity-publication.js";
type GrantDependencies = {
getConnectionRow(idOrUid: string, companyId?: string): Promise;
assertSecretRefs: ReturnType;
@@ -538,6 +541,7 @@ replaceConnectionGrantMembers: async (
}
}
}
+ const releasedWaitPublications: ActivityPublication[] = [];
const grant = await db.transaction(async (tx) => {
await notifyGitHubCredentialChange(tx, connection);
const [lockedGrant] = await tx.select({ id: connectionGrants.id }).from(connectionGrants)
@@ -595,6 +599,13 @@ replaceConnectionGrantMembers: async (
})),
);
}
+ // Usage limits reported on this account no longer hold work. The release
+ // commits with the revocation, so waiting work never outlives it.
+ if (updated) await releaseProviderLimitWaits(tx as unknown as Db, {
+ companyId: connection.companyId, reason: "ai_connection_revoked", grantIds: [grantId],
+ publications: releasedWaitPublications,
+ ...(binding.actorType && binding.actorId ? { actor: { actorType: binding.actorType, actorId: binding.actorId } } : {}),
+ });
return updated;
});
if (!grant) throw notFound("Connection grant not found");
@@ -609,6 +620,7 @@ replaceConnectionGrantMembers: async (
reasonCode: "grant_revoked",
details: { grantId: grant.id, kind: grant.kind, providerRevocation },
});
+ releasedWaitPublications.forEach(publishActivity);
return { ...toConnectionGrant(grant), ...(providerAccess ? { providerAccess } : {}) };
}
};
diff --git a/server/src/services/tool-access/connections/removal.ts b/server/src/services/tool-access/connections/removal.ts
index f950801c4de..ebdb692bdec 100644
--- a/server/src/services/tool-access/connections/removal.ts
+++ b/server/src/services/tool-access/connections/removal.ts
@@ -21,6 +21,7 @@ import { connectionGrants, connectionTokenIssuances, companySecretBindings, comp
import type { ToolConnectionRemovalResult, ToolConnectionRemovalSummary } from "@paperclipai/shared";
import { notFound } from "../../../errors.js";
import { logger } from "../../../middleware/logger.js";
+import { releaseProviderLimitWaits } from "../../heartbeat/provider-limit-wait.js";
import { forgetMcpHttpSessions } from "../../mcp-http.js";
import { secretService } from "../../secrets.js";
import { connectionSecretsUsedByOtherConsumers } from "../../connection-credentials.js";
@@ -312,6 +313,15 @@ async function removeConnection(
),
);
}
+ // Usage limits reported on a removed account no longer hold work. This
+ // runs before any provider call and covers grants an earlier attempt
+ // already revoked, so a failed release fails the removal and its retry
+ // releases them.
+ await releaseProviderLimitWaits(db, {
+ companyId: connection.companyId, reason: "ai_connection_revoked",
+ grantIds: grantRows.map((row) => row.id),
+ ...(binding.actorType && binding.actorId ? { actor: { actorType: binding.actorType, actorId: binding.actorId } } : {}),
+ });
let externalCredentialCleanup: ToolConnectionRemovalSummary["externalCredentialCleanup"] =
null;
if (
diff --git a/server/src/services/tool-gateway.ts b/server/src/services/tool-gateway.ts
index 4781ea2f768..9e191b4371c 100644
--- a/server/src/services/tool-gateway.ts
+++ b/server/src/services/tool-gateway.ts
@@ -33,8 +33,10 @@ import { connectionManagementService, type ConnectionManagementContext } from ".
import { notifyDeliveryWork, DELIVERY_QUEUES } from "./delivery-work-notifications.js";
import { measureToolDiscovery, measureRunPhase, recordConnectionCatalogCounts } from "./execution-preparation-timing.js";
import { nativeProviderCatalogFor } from "./native-provider-catalogs.js";
-import { callGoogleWorkspaceRest, googleWorkspaceCatalogToolTitle, googleWorkspaceRestAuditEndpoint } from "./google-workspace-rest-dispatch.js";
-import { paperclipDefinedTool } from "./connectors/paperclip-defined-tools.js";
+import {
+ callGoogleWorkspaceRest, googleWorkspaceCatalogToolTitle, googleWorkspaceMcpPreflightRefusal, googleWorkspaceRestAuditEndpoint,
+} from "./google-workspace-rest-dispatch.js";
+import { currentConnectionToolDefinition } from "./connectors/paperclip-defined-tools.js";
import { composeConnectionInstructions } from "./connection-instructions.js";
import { googleWorkspaceToolTarget, googleWorkspaceGrantedScopes, isGoogleWorkspaceToolGranted } from "@paperclipai/shared";
import { isInsufficientConnectionScope, INSUFFICIENT_CONNECTION_SCOPE_MESSAGE } from "./connection-permission-errors.js";
@@ -644,7 +646,7 @@ type RemoteHttpExecutionAudit = {
mcpMethod?: "tools/call";
requestId: string;
upstreamToolName: string;
- dispatched: true;
+ dispatched: boolean;
};
response?: {
httpStatus: number;
@@ -2075,7 +2077,7 @@ export function createToolGatewayService(
...(baseNameCounts.get(baseName)! > 1 ? [catalogEntry.id] : []),
]);
const applicationKey = application.applicationKey ?? null;
- const currentDefinition = paperclipDefinedTool(connection, catalogEntry.toolName);
+ const currentDefinition = currentConnectionToolDefinition(connection, catalogEntry.toolName);
const inputSchema = projectedConnectionToolInputSchema(
connection,
currentDefinition?.inputSchema ?? catalogEntry.inputSchema ?? {},
@@ -7518,7 +7520,7 @@ export function createToolGatewayService(
sourceTemplateKey?.startsWith("google-") === true) &&
/caller does not have permission/i.test(providerContent);
const content = googleWorkspacePermissionDenied
- ? "Google rejected this call. Google Workspace MCP is a Developer Preview: enroll the signed-in Workspace account and this OAuth client's Google Cloud project in Google's Developer Preview Program, wait for Google's registration confirmation, then reconnect and try again."
+ ? "Google rejected this call. Google's Workspace MCP servers accept only an OAuth client marked \"Use this client for an AI-powered agent\" in the Google Cloud console, from a project with the service's MCP API enabled. Ask the admin who set up the Google connection to check both, then reconnect and try again."
: providerContent;
const normalized = {
content,
@@ -8253,6 +8255,26 @@ export function createToolGatewayService(
}, { owner });
}
+ async function callConnectionToolForCheck(
+ session: ToolGatewaySession,
+ tool: ToolGatewayDescriptor,
+ connectionId: string,
+ toolName: string,
+ parameters: Record,
+ ms: number,
+ invocationId: string,
+ callerHeaders: ExecuteGatewayToolInput["callerHeaders"],
+ signals: { run?: AbortSignal; caller?: AbortSignal },
+ ): Promise {
+ const [entry] = await db.select({ id: toolCatalogEntries.id }).from(toolCatalogEntries).where(and(
+ eq(toolCatalogEntries.companyId, session.companyId), eq(toolCatalogEntries.connectionId, connectionId),
+ eq(toolCatalogEntries.toolName, toolName), eq(toolCatalogEntries.status, "active"),
+ )).limit(1);
+ if (!entry) return null;
+ return (await executeRemoteHttpTool(session, { ...tool, catalogEntryId: entry.id }, parameters, ms, invocationId, callerHeaders, false,
+ { run: signals.run, caller: signals.caller })).result;
+ }
+
async function executeRemoteHttpTool(
session: ToolGatewaySession,
tool: ToolGatewayDescriptor,
@@ -8347,6 +8369,7 @@ export function createToolGatewayService(
},
};
const controller = new AbortController();
+ const deadlineAt = Date.now() + ms;
const timer = setTimeout(() => controller.abort(), ms);
timer.unref?.();
const progressReporter = toolCallProgressReporterFor(session, tool, invocationId);
@@ -8417,6 +8440,17 @@ export function createToolGatewayService(
{ connectionId: connection.id, catalogEntryId: entry.id, execution },
);
};
+ if (workspaceTarget?.transport === "google_mcp") {
+ const refusal = await googleWorkspaceMcpPreflightRefusal({
+ toolName: entry.toolName, arguments: parameters, inputSchema: entry.inputSchema,
+ callTool: (toolName, args) => callConnectionToolForCheck(session, tool, connection.id, toolName, args,
+ Math.max(1, deadlineAt - Date.now()), invocationId, callerHeaders, { run: taskSignals.run, caller: taskSignals.caller }),
+ });
+ if (refusal) {
+ execution.request.dispatched = false;
+ return { result: normalizeMcpToolResult({ isError: true, content: [{ type: "text", text: refusal }] }, "mcp_http", false, sourceTemplateKey), headerSummary, execution };
+ }
+ }
if (workspaceTarget?.transport === "paperclip_rest") {
execution.request.protocol = "Google Workspace REST";
delete execution.request.mcpMethod;
diff --git a/tests/e2e/agent-chat-projects-handoff.spec.ts b/tests/e2e/agent-chat-projects-handoff.spec.ts
new file mode 100644
index 00000000000..eac1bac374e
--- /dev/null
+++ b/tests/e2e/agent-chat-projects-handoff.spec.ts
@@ -0,0 +1,335 @@
+import { expect, test } from "@playwright/test";
+
+import { idle, json, send, setup } from "./agent-chat.shared";
+
+test.use({ trace: "retain-on-failure" });
+test.setTimeout(120_000);
+
+/**
+ * Agent chat repository selection, plan-approval handoff, shared questions,
+ * history pagination, and retired opt-out coverage. Split from
+ * agent-chat-projects.spec.ts to keep every serial E2E spec under 100s.
+ */
+for (const selection of [
+ { ids: ["101"] },
+ { ids: ["101", "102"] },
+ {
+ ids: ["101"],
+ urls: [
+ "https://github.com/chat-fixture/frontend",
+ "https://github.com/octocat/Hello-World",
+ ],
+ },
+])
+ test(`authorized repository discovery and selection: ${JSON.stringify(selection)}`, async ({
+ page,
+ request,
+ }) => {
+ const f = await setup(request);
+ try {
+ const secret = await json(
+ await request.post(`/api/companies/${f.company.id}/secrets`, {
+ data: {
+ name: "Deterministic GitHub credential",
+ value: "paperclip-e2e-repository-fixture",
+ },
+ }),
+ );
+ await json(
+ await request.post(`/api/companies/${f.company.id}/tools/connections`, {
+ data: {
+ name: "Fixture GitHub",
+ applicationName: "Fixture GitHub",
+ transport: "rest_api",
+ authKind: "api_key",
+ credentialPolicy: "shared",
+ status: "active",
+ enabled: true,
+ config: {
+ sourceTemplateKey: "github",
+ baseUrl: "https://api.github.com",
+ },
+ credentialSecretRefs: [
+ {
+ configPath: "headers.Authorization",
+ secretId: secret.id,
+ versionSelector: "latest",
+ },
+ ],
+ },
+ }),
+ );
+ const repos = await json(
+ await request.get(
+ `/api/companies/${f.company.id}/project-repositories`,
+ ),
+ );
+ expect(repos.repositories.map((repo: any) => repo.id).sort()).toEqual([
+ "101",
+ "102",
+ ]);
+ await page.goto(f.route);
+ await send(page, {
+ action: "project",
+ name: "Selected repositories",
+ ...selection,
+ });
+ await idle(request, f.chatPath);
+ const project = (
+ await json(await request.get(`/api/companies/${f.company.id}/projects`))
+ )[0];
+ expect(project).toBeTruthy();
+ expect(
+ project.workspaces
+ .map((w: any) => w.metadata?.githubRepositoryId)
+ .filter(Boolean)
+ .sort(),
+ ).toEqual(selection.ids);
+ expect(new Set(project.workspaces.map((w: any) => w.repoUrl)).size).toBe(
+ project.workspaces.length,
+ );
+ await expect(
+ page.getByRole("article", {
+ name: "Project created: Selected repositories",
+ }),
+ ).toHaveCount(1);
+ } finally {
+ await f.restore();
+ }
+ });
+
+test("plan approval hands the preserved revision to an assigned project task", async ({
+ page,
+ request,
+}) => {
+ const f = await setup(request);
+ try {
+ await page.goto(f.route);
+ await page.getByTestId("task-chat-composer-add").click();
+ await page.getByTestId("composer-add-plan").click();
+ await send(page, {
+ action: "plan",
+ text: "# Approved welcome\nWrite two friendly sentences.",
+ approval: true,
+ });
+ const chat = await idle(request, f.chatPath);
+ const original = await json(
+ await request.get(`/api/issues/${chat.id}/documents/plan`),
+ );
+ expect(
+ await json(await request.get(`/api/companies/${f.company.id}/issues`)),
+ ).toHaveLength(0);
+ await page
+ .getByRole("button", { name: "Approve handoff", exact: true })
+ .last()
+ .click();
+ await idle(request, f.chatPath, 2);
+ await expect
+ .poll(
+ async () =>
+ (
+ await json(
+ await request.get(`/api/companies/${f.company.id}/issues`),
+ )
+ ).filter((task: any) => task.status === "done").length,
+ { timeout: 60_000 },
+ )
+ .toBe(1);
+ // Task completion is delivered back to the chat as another real turn.
+ await idle(request, f.chatPath, 3);
+ const task = (
+ await json(await request.get(`/api/companies/${f.company.id}/issues`))
+ )[0];
+ expect(task.parentId).toBeNull();
+ expect(task.projectId).toBeTruthy();
+ expect(task.assigneeAgentId).toBe(f.agent.id);
+ const completion = page.getByText("Delegated work completed:", { exact: false });
+ await expect(completion.getByRole("link").and(page.locator(
+ `a[href="/${f.company.issuePrefix}/issues/${task.identifier}"]`,
+ ))).toBeVisible();
+ const plan = await json(
+ await request.get(`/api/issues/${task.id}/documents/plan`),
+ );
+ const output = await json(
+ await request.get(`/api/issues/${task.id}/documents/output`),
+ );
+ expect(plan.body).toContain(original.body);
+ expect(output.body).toContain(plan.body);
+ expect(
+ (await json(await request.get(`/api/issues/${chat.id}/documents/plan`)))
+ .latestRevisionId,
+ ).toBe(original.latestRevisionId);
+ await expect(
+ page.getByRole("article", {
+ name: "Project created: Approved plan project",
+ }),
+ ).toHaveCount(1);
+ } finally {
+ await f.restore();
+ }
+});
+
+test("shared questions resume and existing project reuse creates no project card", async ({
+ page,
+ request,
+}) => {
+ const f = await setup(request);
+ try {
+ const project = await json(
+ await request.post(`/api/companies/${f.company.id}/projects`, {
+ data: { name: "Garden club" },
+ }),
+ );
+ await page.goto(f.route);
+ await send(page, { action: "question" });
+ await idle(request, f.chatPath);
+ await expect(
+ page.getByRole("radio", { name: "Garden club", exact: true }).last(),
+ ).toBeVisible();
+ await page
+ .getByRole("radio", { name: "Garden club", exact: true })
+ .last()
+ .click();
+ await page
+ .getByRole("button", { name: "Submit answers", exact: true })
+ .last()
+ .click();
+ const chat = await idle(request, f.chatPath, 2);
+ await expect(
+ page.getByText("Reply generation 0: Clarification received.", {
+ exact: true,
+ }),
+ ).toBeVisible();
+ await send(page, { action: "handoff", projectId: project.id });
+ await idle(request, f.chatPath, 3);
+ await expect
+ .poll(
+ async () =>
+ (
+ await json(
+ await request.get(`/api/companies/${f.company.id}/issues`),
+ )
+ ).length,
+ )
+ .toBe(1);
+ const task = (
+ await json(await request.get(`/api/companies/${f.company.id}/issues`))
+ )[0];
+ expect(task.projectId).toBe(project.id);
+ expect(task.parentId).toBeNull();
+ expect(
+ await json(await request.get(`/api/companies/${f.company.id}/projects`)),
+ ).toHaveLength(1);
+ await expect(
+ page.getByRole("article", { name: /Project created:/ }),
+ ).toHaveCount(0);
+ const ordinaryChild = await json(
+ await request.post(`/api/companies/${f.company.id}/issues`, {
+ data: { title: "Ordinary delegation still works", parentId: task.id },
+ }),
+ );
+ expect(ordinaryChild.parentId).toBe(task.id);
+ // The delegated task finishes on its own and wakes the conversation with
+ // a completion reporting turn. Wait for that turn to post its reply and
+ // settle before reading status, or this read can catch the conversation
+ // mid-turn.
+ await idle(request, f.chatPath, 4);
+ expect(
+ (await json(await request.get(`/api/issues/${chat.id}`))).status,
+ ).toBe("in_review");
+ } finally {
+ await f.restore();
+ }
+});
+
+test("shared history loads older messages without replacing the latest turn", async ({
+ page,
+ request,
+}) => {
+ const f = await setup(request);
+ try {
+ await page.goto(f.route);
+ await send(page, { action: "history" });
+ await idle(request, f.chatPath, 65);
+ await page.reload();
+ await expect(
+ page.getByText("History message 64", { exact: true }),
+ ).toBeVisible();
+ // Scroll the shared transcript, including its older-page sentinel.
+ await page.getByText("History message 64", { exact: true }).hover();
+ for (
+ let attempt = 0;
+ attempt < 5 &&
+ !(await page.getByText("History message 00", { exact: true }).count());
+ attempt++
+ ) {
+ await page.mouse.wheel(0, -12000);
+ await expect
+ .poll(async () => page.getByText(/History message/).count())
+ .toBeGreaterThan(40);
+ }
+ await expect(
+ page.getByText("History message 00", { exact: true }),
+ ).toBeAttached();
+ await expect(
+ page.getByText("History message 64", { exact: true }),
+ ).toBeAttached();
+ } finally {
+ await f.restore();
+ }
+});
+
+test("retired Chat opt-outs do not interrupt active turns or hide existing history", async ({
+ page,
+ request,
+}) => {
+ const original = await json(
+ await request.get("/api/instance/settings/experimental"),
+ );
+ expect(original.enableAgentChat).toBe(true);
+ const f = await setup(request);
+ try {
+ await page.goto(f.route);
+ await expect(page.getByRole("navigation", { name: "Workspace navigation" })).toBeVisible();
+ await send(page, { action: "delayed" });
+ await expect(
+ page.getByText("Turn started before feature disable.", { exact: true }),
+ ).toBeVisible({ timeout: 30_000 });
+ const chat = await json(await request.get(f.chatPath));
+ await json(
+ await request.patch("/api/instance/settings/experimental", {
+ data: { enableAgentChat: false },
+ }),
+ );
+ await expect
+ .poll(async () =>
+ (await json(await request.get(`/api/issues/${chat.id}/comments`))).some(
+ (c: any) => c.body === "Active turn settled after feature disable.",
+ ),
+ )
+ .toBe(true);
+ await expect
+ .poll(
+ async () =>
+ (await json(await request.get(`/api/issues/${chat.id}`)))
+ .conversationState,
+ )
+ .toBe("waiting");
+ const before = (
+ await json(
+ await request.get(`/api/companies/${f.company.id}/heartbeat-runs`),
+ )
+ ).length;
+ await page.reload();
+ await expect(page.getByText("Active turn settled after feature disable.", { exact: true })).toBeVisible();
+ expect(
+ (
+ await json(
+ await request.get(`/api/companies/${f.company.id}/heartbeat-runs`),
+ )
+ ).length,
+ ).toBe(before);
+ } finally {
+ await f.restore();
+ }
+});
diff --git a/tests/e2e/agent-chat-projects.spec.ts b/tests/e2e/agent-chat-projects.spec.ts
index cad8d985eaf..143a54dd8bc 100644
--- a/tests/e2e/agent-chat-projects.spec.ts
+++ b/tests/e2e/agent-chat-projects.spec.ts
@@ -353,327 +353,3 @@ for (const mode of ["Ask", "Plan"])
await f.restore();
}
});
-
-for (const selection of [
- { ids: ["101"] },
- { ids: ["101", "102"] },
- {
- ids: ["101"],
- urls: [
- "https://github.com/chat-fixture/frontend",
- "https://github.com/octocat/Hello-World",
- ],
- },
-])
- test(`authorized repository discovery and selection: ${JSON.stringify(selection)}`, async ({
- page,
- request,
- }) => {
- const f = await setup(request);
- try {
- const secret = await json(
- await request.post(`/api/companies/${f.company.id}/secrets`, {
- data: {
- name: "Deterministic GitHub credential",
- value: "paperclip-e2e-repository-fixture",
- },
- }),
- );
- await json(
- await request.post(`/api/companies/${f.company.id}/tools/connections`, {
- data: {
- name: "Fixture GitHub",
- applicationName: "Fixture GitHub",
- transport: "rest_api",
- authKind: "api_key",
- credentialPolicy: "shared",
- status: "active",
- enabled: true,
- config: {
- sourceTemplateKey: "github",
- baseUrl: "https://api.github.com",
- },
- credentialSecretRefs: [
- {
- configPath: "headers.Authorization",
- secretId: secret.id,
- versionSelector: "latest",
- },
- ],
- },
- }),
- );
- const repos = await json(
- await request.get(
- `/api/companies/${f.company.id}/project-repositories`,
- ),
- );
- expect(repos.repositories.map((repo: any) => repo.id).sort()).toEqual([
- "101",
- "102",
- ]);
- await page.goto(f.route);
- await send(page, {
- action: "project",
- name: "Selected repositories",
- ...selection,
- });
- await idle(request, f.chatPath);
- const project = (
- await json(await request.get(`/api/companies/${f.company.id}/projects`))
- )[0];
- expect(project).toBeTruthy();
- expect(
- project.workspaces
- .map((w: any) => w.metadata?.githubRepositoryId)
- .filter(Boolean)
- .sort(),
- ).toEqual(selection.ids);
- expect(new Set(project.workspaces.map((w: any) => w.repoUrl)).size).toBe(
- project.workspaces.length,
- );
- await expect(
- page.getByRole("article", {
- name: "Project created: Selected repositories",
- }),
- ).toHaveCount(1);
- } finally {
- await f.restore();
- }
- });
-
-test("plan approval hands the preserved revision to an assigned project task", async ({
- page,
- request,
-}) => {
- const f = await setup(request);
- try {
- await page.goto(f.route);
- await page.getByTestId("task-chat-composer-add").click();
- await page.getByTestId("composer-add-plan").click();
- await send(page, {
- action: "plan",
- text: "# Approved welcome\nWrite two friendly sentences.",
- approval: true,
- });
- const chat = await idle(request, f.chatPath);
- const original = await json(
- await request.get(`/api/issues/${chat.id}/documents/plan`),
- );
- expect(
- await json(await request.get(`/api/companies/${f.company.id}/issues`)),
- ).toHaveLength(0);
- await page
- .getByRole("button", { name: "Approve handoff", exact: true })
- .last()
- .click();
- await idle(request, f.chatPath, 2);
- await expect
- .poll(
- async () =>
- (
- await json(
- await request.get(`/api/companies/${f.company.id}/issues`),
- )
- ).filter((task: any) => task.status === "done").length,
- { timeout: 60_000 },
- )
- .toBe(1);
- // Task completion is delivered back to the chat as another real turn.
- await idle(request, f.chatPath, 3);
- const task = (
- await json(await request.get(`/api/companies/${f.company.id}/issues`))
- )[0];
- expect(task.parentId).toBeNull();
- expect(task.projectId).toBeTruthy();
- expect(task.assigneeAgentId).toBe(f.agent.id);
- const completion = page.getByText("Delegated work completed:", { exact: false });
- await expect(completion.getByRole("link").and(page.locator(
- `a[href="/${f.company.issuePrefix}/issues/${task.identifier}"]`,
- ))).toBeVisible();
- const plan = await json(
- await request.get(`/api/issues/${task.id}/documents/plan`),
- );
- const output = await json(
- await request.get(`/api/issues/${task.id}/documents/output`),
- );
- expect(plan.body).toContain(original.body);
- expect(output.body).toContain(plan.body);
- expect(
- (await json(await request.get(`/api/issues/${chat.id}/documents/plan`)))
- .latestRevisionId,
- ).toBe(original.latestRevisionId);
- await expect(
- page.getByRole("article", {
- name: "Project created: Approved plan project",
- }),
- ).toHaveCount(1);
- } finally {
- await f.restore();
- }
-});
-
-test("shared questions resume and existing project reuse creates no project card", async ({
- page,
- request,
-}) => {
- const f = await setup(request);
- try {
- const project = await json(
- await request.post(`/api/companies/${f.company.id}/projects`, {
- data: { name: "Garden club" },
- }),
- );
- await page.goto(f.route);
- await send(page, { action: "question" });
- await idle(request, f.chatPath);
- await expect(
- page.getByRole("radio", { name: "Garden club", exact: true }).last(),
- ).toBeVisible();
- await page
- .getByRole("radio", { name: "Garden club", exact: true })
- .last()
- .click();
- await page
- .getByRole("button", { name: "Submit answers", exact: true })
- .last()
- .click();
- const chat = await idle(request, f.chatPath, 2);
- await expect(
- page.getByText("Reply generation 0: Clarification received.", {
- exact: true,
- }),
- ).toBeVisible();
- await send(page, { action: "handoff", projectId: project.id });
- await idle(request, f.chatPath, 3);
- await expect
- .poll(
- async () =>
- (
- await json(
- await request.get(`/api/companies/${f.company.id}/issues`),
- )
- ).length,
- )
- .toBe(1);
- const task = (
- await json(await request.get(`/api/companies/${f.company.id}/issues`))
- )[0];
- expect(task.projectId).toBe(project.id);
- expect(task.parentId).toBeNull();
- expect(
- await json(await request.get(`/api/companies/${f.company.id}/projects`)),
- ).toHaveLength(1);
- await expect(
- page.getByRole("article", { name: /Project created:/ }),
- ).toHaveCount(0);
- const ordinaryChild = await json(
- await request.post(`/api/companies/${f.company.id}/issues`, {
- data: { title: "Ordinary delegation still works", parentId: task.id },
- }),
- );
- expect(ordinaryChild.parentId).toBe(task.id);
- // The delegated task finishes on its own and wakes the conversation with
- // a completion reporting turn. Wait for that turn to post its reply and
- // settle before reading status, or this read can catch the conversation
- // mid-turn.
- await idle(request, f.chatPath, 4);
- expect(
- (await json(await request.get(`/api/issues/${chat.id}`))).status,
- ).toBe("in_review");
- } finally {
- await f.restore();
- }
-});
-
-test("shared history loads older messages without replacing the latest turn", async ({
- page,
- request,
-}) => {
- const f = await setup(request);
- try {
- await page.goto(f.route);
- await send(page, { action: "history" });
- await idle(request, f.chatPath, 65);
- await page.reload();
- await expect(
- page.getByText("History message 64", { exact: true }),
- ).toBeVisible();
- // Scroll the shared transcript, including its older-page sentinel.
- await page.getByText("History message 64", { exact: true }).hover();
- for (
- let attempt = 0;
- attempt < 5 &&
- !(await page.getByText("History message 00", { exact: true }).count());
- attempt++
- ) {
- await page.mouse.wheel(0, -12000);
- await expect
- .poll(async () => page.getByText(/History message/).count())
- .toBeGreaterThan(40);
- }
- await expect(
- page.getByText("History message 00", { exact: true }),
- ).toBeAttached();
- await expect(
- page.getByText("History message 64", { exact: true }),
- ).toBeAttached();
- } finally {
- await f.restore();
- }
-});
-
-test("retired Chat opt-outs do not interrupt active turns or hide existing history", async ({
- page,
- request,
-}) => {
- const original = await json(
- await request.get("/api/instance/settings/experimental"),
- );
- expect(original.enableAgentChat).toBe(true);
- const f = await setup(request);
- try {
- await page.goto(f.route);
- await expect(page.getByRole("navigation", { name: "Workspace navigation" })).toBeVisible();
- await send(page, { action: "delayed" });
- await expect(
- page.getByText("Turn started before feature disable.", { exact: true }),
- ).toBeVisible({ timeout: 30_000 });
- const chat = await json(await request.get(f.chatPath));
- await json(
- await request.patch("/api/instance/settings/experimental", {
- data: { enableAgentChat: false },
- }),
- );
- await expect
- .poll(async () =>
- (await json(await request.get(`/api/issues/${chat.id}/comments`))).some(
- (c: any) => c.body === "Active turn settled after feature disable.",
- ),
- )
- .toBe(true);
- await expect
- .poll(
- async () =>
- (await json(await request.get(`/api/issues/${chat.id}`)))
- .conversationState,
- )
- .toBe("waiting");
- const before = (
- await json(
- await request.get(`/api/companies/${f.company.id}/heartbeat-runs`),
- )
- ).length;
- await page.reload();
- await expect(page.getByText("Active turn settled after feature disable.", { exact: true })).toBeVisible();
- expect(
- (
- await json(
- await request.get(`/api/companies/${f.company.id}/heartbeat-runs`),
- )
- ).length,
- ).toBe(before);
- } finally {
- await f.restore();
- }
-});
diff --git a/tests/e2e/chat-adapters-ui-messaging-batches.spec.ts b/tests/e2e/chat-adapters-ui-messaging-batches.spec.ts
new file mode 100644
index 00000000000..e4f0a7e1f40
--- /dev/null
+++ b/tests/e2e/chat-adapters-ui-messaging-batches.spec.ts
@@ -0,0 +1,916 @@
+import { expect, test } from "@playwright/test";
+
+import {
+ fulfill,
+ json,
+ seedCompanyAndAgent,
+ bodyOf,
+ type Seed,
+} from "./chat-adapters-ui.shared";
+
+/**
+ * Native chat-connector batch file consent/tracking and exact failed-run
+ * retry coverage. Split from chat-adapters-ui-messaging.spec.ts to keep
+ * every E2E spec under 1,000 LOC and under the 180s per-file CI budget.
+ */
+test.describe("Board send file consent and batch tracking", () => {
+ for (const cancelledHead of [false, true]) {
+ test(`keeps Teams file consent anchored across reload (${cancelledHead ? "cancelled head with waiting tail" : "mixed terminal receipt and explicit dismiss"})`, async ({
+ page,
+ request,
+ }, testInfo) => {
+ const seed = await seedCompanyAndAgent(request);
+ const issue = await json<{ id: string; identifier: string }>(
+ await request.post(`/api/companies/${seed.companyId}/issues`, {
+ data: { title: "Teams consent receipt", status: "backlog" },
+ }),
+ "create consent receipt task",
+ );
+ const endpointId = "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa";
+ const conversationId = "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb";
+ const anchor = "cccccccc-cccc-4ccc-8ccc-cccccccccccc";
+ const nextAnchor = "ffffffff-ffff-4fff-8fff-ffffffffffff";
+ const filePublications = [
+ "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
+ "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
+ ];
+ const filenames = ["consent-report.txt", "consent-notes.txt"];
+ const posts: Record[] = [];
+ const statusReads: string[] = [];
+ let terminal = false;
+ const publicationsPath = `/api/chat-endpoints/${endpointId}/conversations/${conversationId}/publications`;
+ const session = await json<{ user: { id: string } }>(
+ await request.get("/api/auth/get-session"),
+ "read receipt owner",
+ );
+ const storageKey = `paperclip:board-send:v2:${JSON.stringify([session.user.id, seed.companyId, issue.id, endpointId, conversationId])}`;
+ await page.route("**/api/instance/settings/experimental", (route) =>
+ fulfill(route, { enableChatConnectors: true }),
+ );
+ await page.route(`**/api/issues/${issue.id}/chat-binding`, (route) =>
+ fulfill(route, {
+ endpointId,
+ conversationId,
+ provider: "microsoft-teams",
+ externalLabel: "Personal file conversation",
+ assignedAgentLocked: true,
+ }),
+ );
+ // Only the publication API is simulated. Task creation and safe file
+ // uploads use this test's isolated Paperclip instance, never Teams.
+ await page.route(`**${publicationsPath}`, (route) => {
+ expect(route.request().method()).toBe("POST");
+ posts.push(bodyOf(route));
+ return fulfill(
+ route,
+ {
+ id: posts.length === 1 ? anchor : nextAnchor,
+ state: "pending",
+ attempts: 0,
+ },
+ 201,
+ );
+ });
+ await page.route(`**${publicationsPath}/*/status`, (route) => {
+ expect(route.request().method()).toBe("GET");
+ const path = new URL(route.request().url()).pathname;
+ statusReads.push(path);
+ if (path.endsWith(`/${nextAnchor}/status`)) {
+ return fulfill(route, {
+ publication: { id: nextAnchor, state: "pending", attempts: 0 },
+ total: 1,
+ published: 0,
+ awaitingConsent: 0,
+ declined: 0,
+ expired: 0,
+ cancelled: 0,
+ settled: 0,
+ canDismiss: false,
+ });
+ }
+ expect(path).toBe(`${publicationsPath}/${anchor}/status`);
+ const parts = [
+ { id: anchor, state: "published", attempts: 1 },
+ ...filePublications.map((id, index) => ({
+ id,
+ state:
+ terminal || (cancelledHead && index === 0)
+ ? "cancelled"
+ : "awaiting_consent",
+ attempts: 1,
+ fileTransfer: {
+ provider: "microsoft-teams",
+ filename: filenames[index],
+ phase: terminal
+ ? index === 0
+ ? "declined"
+ : "expired"
+ : cancelledHead && index === 0
+ ? "cancelled"
+ : "awaiting_consent",
+ version: terminal ? 3 : 2,
+ },
+ })),
+ ];
+ return fulfill(route, {
+ publication: parts[1],
+ parts,
+ total: 3,
+ published: 1,
+ awaitingConsent: terminal ? 0 : cancelledHead ? 1 : 2,
+ declined: terminal ? 1 : 0,
+ expired: terminal ? 1 : 0,
+ cancelled: !terminal && cancelledHead ? 1 : 0,
+ settled: terminal ? 3 : cancelledHead ? 2 : 1,
+ canDismiss: terminal,
+ });
+ });
+ await page.goto(`/${seed.prefix}/issues/${issue.identifier}`);
+ const banner = page.getByRole("region", {
+ name: "External conversation",
+ exact: true,
+ });
+ await banner
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .click();
+ for (const name of filenames) {
+ await banner
+ .getByLabel("Attach file to channel update", { exact: true })
+ .setInputFiles({
+ name,
+ mimeType: "text/plain",
+ buffer: Buffer.from(`Synthetic consent fixture: ${name}.\n`),
+ });
+ await expect(
+ banner.getByRole("checkbox", { name, exact: true }),
+ ).toBeChecked();
+ await expect(
+ banner.getByLabel("Attach file to channel update", { exact: true }),
+ ).toBeEnabled();
+ }
+ await expect(
+ banner.getByRole("group", { name: "Include task files", exact: true }),
+ ).toContainText(
+ "In personal Teams chats, recipients accept each file before upload. Channels and group chats receive supported images directly; other files stay on the task, with a task link or private-task notice.",
+ );
+ await banner.screenshot({
+ path: testInfo.outputPath("teams-file-guidance.png"),
+ });
+ expect(posts).toHaveLength(0);
+ await banner
+ .getByRole("textbox", { name: "Board update", exact: true })
+ .fill("Please review these two files.");
+ await banner
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .last()
+ .click();
+ await expect.poll(() => posts.length).toBe(1);
+ expect(posts[0].attachmentIds).toHaveLength(2);
+ await expect(
+ banner.getByText(
+ cancelledHead
+ ? "1 published · 1 awaiting consent · 1 cancelled"
+ : "1 published · 2 awaiting consent",
+ { exact: true },
+ ),
+ ).toBeVisible();
+ const retainedBeforeReload = await page.evaluate(
+ (key) => sessionStorage.getItem(key),
+ storageKey,
+ );
+ expect(JSON.parse(retainedBeforeReload!).publication.id).toBe(anchor);
+ const readsBeforeReload = statusReads.length;
+ await page.reload();
+ await expect
+ .poll(() => statusReads.length)
+ .toBeGreaterThan(readsBeforeReload);
+ expect(
+ await page.evaluate((key) => sessionStorage.getItem(key), storageKey),
+ ).toBe(retainedBeforeReload);
+ expect(
+ statusReads.every(
+ (path) => path === `${publicationsPath}/${anchor}/status`,
+ ),
+ ).toBe(true);
+ await expect(
+ banner.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toBeDisabled();
+ await expect(
+ banner.getByLabel("Attach file to channel update", { exact: true }),
+ ).toBeDisabled();
+ await expect(
+ banner
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .last(),
+ ).toBeDisabled();
+ await expect(
+ banner.getByRole("button", {
+ name: "Dismiss delivery receipt",
+ exact: true,
+ }),
+ ).toHaveCount(0);
+ await expect(
+ banner.getByText(
+ cancelledHead
+ ? "Waiting for remaining file consent"
+ : "Waiting for file consent",
+ { exact: true },
+ ),
+ ).toBeVisible();
+ await expect(
+ banner.getByText("Channel delivery cancelled", { exact: true }),
+ ).toHaveCount(0);
+ await expect(
+ banner.getByText("Sent to channel", { exact: true }),
+ ).toHaveCount(0);
+ for (const name of filenames) {
+ await expect(
+ banner.getByRole("checkbox", { name, exact: true }),
+ ).toBeChecked();
+ await expect(
+ banner.getByRole("checkbox", { name, exact: true }),
+ ).toBeDisabled();
+ }
+ expect(posts).toHaveLength(1);
+ await banner.screenshot({
+ path: testInfo.outputPath("consent-waiting.png"),
+ });
+ if (cancelledHead) return;
+
+ terminal = true;
+ await expect(
+ banner.getByText("Delivery settled with mixed outcomes", {
+ exact: true,
+ }),
+ ).toBeVisible({ timeout: 8_000 });
+ await expect(
+ banner.getByText("1 published · 1 declined · 1 expired", {
+ exact: true,
+ }),
+ ).toBeVisible();
+ await expect(
+ banner.getByText("consent-report.txt — Declined", { exact: true }),
+ ).toBeVisible();
+ await expect(
+ banner.getByText("consent-notes.txt — Consent expired", {
+ exact: true,
+ }),
+ ).toBeVisible();
+ await expect(
+ banner
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .last(),
+ ).toBeDisabled();
+ await banner.screenshot({
+ path: testInfo.outputPath("consent-mixed.png"),
+ });
+ expect(posts).toHaveLength(1);
+ await banner
+ .getByRole("button", { name: "Dismiss delivery receipt", exact: true })
+ .click();
+ await expect(
+ banner.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toHaveValue("");
+ await expect(
+ banner.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toBeEnabled();
+ await expect(
+ banner
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .last(),
+ ).toBeDisabled();
+ expect(
+ await page.evaluate((key) => sessionStorage.getItem(key), storageKey),
+ ).toBeNull();
+ expect(posts).toHaveLength(1);
+ await expect(
+ page.getByText("Sent to channel", { exact: true }),
+ ).toHaveCount(0);
+ for (const name of filenames) {
+ await expect(
+ banner.getByRole("checkbox", { name, exact: true }),
+ ).not.toBeChecked();
+ }
+ await banner
+ .getByRole("textbox", { name: "Board update", exact: true })
+ .fill("A separate text-only update.");
+ expect(posts).toHaveLength(1);
+ await banner
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .last()
+ .click();
+ await expect.poll(() => posts.length).toBe(2);
+ expect(posts[1]).toMatchObject({
+ body: "A separate text-only update.",
+ });
+ expect(posts[1]).not.toHaveProperty("attachmentIds");
+ expect(posts[1].idempotencyKey).not.toBe(posts[0].idempotencyKey);
+ });
+ }
+
+ for (const outcome of [
+ "published",
+ "failed",
+ "delivery_unknown",
+ "response_lost",
+ ] as const) {
+ test(`tracks the whole file batch across reload and ${outcome} without a new send identity`, async ({
+ page,
+ request,
+ }) => {
+ const seed = await seedCompanyAndAgent(request);
+ const issue = await json<{ id: string; identifier: string }>(
+ await request.post(`/api/companies/${seed.companyId}/issues`, {
+ data: { title: "Board delivery refresh", status: "backlog" },
+ }),
+ "create board-send task",
+ );
+ const endpointId = "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa";
+ const conversationId = "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb";
+ const publicationId = "cccccccc-cccc-4ccc-8ccc-cccccccccccc";
+ const attachmentId = "dddddddd-dddd-4ddd-8ddd-dddddddddddd";
+ const statusPath = `/api/chat-endpoints/${endpointId}/conversations/${conversationId}/publications/${publicationId}/status`;
+ let sends = 0;
+ const submittedPayloads: Record[] = [];
+ let reads = 0;
+ let canonicalAttachmentReadsAfterSend = 0;
+ let canonicalCommentReadsAfterSend = 0;
+ let status = "streaming";
+ let releaseResend!: () => void;
+ const resendReleased = new Promise((resolve) => {
+ releaseResend = resolve;
+ });
+ await page.route("**/api/instance/settings/experimental", (route) =>
+ fulfill(route, { enableChatConnectors: true }),
+ );
+ await page.route(`**/api/issues/${issue.id}/chat-binding`, (route) =>
+ fulfill(route, {
+ endpointId,
+ conversationId,
+ provider: "slack",
+ externalLabel: "#board-send-test",
+ assignedAgentLocked: true,
+ }),
+ );
+ // The comment and attachment reads below are faked. The chat bootstrap
+ // would answer them from the server, so make the page read them itself.
+ await page.route(/\/chat-bootstrap(?:\?|$)/, (route) => route.abort());
+ await page.route(
+ new RegExp(
+ `/api/issues/(${issue.id}|${issue.identifier})/(?:recent-comments|comments)(?:\\?|$)`,
+ ),
+ async (route) => {
+ if (
+ sends &&
+ route.request().url().includes(`/issues/${issue.identifier}/`)
+ )
+ canonicalCommentReadsAfterSend += 1;
+ const comments = sends
+ ? [
+ {
+ id: publicationId,
+ companyId: seed.companyId,
+ issueId: issue.id,
+ authorAgentId: null,
+ authorUserId: "local-board",
+ authorType: "user",
+ body: "Board batch must finish all files.",
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ },
+ ]
+ : [];
+ await fulfill(route, route.request().url().includes("/recent-comments")
+ ? { comments, latestCommentId: comments.at(-1)?.id ?? null, hasMore: false }
+ : comments);
+ },
+ );
+ await page.route(
+ new RegExp(
+ `/api/issues/(${issue.id}|${issue.identifier})/attachments$`,
+ ),
+ async (route) => {
+ if (
+ sends &&
+ route.request().url().includes(`/issues/${issue.identifier}/`)
+ )
+ canonicalAttachmentReadsAfterSend += 1;
+ await fulfill(route, [
+ {
+ id: attachmentId,
+ companyId: seed.companyId,
+ issueId: issue.id,
+ issueCommentId: sends ? publicationId : null,
+ assetId: attachmentId,
+ provider: "local_disk",
+ objectKey: "board-send-test.txt",
+ contentType: "text/plain",
+ byteSize: 12,
+ sha256: "a".repeat(64),
+ originalFilename: "board-send-test.txt",
+ createdByAgentId: null,
+ createdByUserId: "local-board",
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ contentPath: `/api/attachments/${attachmentId}/content`,
+ },
+ {
+ id: "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
+ companyId: seed.companyId,
+ issueId: issue.id,
+ issueCommentId: null,
+ assetId: "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
+ provider: "local_disk",
+ objectKey: "internal-only.txt",
+ contentType: "text/plain",
+ byteSize: 8,
+ sha256: "b".repeat(64),
+ originalFilename: "internal-only.txt",
+ createdByAgentId: null,
+ createdByUserId: "local-board",
+ createdAt: new Date().toISOString(),
+ updatedAt: new Date().toISOString(),
+ contentPath:
+ "/api/attachments/eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee/content",
+ },
+ ]);
+ },
+ );
+ await page.route(
+ `**/api/chat-endpoints/${endpointId}/conversations/${conversationId}/publications`,
+ async (route) => {
+ expect(route.request().method()).toBe("POST");
+ expect(bodyOf(route).attachmentIds).toEqual([attachmentId]);
+ sends += 1;
+ submittedPayloads.push(bodyOf(route));
+ if (outcome === "response_lost" && sends === 1) {
+ await route.abort("failed");
+ return;
+ }
+ if (outcome === "response_lost" && sends === 2) {
+ // The automatic resend is still in flight when the page reloads;
+ // the browser drops it.
+ await resendReleased;
+ await route.abort("failed").catch(() => {});
+ return;
+ }
+ await fulfill(
+ route,
+ { id: publicationId, state: "streaming", attempts: 1 },
+ 201,
+ );
+ },
+ );
+ await page.route(`**${statusPath}`, async (route) => {
+ expect(route.request().method()).toBe("GET");
+ reads += 1;
+ await fulfill(route, {
+ publication: {
+ id: status === "streaming" ? publicationId : attachmentId,
+ state: status,
+ attempts: 1,
+ },
+ total: 2,
+ published: status === "published" ? 2 : 1,
+ });
+ });
+ await page.goto(`/${seed.prefix}/issues/${issue.identifier}`);
+ await page
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .click();
+ await page
+ .getByRole("textbox", { name: "Board update", exact: true })
+ .fill("Board batch must finish all files.");
+ await page.getByRole("checkbox", { name: "board-send-test.txt" }).check();
+ await page
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .last()
+ .click();
+ const expectRetainedFiles = async () => {
+ const files = page.getByRole("group", {
+ name: "Files in this send",
+ exact: true,
+ });
+ await expect(files).toBeVisible();
+ await expect(files.getByRole("checkbox")).toHaveCount(1);
+ await expect(
+ files.getByRole("checkbox", { name: "board-send-test.txt" }),
+ ).toBeChecked();
+ await expect(
+ files.getByRole("checkbox", { name: "board-send-test.txt" }),
+ ).toBeDisabled();
+ await expect(
+ files.getByText("internal-only.txt", { exact: true }),
+ ).toHaveCount(0);
+ };
+ if (outcome === "response_lost") {
+ // The lost send resends on its own with the same identity.
+ await expect(
+ page.getByText("Sending when reconnected…", { exact: true }),
+ ).toBeVisible();
+ await expect.poll(() => submittedPayloads.length).toBe(2);
+ expect(submittedPayloads[1]).toEqual(submittedPayloads[0]);
+ // A send restored after reload has an unknown outcome and waits for
+ // an explicit, same-identity retry.
+ await page.reload();
+ releaseResend();
+ await expect(
+ page.getByText("Delivery result not confirmed", { exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toBeDisabled();
+ await expectRetainedFiles();
+ expect(sends).toBe(2);
+ expect(reads).toBe(0);
+ await page
+ .getByRole("button", { name: "Retry safely", exact: true })
+ .click();
+ await expect.poll(() => submittedPayloads.length).toBe(3);
+ expect(submittedPayloads[2]).toEqual(submittedPayloads[0]);
+ } else {
+ await expect(
+ page.getByText("Publishing to channel", { exact: true }).first(),
+ ).toBeVisible();
+ // The canonical task view must refresh its comment/files before any reload.
+ await expect
+ .poll(() => canonicalCommentReadsAfterSend)
+ .toBeGreaterThan(0);
+ await expect
+ .poll(() => canonicalAttachmentReadsAfterSend)
+ .toBeGreaterThan(0);
+ await expectRetainedFiles();
+ const readsBeforeReload = reads;
+ await page.reload();
+ await expect
+ .poll(() => reads, { timeout: 8_000 })
+ .toBeGreaterThan(readsBeforeReload);
+ expect(sends).toBe(1);
+ }
+ await expect.poll(() => reads, { timeout: 8_000 }).toBeGreaterThan(0);
+ await expectRetainedFiles();
+ await expect(
+ page.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toHaveValue("Board batch must finish all files.");
+ await expect(
+ page.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toBeDisabled();
+ status = outcome === "response_lost" ? "published" : outcome;
+ if (status === "published") {
+ await expect(
+ page.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toHaveCount(0, { timeout: 8_000 });
+ await expect(
+ page.getByText("Sent to channel", { exact: true }),
+ ).toBeVisible();
+ } else {
+ await expect(
+ page.getByText(
+ outcome === "failed"
+ ? "Channel delivery failed"
+ : "Delivery not confirmed",
+ { exact: true },
+ ),
+ ).toBeVisible({ timeout: 8_000 });
+ await expect(
+ page.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toHaveValue("Board batch must finish all files.");
+ await expect(
+ page
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .last(),
+ ).toBeDisabled();
+ await expect(
+ page.getByRole("link", { name: "Open Activity", exact: true }),
+ ).toBeVisible();
+ // An explicit resolution elsewhere may complete the batch; this surface only reads it.
+ status = "published";
+ await expect(
+ page.getByRole("textbox", { name: "Board update", exact: true }),
+ ).toHaveCount(0, { timeout: 8_000 });
+ }
+ // response_lost: the lost send, its automatic resend, and the explicit
+ // retry after reload, all with one identity.
+ const expectedSends = outcome === "response_lost" ? 3 : 1;
+ expect(sends).toBe(expectedSends);
+ expect(canonicalCommentReadsAfterSend).toBeGreaterThan(0);
+ expect(canonicalAttachmentReadsAfterSend).toBeGreaterThan(0);
+ await expect(
+ page.getByText("Board batch must finish all files.", { exact: true }),
+ ).toBeVisible();
+ await page
+ .getByRole("button", { name: "Send to channel", exact: true })
+ .click();
+ const newFiles = page.getByRole("group", {
+ name: "Include task files",
+ exact: true,
+ });
+ await expect(
+ newFiles.getByRole("checkbox", { name: "board-send-test.txt" }),
+ ).toHaveCount(0);
+ await expect(
+ newFiles.getByRole("checkbox", { name: "internal-only.txt" }),
+ ).not.toBeChecked();
+ await expect(
+ newFiles.getByRole("checkbox", { name: "internal-only.txt" }),
+ ).toBeEnabled();
+ expect(sends).toBe(expectedSends);
+ });
+ }
+});
+
+test.describe("Failed chat task and exact run retry", () => {
+ let seed: Seed;
+ let issue: { id: string; identifier: string; title: string };
+
+ const failedRunId = "11111111-aaaa-4aaa-8aaa-111111111111";
+ const actionId = "22222222-bbbb-4bbb-8bbb-222222222222";
+ const denial =
+ "This chat source is no longer authorized. Open the task to review its current channel access before retrying.";
+
+ test.beforeAll(async ({ request }) => {
+ seed = await seedCompanyAndAgent(request);
+ issue = await json(
+ await request.post(`/api/companies/${seed.companyId}/issues`, {
+ data: { title: "Exact chat retry destination", status: "backlog" },
+ }),
+ "create exact-retry task",
+ );
+ });
+
+ // Cover every surface and every outcome without running the full 4x3
+ // Cartesian product: all 3 outcomes on the primary Coordinator Tasks surface
+ // plus one representative outcome on each secondary surface.
+ const retryCases: Array<{
+ surface: "agent run" | "Inbox" | "Coordinator Tasks" | "Legacy Inbox";
+ outcome: "queued" | "deferred" | "denied";
+ }> = [
+ { surface: "Coordinator Tasks", outcome: "queued" },
+ { surface: "Coordinator Tasks", outcome: "deferred" },
+ { surface: "Coordinator Tasks", outcome: "denied" },
+ { surface: "agent run", outcome: "queued" },
+ { surface: "Inbox", outcome: "deferred" },
+ { surface: "Legacy Inbox", outcome: "denied" },
+ ];
+ for (const { surface, outcome } of retryCases) {
+ test(`${surface}: selected run ${outcome} preserves exact retry authority and truthful feedback`, async ({
+ page,
+ }, testInfo) => {
+ const usesTaskRetry = surface === "Inbox" || surface === "Coordinator Tasks";
+ const now = Date.now();
+ const run = {
+ id: failedRunId,
+ companyId: seed.companyId,
+ agentId: seed.agentId,
+ status: "failed",
+ invocationSource: "assignment",
+ triggerDetail: "system",
+ startedAt: new Date(now - 60_000).toISOString(),
+ finishedAt: new Date(now - 30_000).toISOString(),
+ createdAt: new Date(now - 60_000).toISOString(),
+ updatedAt: new Date(now - 30_000).toISOString(),
+ error: "The fixture provider turn failed.",
+ errorCode: "adapter_failed",
+ exitCode: 1,
+ signal: null,
+ responsibleUserId: null,
+ runtimeMode: "native",
+ driverKind: "codex_app_server",
+ nativeIssueId: issue.id,
+ usageJson: null,
+ resultJson: null,
+ sessionIdBefore: null,
+ sessionIdAfter: null,
+ logStore: null,
+ logRef: null,
+ logBytes: 0,
+ retryOfRunId: null,
+ scheduledRetryAt: null,
+ scheduledRetryAttempt: 0,
+ scheduledRetryReason: null,
+ contextSnapshot: {
+ source: "chat:slack",
+ issueId: issue.id,
+ taskId: "33333333-cccc-4ccc-8ccc-333333333333",
+ taskKey: "untrusted-copy-of-another-task",
+ wakeCommentId: "44444444-dddd-4ddd-8ddd-444444444444",
+ wakeCommentIds: ["44444444-dddd-4ddd-8ddd-444444444444"],
+ chatFailedRunRetry: { actionId: "untrusted-client-action" },
+ },
+ };
+ const requests: Array<{
+ companyId: string | null;
+ body: Record;
+ }> = [];
+ const destinations: string[] = [];
+ page.on("framenavigated", (frame) => {
+ if (frame === page.mainFrame()) destinations.push(frame.url());
+ });
+ await page.route("**/api/**", async (route) => {
+ const url = new URL(route.request().url());
+ const pathname = url.pathname;
+ if (pathname === "/api/workspace-preferences/me") {
+ await fulfill(route, {
+ userId: "local-board",
+ coordinatorWorkspaceEnabled: surface === "Coordinator Tasks",
+ updatedAt: null,
+ });
+ return;
+ }
+ if (pathname === "/api/instance/settings/experimental") {
+ await fulfill(route, {
+ enableChatConnectors: true,
+ enableStreamlinedUi: surface !== "Legacy Inbox",
+ });
+ return;
+ }
+ if (pathname === `/api/companies/${seed.companyId}/heartbeat-runs`) {
+ await fulfill(route, [run]);
+ return;
+ }
+ if (pathname === `/api/heartbeat-runs/${failedRunId}`) {
+ await fulfill(route, run);
+ return;
+ }
+ if (
+ pathname === `/api/heartbeat-runs/${failedRunId}/events` ||
+ pathname ===
+ `/api/heartbeat-runs/${failedRunId}/workspace-operations` ||
+ pathname === `/api/companies/${seed.companyId}/provider-traces`
+ ) {
+ await fulfill(route, []);
+ return;
+ }
+ if (pathname === `/api/heartbeat-runs/${failedRunId}/issues`) {
+ await fulfill(route, [
+ {
+ issueId: issue.id,
+ identifier: issue.identifier,
+ title: issue.title,
+ status: "backlog",
+ priority: "medium",
+ },
+ ]);
+ return;
+ }
+ if (pathname === `/api/heartbeat-runs/${failedRunId}/log`) {
+ await fulfill(route, {
+ runId: failedRunId,
+ content: "",
+ nextOffset: 0,
+ });
+ return;
+ }
+ const retryPath = usesTaskRetry
+ ? `/api/issues/${issue.id}/retry`
+ : `/api/agents/${seed.agentId}/wakeup`;
+ if (pathname === retryPath) {
+ expect(route.request().method()).toBe("POST");
+ requests.push({
+ companyId: url.searchParams.get("companyId"),
+ body: bodyOf(route),
+ });
+ if (outcome === "denied") {
+ await fulfill(
+ route,
+ {
+ error: denial,
+ details: { code: "chat_failed_run_retry_source_denied" },
+ },
+ 409,
+ );
+ } else {
+ // The durable action exists, but no run has been admitted yet.
+ await fulfill(
+ route,
+ usesTaskRetry
+ ? {
+ requestId: actionId,
+ accepted: true,
+ stale: false,
+ observedRunId: failedRunId,
+ presentation: {
+ intentId: actionId,
+ responsibility: "system",
+ state: outcome === "queued" ? "working" : "retry_scheduled",
+ nextRetryAt: null,
+ canRetry: false,
+ userAction: null,
+ sourceRunIds: [failedRunId],
+ observedRunId: failedRunId,
+ },
+ }
+ : { actionId, issueId: issue.id, runId: null, status: outcome },
+ 202,
+ );
+ }
+ return;
+ }
+ await route.continue();
+ });
+
+ const startPath =
+ surface === "agent run"
+ ? `/${seed.prefix}/agents/maya/runs/${failedRunId}`
+ : `/${seed.prefix}/inbox/all`;
+ const canonicalAgentResponse =
+ surface === "agent run"
+ ? page.waitForResponse((response) => {
+ const url = new URL(response.url());
+ return (
+ response.request().method() === "GET" &&
+ url.pathname === "/api/agents/maya" &&
+ url.searchParams.get("companyId") === seed.companyId
+ );
+ })
+ : null;
+ await page.goto(startPath);
+ if (canonicalAgentResponse) {
+ const response = await canonicalAgentResponse;
+ expect(response.ok()).toBe(true);
+ expect(await response.json()).toMatchObject({
+ id: seed.agentId,
+ companyId: seed.companyId,
+ urlKey: "maya",
+ });
+ await expect(page).toHaveURL(
+ new RegExp(`/${seed.prefix}/agents/maya/runs/${failedRunId}$`),
+ );
+ }
+ const retry = page
+ .getByRole("button", { name: "Retry", exact: true })
+ .filter({ visible: true });
+ await expect(retry).toHaveCount(1);
+ await retry.click();
+ await expect.poll(() => requests.length).toBe(1);
+ expect(requests[0]).toEqual(usesTaskRetry
+ ? {
+ companyId: null,
+ body: {
+ idempotencyKey: expect.stringMatching(
+ /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
+ ),
+ observedRunId: failedRunId,
+ },
+ }
+ : {
+ companyId: seed.companyId,
+ body: {
+ source: "on_demand",
+ triggerDetail: "manual",
+ reason: "retry_failed_run",
+ failedRunId,
+ },
+ });
+ if (outcome === "denied") {
+ await expect(page.getByText(denial, { exact: true })).toBeVisible();
+ if (surface !== "agent run") {
+ await expect(
+ page.getByText("Run retry failed", { exact: true }),
+ ).toBeVisible();
+ const toast = page.getByRole("listitem").filter({
+ has: page.getByText("Run retry failed", { exact: true }),
+ });
+ // Visibility alone accepts opacity:0 during the toast entrance.
+ // The operator must actually be able to read the denial.
+ await expect(toast).toHaveCSS("opacity", "1");
+ await expect(toast).toBeInViewport();
+ }
+ // Agent routes canonicalize the UUID to its human-readable URL key.
+ // The selected failed run must remain unchanged across that redirect.
+ await expect(page).toHaveURL(
+ surface === "agent run"
+ ? new RegExp(
+ `/${seed.prefix}/agents/(${seed.agentId}|maya)/runs/${failedRunId}$`,
+ )
+ : surface === "Coordinator Tasks"
+ ? new RegExp(`/${seed.prefix}/issues\\?view=everything$`)
+ : new RegExp(`${startPath}$`),
+ );
+ await expect(retry).toBeEnabled();
+ await testInfo.attach(`${surface}-retry-denied`, {
+ body: await page.screenshot(),
+ contentType: "image/png",
+ });
+ } else {
+ await expect(page).toHaveURL(
+ new RegExp(
+ `/${seed.prefix}/issues/(${issue.id}|${issue.identifier})$`,
+ ),
+ );
+ await expect(
+ page.getByText(issue.title, { exact: true }).first(),
+ ).toBeVisible();
+ await expect(
+ page.getByText("Run retry failed", { exact: true }),
+ ).toHaveCount(0);
+ }
+ expect(requests).toHaveLength(1);
+ expect(
+ destinations.some((url) =>
+ /\/runs\/(null|undefined)(?:[/?#]|$)/.test(url),
+ ),
+ ).toBe(false);
+ });
+ }
+});
diff --git a/tests/e2e/chat-adapters-ui-messaging.spec.ts b/tests/e2e/chat-adapters-ui-messaging.spec.ts
index c090663c216..11fc59bcee6 100644
--- a/tests/e2e/chat-adapters-ui-messaging.spec.ts
+++ b/tests/e2e/chat-adapters-ui-messaging.spec.ts
@@ -746,904 +746,4 @@ test.describe("Board send delivery refresh", () => {
}),
]);
});
-
- for (const cancelledHead of [false, true]) {
- test(`keeps Teams file consent anchored across reload (${cancelledHead ? "cancelled head with waiting tail" : "mixed terminal receipt and explicit dismiss"})`, async ({
- page,
- request,
- }, testInfo) => {
- const seed = await seedCompanyAndAgent(request);
- const issue = await json<{ id: string; identifier: string }>(
- await request.post(`/api/companies/${seed.companyId}/issues`, {
- data: { title: "Teams consent receipt", status: "backlog" },
- }),
- "create consent receipt task",
- );
- const endpointId = "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa";
- const conversationId = "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb";
- const anchor = "cccccccc-cccc-4ccc-8ccc-cccccccccccc";
- const nextAnchor = "ffffffff-ffff-4fff-8fff-ffffffffffff";
- const filePublications = [
- "dddddddd-dddd-4ddd-8ddd-dddddddddddd",
- "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
- ];
- const filenames = ["consent-report.txt", "consent-notes.txt"];
- const posts: Record[] = [];
- const statusReads: string[] = [];
- let terminal = false;
- const publicationsPath = `/api/chat-endpoints/${endpointId}/conversations/${conversationId}/publications`;
- const session = await json<{ user: { id: string } }>(
- await request.get("/api/auth/get-session"),
- "read receipt owner",
- );
- const storageKey = `paperclip:board-send:v2:${JSON.stringify([session.user.id, seed.companyId, issue.id, endpointId, conversationId])}`;
- await page.route("**/api/instance/settings/experimental", (route) =>
- fulfill(route, { enableChatConnectors: true }),
- );
- await page.route(`**/api/issues/${issue.id}/chat-binding`, (route) =>
- fulfill(route, {
- endpointId,
- conversationId,
- provider: "microsoft-teams",
- externalLabel: "Personal file conversation",
- assignedAgentLocked: true,
- }),
- );
- // Only the publication API is simulated. Task creation and safe file
- // uploads use this test's isolated Paperclip instance, never Teams.
- await page.route(`**${publicationsPath}`, (route) => {
- expect(route.request().method()).toBe("POST");
- posts.push(bodyOf(route));
- return fulfill(
- route,
- {
- id: posts.length === 1 ? anchor : nextAnchor,
- state: "pending",
- attempts: 0,
- },
- 201,
- );
- });
- await page.route(`**${publicationsPath}/*/status`, (route) => {
- expect(route.request().method()).toBe("GET");
- const path = new URL(route.request().url()).pathname;
- statusReads.push(path);
- if (path.endsWith(`/${nextAnchor}/status`)) {
- return fulfill(route, {
- publication: { id: nextAnchor, state: "pending", attempts: 0 },
- total: 1,
- published: 0,
- awaitingConsent: 0,
- declined: 0,
- expired: 0,
- cancelled: 0,
- settled: 0,
- canDismiss: false,
- });
- }
- expect(path).toBe(`${publicationsPath}/${anchor}/status`);
- const parts = [
- { id: anchor, state: "published", attempts: 1 },
- ...filePublications.map((id, index) => ({
- id,
- state:
- terminal || (cancelledHead && index === 0)
- ? "cancelled"
- : "awaiting_consent",
- attempts: 1,
- fileTransfer: {
- provider: "microsoft-teams",
- filename: filenames[index],
- phase: terminal
- ? index === 0
- ? "declined"
- : "expired"
- : cancelledHead && index === 0
- ? "cancelled"
- : "awaiting_consent",
- version: terminal ? 3 : 2,
- },
- })),
- ];
- return fulfill(route, {
- publication: parts[1],
- parts,
- total: 3,
- published: 1,
- awaitingConsent: terminal ? 0 : cancelledHead ? 1 : 2,
- declined: terminal ? 1 : 0,
- expired: terminal ? 1 : 0,
- cancelled: !terminal && cancelledHead ? 1 : 0,
- settled: terminal ? 3 : cancelledHead ? 2 : 1,
- canDismiss: terminal,
- });
- });
- await page.goto(`/${seed.prefix}/issues/${issue.identifier}`);
- const banner = page.getByRole("region", {
- name: "External conversation",
- exact: true,
- });
- await banner
- .getByRole("button", { name: "Send to channel", exact: true })
- .click();
- for (const name of filenames) {
- await banner
- .getByLabel("Attach file to channel update", { exact: true })
- .setInputFiles({
- name,
- mimeType: "text/plain",
- buffer: Buffer.from(`Synthetic consent fixture: ${name}.\n`),
- });
- await expect(
- banner.getByRole("checkbox", { name, exact: true }),
- ).toBeChecked();
- await expect(
- banner.getByLabel("Attach file to channel update", { exact: true }),
- ).toBeEnabled();
- }
- await expect(
- banner.getByRole("group", { name: "Include task files", exact: true }),
- ).toContainText(
- "In personal Teams chats, recipients accept each file before upload. Channels and group chats receive supported images directly; other files stay on the task, with a task link or private-task notice.",
- );
- await banner.screenshot({
- path: testInfo.outputPath("teams-file-guidance.png"),
- });
- expect(posts).toHaveLength(0);
- await banner
- .getByRole("textbox", { name: "Board update", exact: true })
- .fill("Please review these two files.");
- await banner
- .getByRole("button", { name: "Send to channel", exact: true })
- .last()
- .click();
- await expect.poll(() => posts.length).toBe(1);
- expect(posts[0].attachmentIds).toHaveLength(2);
- await expect(
- banner.getByText(
- cancelledHead
- ? "1 published · 1 awaiting consent · 1 cancelled"
- : "1 published · 2 awaiting consent",
- { exact: true },
- ),
- ).toBeVisible();
- const retainedBeforeReload = await page.evaluate(
- (key) => sessionStorage.getItem(key),
- storageKey,
- );
- expect(JSON.parse(retainedBeforeReload!).publication.id).toBe(anchor);
- const readsBeforeReload = statusReads.length;
- await page.reload();
- await expect
- .poll(() => statusReads.length)
- .toBeGreaterThan(readsBeforeReload);
- expect(
- await page.evaluate((key) => sessionStorage.getItem(key), storageKey),
- ).toBe(retainedBeforeReload);
- expect(
- statusReads.every(
- (path) => path === `${publicationsPath}/${anchor}/status`,
- ),
- ).toBe(true);
- await expect(
- banner.getByRole("textbox", { name: "Board update", exact: true }),
- ).toBeDisabled();
- await expect(
- banner.getByLabel("Attach file to channel update", { exact: true }),
- ).toBeDisabled();
- await expect(
- banner
- .getByRole("button", { name: "Send to channel", exact: true })
- .last(),
- ).toBeDisabled();
- await expect(
- banner.getByRole("button", {
- name: "Dismiss delivery receipt",
- exact: true,
- }),
- ).toHaveCount(0);
- await expect(
- banner.getByText(
- cancelledHead
- ? "Waiting for remaining file consent"
- : "Waiting for file consent",
- { exact: true },
- ),
- ).toBeVisible();
- await expect(
- banner.getByText("Channel delivery cancelled", { exact: true }),
- ).toHaveCount(0);
- await expect(
- banner.getByText("Sent to channel", { exact: true }),
- ).toHaveCount(0);
- for (const name of filenames) {
- await expect(
- banner.getByRole("checkbox", { name, exact: true }),
- ).toBeChecked();
- await expect(
- banner.getByRole("checkbox", { name, exact: true }),
- ).toBeDisabled();
- }
- expect(posts).toHaveLength(1);
- await banner.screenshot({
- path: testInfo.outputPath("consent-waiting.png"),
- });
- if (cancelledHead) return;
-
- terminal = true;
- await expect(
- banner.getByText("Delivery settled with mixed outcomes", {
- exact: true,
- }),
- ).toBeVisible({ timeout: 8_000 });
- await expect(
- banner.getByText("1 published · 1 declined · 1 expired", {
- exact: true,
- }),
- ).toBeVisible();
- await expect(
- banner.getByText("consent-report.txt — Declined", { exact: true }),
- ).toBeVisible();
- await expect(
- banner.getByText("consent-notes.txt — Consent expired", {
- exact: true,
- }),
- ).toBeVisible();
- await expect(
- banner
- .getByRole("button", { name: "Send to channel", exact: true })
- .last(),
- ).toBeDisabled();
- await banner.screenshot({
- path: testInfo.outputPath("consent-mixed.png"),
- });
- expect(posts).toHaveLength(1);
- await banner
- .getByRole("button", { name: "Dismiss delivery receipt", exact: true })
- .click();
- await expect(
- banner.getByRole("textbox", { name: "Board update", exact: true }),
- ).toHaveValue("");
- await expect(
- banner.getByRole("textbox", { name: "Board update", exact: true }),
- ).toBeEnabled();
- await expect(
- banner
- .getByRole("button", { name: "Send to channel", exact: true })
- .last(),
- ).toBeDisabled();
- expect(
- await page.evaluate((key) => sessionStorage.getItem(key), storageKey),
- ).toBeNull();
- expect(posts).toHaveLength(1);
- await expect(
- page.getByText("Sent to channel", { exact: true }),
- ).toHaveCount(0);
- for (const name of filenames) {
- await expect(
- banner.getByRole("checkbox", { name, exact: true }),
- ).not.toBeChecked();
- }
- await banner
- .getByRole("textbox", { name: "Board update", exact: true })
- .fill("A separate text-only update.");
- expect(posts).toHaveLength(1);
- await banner
- .getByRole("button", { name: "Send to channel", exact: true })
- .last()
- .click();
- await expect.poll(() => posts.length).toBe(2);
- expect(posts[1]).toMatchObject({
- body: "A separate text-only update.",
- });
- expect(posts[1]).not.toHaveProperty("attachmentIds");
- expect(posts[1].idempotencyKey).not.toBe(posts[0].idempotencyKey);
- });
- }
-
- for (const outcome of [
- "published",
- "failed",
- "delivery_unknown",
- "response_lost",
- ] as const) {
- test(`tracks the whole file batch across reload and ${outcome} without a new send identity`, async ({
- page,
- request,
- }) => {
- const seed = await seedCompanyAndAgent(request);
- const issue = await json<{ id: string; identifier: string }>(
- await request.post(`/api/companies/${seed.companyId}/issues`, {
- data: { title: "Board delivery refresh", status: "backlog" },
- }),
- "create board-send task",
- );
- const endpointId = "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa";
- const conversationId = "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb";
- const publicationId = "cccccccc-cccc-4ccc-8ccc-cccccccccccc";
- const attachmentId = "dddddddd-dddd-4ddd-8ddd-dddddddddddd";
- const statusPath = `/api/chat-endpoints/${endpointId}/conversations/${conversationId}/publications/${publicationId}/status`;
- let sends = 0;
- const submittedPayloads: Record[] = [];
- let reads = 0;
- let canonicalAttachmentReadsAfterSend = 0;
- let canonicalCommentReadsAfterSend = 0;
- let status = "streaming";
- let releaseResend!: () => void;
- const resendReleased = new Promise((resolve) => {
- releaseResend = resolve;
- });
- await page.route("**/api/instance/settings/experimental", (route) =>
- fulfill(route, { enableChatConnectors: true }),
- );
- await page.route(`**/api/issues/${issue.id}/chat-binding`, (route) =>
- fulfill(route, {
- endpointId,
- conversationId,
- provider: "slack",
- externalLabel: "#board-send-test",
- assignedAgentLocked: true,
- }),
- );
- // The comment and attachment reads below are faked. The chat bootstrap
- // would answer them from the server, so make the page read them itself.
- await page.route(/\/chat-bootstrap(?:\?|$)/, (route) => route.abort());
- await page.route(
- new RegExp(
- `/api/issues/(${issue.id}|${issue.identifier})/(?:recent-comments|comments)(?:\\?|$)`,
- ),
- async (route) => {
- if (
- sends &&
- route.request().url().includes(`/issues/${issue.identifier}/`)
- )
- canonicalCommentReadsAfterSend += 1;
- const comments = sends
- ? [
- {
- id: publicationId,
- companyId: seed.companyId,
- issueId: issue.id,
- authorAgentId: null,
- authorUserId: "local-board",
- authorType: "user",
- body: "Board batch must finish all files.",
- createdAt: new Date().toISOString(),
- updatedAt: new Date().toISOString(),
- },
- ]
- : [];
- await fulfill(route, route.request().url().includes("/recent-comments")
- ? { comments, latestCommentId: comments.at(-1)?.id ?? null, hasMore: false }
- : comments);
- },
- );
- await page.route(
- new RegExp(
- `/api/issues/(${issue.id}|${issue.identifier})/attachments$`,
- ),
- async (route) => {
- if (
- sends &&
- route.request().url().includes(`/issues/${issue.identifier}/`)
- )
- canonicalAttachmentReadsAfterSend += 1;
- await fulfill(route, [
- {
- id: attachmentId,
- companyId: seed.companyId,
- issueId: issue.id,
- issueCommentId: sends ? publicationId : null,
- assetId: attachmentId,
- provider: "local_disk",
- objectKey: "board-send-test.txt",
- contentType: "text/plain",
- byteSize: 12,
- sha256: "a".repeat(64),
- originalFilename: "board-send-test.txt",
- createdByAgentId: null,
- createdByUserId: "local-board",
- createdAt: new Date().toISOString(),
- updatedAt: new Date().toISOString(),
- contentPath: `/api/attachments/${attachmentId}/content`,
- },
- {
- id: "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
- companyId: seed.companyId,
- issueId: issue.id,
- issueCommentId: null,
- assetId: "eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee",
- provider: "local_disk",
- objectKey: "internal-only.txt",
- contentType: "text/plain",
- byteSize: 8,
- sha256: "b".repeat(64),
- originalFilename: "internal-only.txt",
- createdByAgentId: null,
- createdByUserId: "local-board",
- createdAt: new Date().toISOString(),
- updatedAt: new Date().toISOString(),
- contentPath:
- "/api/attachments/eeeeeeee-eeee-4eee-8eee-eeeeeeeeeeee/content",
- },
- ]);
- },
- );
- await page.route(
- `**/api/chat-endpoints/${endpointId}/conversations/${conversationId}/publications`,
- async (route) => {
- expect(route.request().method()).toBe("POST");
- expect(bodyOf(route).attachmentIds).toEqual([attachmentId]);
- sends += 1;
- submittedPayloads.push(bodyOf(route));
- if (outcome === "response_lost" && sends === 1) {
- await route.abort("failed");
- return;
- }
- if (outcome === "response_lost" && sends === 2) {
- // The automatic resend is still in flight when the page reloads;
- // the browser drops it.
- await resendReleased;
- await route.abort("failed").catch(() => {});
- return;
- }
- await fulfill(
- route,
- { id: publicationId, state: "streaming", attempts: 1 },
- 201,
- );
- },
- );
- await page.route(`**${statusPath}`, async (route) => {
- expect(route.request().method()).toBe("GET");
- reads += 1;
- await fulfill(route, {
- publication: {
- id: status === "streaming" ? publicationId : attachmentId,
- state: status,
- attempts: 1,
- },
- total: 2,
- published: status === "published" ? 2 : 1,
- });
- });
- await page.goto(`/${seed.prefix}/issues/${issue.identifier}`);
- await page
- .getByRole("button", { name: "Send to channel", exact: true })
- .click();
- await page
- .getByRole("textbox", { name: "Board update", exact: true })
- .fill("Board batch must finish all files.");
- await page.getByRole("checkbox", { name: "board-send-test.txt" }).check();
- await page
- .getByRole("button", { name: "Send to channel", exact: true })
- .last()
- .click();
- const expectRetainedFiles = async () => {
- const files = page.getByRole("group", {
- name: "Files in this send",
- exact: true,
- });
- await expect(files).toBeVisible();
- await expect(files.getByRole("checkbox")).toHaveCount(1);
- await expect(
- files.getByRole("checkbox", { name: "board-send-test.txt" }),
- ).toBeChecked();
- await expect(
- files.getByRole("checkbox", { name: "board-send-test.txt" }),
- ).toBeDisabled();
- await expect(
- files.getByText("internal-only.txt", { exact: true }),
- ).toHaveCount(0);
- };
- if (outcome === "response_lost") {
- // The lost send resends on its own with the same identity.
- await expect(
- page.getByText("Sending when reconnected…", { exact: true }),
- ).toBeVisible();
- await expect.poll(() => submittedPayloads.length).toBe(2);
- expect(submittedPayloads[1]).toEqual(submittedPayloads[0]);
- // A send restored after reload has an unknown outcome and waits for
- // an explicit, same-identity retry.
- await page.reload();
- releaseResend();
- await expect(
- page.getByText("Delivery result not confirmed", { exact: true }),
- ).toBeVisible();
- await expect(
- page.getByRole("textbox", { name: "Board update", exact: true }),
- ).toBeDisabled();
- await expectRetainedFiles();
- expect(sends).toBe(2);
- expect(reads).toBe(0);
- await page
- .getByRole("button", { name: "Retry safely", exact: true })
- .click();
- await expect.poll(() => submittedPayloads.length).toBe(3);
- expect(submittedPayloads[2]).toEqual(submittedPayloads[0]);
- } else {
- await expect(
- page.getByText("Publishing to channel", { exact: true }).first(),
- ).toBeVisible();
- // The canonical task view must refresh its comment/files before any reload.
- await expect
- .poll(() => canonicalCommentReadsAfterSend)
- .toBeGreaterThan(0);
- await expect
- .poll(() => canonicalAttachmentReadsAfterSend)
- .toBeGreaterThan(0);
- await expectRetainedFiles();
- const readsBeforeReload = reads;
- await page.reload();
- await expect
- .poll(() => reads, { timeout: 8_000 })
- .toBeGreaterThan(readsBeforeReload);
- expect(sends).toBe(1);
- }
- await expect.poll(() => reads, { timeout: 8_000 }).toBeGreaterThan(0);
- await expectRetainedFiles();
- await expect(
- page.getByRole("textbox", { name: "Board update", exact: true }),
- ).toHaveValue("Board batch must finish all files.");
- await expect(
- page.getByRole("textbox", { name: "Board update", exact: true }),
- ).toBeDisabled();
- status = outcome === "response_lost" ? "published" : outcome;
- if (status === "published") {
- await expect(
- page.getByRole("textbox", { name: "Board update", exact: true }),
- ).toHaveCount(0, { timeout: 8_000 });
- await expect(
- page.getByText("Sent to channel", { exact: true }),
- ).toBeVisible();
- } else {
- await expect(
- page.getByText(
- outcome === "failed"
- ? "Channel delivery failed"
- : "Delivery not confirmed",
- { exact: true },
- ),
- ).toBeVisible({ timeout: 8_000 });
- await expect(
- page.getByRole("textbox", { name: "Board update", exact: true }),
- ).toHaveValue("Board batch must finish all files.");
- await expect(
- page
- .getByRole("button", { name: "Send to channel", exact: true })
- .last(),
- ).toBeDisabled();
- await expect(
- page.getByRole("link", { name: "Open Activity", exact: true }),
- ).toBeVisible();
- // An explicit resolution elsewhere may complete the batch; this surface only reads it.
- status = "published";
- await expect(
- page.getByRole("textbox", { name: "Board update", exact: true }),
- ).toHaveCount(0, { timeout: 8_000 });
- }
- // response_lost: the lost send, its automatic resend, and the explicit
- // retry after reload, all with one identity.
- const expectedSends = outcome === "response_lost" ? 3 : 1;
- expect(sends).toBe(expectedSends);
- expect(canonicalCommentReadsAfterSend).toBeGreaterThan(0);
- expect(canonicalAttachmentReadsAfterSend).toBeGreaterThan(0);
- await expect(
- page.getByText("Board batch must finish all files.", { exact: true }),
- ).toBeVisible();
- await page
- .getByRole("button", { name: "Send to channel", exact: true })
- .click();
- const newFiles = page.getByRole("group", {
- name: "Include task files",
- exact: true,
- });
- await expect(
- newFiles.getByRole("checkbox", { name: "board-send-test.txt" }),
- ).toHaveCount(0);
- await expect(
- newFiles.getByRole("checkbox", { name: "internal-only.txt" }),
- ).not.toBeChecked();
- await expect(
- newFiles.getByRole("checkbox", { name: "internal-only.txt" }),
- ).toBeEnabled();
- expect(sends).toBe(expectedSends);
- });
- }
-});
-
-test.describe("Failed chat task and exact run retry", () => {
- let seed: Seed;
- let issue: { id: string; identifier: string; title: string };
-
- const failedRunId = "11111111-aaaa-4aaa-8aaa-111111111111";
- const actionId = "22222222-bbbb-4bbb-8bbb-222222222222";
- const denial =
- "This chat source is no longer authorized. Open the task to review its current channel access before retrying.";
-
- test.beforeAll(async ({ request }) => {
- seed = await seedCompanyAndAgent(request);
- issue = await json(
- await request.post(`/api/companies/${seed.companyId}/issues`, {
- data: { title: "Exact chat retry destination", status: "backlog" },
- }),
- "create exact-retry task",
- );
- });
-
- // Cover every surface and every outcome without running the full 4x3
- // Cartesian product: all 3 outcomes on the primary Coordinator Tasks surface
- // plus one representative outcome on each secondary surface.
- const retryCases: Array<{
- surface: "agent run" | "Inbox" | "Coordinator Tasks" | "Legacy Inbox";
- outcome: "queued" | "deferred" | "denied";
- }> = [
- { surface: "Coordinator Tasks", outcome: "queued" },
- { surface: "Coordinator Tasks", outcome: "deferred" },
- { surface: "Coordinator Tasks", outcome: "denied" },
- { surface: "agent run", outcome: "queued" },
- { surface: "Inbox", outcome: "deferred" },
- { surface: "Legacy Inbox", outcome: "denied" },
- ];
- for (const { surface, outcome } of retryCases) {
- test(`${surface}: selected run ${outcome} preserves exact retry authority and truthful feedback`, async ({
- page,
- }, testInfo) => {
- const usesTaskRetry = surface === "Inbox" || surface === "Coordinator Tasks";
- const now = Date.now();
- const run = {
- id: failedRunId,
- companyId: seed.companyId,
- agentId: seed.agentId,
- status: "failed",
- invocationSource: "assignment",
- triggerDetail: "system",
- startedAt: new Date(now - 60_000).toISOString(),
- finishedAt: new Date(now - 30_000).toISOString(),
- createdAt: new Date(now - 60_000).toISOString(),
- updatedAt: new Date(now - 30_000).toISOString(),
- error: "The fixture provider turn failed.",
- errorCode: "adapter_failed",
- exitCode: 1,
- signal: null,
- responsibleUserId: null,
- runtimeMode: "native",
- driverKind: "codex_app_server",
- nativeIssueId: issue.id,
- usageJson: null,
- resultJson: null,
- sessionIdBefore: null,
- sessionIdAfter: null,
- logStore: null,
- logRef: null,
- logBytes: 0,
- retryOfRunId: null,
- scheduledRetryAt: null,
- scheduledRetryAttempt: 0,
- scheduledRetryReason: null,
- contextSnapshot: {
- source: "chat:slack",
- issueId: issue.id,
- taskId: "33333333-cccc-4ccc-8ccc-333333333333",
- taskKey: "untrusted-copy-of-another-task",
- wakeCommentId: "44444444-dddd-4ddd-8ddd-444444444444",
- wakeCommentIds: ["44444444-dddd-4ddd-8ddd-444444444444"],
- chatFailedRunRetry: { actionId: "untrusted-client-action" },
- },
- };
- const requests: Array<{
- companyId: string | null;
- body: Record;
- }> = [];
- const destinations: string[] = [];
- page.on("framenavigated", (frame) => {
- if (frame === page.mainFrame()) destinations.push(frame.url());
- });
- await page.route("**/api/**", async (route) => {
- const url = new URL(route.request().url());
- const pathname = url.pathname;
- if (pathname === "/api/workspace-preferences/me") {
- await fulfill(route, {
- userId: "local-board",
- coordinatorWorkspaceEnabled: surface === "Coordinator Tasks",
- updatedAt: null,
- });
- return;
- }
- if (pathname === "/api/instance/settings/experimental") {
- await fulfill(route, {
- enableChatConnectors: true,
- enableStreamlinedUi: surface !== "Legacy Inbox",
- });
- return;
- }
- if (pathname === `/api/companies/${seed.companyId}/heartbeat-runs`) {
- await fulfill(route, [run]);
- return;
- }
- if (pathname === `/api/heartbeat-runs/${failedRunId}`) {
- await fulfill(route, run);
- return;
- }
- if (
- pathname === `/api/heartbeat-runs/${failedRunId}/events` ||
- pathname ===
- `/api/heartbeat-runs/${failedRunId}/workspace-operations` ||
- pathname === `/api/companies/${seed.companyId}/provider-traces`
- ) {
- await fulfill(route, []);
- return;
- }
- if (pathname === `/api/heartbeat-runs/${failedRunId}/issues`) {
- await fulfill(route, [
- {
- issueId: issue.id,
- identifier: issue.identifier,
- title: issue.title,
- status: "backlog",
- priority: "medium",
- },
- ]);
- return;
- }
- if (pathname === `/api/heartbeat-runs/${failedRunId}/log`) {
- await fulfill(route, {
- runId: failedRunId,
- content: "",
- nextOffset: 0,
- });
- return;
- }
- const retryPath = usesTaskRetry
- ? `/api/issues/${issue.id}/retry`
- : `/api/agents/${seed.agentId}/wakeup`;
- if (pathname === retryPath) {
- expect(route.request().method()).toBe("POST");
- requests.push({
- companyId: url.searchParams.get("companyId"),
- body: bodyOf(route),
- });
- if (outcome === "denied") {
- await fulfill(
- route,
- {
- error: denial,
- details: { code: "chat_failed_run_retry_source_denied" },
- },
- 409,
- );
- } else {
- // The durable action exists, but no run has been admitted yet.
- await fulfill(
- route,
- usesTaskRetry
- ? {
- requestId: actionId,
- accepted: true,
- stale: false,
- observedRunId: failedRunId,
- presentation: {
- intentId: actionId,
- responsibility: "system",
- state: outcome === "queued" ? "working" : "retry_scheduled",
- nextRetryAt: null,
- canRetry: false,
- userAction: null,
- sourceRunIds: [failedRunId],
- observedRunId: failedRunId,
- },
- }
- : { actionId, issueId: issue.id, runId: null, status: outcome },
- 202,
- );
- }
- return;
- }
- await route.continue();
- });
-
- const startPath =
- surface === "agent run"
- ? `/${seed.prefix}/agents/maya/runs/${failedRunId}`
- : `/${seed.prefix}/inbox/all`;
- const canonicalAgentResponse =
- surface === "agent run"
- ? page.waitForResponse((response) => {
- const url = new URL(response.url());
- return (
- response.request().method() === "GET" &&
- url.pathname === "/api/agents/maya" &&
- url.searchParams.get("companyId") === seed.companyId
- );
- })
- : null;
- await page.goto(startPath);
- if (canonicalAgentResponse) {
- const response = await canonicalAgentResponse;
- expect(response.ok()).toBe(true);
- expect(await response.json()).toMatchObject({
- id: seed.agentId,
- companyId: seed.companyId,
- urlKey: "maya",
- });
- await expect(page).toHaveURL(
- new RegExp(`/${seed.prefix}/agents/maya/runs/${failedRunId}$`),
- );
- }
- const retry = page
- .getByRole("button", { name: "Retry", exact: true })
- .filter({ visible: true });
- await expect(retry).toHaveCount(1);
- await retry.click();
- await expect.poll(() => requests.length).toBe(1);
- expect(requests[0]).toEqual(usesTaskRetry
- ? {
- companyId: null,
- body: {
- idempotencyKey: expect.stringMatching(
- /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,
- ),
- observedRunId: failedRunId,
- },
- }
- : {
- companyId: seed.companyId,
- body: {
- source: "on_demand",
- triggerDetail: "manual",
- reason: "retry_failed_run",
- failedRunId,
- },
- });
- if (outcome === "denied") {
- await expect(page.getByText(denial, { exact: true })).toBeVisible();
- if (surface !== "agent run") {
- await expect(
- page.getByText("Run retry failed", { exact: true }),
- ).toBeVisible();
- const toast = page.getByRole("listitem").filter({
- has: page.getByText("Run retry failed", { exact: true }),
- });
- // Visibility alone accepts opacity:0 during the toast entrance.
- // The operator must actually be able to read the denial.
- await expect(toast).toHaveCSS("opacity", "1");
- await expect(toast).toBeInViewport();
- }
- // Agent routes canonicalize the UUID to its human-readable URL key.
- // The selected failed run must remain unchanged across that redirect.
- await expect(page).toHaveURL(
- surface === "agent run"
- ? new RegExp(
- `/${seed.prefix}/agents/(${seed.agentId}|maya)/runs/${failedRunId}$`,
- )
- : surface === "Coordinator Tasks"
- ? new RegExp(`/${seed.prefix}/issues\\?view=everything$`)
- : new RegExp(`${startPath}$`),
- );
- await expect(retry).toBeEnabled();
- await testInfo.attach(`${surface}-retry-denied`, {
- body: await page.screenshot(),
- contentType: "image/png",
- });
- } else {
- await expect(page).toHaveURL(
- new RegExp(
- `/${seed.prefix}/issues/(${issue.id}|${issue.identifier})$`,
- ),
- );
- await expect(
- page.getByText(issue.title, { exact: true }).first(),
- ).toBeVisible();
- await expect(
- page.getByText("Run retry failed", { exact: true }),
- ).toHaveCount(0);
- }
- expect(requests).toHaveLength(1);
- expect(
- destinations.some((url) =>
- /\/runs\/(null|undefined)(?:[/?#]|$)/.test(url),
- ),
- ).toBe(false);
- });
- }
});
diff --git a/tests/e2e/chat-adapters-ui-providers-catalog.spec.ts b/tests/e2e/chat-adapters-ui-providers-catalog.spec.ts
new file mode 100644
index 00000000000..97e7a0c62c4
--- /dev/null
+++ b/tests/e2e/chat-adapters-ui-providers-catalog.spec.ts
@@ -0,0 +1,623 @@
+import { expect, test, type Page, type TestInfo } from "@playwright/test";
+
+import {
+ expectMinimumProviderSetup,
+ expectProviderTryInstructions,
+ expectSetupRail,
+ fillProviderSetup,
+ installChatControlPlaneMock,
+ seedCompanyAndAgent,
+ selectMaya,
+ PROVIDER_LIFECYCLE_COPY,
+ PROVIDERS,
+ expectedCredentialKeys,
+ type ProviderCase,
+ type Seed,
+ type ChatMock,
+ GITHUB_PRIVATE_KEY_PASTE_FIXTURE,
+} from "./chat-adapters-ui.shared";
+
+async function findConnectorBySearch(page: Page, query: string, slug: string) {
+ const search = page.getByRole("searchbox", { name: "Search connectors" });
+ await expect(search).toBeVisible();
+ await search.fill(query);
+ const connector = page.locator(`[role="listitem"][data-app-slug="${slug}"]`);
+ await expect(connector).toBeVisible({ timeout: 30_000 });
+ return connector;
+}
+
+async function exerciseGitHubReviewSetup(page: Page, mock: ChatMock, seed: Seed, provider: ProviderCase, testInfo: TestInfo) {
+ await expect(page.getByRole("heading", { name: "Choose agent", exact: true })).toBeVisible();
+ await page.getByRole("button", { name: "Select agent…", exact: true }).click();
+ await page.getByRole("button", { name: "Select Maya", exact: true }).click();
+ await expect(page.getByText("Maya is not configured for low-trust review")).toBeVisible();
+ await expect(page.getByRole("link", { name: "Learn about low-trust agents" })).toHaveAttribute("href", /trust-and-low-trust-review/);
+ await testInfo.attach("Choose agent — inline low-trust warning", { body: await page.screenshot(), contentType: "image/png" });
+ await page.getByRole("button", { name: "Change Maya to a low trust agent" }).click();
+ await expect(page.getByText("Maya is not configured for low-trust review")).toHaveCount(0);
+ await page.getByRole("button", { name: "Continue", exact: true }).click();
+ await expect.poll(() => mock.createdWithAgentId).toBe(seed.agentId);
+ await expect(page.getByRole("heading", { name: "Connect GitHub", exact: true })).toBeVisible();
+ await expect(page.getByLabel("GitHub account")).toHaveValue("personal");
+ await expect(page.getByLabel("App name", { exact: true })).toHaveValue("Maya");
+ await page.getByLabel("GitHub account").selectOption("organization");
+ await page.getByLabel("Organization", { exact: true }).fill("paperclip-ai");
+ await testInfo.attach("Connect GitHub — organization", { body: await page.screenshot(), contentType: "image/png" });
+ await page.getByRole("button", { name: "Save & exit", exact: true }).click();
+ await page.goto(`/${seed.prefix}/apps/chat/connect?provider=github&purpose=chat&resume=endpoint-github`);
+ await expect(page.getByLabel("GitHub account")).toHaveValue("organization");
+ await expect(page.getByLabel("Organization", { exact: true })).toHaveValue("paperclip-ai");
+ await expect(page.getByRole("button", { name: "Select agent…", exact: true })).toHaveCount(0);
+ // Existing-App recovery stays available and preserves entered credentials after failure.
+ await page.getByRole("button", { name: "I already have an App" }).click();
+ await page.getByLabel("App ID", { exact: true }).fill("123456");
+ await page.getByLabel("Private key", { exact: true }).evaluate((element, privateKey) => {
+ const clipboardData = new DataTransfer();
+ clipboardData.setData("text/plain", privateKey);
+ element.dispatchEvent(new ClipboardEvent("paste", { bubbles: true, cancelable: true, clipboardData }));
+ }, GITHUB_PRIVATE_KEY_PASTE_FIXTURE);
+ await page.getByLabel("Webhook secret", { exact: true }).fill("github-webhook-secret");
+ const rejectedAppResponse = page.waitForResponse((response) =>
+ response.url().endsWith("/api/chat-endpoints/endpoint-github/github/app") && response.request().method() === "POST",
+ );
+ await page.getByRole("button", { name: "Connect existing App", exact: true }).click();
+ expect((await rejectedAppResponse).request().postDataJSON().privateKey).toBe(GITHUB_PRIVATE_KEY_PASTE_FIXTURE);
+ await expect(page.getByRole("alert")).toContainText("GitHub rejected the supplied App credentials.");
+ await expect(page.getByLabel("Private key", { exact: true })).toHaveValue("");
+ await expect(page.getByText("Private key loaded. Paste or upload another key to replace it.", { exact: true })).toBeVisible();
+ const retriedAppResponse = page.waitForResponse((response) =>
+ response.url().endsWith("/api/chat-endpoints/endpoint-github/github/app") && response.request().method() === "POST",
+ );
+ await page.getByRole("button", { name: "Connect existing App", exact: true }).click();
+ expect((await retriedAppResponse).request().postDataJSON().privateKey).toBe(GITHUB_PRIVATE_KEY_PASTE_FIXTURE);
+ await expect(page.getByRole("heading", { name: "Connect your account", exact: true })).toBeVisible();
+ await page.getByLabel("Existing GitHub connection").selectOption("personal-github");
+ await expect(page.getByRole("button", { name: "Check my account" })).toBeVisible();
+ await page.getByRole("button", { name: "Check my account" }).click();
+ expect(mock.githubIdentityConfirmed).toBe(false);
+ await page.getByRole("button", { name: "Confirm my account" }).click();
+ await expect.poll(() => mock.githubIdentityConfirmed).toBe(true);
+ await expect(page.getByRole("heading", { name: "GitHub connected", exact: true })).toBeVisible();
+ await expect(page.getByText("1 repository enabled", { exact: true })).toBeVisible();
+ await expect(page.getByRole("button", { name: /Finish|Verify connection|Refresh access|Save repositories/ })).toHaveCount(0);
+ await page.getByRole("dialog").getByRole("button", { name: "Done", exact: true }).click();
+ await expect(page).toHaveURL(/\/apps\/chat\/endpoint-github\/settings$/);
+ const nav = page.getByRole("navigation", { name: "Chat connection" });
+ for (const tab of ["Settings", "Access", "Reviews", "Conversations", "Activity"]) {
+ await expect(nav.getByRole("link", { name: tab, exact: true })).toBeVisible();
+ }
+ await nav.getByRole("link", { name: "Access", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "People", exact: true })).toBeVisible();
+ await nav.getByRole("link", { name: "Reviews", exact: true }).click();
+ await expect(page.getByText("No reviews yet", { exact: true })).toBeVisible();
+ await nav.getByRole("link", { name: "Conversations", exact: true }).click();
+ await expect(page.getByRole("list", { name: "Conversations", exact: true })).toBeVisible();
+ await nav.getByRole("link", { name: "Activity", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "Connection activity", exact: true })).toBeVisible();
+ await page.getByText("Connection health and controls", { exact: true }).click();
+ await page.getByRole("button", { name: "Pause", exact: true }).click();
+ await page.getByRole("button", { name: "Resume", exact: true }).click();
+ await expect.poll(() => mock.lifecycleActions).toEqual(["pause", "resume"]);
+ await page.getByRole("button", { name: "Replay failed delivery", exact: true }).click();
+ await expect.poll(() => mock.replayedDelivery).toBe(true);
+ mock.setStatus("attention");
+ await page.reload();
+ const recoveryNotice = page.getByRole("region", { name: "GitHub connection needs repair" });
+ await expect(recoveryNotice).toBeVisible();
+ await recoveryNotice.getByRole("link", { name: "Reconnect GitHub", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "Reconnect GitHub", exact: true })).toBeVisible();
+ await expect(page.getByText(/using its saved credentials/)).toBeVisible();
+ await expect(page.getByRole("button", { name: "Choose an agent", exact: true })).toHaveCount(0);
+ await expect(page.getByLabel("Private key", { exact: true })).toHaveCount(0);
+ const reconnectResponse = page.waitForResponse((response) =>
+ response.url().endsWith("/api/chat-endpoints/endpoint-github/setup") &&
+ response.request().method() === "POST" &&
+ response.request().postDataJSON().action === "reconnect",
+ );
+ await page.getByRole("button", { name: "Reconnect saved App", exact: true }).click();
+ const reconnected = await reconnectResponse;
+ expect(reconnected.request().postDataJSON()).toEqual({ action: "reconnect" });
+ expect(await reconnected.json()).toMatchObject({ assignedAgentId: seed.agentId, assignedAgentName: "Maya" });
+ await expect(page.getByRole("heading", { name: "GitHub connected", exact: true })).toBeVisible();
+ mock.setStatus("active");
+ await page.getByRole("dialog").getByRole("button", { name: "Done", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "Maya", exact: true })).toBeVisible();
+ await nav.getByRole("link", { name: "Activity", exact: true }).click();
+ await page.getByText("Connection health and controls", { exact: true }).click();
+ await page.getByRole("button", { name: "Remove connection", exact: true }).click();
+ await page.getByRole("alertdialog").getByRole("button", { name: "Remove connection", exact: true }).click();
+ await expect.poll(() => mock.removed).toBe(true);
+ await expect(page).toHaveURL(new RegExp(`/${seed.prefix}/apps$`));
+}
+
+/**
+ * Per-provider catalog, setup, and connection management tab flows across
+ * Slack, GitHub, Microsoft Teams, Discord, and Telegram. Split from
+ * chat-adapters-ui-providers.spec.ts to keep every E2E spec under 1,000 LOC
+ * and under the 180s per-file CI budget.
+ */
+test.describe("native chat adapter UI catalog and management", () => {
+ test.setTimeout(180_000);
+
+ let seed: Seed;
+
+ test.beforeAll(async ({ request }) => {
+ seed = await seedCompanyAndAgent(request);
+ });
+
+ for (const provider of PROVIDERS) {
+ test(`${provider.name}: catalog, setup, and connection management tabs`, async ({
+ page,
+ }, testInfo) => {
+ const mock = await installChatControlPlaneMock(page, provider, seed, {
+ enableChatConnectors: provider.provider !== "github",
+ enableGitHubReviewBots: provider.provider === "github",
+ });
+
+ await page.goto(`/${seed.prefix}/apps`);
+ await expect(
+ page.getByRole("heading", { name: "Connectors" }),
+ ).toBeVisible({ timeout: 30_000 });
+ let connector = await findConnectorBySearch(page, provider.name, provider.slug);
+ if (provider.provider === "github") {
+ const tools = await findConnectorBySearch(page, "GitHub", "github");
+ await tools.getByRole("button", { name: "Add key GitHub", exact: true }).click();
+ await page.getByRole("button", { name: "Change", exact: true }).click();
+ await expect(page.getByRole("heading", { name: "Connect GitHub as" })).toBeVisible();
+ await expect(page.getByRole("heading", { name: "Choose how to connect" })).toHaveCount(0);
+ await page.goto(`/${seed.prefix}/apps`);
+ connector = await findConnectorBySearch(page, provider.name, provider.slug);
+ }
+ await connector
+ .getByRole("button", { name: `Connect ${provider.provider === "github" ? "GitHub Code Review Bot" : provider.name}` })
+ .click();
+
+ if (provider.chatAndTool) {
+ await expect(
+ page.getByRole("heading", { name: "Choose how to connect" }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: /Chat with an agent/ }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", {
+ name: /Use this connection as an agent tool/,
+ }),
+ ).toBeVisible();
+ const chatSetupUrl = page.url();
+ const toolHref = new URL(chatSetupUrl).searchParams.get("toolHref");
+ expect(toolHref).toBeTruthy();
+ await page
+ .getByRole("button", {
+ name: /Use this connection as an agent tool/,
+ })
+ .click();
+ await expect(page).toHaveURL(/\/apps\/connect\?/);
+ expect(new URL(page.url()).searchParams.get("source")).toBe(
+ provider.provider,
+ );
+ await page.goto(chatSetupUrl);
+ await expect(
+ page.getByRole("heading", { name: "Choose how to connect" }),
+ ).toBeVisible();
+ await page.getByRole("button", { name: /Chat with an agent/ }).click();
+ } else {
+ const chatOnlySetupUrl = new URL(page.url());
+ expect(chatOnlySetupUrl.searchParams.get("purpose")).toBe("chat");
+ expect(chatOnlySetupUrl.searchParams.get("toolHref")).toBeNull();
+ await expect(
+ page.getByRole("heading", { name: "Choose how to connect" }),
+ ).toHaveCount(0);
+ }
+
+ if (provider.provider === "github") {
+ await exerciseGitHubReviewSetup(page, mock, seed, provider, testInfo);
+ return;
+ }
+
+ await expect(
+ page.getByRole("heading", {
+ name: "Which agent do you want to chat with?",
+ }),
+ ).toBeVisible();
+ await expectSetupRail(page, true);
+ await selectMaya(page);
+ if (provider.provider === "slack") {
+ await page.getByText("Advanced", { exact: true }).click();
+ await page.getByRole("button", { name: "Create manually", exact: true }).click();
+ }
+ await expect.poll(() => mock.createdWithAgentId).toBe(seed.agentId);
+ expect(mock.createdWithAgentId).not.toBe(seed.otherAgentId);
+ await expect(
+ page.getByRole("button", { name: "Choose an active agent" }),
+ ).toHaveCount(0);
+ await expect(
+ page.getByRole("heading", { name: provider.setupHeading }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(PROVIDER_LIFECYCLE_COPY[provider.provider].reconnect, {
+ exact: false,
+ }),
+ ).toHaveCount(0);
+ await expectSetupRail(page);
+ await expectMinimumProviderSetup(page, provider);
+ await fillProviderSetup(page, provider);
+
+ if (provider.provider === "telegram") {
+ const submittedToken = "123456:e2e-redacted";
+ // The next step intentionally has its own identity-readiness alert.
+ // Assert that this failed setup attempt clears, not that all alerts
+ // disappear during the transition between two valid wizard states.
+ const setupAlert = page.getByRole("alert").filter({
+ has: page.getByText("Connection failed", { exact: true }),
+ });
+ await expect(setupAlert).toContainText("Connection failed");
+ await expect(setupAlert).toContainText(
+ "Telegram rejected bot token [redacted]. Confirm the token in BotFather and try again.",
+ );
+ await expect(page.locator("body")).not.toContainText(submittedToken);
+ const tokenInput = page.getByLabel("Bot token");
+ await expect(tokenInput).toHaveAttribute("type", "password");
+ await expect(tokenInput).toHaveValue(submittedToken);
+ await tokenInput.focus();
+ await tokenInput.press("Tab");
+ await expect(setupAlert).toBeVisible();
+
+ await page.getByRole("button", { name: provider.setupButton }).click();
+ await expect(
+ page.getByRole("heading", { name: `Try Maya in ${provider.name}` }),
+ ).toBeVisible();
+ await expect(setupAlert).toHaveCount(0);
+ expect(mock.setupAttempts).toBe(2);
+ }
+
+ if (provider.provider === "slack") {
+ await expect(page.getByRole("heading", { name: "Verify Slack connection" })).toBeVisible();
+ await expect(page.getByText("Slack needs to confirm that it can reach your Paperclip instance.")).toBeVisible();
+ mock.setWebhookVerified();
+ await expect(page.getByRole("heading", { name: "Connect your Slack account" })).toBeVisible();
+ await expect(page.getByText("/maya connect", { exact: true })).toBeVisible();
+ await page.getByRole("button", { name: "Link Test operator to my Paperclip account" }).click();
+ await page.getByRole("button", { name: "Continue to message test" }).click();
+ }
+
+ await expect(
+ page.getByRole("heading", { name: `Try Maya in ${provider.name}` }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: provider.provider === "slack" ? "Done" : "I've sent the test message" }),
+ ).toBeVisible();
+ if (provider.provider !== "slack") {
+ await expect(
+ page.getByRole("heading", {
+ name: "Link the account you’re testing",
+ }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(
+ /An observed external account is unlinked, and isolated guest work is off, so it cannot safely start Maya/,
+ ),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: "Review identity access" }),
+ ).toBeVisible();
+ await page
+ .getByRole("button", { name: "Review identity access" })
+ .click();
+ await expect(page).toHaveURL(
+ new RegExp(
+ `/${seed.prefix}/apps/chat/endpoint-${provider.provider}/access$`,
+ ),
+ );
+ await expect(
+ page.getByRole("button", { name: "Continue setup" }),
+ ).toBeVisible();
+ await page.getByRole("button", { name: "Continue setup" }).click();
+ expect(new URL(page.url()).searchParams.get("reconnect")).toBeNull();
+ await expect(
+ page.getByRole("heading", { name: `Try Maya in ${provider.name}` }),
+ ).toBeVisible();
+ }
+ await expectSetupRail(page);
+ await expectProviderTryInstructions(page, provider);
+ expect(mock.configuredCredentialKeys).toEqual(
+ expectedCredentialKeys(provider.provider),
+ );
+ await page
+ .getByRole("button", { name: provider.provider === "slack" ? "Done" : "I've sent the test message" })
+ .click();
+
+ await expect(page).toHaveURL(
+ new RegExp(
+ `/${seed.prefix}/apps/chat/endpoint-${provider.provider}/settings$`,
+ ),
+ );
+ await expect(
+ page.getByRole("heading", { name: "Maya", exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(provider.accountLabel, { exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: "Continue setup" }),
+ ).toHaveCount(0);
+ await expect(page.getByText("Change agent", { exact: true })).toHaveCount(
+ 0,
+ );
+ await expect(page.getByRole("navigation", { name: "Chat connection" }).getByRole("link")).toHaveCount(4);
+ for (const tab of ["Settings", "Access", "Conversations", "Activity"]) {
+ await expect(page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: tab , exact: true })).toBeVisible();
+ }
+ await expect(
+ page.getByRole("heading", { name: provider.provider === "slack" ? "Allowed Channels" : "Destinations" }),
+ ).toBeVisible();
+ if (provider.provider === "slack") {
+ await expect(page.getByRole("heading", { name: "Allowed Channels" })).toBeVisible();
+ await expect(page.getByRole("button", { name: "Send me a test message" })).toBeVisible();
+ await expect(page.getByRole("link", { name: "Open Slack configuration" })).toBeVisible();
+ await expect(page.getByText("Message in a channel", { exact: true })).toHaveCount(0);
+ await expect(page.getByText("Agent avatar", { exact: true })).toHaveCount(0);
+ await expect(page.getByRole("link", { name: "View message" })).toHaveCount(0);
+ }
+
+ await expect(
+ page.getByRole("switch", {
+ name: `Enable ${provider.resourceLabel}`,
+ }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(provider.resourceLabel, { exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(provider.secondaryResourceLabel, { exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("switch", {
+ name: `Enable ${provider.secondaryResourceLabel}`,
+ }),
+ ).not.toBeChecked();
+ await page
+ .getByRole("switch", { name: `Enable ${provider.resourceLabel}` })
+ .click();
+ await expect.poll(() => mock.updatedResource).toBe(true);
+ expect(mock.resourceUpdates.at(-1)).toEqual([
+ { id: `resource-${provider.provider}`, enabled: true },
+ ]);
+
+ const directMessages = page.getByRole("switch", {
+ name: "Allow direct messages",
+ });
+ await expect(directMessages).toBeVisible();
+ if (provider.provider === "discord") {
+ await expect(
+ page.getByText(
+ "People must also enable Direct Messages in their shared Discord server’s Privacy Settings.",
+ ),
+ ).toBeVisible();
+ }
+ await directMessages.click();
+ await expect.poll(() => mock.allowDirectMessages).toBe(true);
+ if (provider.provider === "microsoft-teams") {
+ const groupChats = page.getByRole("switch", {
+ name: "Allow group chats",
+ });
+ await expect(groupChats).toBeVisible();
+ await groupChats.click();
+ await expect.poll(() => mock.allowGroupChats).toBe(true);
+ }
+ for (const lifecycleAction of [
+ "Pause",
+ "Resume",
+ "Reconnect",
+ "Remove connection",
+ ]) {
+ await expect(
+ page.getByRole("button", {
+ name: lifecycleAction,
+ exact: true,
+ }),
+ ).toHaveCount(0);
+ }
+ await expect(
+ page.getByRole("switch", { name: "Allow unlinked people" }),
+ ).toHaveCount(0);
+
+ await page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: "Access", exact: true }).click();
+ await expect(
+ page.getByRole("heading", { name: "People" }),
+ ).toBeVisible();
+ if (provider.provider === "slack") {
+ await page.context().grantPermissions(["clipboard-read", "clipboard-write"], { origin: new URL(page.url()).origin });
+ await page.getByRole("button", { name: "Invite people", exact: true }).click();
+ await page.getByRole("dialog").getByRole("button", { name: "Copy invitation" }).click();
+ await expect.poll(() => page.evaluate(() => navigator.clipboard.readText())).toContain("connect");
+ expect(await page.evaluate(() => navigator.clipboard.readText())).not.toContain("token=");
+ await page.getByRole("dialog").getByRole("button", { name: "Close", exact: true }).click();
+ }
+ await page.locator("summary").filter({ hasText: "Guest access" }).click();
+ await expect(page.getByText(/Requests are refused when isolation is unavailable/)).toBeVisible();
+ const allowUnlinked = page.getByRole("switch", {
+ name: "Allow unlinked people",
+ });
+ await expect(allowUnlinked).toBeVisible();
+ await allowUnlinked.click();
+ await expect.poll(() => mock.allowUnlinkedPeople).toBe(true);
+ await expect(
+ page.getByText("Ada Lovelace", { exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByText("Grace Hopper", { exact: true }),
+ ).toBeVisible();
+
+ await expect(
+ page.getByRole("button", { name: "Create confirmation link" }),
+ ).toBeVisible();
+ await page
+ .context()
+ .grantPermissions(["clipboard-read", "clipboard-write"], {
+ origin: new URL(page.url()).origin,
+ });
+ await page.getByRole("button", { name: "Create confirmation link" }).click();
+ await expect
+ .poll(() => mock.linkIntentPrincipalId)
+ .toBe(`principal-${provider.provider}`);
+ const confirmationUrl = `https://paperclip.example.test/${seed.prefix}/chat-identity/confirm?token=e2e-redacted`;
+ await expect(
+ page.getByText(confirmationUrl, { exact: true }),
+ ).toBeVisible();
+ await page.getByRole("button", { name: "Copy link" }).click();
+ await expect
+ .poll(() => page.evaluate(() => navigator.clipboard.readText()))
+ .toBe(confirmationUrl);
+ await expect(
+ page.getByText("Confirmation link copied", { exact: true }),
+ ).toBeVisible();
+ await page.getByRole("listitem").filter({ hasText: "Grace Hopper" }).getByRole("button", { name: "Disconnect", exact: true }).click();
+ await expect
+ .poll(() => mock.revokedPrincipalId)
+ .toBe(`principal-${provider.provider}-linked`);
+ await expect(page.getByText("Disconnected", { exact: true })).toBeVisible();
+
+ await page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: "Conversations", exact: true }).click();
+ await expect(
+ page.getByRole("list", { name: "Conversations", exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(`Investigate ${provider.name} delivery`, { exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(provider.resourceLabel, { exact: true }),
+ ).toHaveCount(1);
+ const providerLink = page.getByRole("link", {
+ name: provider.resourceLabel,
+ });
+ await expect(providerLink).toHaveAttribute("href", provider.externalUrl);
+ const taskLink = page.getByRole("link", { name: `Investigate ${provider.name} delivery` });
+ await expect(taskLink).toHaveAttribute(
+ "href",
+ new RegExp(`/${seed.prefix}/issues/issue-${provider.provider}$`),
+ );
+ mock.conversationState = "waiting";
+ await expect(page.getByText("waiting", { exact: true })).toBeVisible({
+ timeout: 8_000,
+ });
+
+ await page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: "Activity", exact: true }).click();
+ await expect(
+ page.getByRole("heading", { name: "Connection activity" }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(
+ `Inbound ${provider.name} delivery could not be processed`,
+ ),
+ ).toBeVisible();
+ await expect(
+ page.getByText(`Published safe output to ${provider.name}`),
+ ).toBeVisible();
+ await expect(page.getByText("Recent activity", { exact: true })).toBeVisible();
+ await page.getByText("Connection health and controls", { exact: true }).click();
+ const deliveryTimestamp = page
+ .getByText(`Inbound ${provider.name} delivery could not be processed`)
+ .locator("..")
+ .locator("time");
+ await expect(deliveryTimestamp).toHaveText(
+ /\w+ \d+, \d{4}, \d{1,2}:\d{2}:\d{2} [AP]M/,
+ );
+ await expect(deliveryTimestamp).toHaveAttribute(
+ "datetime",
+ /\d{4}-\d{2}-\d{2}T/,
+ );
+ await expect(deliveryTimestamp).toHaveAttribute(
+ "title",
+ (await deliveryTimestamp.getAttribute("datetime"))!,
+ );
+ await expect(page.getByText("xoxb-e2e-redacted")).toHaveCount(0);
+ await expect(page.getByText("teams-client-secret")).toHaveCount(0);
+ await expect(page.getByText("github-webhook-secret")).toHaveCount(0);
+
+ // A provider callback does not cause a Board mutation. Keep this tab
+ // mounted and focused: neither navigation nor Replay may refresh it.
+ mock.liveActivitySummary = `${provider.name} reaction removed while viewing Activity`;
+ mock.setStatus("paused");
+ await expect(
+ page.getByText(mock.liveActivitySummary, { exact: true }),
+ ).toBeVisible({ timeout: 8_000 });
+ await expect(
+ page.getByRole("button", { name: "Resume", exact: true }),
+ ).toBeVisible({ timeout: 8_000 });
+ mock.setStatus("active");
+ await expect(
+ page.getByRole("button", { name: "Pause", exact: true }),
+ ).toBeVisible({ timeout: 8_000 });
+
+ await page.getByRole("button", { name: "Replay" }).click();
+ await expect.poll(() => mock.replayedDelivery).toBe(true);
+
+ await expect(
+ page.getByRole("button", { name: "Pause", exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: "Remove connection", exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByText(PROVIDER_LIFECYCLE_COPY[provider.provider].reconnect, {
+ exact: true,
+ }),
+ ).toBeVisible();
+ await page.getByRole("button", { name: "Pause", exact: true }).click();
+ await expect(
+ page.getByRole("button", { name: "Resume", exact: true }),
+ ).toBeVisible();
+ await page.getByRole("button", { name: "Resume", exact: true }).click();
+ await expect(
+ page.getByRole("button", { name: "Pause", exact: true }),
+ ).toBeVisible();
+ await expect.poll(() => mock.lifecycleActions).toEqual(["pause", "resume"]);
+
+ mock.setStatus("attention");
+ await page.reload();
+ await page.getByText("Connection health and controls", { exact: true }).click();
+ await expect(
+ page.getByRole("button", { name: "Reconnect", exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: "Remove connection" }),
+ ).toBeVisible();
+ await page
+ .getByRole("button", { name: "Reconnect", exact: true })
+ .click();
+ await expect(page).toHaveURL(
+ new RegExp(
+ `/${seed.prefix}/apps/chat/connect\\?.*resume=endpoint-${provider.provider}`,
+ ),
+ );
+ expect(new URL(page.url()).searchParams.get("reconnect")).toBe("1");
+ await expect(
+ page.getByRole("heading", {
+ name: provider.provider === "slack" ? "Add Slack credentials" : provider.setupHeading,
+ }),
+ ).toBeVisible();
+ await expect(
+ page.getByRole("button", { name: "Choose an active agent" }),
+ ).toHaveCount(0);
+
+ mock.setStatus("active");
+ await page.goto(
+ `/${seed.prefix}/apps/chat/endpoint-${provider.provider}/activity`,
+ );
+ await page.getByText("Connection health and controls", { exact: true }).click();
+ await page.getByRole("button", { name: "Remove connection" }).click();
+ const confirmation = page.getByRole("alertdialog");
+ await expect(confirmation).toContainText("Remove this connection?");
+ await expect(confirmation).toContainText(
+ PROVIDER_LIFECYCLE_COPY[provider.provider].remove,
+ );
+ await confirmation
+ .getByRole("button", { name: "Remove connection" })
+ .click();
+ await expect(page).toHaveURL(new RegExp(`/${seed.prefix}/apps$`));
+ await expect.poll(() => mock.removed).toBe(true);
+ await expect.poll(() => mock.lifecycleActions).toEqual(["pause", "resume", "remove"]);
+ });
+ }
+});
diff --git a/tests/e2e/chat-adapters-ui-providers.spec.ts b/tests/e2e/chat-adapters-ui-providers.spec.ts
index 3ea87a5ab35..e04df4d0774 100644
--- a/tests/e2e/chat-adapters-ui-providers.spec.ts
+++ b/tests/e2e/chat-adapters-ui-providers.spec.ts
@@ -1,23 +1,15 @@
import { oauthCallbackInterstitialHtml } from "../../server/src/lib/oauth-browser-return";
import { createServer } from "node:http";
-import { readFile } from "node:fs/promises";
-import { expect, test, type Page, type TestInfo } from "@playwright/test";
+import { expect, test, type Page } from "@playwright/test";
import {
- expectMinimumProviderSetup,
- expectProviderTryInstructions,
expectSetupRail,
- fillProviderSetup,
installChatControlPlaneMock,
seedCompanyAndAgent,
selectMaya,
- PROVIDER_LIFECYCLE_COPY,
PROVIDERS,
- expectedCredentialKeys,
type ProviderCase,
type Seed,
- type ChatMock,
- GITHUB_PRIVATE_KEY_PASTE_FIXTURE,
} from "./chat-adapters-ui.shared";
async function expectCompletedSlackSetupCloses(page: Page, seed: Seed) {
@@ -45,110 +37,6 @@ async function findConnectorBySearch(page: Page, query: string, slug: string) {
return connector;
}
-async function exerciseGitHubReviewSetup(page: Page, mock: ChatMock, seed: Seed, provider: ProviderCase, testInfo: TestInfo) {
- await expect(page.getByRole("heading", { name: "Choose agent", exact: true })).toBeVisible();
- await page.getByRole("button", { name: "Select agent…", exact: true }).click();
- await page.getByRole("button", { name: "Select Maya", exact: true }).click();
- await expect(page.getByText("Maya is not configured for low-trust review")).toBeVisible();
- await expect(page.getByRole("link", { name: "Learn about low-trust agents" })).toHaveAttribute("href", /trust-and-low-trust-review/);
- await testInfo.attach("Choose agent — inline low-trust warning", { body: await page.screenshot(), contentType: "image/png" });
- await page.getByRole("button", { name: "Change Maya to a low trust agent" }).click();
- await expect(page.getByText("Maya is not configured for low-trust review")).toHaveCount(0);
- await page.getByRole("button", { name: "Continue", exact: true }).click();
- await expect.poll(() => mock.createdWithAgentId).toBe(seed.agentId);
- await expect(page.getByRole("heading", { name: "Connect GitHub", exact: true })).toBeVisible();
- await expect(page.getByLabel("GitHub account")).toHaveValue("personal");
- await expect(page.getByLabel("App name", { exact: true })).toHaveValue("Maya");
- await page.getByLabel("GitHub account").selectOption("organization");
- await page.getByLabel("Organization", { exact: true }).fill("paperclip-ai");
- await testInfo.attach("Connect GitHub — organization", { body: await page.screenshot(), contentType: "image/png" });
- await page.getByRole("button", { name: "Save & exit", exact: true }).click();
- await page.goto(`/${seed.prefix}/apps/chat/connect?provider=github&purpose=chat&resume=endpoint-github`);
- await expect(page.getByLabel("GitHub account")).toHaveValue("organization");
- await expect(page.getByLabel("Organization", { exact: true })).toHaveValue("paperclip-ai");
- await expect(page.getByRole("button", { name: "Select agent…", exact: true })).toHaveCount(0);
- // Existing-App recovery stays available and preserves entered credentials after failure.
- await page.getByRole("button", { name: "I already have an App" }).click();
- await page.getByLabel("App ID", { exact: true }).fill("123456");
- await page.getByLabel("Private key", { exact: true }).evaluate((element, privateKey) => {
- const clipboardData = new DataTransfer();
- clipboardData.setData("text/plain", privateKey);
- element.dispatchEvent(new ClipboardEvent("paste", { bubbles: true, cancelable: true, clipboardData }));
- }, GITHUB_PRIVATE_KEY_PASTE_FIXTURE);
- await page.getByLabel("Webhook secret", { exact: true }).fill("github-webhook-secret");
- const rejectedAppResponse = page.waitForResponse((response) =>
- response.url().endsWith("/api/chat-endpoints/endpoint-github/github/app") && response.request().method() === "POST",
- );
- await page.getByRole("button", { name: "Connect existing App", exact: true }).click();
- expect((await rejectedAppResponse).request().postDataJSON().privateKey).toBe(GITHUB_PRIVATE_KEY_PASTE_FIXTURE);
- await expect(page.getByRole("alert")).toContainText("GitHub rejected the supplied App credentials.");
- await expect(page.getByLabel("Private key", { exact: true })).toHaveValue("");
- await expect(page.getByText("Private key loaded. Paste or upload another key to replace it.", { exact: true })).toBeVisible();
- const retriedAppResponse = page.waitForResponse((response) =>
- response.url().endsWith("/api/chat-endpoints/endpoint-github/github/app") && response.request().method() === "POST",
- );
- await page.getByRole("button", { name: "Connect existing App", exact: true }).click();
- expect((await retriedAppResponse).request().postDataJSON().privateKey).toBe(GITHUB_PRIVATE_KEY_PASTE_FIXTURE);
- await expect(page.getByRole("heading", { name: "Connect your account", exact: true })).toBeVisible();
- await page.getByLabel("Existing GitHub connection").selectOption("personal-github");
- await expect(page.getByRole("button", { name: "Check my account" })).toBeVisible();
- await page.getByRole("button", { name: "Check my account" }).click();
- expect(mock.githubIdentityConfirmed).toBe(false);
- await page.getByRole("button", { name: "Confirm my account" }).click();
- await expect.poll(() => mock.githubIdentityConfirmed).toBe(true);
- await expect(page.getByRole("heading", { name: "GitHub connected", exact: true })).toBeVisible();
- await expect(page.getByText("1 repository enabled", { exact: true })).toBeVisible();
- await expect(page.getByRole("button", { name: /Finish|Verify connection|Refresh access|Save repositories/ })).toHaveCount(0);
- await page.getByRole("dialog").getByRole("button", { name: "Done", exact: true }).click();
- await expect(page).toHaveURL(/\/apps\/chat\/endpoint-github\/settings$/);
- const nav = page.getByRole("navigation", { name: "Chat connection" });
- for (const tab of ["Settings", "Access", "Reviews", "Conversations", "Activity"]) {
- await expect(nav.getByRole("link", { name: tab, exact: true })).toBeVisible();
- }
- await nav.getByRole("link", { name: "Access", exact: true }).click();
- await expect(page.getByRole("heading", { name: "People", exact: true })).toBeVisible();
- await nav.getByRole("link", { name: "Reviews", exact: true }).click();
- await expect(page.getByText("No reviews yet", { exact: true })).toBeVisible();
- await nav.getByRole("link", { name: "Conversations", exact: true }).click();
- await expect(page.getByRole("list", { name: "Conversations", exact: true })).toBeVisible();
- await nav.getByRole("link", { name: "Activity", exact: true }).click();
- await expect(page.getByRole("heading", { name: "Connection activity", exact: true })).toBeVisible();
- await page.getByText("Connection health and controls", { exact: true }).click();
- await page.getByRole("button", { name: "Pause", exact: true }).click();
- await page.getByRole("button", { name: "Resume", exact: true }).click();
- await expect.poll(() => mock.lifecycleActions).toEqual(["pause", "resume"]);
- await page.getByRole("button", { name: "Replay failed delivery", exact: true }).click();
- await expect.poll(() => mock.replayedDelivery).toBe(true);
- mock.setStatus("attention");
- await page.reload();
- const recoveryNotice = page.getByRole("region", { name: "GitHub connection needs repair" });
- await expect(recoveryNotice).toBeVisible();
- await recoveryNotice.getByRole("link", { name: "Reconnect GitHub", exact: true }).click();
- await expect(page.getByRole("heading", { name: "Reconnect GitHub", exact: true })).toBeVisible();
- await expect(page.getByText(/using its saved credentials/)).toBeVisible();
- await expect(page.getByRole("button", { name: "Choose an agent", exact: true })).toHaveCount(0);
- await expect(page.getByLabel("Private key", { exact: true })).toHaveCount(0);
- const reconnectResponse = page.waitForResponse((response) =>
- response.url().endsWith("/api/chat-endpoints/endpoint-github/setup") &&
- response.request().method() === "POST" &&
- response.request().postDataJSON().action === "reconnect",
- );
- await page.getByRole("button", { name: "Reconnect saved App", exact: true }).click();
- const reconnected = await reconnectResponse;
- expect(reconnected.request().postDataJSON()).toEqual({ action: "reconnect" });
- expect(await reconnected.json()).toMatchObject({ assignedAgentId: seed.agentId, assignedAgentName: "Maya" });
- await expect(page.getByRole("heading", { name: "GitHub connected", exact: true })).toBeVisible();
- mock.setStatus("active");
- await page.getByRole("dialog").getByRole("button", { name: "Done", exact: true }).click();
- await expect(page.getByRole("heading", { name: "Maya", exact: true })).toBeVisible();
- await nav.getByRole("link", { name: "Activity", exact: true }).click();
- await page.getByText("Connection health and controls", { exact: true }).click();
- await page.getByRole("button", { name: "Remove connection", exact: true }).click();
- await page.getByRole("alertdialog").getByRole("button", { name: "Remove connection", exact: true }).click();
- await expect.poll(() => mock.removed).toBe(true);
- await expect(page).toHaveURL(new RegExp(`/${seed.prefix}/apps$`));
-}
-
/**
* Native chat-connector provider setup coverage: adapter install/lifecycle
* flows and the iMessage Photon variant. Shared fixtures and the
@@ -519,482 +407,6 @@ test.describe("native chat adapter UI", () => {
}
});
}
-
- for (const provider of PROVIDERS) {
- test(`${provider.name}: catalog, setup, and connection management tabs`, async ({
- page,
- }, testInfo) => {
- const mock = await installChatControlPlaneMock(page, provider, seed, {
- enableChatConnectors: provider.provider !== "github",
- enableGitHubReviewBots: provider.provider === "github",
- });
-
- await page.goto(`/${seed.prefix}/apps`);
- await expect(
- page.getByRole("heading", { name: "Connectors" }),
- ).toBeVisible({ timeout: 30_000 });
- let connector = await findConnectorBySearch(page, provider.name, provider.slug);
- if (provider.provider === "github") {
- const tools = await findConnectorBySearch(page, "GitHub", "github");
- await tools.getByRole("button", { name: "Add key GitHub", exact: true }).click();
- await page.getByRole("button", { name: "Change", exact: true }).click();
- await expect(page.getByRole("heading", { name: "Connect GitHub as" })).toBeVisible();
- await expect(page.getByRole("heading", { name: "Choose how to connect" })).toHaveCount(0);
- await page.goto(`/${seed.prefix}/apps`);
- connector = await findConnectorBySearch(page, provider.name, provider.slug);
- }
- await connector
- .getByRole("button", { name: `Connect ${provider.provider === "github" ? "GitHub Code Review Bot" : provider.name}` })
- .click();
-
- if (provider.chatAndTool) {
- await expect(
- page.getByRole("heading", { name: "Choose how to connect" }),
- ).toBeVisible();
- await expect(
- page.getByRole("button", { name: /Chat with an agent/ }),
- ).toBeVisible();
- await expect(
- page.getByRole("button", {
- name: /Use this connection as an agent tool/,
- }),
- ).toBeVisible();
- const chatSetupUrl = page.url();
- const toolHref = new URL(chatSetupUrl).searchParams.get("toolHref");
- expect(toolHref).toBeTruthy();
- await page
- .getByRole("button", {
- name: /Use this connection as an agent tool/,
- })
- .click();
- await expect(page).toHaveURL(/\/apps\/connect\?/);
- expect(new URL(page.url()).searchParams.get("source")).toBe(
- provider.provider,
- );
- await page.goto(chatSetupUrl);
- await expect(
- page.getByRole("heading", { name: "Choose how to connect" }),
- ).toBeVisible();
- await page.getByRole("button", { name: /Chat with an agent/ }).click();
- } else {
- const chatOnlySetupUrl = new URL(page.url());
- expect(chatOnlySetupUrl.searchParams.get("purpose")).toBe("chat");
- expect(chatOnlySetupUrl.searchParams.get("toolHref")).toBeNull();
- await expect(
- page.getByRole("heading", { name: "Choose how to connect" }),
- ).toHaveCount(0);
- }
-
- if (provider.provider === "github") {
- await exerciseGitHubReviewSetup(page, mock, seed, provider, testInfo);
- return;
- }
-
- await expect(
- page.getByRole("heading", {
- name: "Which agent do you want to chat with?",
- }),
- ).toBeVisible();
- await expectSetupRail(page, true);
- await selectMaya(page);
- if (provider.provider === "slack") {
- await page.getByText("Advanced", { exact: true }).click();
- await page.getByRole("button", { name: "Create manually", exact: true }).click();
- }
- await expect.poll(() => mock.createdWithAgentId).toBe(seed.agentId);
- expect(mock.createdWithAgentId).not.toBe(seed.otherAgentId);
- await expect(
- page.getByRole("button", { name: "Choose an active agent" }),
- ).toHaveCount(0);
- await expect(
- page.getByRole("heading", { name: provider.setupHeading }),
- ).toBeVisible();
- await expect(
- page.getByText(PROVIDER_LIFECYCLE_COPY[provider.provider].reconnect, {
- exact: false,
- }),
- ).toHaveCount(0);
- await expectSetupRail(page);
- await expectMinimumProviderSetup(page, provider);
- await fillProviderSetup(page, provider);
-
- if (provider.provider === "telegram") {
- const submittedToken = "123456:e2e-redacted";
- // The next step intentionally has its own identity-readiness alert.
- // Assert that this failed setup attempt clears, not that all alerts
- // disappear during the transition between two valid wizard states.
- const setupAlert = page.getByRole("alert").filter({
- has: page.getByText("Connection failed", { exact: true }),
- });
- await expect(setupAlert).toContainText("Connection failed");
- await expect(setupAlert).toContainText(
- "Telegram rejected bot token [redacted]. Confirm the token in BotFather and try again.",
- );
- await expect(page.locator("body")).not.toContainText(submittedToken);
- const tokenInput = page.getByLabel("Bot token");
- await expect(tokenInput).toHaveAttribute("type", "password");
- await expect(tokenInput).toHaveValue(submittedToken);
- await tokenInput.focus();
- await tokenInput.press("Tab");
- await expect(setupAlert).toBeVisible();
-
- await page.getByRole("button", { name: provider.setupButton }).click();
- await expect(
- page.getByRole("heading", { name: `Try Maya in ${provider.name}` }),
- ).toBeVisible();
- await expect(setupAlert).toHaveCount(0);
- expect(mock.setupAttempts).toBe(2);
- }
-
- if (provider.provider === "slack") {
- await expect(page.getByRole("heading", { name: "Verify Slack connection" })).toBeVisible();
- await expect(page.getByText("Slack needs to confirm that it can reach your Paperclip instance.")).toBeVisible();
- mock.setWebhookVerified();
- await expect(page.getByRole("heading", { name: "Connect your Slack account" })).toBeVisible();
- await expect(page.getByText("/maya connect", { exact: true })).toBeVisible();
- await page.getByRole("button", { name: "Link Test operator to my Paperclip account" }).click();
- await page.getByRole("button", { name: "Continue to message test" }).click();
- }
-
- await expect(
- page.getByRole("heading", { name: `Try Maya in ${provider.name}` }),
- ).toBeVisible();
- await expect(
- page.getByRole("button", { name: provider.provider === "slack" ? "Done" : "I've sent the test message" }),
- ).toBeVisible();
- if (provider.provider !== "slack") {
- await expect(
- page.getByRole("heading", {
- name: "Link the account you’re testing",
- }),
- ).toBeVisible();
- await expect(
- page.getByText(
- /An observed external account is unlinked, and isolated guest work is off, so it cannot safely start Maya/,
- ),
- ).toBeVisible();
- await expect(
- page.getByRole("button", { name: "Review identity access" }),
- ).toBeVisible();
- await page
- .getByRole("button", { name: "Review identity access" })
- .click();
- await expect(page).toHaveURL(
- new RegExp(
- `/${seed.prefix}/apps/chat/endpoint-${provider.provider}/access$`,
- ),
- );
- await expect(
- page.getByRole("button", { name: "Continue setup" }),
- ).toBeVisible();
- await page.getByRole("button", { name: "Continue setup" }).click();
- expect(new URL(page.url()).searchParams.get("reconnect")).toBeNull();
- await expect(
- page.getByRole("heading", { name: `Try Maya in ${provider.name}` }),
- ).toBeVisible();
- }
- await expectSetupRail(page);
- await expectProviderTryInstructions(page, provider);
- expect(mock.configuredCredentialKeys).toEqual(
- expectedCredentialKeys(provider.provider),
- );
- await page
- .getByRole("button", { name: provider.provider === "slack" ? "Done" : "I've sent the test message" })
- .click();
-
- await expect(page).toHaveURL(
- new RegExp(
- `/${seed.prefix}/apps/chat/endpoint-${provider.provider}/settings$`,
- ),
- );
- await expect(
- page.getByRole("heading", { name: "Maya", exact: true }),
- ).toBeVisible();
- await expect(
- page.getByText(provider.accountLabel, { exact: true }),
- ).toBeVisible();
- await expect(
- page.getByRole("button", { name: "Continue setup" }),
- ).toHaveCount(0);
- await expect(page.getByText("Change agent", { exact: true })).toHaveCount(
- 0,
- );
- await expect(page.getByRole("navigation", { name: "Chat connection" }).getByRole("link")).toHaveCount(4);
- for (const tab of ["Settings", "Access", "Conversations", "Activity"]) {
- await expect(page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: tab , exact: true })).toBeVisible();
- }
- await expect(
- page.getByRole("heading", { name: provider.provider === "slack" ? "Allowed Channels" : "Destinations" }),
- ).toBeVisible();
- if (provider.provider === "slack") {
- await expect(page.getByRole("heading", { name: "Allowed Channels" })).toBeVisible();
- await expect(page.getByRole("button", { name: "Send me a test message" })).toBeVisible();
- await expect(page.getByRole("link", { name: "Open Slack configuration" })).toBeVisible();
- await expect(page.getByText("Message in a channel", { exact: true })).toHaveCount(0);
- await expect(page.getByText("Agent avatar", { exact: true })).toHaveCount(0);
- await expect(page.getByRole("link", { name: "View message" })).toHaveCount(0);
- }
-
- await expect(
- page.getByRole("switch", {
- name: `Enable ${provider.resourceLabel}`,
- }),
- ).toBeVisible();
- await expect(
- page.getByText(provider.resourceLabel, { exact: true }),
- ).toBeVisible();
- await expect(
- page.getByText(provider.secondaryResourceLabel, { exact: true }),
- ).toBeVisible();
- await expect(
- page.getByRole("switch", {
- name: `Enable ${provider.secondaryResourceLabel}`,
- }),
- ).not.toBeChecked();
- await page
- .getByRole("switch", { name: `Enable ${provider.resourceLabel}` })
- .click();
- await expect.poll(() => mock.updatedResource).toBe(true);
- expect(mock.resourceUpdates.at(-1)).toEqual([
- { id: `resource-${provider.provider}`, enabled: true },
- ]);
-
- const directMessages = page.getByRole("switch", {
- name: "Allow direct messages",
- });
- await expect(directMessages).toBeVisible();
- if (provider.provider === "discord") {
- await expect(
- page.getByText(
- "People must also enable Direct Messages in their shared Discord server’s Privacy Settings.",
- ),
- ).toBeVisible();
- }
- await directMessages.click();
- await expect.poll(() => mock.allowDirectMessages).toBe(true);
- if (provider.provider === "microsoft-teams") {
- const groupChats = page.getByRole("switch", {
- name: "Allow group chats",
- });
- await expect(groupChats).toBeVisible();
- await groupChats.click();
- await expect.poll(() => mock.allowGroupChats).toBe(true);
- }
- for (const lifecycleAction of [
- "Pause",
- "Resume",
- "Reconnect",
- "Remove connection",
- ]) {
- await expect(
- page.getByRole("button", {
- name: lifecycleAction,
- exact: true,
- }),
- ).toHaveCount(0);
- }
- await expect(
- page.getByRole("switch", { name: "Allow unlinked people" }),
- ).toHaveCount(0);
-
- await page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: "Access", exact: true }).click();
- await expect(
- page.getByRole("heading", { name: "People" }),
- ).toBeVisible();
- if (provider.provider === "slack") {
- await page.context().grantPermissions(["clipboard-read", "clipboard-write"], { origin: new URL(page.url()).origin });
- await page.getByRole("button", { name: "Invite people", exact: true }).click();
- await page.getByRole("dialog").getByRole("button", { name: "Copy invitation" }).click();
- await expect.poll(() => page.evaluate(() => navigator.clipboard.readText())).toContain("connect");
- expect(await page.evaluate(() => navigator.clipboard.readText())).not.toContain("token=");
- await page.getByRole("dialog").getByRole("button", { name: "Close", exact: true }).click();
- }
- await page.locator("summary").filter({ hasText: "Guest access" }).click();
- await expect(page.getByText(/Requests are refused when isolation is unavailable/)).toBeVisible();
- const allowUnlinked = page.getByRole("switch", {
- name: "Allow unlinked people",
- });
- await expect(allowUnlinked).toBeVisible();
- await allowUnlinked.click();
- await expect.poll(() => mock.allowUnlinkedPeople).toBe(true);
- await expect(
- page.getByText("Ada Lovelace", { exact: true }),
- ).toBeVisible();
- await expect(
- page.getByText("Grace Hopper", { exact: true }),
- ).toBeVisible();
-
- await expect(
- page.getByRole("button", { name: "Create confirmation link" }),
- ).toBeVisible();
- await page
- .context()
- .grantPermissions(["clipboard-read", "clipboard-write"], {
- origin: new URL(page.url()).origin,
- });
- await page.getByRole("button", { name: "Create confirmation link" }).click();
- await expect
- .poll(() => mock.linkIntentPrincipalId)
- .toBe(`principal-${provider.provider}`);
- const confirmationUrl = `https://paperclip.example.test/${seed.prefix}/chat-identity/confirm?token=e2e-redacted`;
- await expect(
- page.getByText(confirmationUrl, { exact: true }),
- ).toBeVisible();
- await page.getByRole("button", { name: "Copy link" }).click();
- await expect
- .poll(() => page.evaluate(() => navigator.clipboard.readText()))
- .toBe(confirmationUrl);
- await expect(
- page.getByText("Confirmation link copied", { exact: true }),
- ).toBeVisible();
- await page.getByRole("listitem").filter({ hasText: "Grace Hopper" }).getByRole("button", { name: "Disconnect", exact: true }).click();
- await expect
- .poll(() => mock.revokedPrincipalId)
- .toBe(`principal-${provider.provider}-linked`);
- await expect(page.getByText("Disconnected", { exact: true })).toBeVisible();
-
- await page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: "Conversations", exact: true }).click();
- await expect(
- page.getByRole("list", { name: "Conversations", exact: true }),
- ).toBeVisible();
- await expect(
- page.getByText(`Investigate ${provider.name} delivery`, { exact: true }),
- ).toBeVisible();
- await expect(
- page.getByText(provider.resourceLabel, { exact: true }),
- ).toHaveCount(1);
- const providerLink = page.getByRole("link", {
- name: provider.resourceLabel,
- });
- await expect(providerLink).toHaveAttribute("href", provider.externalUrl);
- const taskLink = page.getByRole("link", { name: `Investigate ${provider.name} delivery` });
- await expect(taskLink).toHaveAttribute(
- "href",
- new RegExp(`/${seed.prefix}/issues/issue-${provider.provider}$`),
- );
- mock.conversationState = "waiting";
- await expect(page.getByText("waiting", { exact: true })).toBeVisible({
- timeout: 8_000,
- });
-
- await page.getByRole("navigation", { name: "Chat connection" }).getByRole("link", { name: "Activity", exact: true }).click();
- await expect(
- page.getByRole("heading", { name: "Connection activity" }),
- ).toBeVisible();
- await expect(
- page.getByText(
- `Inbound ${provider.name} delivery could not be processed`,
- ),
- ).toBeVisible();
- await expect(
- page.getByText(`Published safe output to ${provider.name}`),
- ).toBeVisible();
- await expect(page.getByText("Recent activity", { exact: true })).toBeVisible();
- await page.getByText("Connection health and controls", { exact: true }).click();
- const deliveryTimestamp = page
- .getByText(`Inbound ${provider.name} delivery could not be processed`)
- .locator("..")
- .locator("time");
- await expect(deliveryTimestamp).toHaveText(
- /\w+ \d+, \d{4}, \d{1,2}:\d{2}:\d{2} [AP]M/,
- );
- await expect(deliveryTimestamp).toHaveAttribute(
- "datetime",
- /\d{4}-\d{2}-\d{2}T/,
- );
- await expect(deliveryTimestamp).toHaveAttribute(
- "title",
- (await deliveryTimestamp.getAttribute("datetime"))!,
- );
- await expect(page.getByText("xoxb-e2e-redacted")).toHaveCount(0);
- await expect(page.getByText("teams-client-secret")).toHaveCount(0);
- await expect(page.getByText("github-webhook-secret")).toHaveCount(0);
-
- // A provider callback does not cause a Board mutation. Keep this tab
- // mounted and focused: neither navigation nor Replay may refresh it.
- mock.liveActivitySummary = `${provider.name} reaction removed while viewing Activity`;
- mock.setStatus("paused");
- await expect(
- page.getByText(mock.liveActivitySummary, { exact: true }),
- ).toBeVisible({ timeout: 8_000 });
- await expect(
- page.getByRole("button", { name: "Resume", exact: true }),
- ).toBeVisible({ timeout: 8_000 });
- mock.setStatus("active");
- await expect(
- page.getByRole("button", { name: "Pause", exact: true }),
- ).toBeVisible({ timeout: 8_000 });
-
- await page.getByRole("button", { name: "Replay" }).click();
- await expect.poll(() => mock.replayedDelivery).toBe(true);
-
- await expect(
- page.getByRole("button", { name: "Pause", exact: true }),
- ).toBeVisible();
- await expect(
- page.getByRole("button", { name: "Remove connection", exact: true }),
- ).toBeVisible();
- await expect(
- page.getByText(PROVIDER_LIFECYCLE_COPY[provider.provider].reconnect, {
- exact: true,
- }),
- ).toBeVisible();
- await page.getByRole("button", { name: "Pause", exact: true }).click();
- await expect(
- page.getByRole("button", { name: "Resume", exact: true }),
- ).toBeVisible();
- await page.getByRole("button", { name: "Resume", exact: true }).click();
- await expect(
- page.getByRole("button", { name: "Pause", exact: true }),
- ).toBeVisible();
- await expect.poll(() => mock.lifecycleActions).toEqual(["pause", "resume"]);
-
- mock.setStatus("attention");
- await page.reload();
- await page.getByText("Connection health and controls", { exact: true }).click();
- await expect(
- page.getByRole("button", { name: "Reconnect", exact: true }),
- ).toBeVisible();
- await expect(
- page.getByRole("button", { name: "Remove connection" }),
- ).toBeVisible();
- await page
- .getByRole("button", { name: "Reconnect", exact: true })
- .click();
- await expect(page).toHaveURL(
- new RegExp(
- `/${seed.prefix}/apps/chat/connect\\?.*resume=endpoint-${provider.provider}`,
- ),
- );
- expect(new URL(page.url()).searchParams.get("reconnect")).toBe("1");
- await expect(
- page.getByRole("heading", {
- name: provider.provider === "slack" ? "Add Slack credentials" : provider.setupHeading,
- }),
- ).toBeVisible();
- await expect(
- page.getByRole("button", { name: "Choose an active agent" }),
- ).toHaveCount(0);
-
- mock.setStatus("active");
- await page.goto(
- `/${seed.prefix}/apps/chat/endpoint-${provider.provider}/activity`,
- );
- await page.getByText("Connection health and controls", { exact: true }).click();
- await page.getByRole("button", { name: "Remove connection" }).click();
- const confirmation = page.getByRole("alertdialog");
- await expect(confirmation).toContainText("Remove this connection?");
- await expect(confirmation).toContainText(
- PROVIDER_LIFECYCLE_COPY[provider.provider].remove,
- );
- await confirmation
- .getByRole("button", { name: "Remove connection" })
- .click();
- await expect(page).toHaveURL(new RegExp(`/${seed.prefix}/apps$`));
- await expect.poll(() => mock.removed).toBe(true);
- await expect.poll(() => mock.lifecycleActions).toEqual(["pause", "resume", "remove"]);
- });
- }
});
test.describe("iMessage Photon setup and management", () => {
diff --git a/tests/e2e/playwright.config.ts b/tests/e2e/playwright.config.ts
index 0d9da6efcb7..0ea43449e9a 100644
--- a/tests/e2e/playwright.config.ts
+++ b/tests/e2e/playwright.config.ts
@@ -49,6 +49,7 @@ if (SKIP_UI_BUILD && !fs.existsSync(UI_DIST_INDEX)) {
// `scripts/e2e-shard.mjs` — `scripts/__tests__/e2e-shard.test.mjs` fails if
// the two ever drift.
export const SERIAL_SPECS = [
+ "agent-chat-projects-handoff.spec.ts",
"agent-chat-projects.spec.ts",
"agent-chat-sessions.spec.ts",
"agent-configuration.spec.ts",
diff --git a/tests/e2e/project-pinning.spec.ts b/tests/e2e/project-pinning.spec.ts
new file mode 100644
index 00000000000..6d6b0c1e307
--- /dev/null
+++ b/tests/e2e/project-pinning.spec.ts
@@ -0,0 +1,45 @@
+import { expect, test } from "@playwright/test";
+
+test("pin a project from the Projects list and open a task from its sidebar row", async ({ page, request }) => {
+ const createdCompany = await request.post("/api/companies", { data: { name: "Project pinning" } });
+ expect(createdCompany.ok()).toBe(true);
+ const company = await createdCompany.json();
+ const projectName = "Customer onboarding";
+ const taskTitle = "Review the welcome email";
+ const createdProject = await request.post(`/api/companies/${company.id}/projects`, {
+ data: { name: projectName },
+ });
+ expect(createdProject.ok()).toBe(true);
+ const project = await createdProject.json();
+ const createdTask = await request.post(`/api/companies/${company.id}/issues`, {
+ data: { title: taskTitle, projectId: project.id, status: "todo" },
+ });
+ expect(createdTask.ok()).toBe(true);
+ const task = await createdTask.json();
+
+ const projectsPath = `/${company.issuePrefix}/projects`;
+ await page.goto(projectsPath);
+ const main = page.getByRole("main");
+ const nav = page.getByRole("navigation", { name: "Workspace navigation" });
+ const folder = nav.getByRole("button", { name: projectName, exact: true });
+ await main.getByRole("button", { name: `Pin ${projectName}`, exact: true }).click();
+ await expect(page).toHaveURL((url) => url.pathname === projectsPath);
+ await expect(folder).toHaveAttribute("aria-expanded", "false");
+
+ await page.reload();
+ await expect(folder).toHaveAttribute("aria-expanded", "false");
+ const label = folder.locator("[data-cell-marquee]");
+ const idleWidth = await label.evaluate((element) => element.getBoundingClientRect().width);
+ await folder.hover();
+ await expect.poll(() => label.evaluate((element) => element.getBoundingClientRect().width)).toBeLessThan(idleWidth);
+
+ await folder.press("Space");
+ await expect(folder).toHaveAttribute("aria-expanded", "true");
+ await expect(page).toHaveURL((url) => url.pathname === projectsPath);
+ await nav.getByRole("link", { name: taskTitle }).click();
+ await expect(page).toHaveURL((url) => url.pathname.includes(`/issues/${task.identifier}`));
+
+ await page.goto(projectsPath);
+ await main.getByRole("button", { name: `Unpin ${projectName}`, exact: true }).click();
+ await expect(folder).toHaveCount(0);
+});
diff --git a/tests/e2e/start-e2e-server.ts b/tests/e2e/start-e2e-server.ts
index 20e7a377618..2aa8918bff4 100644
--- a/tests/e2e/start-e2e-server.ts
+++ b/tests/e2e/start-e2e-server.ts
@@ -1,19 +1,236 @@
import { randomBytes } from "node:crypto";
import fs from "node:fs";
+import { createRequire } from "node:module";
+import net from "node:net";
import os from "node:os";
import path from "node:path";
-import { createDb } from "../../packages/db/src/client.js";
-import { startEmbeddedPostgresTestDatabase } from "../../packages/db/src/test-embedded-postgres.js";
+import {
+ applyPendingMigrations,
+ closeRegisteredClients,
+ createDb,
+ ensurePostgresDatabase,
+} from "../../packages/db/src/client.js";
+import { loadWithoutEmbeddedPostgresExitHooks } from "../../packages/db/src/embedded-postgres-lifecycle.js";
+import { prepareEmbeddedPostgresNativeRuntime } from "../../packages/db/src/embedded-postgres-native.js";
+import {
+ computeEmbeddedPostgresTemplateKey,
+ startEmbeddedPostgresTestDatabase,
+} from "../../packages/db/src/test-embedded-postgres.js";
+import {
+ beforeTestPostgresShutdown,
+ ownTestPostgres,
+ type TestPostgresInstance,
+} from "../../packages/db/src/test-postgres-owner.js";
// Fast throwaway server bootstrap for Playwright E2E shards.
-// Replaces `cli onboard --yes --run` (which runs CLI onboarding + 12 doctor
-// checks + fresh durable Postgres initdb/migrations) by:
-// 1. Writing the minimal throwaway local_trusted config + secrets key directly.
-// 2. Booting a disposable embedded Postgres via `@paperclipai/db`'s migrated
-// template cache and disabling durability flushes (`fsync=off`,
-// `synchronous_commit=off`, `full_page_writes=off`) so both startup and
-// every E2E test write execute at memory speed.
-// 3. Starting `server/src/index.ts` directly via `startServer()`.
+// Replaces `cli onboard --yes --run` (and avoids building/copying a durable
+// template cluster on ephemeral CI runners where only one server boots per job):
+// 1. Writes the minimal throwaway local_trusted config + secrets key directly.
+// 2. Boots a single disposable embedded Postgres with `initdb --no-sync` and
+// non-durable settings (`fsync=off`, `synchronous_commit=off`,
+// `full_page_writes=off`, `autovacuum=off`) written to `postgresql.conf`
+// BEFORE `start()`, so all migrations and E2E test writes run at memory
+// speed without stop/copy/restart overhead.
+// 3. Overlaps `import("../../server/src/index.js")` with Postgres bootstrap
+// and starts `server/src/index.ts` directly via `startServer()`.
+
+type EmbeddedPostgresCtor = new (opts: {
+ databaseDir: string;
+ user: string;
+ password: string;
+ port: number;
+ persistent: boolean;
+ initdbFlags?: string[];
+ onLog?: (message: unknown) => void;
+ onError?: (message: unknown) => void;
+}) => TestPostgresInstance;
+
+type DisposableDatabase = {
+ connectionString: string;
+ cleanup(): Promise;
+};
+
+const EMBEDDED_USER = "paperclip";
+const EMBEDDED_PASSWORD = "paperclip";
+const EMBEDDED_DB = "paperclip";
+const INITDB_FLAGS = ["--encoding=UTF8", "--locale=C", "--lc-messages=C", "--no-sync"];
+const DISPOSABLE_PG_CONF = [
+ "",
+ "# Disposable E2E test cluster tuning — zero crash durability required",
+ "fsync = off",
+ "synchronous_commit = off",
+ "full_page_writes = off",
+ "autovacuum = off",
+ "checkpoint_timeout = 1h",
+ "max_wal_size = 1GB",
+ "log_min_messages = warning",
+ "",
+].join("\n");
+
+const MAX_START_ATTEMPTS = 5;
+
+async function getAvailablePort(): Promise {
+ return await new Promise((resolve, reject) => {
+ const server = net.createServer();
+ server.unref();
+ server.on("error", reject);
+ server.listen(0, "127.0.0.1", () => {
+ const address = server.address();
+ if (!address || typeof address === "string") {
+ server.close(() => reject(new Error("Failed to allocate E2E Postgres port")));
+ return;
+ }
+ const { port } = address;
+ server.close((error) => (error ? reject(error) : resolve(port)));
+ });
+ });
+}
+
+async function loadEmbeddedPostgresCtor(): Promise {
+ const dbRequire = createRequire(new URL("../../packages/db/package.json", import.meta.url));
+ const mod = await loadWithoutEmbeddedPostgresExitHooks(async () => {
+ const loaded = dbRequire("embedded-postgres") as { default?: EmbeddedPostgresCtor } | EmbeddedPostgresCtor;
+ return typeof loaded === "function" ? loaded : loaded.default;
+ });
+ if (!mod) {
+ throw new Error("Failed to load embedded-postgres constructor from @paperclipai/db");
+ }
+ await prepareEmbeddedPostgresNativeRuntime();
+ return mod;
+}
+
+type FastPostgresHandle = {
+ ready: Promise;
+};
+
+async function startFastDisposablePostgres(
+ EmbeddedPostgres: EmbeddedPostgresCtor,
+): Promise {
+ // Allocate port and kick off `initdb` BEFORE returning so the `initdb` child
+ // process runs in parallel on another core while the caller concurrently
+ // transpiles `server/src/index.ts` via `tsx`.
+ const firstDataDir = fs.mkdtempSync(path.join(os.tmpdir(), "paperclip-e2e-pg-"));
+ const firstPort = await getAvailablePort();
+
+ const attemptStart = async (
+ dataDir: string,
+ pgPort: number,
+ preStartedInit?: Promise,
+ preOwnedInstance?: ReturnType,
+ preLogs?: string[],
+ ): Promise => {
+ const recentLogs = preLogs ?? [];
+ const appendLog = (message: unknown) => {
+ const text = String(message ?? "").trim();
+ if (!text) return;
+ recentLogs.push(text);
+ if (recentLogs.length > 40) recentLogs.shift();
+ };
+ const instance =
+ preOwnedInstance ??
+ ownTestPostgres(
+ new EmbeddedPostgres({
+ databaseDir: dataDir,
+ user: EMBEDDED_USER,
+ password: EMBEDDED_PASSWORD,
+ port: pgPort,
+ persistent: true,
+ initdbFlags: INITDB_FLAGS,
+ onLog: appendLog,
+ onError: appendLog,
+ }),
+ dataDir,
+ );
+
+ try {
+ await (preStartedInit ?? instance.initialise());
+ fs.appendFileSync(path.join(dataDir, "postgresql.conf"), DISPOSABLE_PG_CONF, "utf8");
+ await instance.start();
+
+ const adminUrl = `postgres://${EMBEDDED_USER}:${EMBEDDED_PASSWORD}@127.0.0.1:${pgPort}/postgres`;
+ const connectionString = `postgres://${EMBEDDED_USER}:${EMBEDDED_PASSWORD}@127.0.0.1:${pgPort}/${EMBEDDED_DB}`;
+ await ensurePostgresDatabase(adminUrl, EMBEDDED_DB);
+ await applyPendingMigrations(connectionString);
+
+ let cleaned = false;
+ return {
+ connectionString,
+ cleanup: async () => {
+ if (cleaned) return;
+ cleaned = true;
+ try {
+ await closeRegisteredClients(connectionString).catch(() => {});
+ } finally {
+ await instance.stop().catch(() => {});
+ await fs.promises.rm(dataDir, { recursive: true, force: true });
+ }
+ },
+ };
+ } catch (error) {
+ try {
+ await instance.stop();
+ } catch {
+ // Ignore stop error on failed start attempt.
+ }
+ await fs.promises.rm(dataDir, { recursive: true, force: true });
+ const combined = `${error instanceof Error ? error.message : String(error)}\n${recentLogs.join("\n")}`;
+ if (!/address already in use/i.test(combined)) {
+ throw new Error(`Fast E2E embedded Postgres startup failed: ${combined}`);
+ }
+ throw error;
+ }
+ };
+
+ const firstLogs: string[] = [];
+ const appendFirstLog = (message: unknown) => {
+ const text = String(message ?? "").trim();
+ if (!text) return;
+ firstLogs.push(text);
+ if (firstLogs.length > 40) firstLogs.shift();
+ };
+ const firstInstance = ownTestPostgres(
+ new EmbeddedPostgres({
+ databaseDir: firstDataDir,
+ user: EMBEDDED_USER,
+ password: EMBEDDED_PASSWORD,
+ port: firstPort,
+ persistent: true,
+ initdbFlags: INITDB_FLAGS,
+ onLog: appendFirstLog,
+ onError: appendFirstLog,
+ }),
+ firstDataDir,
+ );
+ // Spawns the `initdb` child process synchronously before returning.
+ const firstInitPromise = firstInstance.initialise();
+
+ const ready = (async () => {
+ let lastError: unknown = new Error("embedded Postgres startup failed");
+ try {
+ return await attemptStart(firstDataDir, firstPort, firstInitPromise, firstInstance, firstLogs);
+ } catch (error) {
+ lastError = error;
+ if (!/address already in use/i.test(error instanceof Error ? error.message : String(error))) {
+ throw error;
+ }
+ }
+ for (let attempt = 2; attempt <= MAX_START_ATTEMPTS; attempt += 1) {
+ const dataDir = fs.mkdtempSync(path.join(os.tmpdir(), "paperclip-e2e-pg-"));
+ const pgPort = await getAvailablePort();
+ try {
+ return await attemptStart(dataDir, pgPort);
+ } catch (error) {
+ lastError = error;
+ if (!/address already in use/i.test(error instanceof Error ? error.message : String(error))) {
+ throw error;
+ }
+ }
+ }
+ throw lastError instanceof Error ? lastError : new Error(String(lastError));
+ })();
+
+ return { ready };
+}
const port = Number(process.env.PORT ?? process.env.PAPERCLIP_E2E_PORT ?? 3199);
const instanceId = process.env.PAPERCLIP_INSTANCE_ID ?? "playwright-e2e";
@@ -39,48 +256,102 @@ if (!fs.existsSync(masterKeyPath)) {
});
}
-let db: Awaited> | undefined;
+process.env.PAPERCLIP_HOME = homeDir;
+process.env.PAPERCLIP_INSTANCE_ID = instanceId;
+process.env.PAPERCLIP_CONFIG = configPath;
+process.env.PAPERCLIP_STORAGE_LOCAL_DIR = storageDir;
+process.env.PAPERCLIP_SECRETS_MASTER_KEY_FILE = masterKeyPath;
+process.env.PAPERCLIP_DB_BACKUP_ENABLED = "false";
+
+let db: DisposableDatabase | undefined;
let shutdownServer: ((signal?: "SIGINT" | "SIGTERM") => Promise) | undefined;
let shuttingDown = false;
-async function shutdown(signal: "SIGINT" | "SIGTERM") {
- if (shuttingDown) return;
- shuttingDown = true;
- try {
- await shutdownServer?.(signal);
- } finally {
- await db?.cleanup();
- }
- process.exit(0);
+function hasWarmEmbeddedPostgresTemplate(): boolean {
+ if (process.env.PAPERCLIP_TEST_POSTGRES_TEMPLATE === "0") return false;
+ const uid = process.getuid?.();
+ if (uid === undefined) return false;
+ const templateDir = path.join(
+ os.tmpdir(),
+ `paperclip-embedded-postgres-templates-${uid}`,
+ computeEmbeddedPostgresTemplateKey(),
+ );
+ return (
+ fs.existsSync(path.join(templateDir, "PG_VERSION")) &&
+ !fs.existsSync(path.join(templateDir, "postmaster.pid"))
+ );
}
-process.once("SIGINT", () => {
- void shutdown("SIGINT");
-});
-process.once("SIGTERM", () => {
- void shutdown("SIGTERM");
-});
+async function tuneDisposableCluster(connectionString: string): Promise {
+ const adminUrl = new URL(connectionString);
+ adminUrl.pathname = "/postgres";
+ const admin = createDb(adminUrl.toString(), { maxConnections: 1 });
+ try {
+ await admin.$client.unsafe("ALTER SYSTEM SET fsync = off");
+ await admin.$client.unsafe("ALTER SYSTEM SET synchronous_commit = off");
+ await admin.$client.unsafe("ALTER SYSTEM SET full_page_writes = off");
+ await admin.$client.unsafe("ALTER SYSTEM SET autovacuum = off");
+ await admin.$client.unsafe("SELECT pg_reload_conf()");
+ } finally {
+ await admin.$client.end({ timeout: 1 });
+ }
+}
+
+const usesExternalPostgres = Boolean(process.env.PAPERCLIP_TEST_POSTGRES_ADMIN_URL?.trim());
+const useWarmTemplate = !usesExternalPostgres && hasWarmEmbeddedPostgresTemplate();
+
+if (usesExternalPostgres) {
+ const shutdownExternal = async (signal: "SIGINT" | "SIGTERM") => {
+ if (shuttingDown) return;
+ shuttingDown = true;
+ try {
+ await shutdownServer?.(signal);
+ } finally {
+ await db?.cleanup();
+ }
+ process.exit(0);
+ };
+ process.once("SIGINT", () => void shutdownExternal("SIGINT"));
+ process.once("SIGTERM", () => void shutdownExternal("SIGTERM"));
+} else {
+ beforeTestPostgresShutdown({
+ stop: async (signal) => {
+ if (shuttingDown) return;
+ shuttingDown = true;
+ await shutdownServer?.(signal === "SIGINT" ? "SIGINT" : "SIGTERM");
+ if (db) await closeRegisteredClients(db.connectionString).catch(() => {});
+ },
+ interrupt() {},
+ afterStop: async () => {
+ await db?.cleanup();
+ },
+ });
+}
try {
- const usesExternalPostgres = Boolean(process.env.PAPERCLIP_TEST_POSTGRES_ADMIN_URL?.trim());
- db = await startEmbeddedPostgresTestDatabase("paperclip-e2e-pg-");
+ let startedDb: DisposableDatabase;
+ let serverModule: typeof import("../../server/src/index.js");
- // Only tune cluster-wide durability settings on a disposable embedded
- // PostgreSQL instance owned by this script. Never mutate a shared external
- // PostgreSQL server passed via PAPERCLIP_TEST_POSTGRES_ADMIN_URL.
- if (!usesExternalPostgres) {
- const adminUrl = new URL(db.connectionString);
- adminUrl.pathname = "/postgres";
- const admin = createDb(adminUrl.toString(), { maxConnections: 1 });
- try {
- await admin.$client.unsafe("ALTER SYSTEM SET fsync = off");
- await admin.$client.unsafe("ALTER SYSTEM SET synchronous_commit = off");
- await admin.$client.unsafe("ALTER SYSTEM SET full_page_writes = off");
- await admin.$client.unsafe("SELECT pg_reload_conf()");
- } finally {
- await admin.$client.end({ timeout: 1 });
- }
+ if (usesExternalPostgres) {
+ startedDb = await startEmbeddedPostgresTestDatabase("paperclip-e2e-pg-");
+ serverModule = await import("../../server/src/index.js");
+ } else if (useWarmTemplate) {
+ startedDb = await startEmbeddedPostgresTestDatabase("paperclip-e2e-pg-");
+ await tuneDisposableCluster(startedDb.connectionString);
+ serverModule = await import("../../server/src/index.js");
+ } else {
+ // Load `embedded-postgres` and spawn `initdb` BEFORE calling
+ // `import("../../server/src/index.js")` so synchronous `createRequire`
+ // never races `tsx`'s ESM loader AND `initdb` runs in a separate OS
+ // process while `tsx` transpiles the server graph.
+ const embeddedPostgresCtor = await loadEmbeddedPostgresCtor();
+ const fastPg = await startFastDisposablePostgres(embeddedPostgresCtor);
+ [startedDb, serverModule] = await Promise.all([
+ fastPg.ready,
+ import("../../server/src/index.js"),
+ ]);
}
+ db = startedDb;
const config = {
$meta: {
@@ -91,7 +362,12 @@ try {
database: {
mode: "postgres",
connectionString: db.connectionString,
- backup: { enabled: false, intervalMinutes: 60, retentionDays: 7, dir: path.join(instanceRoot, "data", "backups") },
+ backup: {
+ enabled: false,
+ intervalMinutes: 60,
+ retentionDays: 7,
+ dir: path.join(instanceRoot, "data", "backups"),
+ },
},
logging: { mode: "file", logDir: logsDir },
server: {
@@ -116,16 +392,9 @@ try {
mode: 0o600,
});
- process.env.PAPERCLIP_HOME = homeDir;
- process.env.PAPERCLIP_INSTANCE_ID = instanceId;
- process.env.PAPERCLIP_CONFIG = configPath;
process.env.DATABASE_URL = db.connectionString;
- process.env.PAPERCLIP_STORAGE_LOCAL_DIR = storageDir;
- process.env.PAPERCLIP_SECRETS_MASTER_KEY_FILE = masterKeyPath;
- process.env.PAPERCLIP_DB_BACKUP_ENABLED = "false";
- const { startServer } = await import("../../server/src/index.js");
- const started = await startServer();
+ const started = await serverModule.startServer();
shutdownServer = started.shutdown;
} catch (error) {
await db?.cleanup();
diff --git a/tests/runner-e2e/PRODUCT-JOURNEYS.md b/tests/runner-e2e/PRODUCT-JOURNEYS.md
index abe5558510c..6eec3cd43b6 100644
--- a/tests/runner-e2e/PRODUCT-JOURNEYS.md
+++ b/tests/runner-e2e/PRODUCT-JOURNEYS.md
@@ -487,6 +487,29 @@ saved daily TestOps plan only after an inspected real QA Cloud pass including
usage, artifact/decision evidence and cleanup. The daily driver runs that saved
plan against the registered QA tenant; it does not substitute a local instance.
+The scheduled-routine browser actions use the current routine form's Title,
+Default agent, Project and Instructions controls. Each picker opens explicitly;
+agent selection does not imply project focus. The schedule's normal popover
+owns Resume and Pause, and both actions wait for the exact trigger PATCH.
+The task-history read returns to the routine page's History field; the separate
+/history route contains configuration revisions. The existing scheduled-run,
+output attribution, duplicate-run and pause-window checks remain independent.
+
+A credential-free control renders the production form, entity pickers and
+routine page in Chromium. It resolves React from the UI workspace, as required
+by an isolated pnpm install. It checks exact owner/project selection, refusal of a
+missing agent or project, and one Resume/Pause mutation for the owned trigger. Its unrelated
+editor/display boundaries are stubbed: AgentAvatar, Identity initials, style
+joining, router Link, MarkdownBody, RunButton, TaskSummaryList, MarkdownEditor,
+RoutineVariablesEditor, EnvironmentVariablesEditor, and ScheduleEditor (including
+its schedule-description formatter). The stub map is next to the browser fixture.
+The real Markdown serialization, task-history content and schedule-expression
+editor are outside this control's scope. It is not full-stack or QA qualification:
+
+```sh
+node --import ./cli/node_modules/tsx/dist/loader.mjs tests/runner-e2e/product-journeys/routine-schedule-ui.browser.mjs
+```
+
The scheduled-routine pause oracle uses a full 65 seconds of monotonic elapsed
time after both pause acknowledgement and work completion. Its enable receipt
uses the server's timestamp; client and server wall clocks are never compared.
diff --git a/tests/runner-e2e/product-journeys/routine-schedule-entry.test.ts b/tests/runner-e2e/product-journeys/routine-schedule-entry.test.ts
index f5c46e5f4a0..ad1992ffbd1 100644
--- a/tests/runner-e2e/product-journeys/routine-schedule-entry.test.ts
+++ b/tests/runner-e2e/product-journeys/routine-schedule-entry.test.ts
@@ -4,6 +4,7 @@ import path from "node:path";
import { createHash } from "node:crypto";
import { afterEach, expect, it, vi } from "vitest";
import { runScheduledRoutine } from "./routine-schedule-flow.js";
+import { resolveRoutineAddress } from "../../../ui/src/components/routine-page/routine-routes.js";
import type { JourneyContext, JourneyEvidence, TargetSession } from "./types.js";
// Browser rendering is covered by the real Routines component tests. This entry
@@ -34,6 +35,7 @@ async function fixture(fault: "body" | "document-author" | "revision-run" | "cre
const revision = { id: "revision", documentId: document.id, body, createdByAgentId: agent.id,
createdByRunId: fault === "revision-run" ? "foreign-run" : run.id };
const reads: string[] = [];
+ const visited: string[] = [];
let instructions = "", pastes = 0, triggerCreated = false, responseResolver: ((value: unknown) => void) | undefined;
const routine = () => ({ id: "routine", companyId: "company", title: `Journey QA scheduled routine ${campaignId}`,
projectId: fault === "creation-project" ? "foreign-project" : project.id, assigneeAgentId: agent.id,
@@ -41,7 +43,7 @@ async function fixture(fault: "body" | "document-author" | "revision-run" | "cre
description: fault === "creation-description" ? instructions.replaceAll("`", "\\`") : instructions,
concurrencyPolicy: "always_enqueue", triggers: triggerCreated ? [trigger] : [] });
const locator = (name = ""): any => ({ first() { return this; }, getByRole: (_role: string, options: { name?: string } = {}) => locator(options.name),
- getByPlaceholder: () => locator(), locator: () => ({
+ getByPlaceholder: () => locator(), focus: async () => {}, locator: () => ({
fill: async (value: string) => { instructions = value; }, focus: async () => {},
// The real MDX browser discriminator covers serialization. Keep this unit
// editor boundary separate from the production API reads and grade.
@@ -50,9 +52,13 @@ async function fixture(fault: "body" | "document-author" | "revision-run" | "cre
pastes += 1; instructions = text;
},
}),
- fill: async () => {}, click: async () => {
- if (name === "Enable trigger") { trigger.enabled = true; responseResolver?.({ status: () => 200, json: async () => ({ ...trigger }) }); }
- if (name === "Pause trigger") trigger.enabled = false;
+ fill: async (value: string) => { if (name === "Instructions") instructions = value; },
+ evaluate: async (_action: unknown, text?: string) => {
+ if (text === undefined) return false;
+ pastes += 1; instructions = text;
+ }, click: async () => {
+ if (name === "Resume") { trigger.enabled = true; responseResolver?.({ status: () => 200, json: async () => ({ ...trigger }) }); }
+ if (name === "Pause") { trigger.enabled = false; responseResolver?.({ status: () => 200 }); }
if (name === "Create routine") responseResolver?.({ status: () => 201, json: async () => routine() });
} });
const api = { origin: "https://qa.example.test", async post(route: string) {
@@ -76,13 +82,20 @@ async function fixture(fault: "body" | "document-author" | "revision-run" | "cre
if (route === "/api/issues/task/documents/scheduled-summary/revisions/revision") return revision;
throw new Error(`Unexpected fixture read ${route}`);
} };
- const page = { getByRole: (_role: string, options: { name?: string } = {}) => locator(options.name), getByPlaceholder: () => locator(),
- async goto(url: string) { if (url.endsWith("/routines/routine/runs")) throw new Error("Stop the positive control before the real pause window"); },
+ const page = { getByRole: (role: string, options: { name?: string } = {}) => {
+ if (role === "link" && options.name === task.identifier) {
+ // Stop at the task-link assertion, independently of the address chosen.
+ // The test below checks that address using the production route resolver.
+ throw new Error("Stop the positive control before the real pause window");
+ }
+ return locator(options.name);
+ }, getByPlaceholder: () => locator(),
+ async goto(url: string) { visited.push(url); }, async reload() {},
waitForResponse: () => new Promise(resolve => { responseResolver = resolve; }) };
const context = { api, page, company: { id: "company", issuePrefix: "QA" }, user: { id: "user" }, agent, environmentId: "environment" } as unknown as JourneyContext;
const directory = await mkdtemp(path.join(os.tmpdir(), "routine-attribution-")); directories.push(directory);
const evidence = { checks: [] } as unknown as JourneyEvidence;
- return { expectedBody, body, instructions: () => instructions, pastes: () => pastes, evidence, trigger, directory, reads,
+ return { expectedBody, body, instructions: () => instructions, pastes: () => pastes, evidence, trigger, directory, reads, visited,
run: () => runScheduledRoutine(context, { async own() {} } as unknown as TargetSession, campaignId, evidence,
{ directory, deadlineAt: Date.now() + 10_000 }) };
}
@@ -125,6 +138,10 @@ it("keeps the real journey attribution failure when final trigger disabling also
it("sends the unchanged exact two-line body as a delimited instruction and accepts valid attribution", async () => {
const f = await fixture();
await expect(f.run()).rejects.toMatchObject({ code: "routine_open_history_failed" });
+ const historyUrl = new URL(f.visited.at(-1)!);
+ const section = historyUrl.pathname.split("/")[4];
+ expect(resolveRoutineAddress({ routineId: "routine", section }).view).toBe("routine");
+ expect(historyUrl.pathname).toBe("/QA/routines/routine");
const block = f.instructions().match(/```text\n([\s\S]*?)\n```/);
expect(block?.[1]).toBe(f.expectedBody);
expect(f.instructions()).toContain("including the final period");
diff --git a/tests/runner-e2e/product-journeys/routine-schedule-flow.test.ts b/tests/runner-e2e/product-journeys/routine-schedule-flow.test.ts
index d5fe9dbec28..cc7dab254d8 100644
--- a/tests/runner-e2e/product-journeys/routine-schedule-flow.test.ts
+++ b/tests/runner-e2e/product-journeys/routine-schedule-flow.test.ts
@@ -1,8 +1,9 @@
+import { enableRoutineScheduleTrigger } from "./routine-schedule-ui.js";
import { mkdtemp, readFile, rm } from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { describe, expect, it, vi } from "vitest";
-import { enableRoutineScheduleTrigger, routineUiStep, withRoutineTriggerCleanup } from "./routine-schedule-flow.js";
+import { routineUiStep, withRoutineTriggerCleanup } from "./routine-schedule-flow.js";
import { JourneyError } from "./types.js";
describe("routine trigger cleanup failure reporting", () => {
@@ -31,11 +32,11 @@ describe("routine trigger cleanup failure reporting", () => {
describe("routine UI failure evidence", () => {
it("retains a closed step code without browser messages or form values", async () => {
- const error = await routineUiStep("select_project", async () => {
+ const error = await routineUiStep("fill_form", async () => {
throw new Error("Timeout at https://private.example/?token=secret with form value private-project");
}).catch(value => value);
expect(error).toBeInstanceOf(JourneyError);
- expect(error).toMatchObject({ outcome: "failed", code: "routine_select_project_failed", message: "routine_select_project_failed" });
+ expect(error).toMatchObject({ outcome: "failed", code: "routine_fill_form_failed", message: "routine_fill_form_failed" });
expect(JSON.stringify(error)).not.toMatch(/private|token|secret/);
});
it("keeps a semantic journey failure instead of replacing its evidence code", async () => {
@@ -52,20 +53,16 @@ describe("routine UI failure evidence", () => {
describe("schedule trigger controls", () => {
- it("opens the collapsed schedule editor before its single enable action", async () => {
+ it("opens the schedule popover before one attributed resume action", async () => {
let expanded = false, clicks = 0, resolveResponse!: (value: any) => void;
const response = { status: () => 200 };
const pending = new Promise(resolve => { resolveResponse = resolve; });
- const schedule = { getByRole: (_role: string, options: { name: string }) => ({ click: async () => {
- if (options.name === "Edit schedule") { expanded = true; return; }
- if (options.name !== "Enable trigger" || !expanded) throw new Error("schedule control is not rendered");
+ const page = { getByRole: (_role: string, options: { name: string | RegExp }) => ({ click: async () => {
+ if (options.name instanceof RegExp && options.name.test("Change schedule: Every minute")) { expanded = true; return; }
+ if (options.name !== "Resume" || !expanded) throw new Error("schedule control is not rendered");
clicks += 1;
resolveResponse(response);
- } }) };
- const page = { getByRole: (role: string, options: { name: string }) => {
- if (role === "region" && options.name === "Schedule trigger") return schedule;
- return schedule.getByRole(role, options);
- }, waitForResponse: () => pending } as unknown as Parameters[0];
+ } }), waitForResponse: () => pending } as unknown as Parameters[0];
expect(await enableRoutineScheduleTrigger(page, "/api/routine-triggers/owned-trigger")).toBe(response);
expect(expanded).toBe(true);
expect(clicks).toBe(1);
diff --git a/tests/runner-e2e/product-journeys/routine-schedule-flow.ts b/tests/runner-e2e/product-journeys/routine-schedule-flow.ts
index 35ceaaa9f90..5103b604a43 100644
--- a/tests/runner-e2e/product-journeys/routine-schedule-flow.ts
+++ b/tests/runner-e2e/product-journeys/routine-schedule-flow.ts
@@ -1,10 +1,11 @@
+import { fillRoutineCreateForm, enableRoutineScheduleTrigger, setRoutineScheduleEnabled } from "./routine-schedule-ui.js";
import { createObservedReader } from "./observation-read.js";
import { createHash } from "node:crypto";
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
-import { expect, type Page } from "@playwright/test";
+import { expect } from "@playwright/test";
import { ConnectionFailure } from "../connection-config.js";
-import { fillTaskPrompt, withBrowserEvent } from "../user-actions.js";
+import { withBrowserEvent } from "../user-actions.js";
import { validateAgentTaskState, waitFor } from "./agent-flows.js";
import { openDocumentAuthoring } from "./task-document-flow.js";
import { scheduledInvocationMatches, schedulePauseMatches, schedulePauseObservationMs, type ScheduledInvocation, type ScheduledTask } from "./routine-schedule-evidence.js";
@@ -12,7 +13,7 @@ import { JourneyError, type JourneyContext, type JourneyEvidence, type TargetSes
type Row = Record;
const journeyId = "routine-scheduled-run" as const;
-type RoutineUiStep = "open_composer" | "select_responsible" | "select_project" | "fill_instructions" | "submit" | "enable_trigger" | "pause_trigger" | "open_history" | "reopen_result";
+type RoutineUiStep = "open_composer" | "fill_form" | "submit" | "enable_trigger" | "pause_trigger" | "open_history" | "reopen_result";
export async function routineUiStep(step: RoutineUiStep, action: () => Promise): Promise {
try { return await action(); }
catch (error) {
@@ -21,15 +22,6 @@ export async function routineUiStep(step: RoutineUiStep, action: () => Promis
throw new JourneyError("failed", `routine_${step}_failed`);
}
}
-export async function enableRoutineScheduleTrigger(page: Pick, triggerRoute: string) {
- const schedule = page.getByRole("region", { name: "Schedule trigger", exact: true });
- // The enable/pause controls are children of the collapsed schedule editor.
- await schedule.getByRole("button", { name: "Edit schedule", exact: true }).click();
- return withBrowserEvent(
- () => page.waitForResponse(response => response.request().method() === "PATCH"
- && new URL(response.url()).pathname === triggerRoute),
- () => schedule.getByRole("button", { name: "Enable trigger", exact: true }).click());
-}
export async function withRoutineTriggerCleanup(input: {
api: Pick; triggerRoute: string; directory: string; run(): Promise;
}): Promise {
@@ -86,21 +78,9 @@ export async function runScheduledRoutine(context: JourneyContext, session: Targ
await page.getByRole("button", { name: "New routine", exact: true }).first().click();
});
const dialog = page.getByRole("dialog");
- await routineUiStep("select_responsible", async () => {
- await dialog.getByPlaceholder("Routine title", { exact: true }).fill(title);
- await dialog.getByRole("button", { name: "Responsible", exact: true }).click();
- await page.getByPlaceholder("Search responsible...", { exact: true }).fill(agent.name);
- await page.getByRole("button", { name: agent.name, exact: true }).click();
- });
- await routineUiStep("select_project", async () => {
- // Selecting Responsible focuses Project and opens its picker. Clicking
- // its trigger again closes the picker before the search field can fill.
- const projectSearch = page.getByPlaceholder("Search projects...", { exact: true });
- await expect(projectSearch).toBeVisible();
- await projectSearch.fill(projectName);
- await page.getByRole("button", { name: projectName, exact: true }).click();
- });
- await routineUiStep("fill_instructions", () => fillTaskPrompt(dialog.locator('[contenteditable="true"]'), prompt));
+ await routineUiStep("fill_form", () => fillRoutineCreateForm(page, {
+ title, agentName: agent.name, projectName, prompt,
+ }));
await session.own({ kind: "routine", name: title, journeyId });
const response = await routineUiStep("submit", () => withBrowserEvent(
() => page.waitForResponse(response => response.request().method() === "POST"
@@ -149,7 +129,7 @@ export async function runScheduledRoutine(context: JourneyContext, session: Targ
let pausedAt = 0;
await withRoutineTriggerCleanup({ api, triggerRoute, directory: options.directory, run: async () => {
const enabledResponse = await routineUiStep("enable_trigger", async () => {
- await page.goto(`${api.origin}/${company.issuePrefix}/routines/${routine.id}/triggers`, { waitUntil: "domcontentloaded" });
+ await page.goto(`${api.origin}/${company.issuePrefix}/routines/${routine.id}`, { waitUntil: "domcontentloaded" });
return enableRoutineScheduleTrigger(page, triggerRoute);
});
if (enabledResponse.status() !== 200) throw new JourneyError("failed", "routine_schedule_enable_failed");
@@ -159,7 +139,8 @@ export async function runScheduledRoutine(context: JourneyContext, session: Targ
|| enabledTrigger.enabled !== true || !Number.isFinite(enabledAt)) throw new JourneyError("failed", "routine_schedule_enable_receipt_missing");
await expect.poll(async () => (await readTrigger()).enabled).toBe(true);
const first = await waitFor(options.deadlineAt, runs, rows => rows.length > 0 && Boolean(rows[0]?.linkedIssueId), "scheduled_invocation_missing");
- await routineUiStep("pause_trigger", () => page.getByRole("button", { name: "Pause trigger", exact: true }).click());
+ const pausedResponse = await routineUiStep("pause_trigger", () => setRoutineScheduleEnabled(page, triggerRoute, false));
+ if (pausedResponse.status() !== 200) throw new JourneyError("failed", "routine_schedule_pause_failed");
await expect.poll(async () => (await readTrigger()).enabled).toBe(false);
pausedAt = performance.now();
const task = await readObserved(`/api/issues/${first[0]!.linkedIssueId}`);
@@ -205,7 +186,7 @@ export async function runScheduledRoutine(context: JourneyContext, session: Targ
check("routine-result-attributed", Object.values(matches).every(Boolean));
if (typeof state.currentIssue.identifier !== "string" || !state.currentIssue.identifier) throw new JourneyError("failed", "routine_task_identifier_missing");
await routineUiStep("open_history", async () => {
- await page.goto(`${api.origin}/${company.issuePrefix}/routines/${routine.id}/runs`, { waitUntil: "domcontentloaded" });
+ await page.goto(`${api.origin}/${company.issuePrefix}/routines/${routine.id}`, { waitUntil: "domcontentloaded" });
await page.reload();
await expect(page.getByRole("link", { name: state.currentIssue.identifier, exact: false }).first()).toBeVisible();
});
diff --git a/tests/runner-e2e/product-journeys/routine-schedule-ui.browser.mjs b/tests/runner-e2e/product-journeys/routine-schedule-ui.browser.mjs
new file mode 100644
index 00000000000..88376a3deb2
--- /dev/null
+++ b/tests/runner-e2e/product-journeys/routine-schedule-ui.browser.mjs
@@ -0,0 +1,106 @@
+import assert from "node:assert/strict";
+import path from "node:path";
+import { existsSync } from "node:fs";
+import { createRequire } from "node:module";
+import { fileURLToPath } from "node:url";
+import { build } from "esbuild";
+import { chromium } from "@playwright/test";
+import { fillRoutineCreateForm, enableRoutineScheduleTrigger, setRoutineScheduleEnabled } from "./routine-schedule-ui.ts";
+
+// Render the production form, entity pickers, schedule rows and Radix primitives.
+// Only unrelated display/editor boundaries are replaced. No app, provider or QA
+// credential is needed. The full journey retains independent API readback/grades.
+const root = fileURLToPath(new URL("../../../", import.meta.url));
+const uiRoot = path.join(root, "ui");
+const uiRequire = createRequire(path.join(uiRoot, "package.json"));
+const stubs = {
+ "@/components/AgentAvatar": "export const AgentAvatar = () => null;",
+ "@/components/Identity": "export const deriveInitials = name => name.slice(0, 2);",
+ "@/lib/utils": "export const cn = (...values) => values.filter(Boolean).join(' ');",
+ "../lib/utils": "export const cn = (...values) => values.filter(Boolean).join(' ');",
+ "@/lib/router": "export const Link = ({to, children, ...props}) => {children};",
+ "@/components/MarkdownBody": "export const MarkdownBody = () => null;",
+ "@/components/AgentActionButtons": "export const RunButton = () => null;",
+ "@/components/TaskSummaryList": "export const TaskSummaryList = () => null;",
+ "@/components/MarkdownEditor": `export const MarkdownEditor = ({value, onChange, ariaLabel}) =>
+ ]
) : null}
diff --git a/ui/src/components/NavigationPinButton.tsx b/ui/src/components/NavigationPinButton.tsx
new file mode 100644
index 00000000000..d79f2dc7b33
--- /dev/null
+++ b/ui/src/components/NavigationPinButton.tsx
@@ -0,0 +1,40 @@
+import { Pin, PinOff } from "lucide-react";
+import { cn } from "@/lib/utils";
+import type { usePinnedNavigation } from "@/hooks/usePinnedNavigation";
+
+export type PinControls = Pick, "keys" | "canPin" | "toggle">;
+
+interface NavigationPinButtonProps {
+ pinKey: string;
+ label: string;
+ pins: PinControls;
+ className: string;
+}
+
+export function NavigationPinButton({ pinKey, label, pins, className }: NavigationPinButtonProps) {
+ const pinned = pins.keys.has(pinKey);
+ const Icon = pinned ? PinOff : Pin;
+ const action = `${pinned ? "Unpin" : "Pin"} ${label}`;
+
+ return (
+
+ );
+}
diff --git a/ui/src/components/OnboardingWizard.tsx b/ui/src/components/OnboardingWizard.tsx
index 1027fa2fd79..410b6801ff9 100644
--- a/ui/src/components/OnboardingWizard.tsx
+++ b/ui/src/components/OnboardingWizard.tsx
@@ -3,7 +3,7 @@ import { cancelAdapterLoginSession, cancelPendingAdapterLogin, matchesAdapterLog
import { useQueryView } from "@/components/QueryView";
import type { AgentRunner, AgentRunnerChoice } from "@paperclipai/shared";
import { needsClaudeSetupQualification, qualifyClaudeSetup } from "../lib/qualify-claude-setup";
-import { runOnboardingConnectionTest } from "../lib/onboarding-connection-test";
+import { blocksAgentCreate, runOnboardingConnectionTest } from "../lib/onboarding-connection-test";
import { agentHarnessType, agentRunner } from "@paperclipai/shared";
import { adaptersApi, type AdapterInfo } from "../api/adapters";
import { healthApi } from "@/api/health";
@@ -140,7 +140,11 @@ import { OnboardingHeading } from "./onboarding/OnboardingPrimitives";
import { DEFAULT_AGENT_ROLE } from "../lib/onboarding-agent-role";
import { capsuleHeroMotion, capsuleRoomEnter, capsuleRoomExit, heroRoomArrival, heroRoomMotion, ledeMotion, stepContentMotion, titleSwapMotion } from "./onboarding/onboarding-motion";
import { Badge } from "@/components/ui/badge";
-import { captureOnboardingStepCompleted, useOnboardingAnalytics } from "@/lib/analytics/onboarding-analytics";
+import {
+ captureOnboardingStepCompleted,
+ captureOnboardingStepFailed,
+ useOnboardingAnalytics,
+} from "@/lib/analytics/onboarding-analytics";
import {
ArrowLeft,
ArrowRight,
@@ -165,19 +169,6 @@ function restoreOnboardingAdapterType(savedAdapterType: unknown, provider?: unkn
: "claude_local";
}
-/**
- * True when an adapter-test result blocks a hire. A `fail` status always
- * blocks. A `warn` or a `pass` status blocks too when a check reports
- * `ADAPTER_AUTH_MISSING_CHECK_CODE`. That check means the agent has no
- * working authentication, so it cannot run. A `warn` with no such check
- * still lets the hire proceed. The wizard widened the gate for missing
- * authentication only, not for every other warning.
- */
-function blocksAgentCreate(result: AdapterEnvironmentTestResult): boolean {
- if (result.status === "fail") return true;
- return result.checks.some((check) => check.code === ADAPTER_AUTH_MISSING_CHECK_CODE);
-}
-
/** True when `value` is a plain object, so callers can spread it as env config. */
function isEnvRecord(value: unknown): value is Record {
return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -1912,6 +1903,7 @@ function OnboardingWizardInner({
navigate(`${prefix ? `/${prefix}` : ""}/chats/${agentId}`);
} catch (err) {
captureOnboardingStepCompleted("launch", "failed");
+ captureOnboardingStepFailed({ step: "launch", reason: "launch_failed" });
setError(err instanceof Error ? err.message : "Failed to open your chat. Please try again.");
} finally {
setLoading(false);
@@ -1958,11 +1950,19 @@ function OnboardingWizardInner({
apiKeySecretRef.current = { key, companyId, envKey, binding: legacyStored.binding };
return true;
} catch (err) {
- if (isCurrent()) setError(
- err instanceof Error
- ? `Could not store the API key: ${describeError(err).body}`
- : "Could not store the API key.",
- );
+ if (isCurrent()) {
+ captureOnboardingStepFailed({
+ step: "connect_model",
+ reason: "api_key_save_failed",
+ provider: managedProvider ?? adapterType,
+ method: "api_key",
+ });
+ setError(
+ err instanceof Error
+ ? `Could not store the API key: ${describeError(err).body}`
+ : "Could not store the API key.",
+ );
+ }
return false;
}
}
@@ -2184,6 +2184,12 @@ function OnboardingWizardInner({
managedSandboxOnly = experimentalSettings?.enableManagedSandboxOnly === true;
} catch {
if (!testIsCurrent()) return null;
+ captureOnboardingStepFailed({
+ step: "connect_model",
+ reason: "environment_test_failed",
+ provider: managedProvider ?? adapterType,
+ method: credentialMode === "api" ? "api_key" : "subscription",
+ });
setAdapterEnvError(
"Could not load environment settings to determine which environment to test in. Retry the test.",
);
@@ -2274,12 +2280,26 @@ function OnboardingWizardInner({
{ signal },
);
if (!testIsCurrent()) return null;
+ if (blocksAgentCreate(result)) {
+ captureOnboardingStepFailed({
+ step: "connect_model",
+ reason: "environment_test_failed",
+ provider: managedProvider ?? adapterType,
+ method: credentialMode === "api" ? "api_key" : "subscription",
+ });
+ }
setAdapterEnvResult(result);
adapterEnvResultAppliedStoredLoginRef.current = appliedStoredClaudeLoginBinding;
return result;
});
} catch (err) {
if (!selectionIsCurrent()) return null;
+ captureOnboardingStepFailed({
+ step: "connect_model",
+ reason: "environment_test_failed",
+ provider: managedProvider ?? adapterType,
+ method: credentialMode === "api" ? "api_key" : "subscription",
+ });
adapterEnvErrorSelectionRef.current = selection || null;
setAdapterEnvError(
err instanceof Error ? err.message : "Adapter environment test failed"
@@ -2600,6 +2620,12 @@ function OnboardingWizardInner({
setStep(5);
} catch (err) {
if (!isCurrent()) return;
+ captureOnboardingStepFailed({
+ step: "connect_model",
+ reason: "agent_create_failed",
+ provider: managedProvider ?? adapterType,
+ method: credentialMode === "api" ? "api_key" : "subscription",
+ });
setError(err instanceof Error ? err.message : "Failed to create agent");
} finally {
if (hiringAgentRef.current === attempt) hiringAgentRef.current = null;
@@ -3248,6 +3274,14 @@ function OnboardingWizardInner({
phaseBeforeSubmitRef.current === "ready" ? "ready" : "waiting",
);
}}
+ onLoginFailed={() => {
+ captureOnboardingStepFailed({
+ step: "connect_model",
+ reason: "subscription_login_failed",
+ provider: managedProvider ?? adapterType,
+ method: "subscription",
+ });
+ }}
onConnected={(sessionId) => {
if (managedSubscriptionProvider) managedSubscriptionRef.current = { companyId: createdCompanyId, binding: { provider: managedSubscriptionProvider, method: "subscription", mode: "responsible_user" }, sessionId };
setConnectAuthUrl(null);
diff --git a/ui/src/components/PinnedNavigationList.tsx b/ui/src/components/PinnedNavigationList.tsx
index 181f9cbfc9f..f1d634fcae4 100644
--- a/ui/src/components/PinnedNavigationList.tsx
+++ b/ui/src/components/PinnedNavigationList.tsx
@@ -9,14 +9,10 @@ import { cn } from "@/lib/utils";
import type { Project } from "@paperclipai/shared";
import { SidebarProjectTasks } from "./SidebarProjectTasks";
-export interface PinnedNavigationItem {
- key: string;
- to: string;
- label: string;
- icon: ReactNode;
- task?: { id: string; identifier: string | null; isUnreadForMe?: boolean };
- project?: Pick;
-}
+export type PinnedNavigationItem = { key: string; label: string } & (
+ | { project: Pick }
+ | { project?: never; to: string; icon: ReactNode; task?: { id: string; identifier: string | null; isUnreadForMe?: boolean } }
+);
/** Keep this row mounted when a pin is toggled so its controls retain focus. */
export function SortablePinnedRow({ id, label, disabled = false, className, handleClassName, handleIconClassName, children, ...props }: Omit, "id" | "children"> & {
@@ -37,17 +33,24 @@ export function SortablePinnedRow({ id, label, disabled = false, className, hand
}
function PinnedItem({ item, userId, onUnpin }: { item: PinnedNavigationItem; userId?: string | null; onUnpin: (key: string) => void }) {
- const link = { to: item.to, label: item.label, iconNode: item.icon, className: "design-sidebar-item design-sidebar-pinned-item group-hover/coordinator-pin:bg-sidebar-accent" };
- const row = (handle: ReactNode) => <>
- {item.task ? : }
+ const rowClassName = "design-sidebar-item design-sidebar-pinned-item";
+ const row = (primary: ReactNode, handle: ReactNode) =>
+ {primary}
+ className="absolute right-10 top-1/2 flex size-7 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-sidebar-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:opacity-100">
{handle}
- >;
- return
- {handle => item.project ? {row(handle)} : row(handle)}
+ ;
+ return
+ {handle => {
+ if (item.project) {
+ return row(toggle, handle)} />;
+ }
+ const link = { to: item.to, label: item.label, iconNode: item.icon, className: rowClassName };
+ return row(item.task ? : , handle);
+ }}
;
}
diff --git a/ui/src/components/SidebarProjectTasks.tsx b/ui/src/components/SidebarProjectTasks.tsx
index 102fe1d6f71..5ce670917d1 100644
--- a/ui/src/components/SidebarProjectTasks.tsx
+++ b/ui/src/components/SidebarProjectTasks.tsx
@@ -1,18 +1,20 @@
import { useId, useState, type ReactNode } from "react";
import { useQuery } from "@tanstack/react-query";
-import { ChevronRight } from "lucide-react";
+import { Folder, FolderOpen } from "lucide-react";
import type { Issue, Project } from "@paperclipai/shared";
import { issuesApi } from "@/api/issues";
import { queryKeys } from "@/lib/queryKeys";
import { cn } from "@/lib/utils";
import { taskStatusIconProps } from "@/lib/task-status-presentation";
import { RecentTaskNavItem } from "./RecentTaskNavItem";
+import { TruncatedText } from "./TruncatedText";
import { StatusIcon } from "./StatusIcon";
-export function SidebarProjectTasks({ project, userId, children, renderTask }: {
+export function SidebarProjectTasks({ project, userId, renderRow, className, renderTask }: {
project: Pick;
userId?: string | null;
- children: ReactNode;
+ renderRow: (toggle: ReactNode) => ReactNode;
+ className?: string;
renderTask?: (task: Issue) => ReactNode;
}) {
const [expanded, setExpanded] = useState(false);
@@ -24,16 +26,21 @@ export function SidebarProjectTasks({ project, userId, children, renderTask }: {
}, { signal }),
enabled: expanded,
});
- return
-
-
{children}
-