Skip to content

Commit 300b0ad

Browse files
committed
Merge release/native-0.1.10 into the delivery-class branch.
Keep the digest wrapper around the seen marker, and keep the shared-sender prefix inside that marker. Model: grok-4.7 Task: fix Agent: Gardening
2 parents bb64bee + 1095e66 commit 300b0ad

112 files changed

Lines changed: 4918 additions & 385 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/test-t3-app/references/feature-map.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Code: apps/web/src/components/sidebar/
3737
- **sidebar.working-section** — collapsed "Working" section for threads busy with background work. Turn off in **Settings → General → Working section**.
3838
- **sidebar.snoozed-shelf** — "Snoozed" threads, hidden until their wake time.
3939
- **sidebar.settled-shelf** — "Settled" finished threads. Drag a thread onto the header to settle it.
40-
- **sidebar.bots-group** — "Bots" group for standing bot threads.
40+
- **sidebar.bots-group** — "My Bots" and "Shared Bots" groups for standing bot threads. Shared bots are the ones filed to the Shared inbox.
4141
- **sidebar.project-folder** — per-project folders when **Settings → Labs → Boring sidebar (group by project)** is on; "Pin project" / "Unpin project", "Project settings".
4242
- **sidebar.thread-row** — one thread: title, status, PR badge, hover actions. Click opens `/$environmentId/$threadId`. Drop files on it to attach them.
4343
- **sidebar.thread-status** — row status labels: "Working", "Waiting", "Needs you", "Needs action", "Usage limit reached", "Failed", "Woke", "Unsent draft".
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Provide Chromium libraries
2+
description: Make the shared libraries Playwright's Chromium shell needs available without root.
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Provide Chromium libraries for the voice latency browser test
7+
shell: bash
8+
run: |
9+
set -euo pipefail
10+
if test -e /usr/lib/x86_64-linux-gnu/libnspr4.so; then
11+
printf 'Chromium libraries present\n'
12+
exit 0
13+
fi
14+
dir="$RUNNER_TEMP/chromium-libs"
15+
mkdir -p "$dir/lists/partial" "$dir/cache/archives/partial" "$dir/root"
16+
apt_opts=(-o Debug::NoLocking=1 -o Dir::State::Lists="$dir/lists" -o Dir::Cache="$dir/cache")
17+
apt-get "${apt_opts[@]}" -qq update
18+
apt-get "${apt_opts[@]}" -qq install --download-only --no-install-recommends -y \
19+
libasound2t64 libatk-bridge2.0-0t64 libatk1.0-0t64 libatspi2.0-0t64 libcairo2 \
20+
libcups2t64 libdbus-1-3 libdrm2 libgbm1 libglib2.0-0t64 libnspr4 libnss3 \
21+
libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 \
22+
libxkbcommon0 libxrandr2
23+
for deb in "$dir"/cache/archives/*.deb; do dpkg-deb -x "$deb" "$dir/root"; done
24+
lib_dir="$dir/root/usr/lib/x86_64-linux-gnu"
25+
test -f "$lib_dir/libnspr4.so"
26+
printf 'LD_LIBRARY_PATH=%s\n' "$lib_dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Provide libatomic
2+
description: Make libatomic.so.1 available to official Node binaries without root.
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Provide libatomic for official Node binaries
7+
shell: bash
8+
run: |
9+
set -euo pipefail
10+
# Official Node 26 linux-x64 binaries link libatomic.so.1. The pinned
11+
# actions-runner image (dotnet runtime-deps:8.0-noble) lacks it, and
12+
# the ARC pod cannot use sudo/apt (no privilege escalation). Without
13+
# it, Vite+ self-setup fails with exit 127. Use Ubuntu noble's
14+
# immutable release-pocket package, pinned by SHA-256.
15+
lib_system=/usr/lib/x86_64-linux-gnu/libatomic.so.1
16+
if test -e "$lib_system"; then
17+
printf 'libatomic present at %s\n' "$lib_system"
18+
exit 0
19+
fi
20+
test "$(uname -m)" = x86_64
21+
deb_url='https://archive.ubuntu.com/ubuntu/pool/main/g/gcc-14/libatomic1_14-20240412-0ubuntu1_amd64.deb'
22+
deb_sha256='f496d80626e1512456273965d44f47b281edf53fa26d0d8bd0defc5be7e4601c'
23+
dir="$RUNNER_TEMP/libatomic"
24+
mkdir -p "$dir"
25+
curl -fsSL --connect-timeout 10 --max-time 120 -o "$dir/libatomic1.deb" "$deb_url"
26+
printf '%s %s\n' "$deb_sha256" "$dir/libatomic1.deb" | sha256sum -c -
27+
dpkg-deb -x "$dir/libatomic1.deb" "$dir/root"
28+
lib_dir="$dir/root/usr/lib/x86_64-linux-gnu"
29+
test -f "$lib_dir/libatomic.so.1"
30+
printf 'LD_LIBRARY_PATH=%s\n' "$lib_dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"

‎.github/actions/setup-ci-deps/action.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,18 @@ runs:
131131
# default, saves a ~1 GB store only its own reruns can read, so it only restores.
132132
# Concurrent jobs with the same install args reserve one key, so the losers
133133
# compress the store for nothing; all but one pass save-pnpm-store: false.
134+
#
135+
# A pull_request cache is scoped to that PR, so only the push to the default
136+
# branch writes the store later runs share. This fork's default branch is
137+
# `release/native-0.1.10`, so that push writes it and a PR into it reads it.
138+
# A push to `feat/assemblyai-current` writes a store only that branch's own
139+
# runs can read, which is the same scoping the action already gives any
140+
# non-default branch.
134141
- name: Save pnpm store
135142
if: >-
136143
inputs.install == 'true' && inputs.save-pnpm-store == 'true' &&
137-
(github.event_name != 'pull_request' || github.base_ref == github.event.repository.default_branch) &&
144+
(github.event_name != 'pull_request' ||
145+
github.base_ref == github.event.repository.default_branch) &&
138146
steps.pnpm_cache.outputs.cache-hit != 'true' &&
139147
(steps.pnpm_store.outputs.namespace == 'full' ||
140148
steps.pnpm_cache.outputs.cache-matched-key != format('pnpm-full-v1-{0}-{1}-{2}', runner.os, runner.arch, hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', 'package.json')))
Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
const fs = require("node:fs");
2+
const path = require("node:path");
3+
4+
const WORKFLOW = ".github/workflows/closura-arc-ci.yml";
5+
const REQUIRED_CHECK = "Voice + founder inbox (Linux ARC)";
6+
const WORKERS = ["voice-and-inbox-core", "voice-and-inbox-web", "voice-and-inbox-mobile"];
7+
8+
// Every test the single serial job ran before the split. A parallel job that
9+
// drops one of these makes the required check pass without running it.
10+
const REQUIRED_TESTS = [
11+
"apps/server/src/speech/CloudSpeech.test.ts",
12+
"apps/server/src/speech/GroqSpeechStream.test.ts",
13+
"apps/server/src/speech/stream.test.ts",
14+
"packages/contracts/src/threadInbox.test.ts",
15+
"packages/contracts/src/threadInbox.invariants.test.ts",
16+
"packages/contracts/src/threadInbox.upgrade.test.ts",
17+
"packages/contracts/src/threadMetadataMcp.test.ts",
18+
"apps/web/src/components/threadActionMenu.logic.test.ts",
19+
"apps/web/src/components/sidebar/threadListFilter.logic.test.ts",
20+
"packages/client-runtime/src/state/threadAttribution.test.ts",
21+
"apps/server/src/orchestration-v2/ThreadLaunchService.test.ts",
22+
"apps/server/src/orchestration-v2/SubagentProjection.test.ts",
23+
"apps/server/src/orchestration-v2/ModelAlertReactor.test.ts",
24+
"apps/server/src/orchestration-v2/ThreadEventAlerts.test.ts",
25+
"apps/server/src/orchestration-v2/DelegatedCompletionDelivery.test.ts",
26+
"packages/shared/src/threadPlacement.test.ts",
27+
"apps/server/src/peer/RemoteDelegation.test.ts",
28+
"apps/server/src/mcp/OrchestratorMcpService.test.ts",
29+
"apps/server/src/cli/thread.test.ts",
30+
"apps/web/src/composerDraftStore.test.ts",
31+
"packages/client-runtime/src/voice-input/controller.test.ts",
32+
"apps/web/src/components/chat/composerSend.logic.test.ts",
33+
"apps/web/src/components/chat/chatViewSend.test.ts",
34+
"apps/web/src/components/chat/composerImagePersistence.test.ts",
35+
"apps/web/src/components/chat/draftPlacement.test.ts",
36+
"apps/web/src/components/chat/draftAttachmentUploads.test.ts",
37+
"apps/web/src/components/chat/draftUploadReconcile.test.ts",
38+
"apps/web/src/lib/attachmentUploadQueue.test.ts",
39+
"apps/server/src/ws.test.ts",
40+
"packages/contracts/src/environment.test.ts",
41+
"scripts/feature-map.test.ts",
42+
"apps/mobile/src/state/thread-placement.model.test.ts",
43+
"apps/mobile/src/state/threadOutboxDelivery.placement.test.ts",
44+
"apps/mobile/src/state/composer-attachment-uploads.test.ts",
45+
"apps/mobile/src/lib/composerAttachmentUploadQueue.test.ts",
46+
"apps/mobile/src/lib/attachmentUpload.test.ts",
47+
"apps/mobile/src/state/use-composer-drafts.test.ts",
48+
"apps/mobile/src/state/thread-outbox.test.ts",
49+
"apps/mobile/src/state/threadOutboxDelivery.permissions.test.ts",
50+
"apps/mobile/src/state/threadOutboxDelivery.test.ts",
51+
"apps/mobile/src/state/pending-thread-creation.test.ts",
52+
"apps/mobile/src/lib/projectThreadStartTurn.test.ts",
53+
"apps/mobile/src/features/threads/thread-route-state.test.ts",
54+
"apps/mobile/src/features/threads/new-task-flow-provider.test.tsx",
55+
"apps/mobile/src/features/home/pendingTaskRoute.test.tsx",
56+
"apps/mobile/src/features/threads/NewTaskDraftRouteScreen.test.tsx",
57+
"apps/web/src/speech/voiceInputLatency.browser.test.ts",
58+
"apps/web/src/speech/useEnvironmentSpeechInput.browser.test.tsx",
59+
];
60+
61+
function unquote(value) {
62+
const trimmed = value.trim();
63+
if (
64+
(trimmed.startsWith('"') && trimmed.endsWith('"')) ||
65+
(trimmed.startsWith("'") && trimmed.endsWith("'"))
66+
) {
67+
return trimmed.slice(1, -1);
68+
}
69+
return trimmed;
70+
}
71+
72+
// Workflow files are small and this only needs the step structure, so a flat
73+
// scan beats pulling in a YAML parser. It tracks job ids, job names, `needs`,
74+
// and the `run` / `working-directory` pairs inside each job's steps.
75+
function parseWorkflow(source) {
76+
const jobs = {};
77+
let current = null;
78+
let inRun = false;
79+
let runIndent = 0;
80+
let inTriggers = true;
81+
const lines = source.split("\n");
82+
for (const line of lines) {
83+
if (inRun) {
84+
const indent = line.match(/^\s*/)[0].length;
85+
if (line.trim() !== "" && indent <= runIndent) inRun = false;
86+
else {
87+
current.run.push(line.trim().replace(/\\$/, "").trim());
88+
continue;
89+
}
90+
}
91+
if (inTriggers) {
92+
if (line === "jobs:") inTriggers = false;
93+
continue;
94+
}
95+
const job = line.match(/^ {2}([\w-]+):\s*$/);
96+
if (job) {
97+
current = { id: job[1], name: null, needs: [], condition: null, steps: [] };
98+
jobs[current.id] = current;
99+
continue;
100+
}
101+
if (!current) continue;
102+
const condition = line.match(/^ {4}if:\s*(.+)$/);
103+
if (condition && current.condition === null && current.steps.length === 0) {
104+
current.condition = unquote(condition[1]);
105+
continue;
106+
}
107+
if (!current) continue;
108+
const name = line.match(/^ {4}name:\s*(.+)$/);
109+
if (name) {
110+
current.name = unquote(name[1]);
111+
continue;
112+
}
113+
const needs = line.match(/^ {4}needs:\s*\[([^\]]*)\]/);
114+
if (needs) {
115+
current.needs = needs[1]
116+
.split(",")
117+
.map((item) => unquote(item))
118+
.filter(Boolean);
119+
continue;
120+
}
121+
const directory = line.match(/^ {8}working-directory:\s*(.+)$/);
122+
if (directory) {
123+
current.directory = unquote(directory[1]);
124+
continue;
125+
}
126+
const run = line.match(/^ {8}run:\s*(\||>)?\s*$/);
127+
if (run) {
128+
const step = { directory: current.directory ?? "", run: [] };
129+
current.steps.push(step);
130+
current.run = step.run;
131+
current.directory = "";
132+
inRun = true;
133+
runIndent = 8;
134+
}
135+
}
136+
return jobs;
137+
}
138+
139+
// A test path only counts when a worker actually invokes it. A path that only
140+
// appears inside a comment or a branch that never runs would otherwise let the
141+
// guard pass while the required check runs nothing.
142+
function testsIn(job) {
143+
const found = [];
144+
for (const step of job.steps) {
145+
const prefix = step.directory ? `${step.directory}/` : "";
146+
let skipping = false;
147+
for (const line of step.run) {
148+
if (/^(?:if\s+false\b|exit\b)/.test(line)) skipping = true;
149+
else if (skipping && /^(?:fi|else|elif)\b/.test(line)) skipping = false;
150+
if (skipping || line.startsWith("#")) continue;
151+
if (/^[\w./-]+\.(ts|tsx)$/.test(line)) found.push(prefix + line);
152+
}
153+
}
154+
return found;
155+
}
156+
157+
function jobBody(source, id) {
158+
const marker = `\n ${id}:`;
159+
const start = source.indexOf(marker);
160+
if (start < 0) return "";
161+
const rest = source.slice(start + marker.length);
162+
const next = rest.search(/\n {2}[\w-]+:\s*\n/);
163+
return next < 0 ? rest : rest.slice(0, next);
164+
}
165+
166+
function checkCoverage(source) {
167+
const jobs = parseWorkflow(source);
168+
const problems = [];
169+
const aggregator = jobs["voice-and-inbox"];
170+
if (!aggregator) problems.push("missing voice-and-inbox job");
171+
else {
172+
if (aggregator.name !== REQUIRED_CHECK) {
173+
problems.push(`required check is named ${JSON.stringify(aggregator.name)}`);
174+
}
175+
const needs = [...aggregator.needs].sort();
176+
if (needs.join() !== [...WORKERS].sort().join()) {
177+
problems.push(`aggregator needs ${needs.join(", ") || "nothing"}`);
178+
}
179+
// `always()` is true for a cancelled run, and a worker that never started
180+
// reports success, so the required check would pass with nothing tested.
181+
if (!aggregator.condition || !aggregator.condition.includes("!cancelled()")) {
182+
problems.push("aggregator runs when the workflow is cancelled");
183+
}
184+
// The ARC image has no node on PATH. setup-node downloads an official
185+
// Node 26 binary that needs libatomic, so both have to run first.
186+
const body = jobBody(source, "voice-and-inbox");
187+
const libatomic = body.indexOf("uses: ./.github/actions/provide-libatomic");
188+
const setupNode = body.indexOf("uses: actions/setup-node@");
189+
const guard = body.indexOf("run: node .github/scripts/arc-ci-coverage.cjs");
190+
if (
191+
libatomic < 0 ||
192+
setupNode < 0 ||
193+
guard < 0 ||
194+
!(libatomic < setupNode && setupNode < guard)
195+
) {
196+
problems.push("coverage guard runs before Node is on PATH");
197+
}
198+
}
199+
const ran = [];
200+
for (const id of WORKERS) {
201+
if (!jobs[id]) {
202+
problems.push(`missing worker ${id}`);
203+
continue;
204+
}
205+
ran.push(...testsIn(jobs[id]));
206+
}
207+
const ranSet = new Set(ran);
208+
for (const test of REQUIRED_TESTS) {
209+
if (!ranSet.has(test)) problems.push(`no worker runs ${test}`);
210+
}
211+
const duplicates = ran.filter((test, index) => ran.indexOf(test) !== index);
212+
for (const test of new Set(duplicates)) problems.push(`run twice: ${test}`);
213+
return problems;
214+
}
215+
216+
module.exports = { REQUIRED_CHECK, REQUIRED_TESTS, WORKERS, checkCoverage, parseWorkflow };
217+
218+
if (require.main === module) {
219+
const root = process.argv[2] ?? process.cwd();
220+
const source = fs.readFileSync(path.join(root, WORKFLOW), "utf8");
221+
const problems = checkCoverage(source);
222+
if (problems.length > 0) {
223+
for (const problem of problems) process.stderr.write(`${problem}\n`);
224+
process.exit(1);
225+
}
226+
process.stdout.write(
227+
`${REQUIRED_CHECK} covers ${REQUIRED_TESTS.length} tests across ${WORKERS.length} workers\n`,
228+
);
229+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
const assert = require("node:assert/strict");
2+
const fs = require("node:fs");
3+
const path = require("node:path");
4+
const test = require("node:test");
5+
const { REQUIRED_TESTS, checkCoverage } = require("./arc-ci-coverage.cjs");
6+
7+
const root = path.resolve(__dirname, "../..");
8+
const workflow = fs.readFileSync(
9+
path.join(root, ".github/workflows/closura-arc-ci.yml"),
10+
"utf8",
11+
);
12+
13+
test("the parallel workers cover every test the serial job ran", () => {
14+
assert.deepEqual(checkCoverage(workflow), []);
15+
});
16+
17+
test("renaming the aggregator or dropping a test fails the check", () => {
18+
const renamed = workflow.replace(
19+
"name: Voice + founder inbox (Linux ARC)",
20+
"name: Voice and inbox",
21+
);
22+
assert.ok(checkCoverage(renamed).some((problem) => problem.startsWith("required check")));
23+
24+
const dropped = workflow.replace(` ${REQUIRED_TESTS[0]} \\\n`, "");
25+
assert.ok(checkCoverage(dropped).some((problem) => problem.includes(REQUIRED_TESTS[0])));
26+
});
27+
28+
test("a test that only appears in dead code does not count as run", () => {
29+
const buried = workflow.replace(
30+
` ${REQUIRED_TESTS[0]} \\\n`,
31+
` if false; then echo ${REQUIRED_TESTS[0]}; fi\n`,
32+
);
33+
assert.ok(checkCoverage(buried).some((problem) => problem.includes(REQUIRED_TESTS[0])));
34+
});
35+
36+
test("the coverage guard refuses to run before Node is on PATH", () => {
37+
const withoutNode = workflow.replace(
38+
/ {6}- name: Provide libatomic for official Node binaries\n {8}uses: \.\/\.github\/actions\/provide-libatomic\n\n {6}- name: Setup Node\n {8}uses: actions\/setup-node@\S+ # v6\.5\.0\n {8}with:\n {10}node-version-file: package\.json\n\n/,
39+
"",
40+
);
41+
assert.notEqual(withoutNode, workflow);
42+
assert.ok(
43+
checkCoverage(withoutNode).some((problem) => problem.includes("Node is on PATH")),
44+
);
45+
});
46+
47+
test("an aggregator that runs on cancellation fails the check", () => {
48+
const always = workflow.replace("if: ${{ !cancelled() }}", "if: always()");
49+
assert.ok(
50+
checkCoverage(always).some((problem) => problem.includes("cancelled")),
51+
);
52+
});

0 commit comments

Comments
 (0)