The best way to control Claude Code, Codex and more from any computer or phone
fix(ci): a change to the T3 Connect troubleshooting guide runs the server test that reads it (#28273)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Victor Vogel committed
Oct 31, 2026 at 21:50 UTC
906156b4e5f78704c4fc57888c3b166672382d37
3 files changed
+24
-2
.github/scripts/ci-changes.cjs
+4
-2
@@ -27,6 +27,8 @@ const EXTRA_OWNERS = [
27
[/^native\/browser-secret\//, ["@t3tools/desktop"]],
28
[/^native\/kde-snap-shot\//, ["@t3tools/desktop"]],
29
[/^native\/libghostty-vt\//, ["@t3tools/web"]],
30
+ // apps/server/src/cloud/ConnectReachability.test.ts checks the guide's headings.
31
+ [/^docs\/user\/t3-connect-troubleshooting\.md$/, ["t3"]],
32
];
33
const RUST = /^native\/(resource-monitor|kde-snap-shot|hyprland-snap-shot)\//;
34
@@ -92,11 +94,11 @@ function readWorkspace() {
94
95
// [] means inert; null means unknown and requires every job.
96
function ownersOf(file, packages) {
95
- if (INERT.some((pattern) => pattern.test(file))) return [];
97
+ const extra = EXTRA_OWNERS.flatMap(([pattern, names]) => (pattern.test(file) ? names : []));
98
+ if (INERT.some((pattern) => pattern.test(file))) return extra;
99
// A manifest can change dependencies or versions other packages read.
100
if (path.posix.basename(file) === "package.json") return null;
101
if (RUNS_EVERYTHING.some((pattern) => pattern.test(file))) return null;
99
- const extra = EXTRA_OWNERS.flatMap(([pattern, names]) => (pattern.test(file) ? names : []));
102
// scripts/build-desktop-artifact.test.ts reads the crates' sources.
103
if (RUST.test(file)) return ["@t3tools/scripts", ...extra];
104
scripts/check-changed.test.ts
+13
@@ -17,10 +17,12 @@ import * as TestClock from "effect/testing/TestClock";
17
import {
18
comparisonBase,
19
defaultConcurrency,
20
+ docReaderTests,
21
gitLines,
22
runSteps,
23
type Step,
24
} from "./check-changed.ts";
25
+import { decide, readWorkspace } from "../.github/scripts/ci-changes.cjs";
26
27
const GiB = 1024 ** 3;
28
@@ -33,6 +35,17 @@ describe("check:changed", () => {
35
assert.strictEqual(defaultConcurrency(1, 64 * GiB), 1);
36
});
37
38
+ it("runs the server tests for the one guide they read and leaves other docs inert", () => {
39
+ const packages = readWorkspace();
40
+ assert.isTrue(
41
+ decide(["docs/user/t3-connect-troubleshooting.md"], packages, false).outputs.test_server,
42
+ );
43
+ assert.deepStrictEqual(docReaderTests(["docs/user/t3-connect-troubleshooting.md"]), [
44
+ "apps/server/src/cloud/ConnectReachability.test.ts",
45
+ ]);
46
+ assert.deepStrictEqual(decide(["docs/user/install.md"], packages, false).affected, []);
47
+ });
48
+
49
it.effect(
50
"keeps weighted steps within the budget, in order, and serial steps one at a time",
51
() =>
scripts/check-changed.ts
+7
@@ -190,6 +190,12 @@ const override = Effect.fn("checkChanged.override")(function* (
190
return value;
191
});
192
193
+// Tests that read a doc; a changed doc has no test beside it to select them.
194
+export const docReaderTests = (files: ReadonlyArray<string>) =>
195
+ files.includes("docs/user/t3-connect-troubleshooting.md")
196
+ ? ["apps/server/src/cloud/ConnectReachability.test.ts"]
197
+ : [];
198
+
199
const checkChanged = Effect.fn("checkChanged")(function* (input: {
200
readonly ref: Option.Option<string>;
201
readonly concurrency: Option.Option<number>;
@@ -309,6 +315,7 @@ const checkChanged = Effect.fn("checkChanged")(function* (input: {
315
if (entry.startsWith(prefix) && TEST.test(entry)) tests.add(path.join(dir, entry));
316
}
317
}
318
+ for (const test of docReaderTests(files)) tests.add(test);
319
// It reads files other than the ones beside it, so no changed file selects it.
320
if (affected.includes("t3")) tests.add("apps/server/src/provider/AgentContextBudget.test.ts");
321