@zgeoff/chex 0.8.8 → 0.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -61,6 +61,7 @@ Run these repo checks on the branch, the pushed commits and the repo's config:
61
61
  | `workflows` | nothing: it prints each fault of the shared workflow lint, and in a repo that calls the shared `checks.yml` each break of the [ci-design](https://github.com/zgeoff/skills/blob/main/skills/ci-design/SKILL.md) rules, and fails when there is one |
62
62
  | `dependency-gates` | a stale age-gate exclude, an override or an audit ignore that nothing needs, a first-party package with no age-gate exclude, or a pinned release younger than the age gate ([details](../../docs/architecture/dependency-updates.md#the-dependency-gates-check)) | none |
63
63
  | `uncommitted` | a file the branch changes that has an uncommitted edit, which the push does not send | none |
64
+ | `typecheck` | the repo's `typecheck` script, which it runs only over the packages the branch changes and the packages that depend on them, or over the whole repo when it cannot narrow the run, and skips when the branch changes no file a typecheck reads ([details](../../docs/architecture/pre-push-baseline.md#the-type-check)) | none |
64
65
  | `pr-body` | a PR description with a heading, a label or a code block that the [PR template](../../.github/PULL_REQUEST_TEMPLATE.md) doesn't allow, or a Deslop or Cold read line with a commit hash the branch lacks or a later doc change outdates ([details](../../docs/architecture/pr-body-check.md)) | `--body-file`, then `--base` and `--head` for the commit checks |
65
66
 
66
67
  With no path, `prose` and `links` read every README outside `.claude/` and `.agents/`, every file
@@ -95,6 +96,5 @@ extends:
95
96
  - node_modules/@zgeoff/chex/lefthook.yml
96
97
  ```
97
98
 
98
- The baseline's jobs, which [its doc](../../docs/architecture/pre-push-baseline.md) describes, call
99
- `chex <check>`, `bun run check:docs`, `rig related` and the repo's own `format:check` and
100
- `typecheck` scripts.
99
+ The baseline's jobs, which [its doc](../../docs/architecture/pre-push-baseline.md) lists, call chex,
100
+ rig, the linters and the repo's `format:check`, `typecheck` and `check:docs` scripts.
package/lefthook.yml CHANGED
@@ -3,8 +3,9 @@
3
3
  # extends:
4
4
  # - node_modules/@zgeoff/chex/lefthook.yml
5
5
  #
6
- # It checks what the branch changes, plus the whole-tree gates that fit a
7
- # small host: format:check and typecheck. CI runs every whole-tree check. It
6
+ # It checks what the branch changes, plus format:check over the whole tree,
7
+ # which fits a small host. CI runs every whole-tree check, the typecheck and
8
+ # the dependency gates among them. It
8
9
  # adds no job before a commit, so a commit costs only the repo's own jobs, such
9
10
  # as its staged-file fixers. A repo adds its own jobs under pre-commit.jobs and pre-push.jobs in
10
11
  # lefthook.yml; the pre-push ones run before these.
@@ -145,10 +146,13 @@ pre-push:
145
146
  run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex test-timeouts'
146
147
  - name: chex-lint-overrides
147
148
  run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex lint-overrides'
148
- - name: chex-dependency-gates
149
- run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex dependency-gates'
149
+ # chex typecheck reads the files the branch changes or deletes. It skips
150
+ # when none is a file a typecheck reads, and in a repo whose typecheck
151
+ # script runs turbo it narrows turbo to the changed packages and their
152
+ # dependents. A change that every package reads, and a repo it cannot
153
+ # narrow, run the whole typecheck script.
150
154
  - name: chex-typecheck
151
- run: '{clear-git-env} bun x --no-install diet -- bun run typecheck'
155
+ run: '{clear-git-env} bun x --no-install diet -- bun x --no-install chex typecheck'
152
156
  # A bunfig.toml reaches the job too, because rig related runs a spread
153
157
  # of the tests under a changed bunfig.
154
158
  - name: chex-test
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/chex",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
4
4
  "description": "Run each shared docs and repo check as one subcommand, with the lefthook pre-push baseline that calls them",
5
5
  "keywords": [
6
6
  "checks",
@@ -79,17 +79,17 @@
79
79
  "typecheck": "tsrs --fast"
80
80
  },
81
81
  "dependencies": {
82
- "@zgeoff/std": "0.8.1",
82
+ "@zgeoff/std": "0.8.2",
83
83
  "oxc-parser": "0.160.0",
84
84
  "ts-pattern": "5.9.2",
85
85
  "yaml": "2.9.1"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@types/bun": "1.4.4",
89
- "@zgeoff/oxlint-config": "0.15.4",
90
- "@zgeoff/rig": "0.3.10",
91
- "@zgeoff/std": "0.8.1",
92
- "@zgeoff/testing": "0.5.4",
89
+ "@zgeoff/oxlint-config": "0.15.5",
90
+ "@zgeoff/rig": "0.3.11",
91
+ "@zgeoff/std": "0.8.2",
92
+ "@zgeoff/testing": "0.5.5",
93
93
  "@zgeoff/tools-scripts": "0.0.0",
94
94
  "msw": "3.0.4",
95
95
  "tiny-invariant": "1.3.3",
@@ -11,6 +11,7 @@ export const checkNames = [
11
11
  'workflows',
12
12
  'dependency-gates',
13
13
  'uncommitted',
14
+ 'typecheck',
14
15
  'pr-body',
15
16
  ] as const;
16
17
 
package/src/cli.ts CHANGED
@@ -15,6 +15,7 @@ import { writeTextFile } from './output/write-text-file.ts';
15
15
  import { runPrBodyCheck } from './pr-body/run-pr-body-check.ts';
16
16
  import { runTestLayoutCommand } from './test-layout/run-test-layout-check.ts';
17
17
  import { runTestTimeoutsCommand } from './test-timeouts/run-test-timeouts-check.ts';
18
+ import { runTypecheckCommand } from './typecheck/run-typecheck-check.ts';
18
19
  import { runUncommittedCommand } from './uncommitted/run-uncommitted-check.ts';
19
20
  import { runWorkflowsCommand } from './workflows/run-workflows-check.ts';
20
21
 
@@ -31,6 +32,7 @@ process.exitCode = await runChex(process.argv.slice(2), {
31
32
  workflows: runWorkflowsCommand,
32
33
  'dependency-gates': runDependencyGatesCommand,
33
34
  uncommitted: runUncommittedCommand,
35
+ typecheck: runTypecheckCommand,
34
36
  'pr-body': runPrBodyCheck,
35
37
  },
36
38
  }),
@@ -0,0 +1,172 @@
1
+ import { basename } from 'node:path';
2
+ import { match } from 'ts-pattern';
3
+
4
+ export interface WorkspacePackage {
5
+ readonly name: string;
6
+
7
+ // Relative to the repo root, with no trailing slash.
8
+ readonly path: string;
9
+ }
10
+
11
+ // How the repo could narrow its typecheck: through turbo, or not at all.
12
+ export type TypecheckScope =
13
+ | { readonly kind: 'none'; readonly reason: string }
14
+ | { readonly kind: 'turbo'; readonly packages: readonly WorkspacePackage[] };
15
+
16
+ // The files the branch changes or deletes, or why chex cannot read them.
17
+ export type BranchFiles =
18
+ | { readonly kind: 'read'; readonly files: readonly string[] }
19
+ | { readonly kind: 'unread'; readonly reason: string };
20
+
21
+ export interface TypecheckPlanInput {
22
+ readonly branchFiles: BranchFiles;
23
+
24
+ // The repo's typecheck script, or null when package.json has none.
25
+ readonly script: string | null;
26
+
27
+ readonly scope: TypecheckScope;
28
+
29
+ // The globalDependencies globs of the turbo config, relative to the repo root; empty without a
30
+ // config, and null for a config chex cannot read, where any changed file could be one.
31
+ readonly globalDependencies: readonly string[] | null;
32
+ }
33
+
34
+ export type TypecheckPlan =
35
+ | { readonly kind: 'skip'; readonly reason: string }
36
+ | { readonly kind: 'whole'; readonly reason: string }
37
+ | {
38
+ readonly kind: 'scoped';
39
+ readonly packageNames: readonly string[];
40
+
41
+ // The repo's typecheck script with a turbo filter for each package and its dependents.
42
+ readonly command: string;
43
+ };
44
+
45
+ // Never skips when it cannot tell: an unread branch, a repo it cannot narrow or a change that
46
+ // every package reads all run the whole typecheck.
47
+ export function pickTypecheckPlan(input: Readonly<TypecheckPlanInput>): TypecheckPlan {
48
+ return match(input.branchFiles)
49
+ .with({ kind: 'unread' }, (unread): TypecheckPlan => ({ kind: 'whole', reason: unread.reason }))
50
+ .with({ kind: 'read' }, (read) => pickBranchPlan(input, read.files))
51
+ .exhaustive();
52
+ }
53
+
54
+ function pickBranchPlan(
55
+ input: Readonly<TypecheckPlanInput>,
56
+ files: readonly string[],
57
+ ): TypecheckPlan {
58
+ if (input.globalDependencies === null) {
59
+ return files.length === 0
60
+ ? { kind: 'skip', reason: 'the branch changes no file' }
61
+ : { kind: 'whole', reason: "chex cannot read the turbo config's globalDependencies" };
62
+ }
63
+
64
+ const globalDependencies = input.globalDependencies;
65
+ const globalFiles = files.filter((file) => isGlobalDependency(file, globalDependencies));
66
+ const typeFiles = files.filter((file) => isTypeFile(file));
67
+
68
+ if (globalFiles.length === 0 && typeFiles.length === 0) {
69
+ return { kind: 'skip', reason: 'the branch changes no file that a typecheck reads' };
70
+ }
71
+
72
+ return match(input.scope)
73
+ .with({ kind: 'none' }, (scope): TypecheckPlan => ({ kind: 'whole', reason: scope.reason }))
74
+ .with({ kind: 'turbo' }, (scope) => pickTurboPlan(input.script, scope, globalFiles, typeFiles))
75
+ .exhaustive();
76
+ }
77
+
78
+ // turbo reads a leading ./ as the repo root, and a ! entry takes files back out, as in its docs.
79
+ function isGlobalDependency(file: string, globalDependencies: readonly string[]): boolean {
80
+ const included = globalDependencies.filter((pattern) => !pattern.startsWith('!'));
81
+ const excluded = globalDependencies.filter((pattern) => pattern.startsWith('!'));
82
+
83
+ return (
84
+ included.some((pattern) => toTurboGlob(pattern).match(file)) &&
85
+ !excluded.some((pattern) => toTurboGlob(pattern.slice(1)).match(file))
86
+ );
87
+ }
88
+
89
+ function toTurboGlob(pattern: string): InstanceType<typeof Bun.Glob> {
90
+ return new Bun.Glob(pattern.replace(/^\.\//u, ''));
91
+ }
92
+
93
+ // A file that a typecheck can read: code, JSON such as a tsconfig or an imported file, or a
94
+ // lockfile, which decides the version of each package's types.
95
+ const typeFilePattern = /\.(?:[cm]?[jt]sx?|json[c5]?)$/u;
96
+
97
+ const lockfileNames = new Set([
98
+ 'bun.lock',
99
+ 'bun.lockb',
100
+ 'package-lock.json',
101
+ 'pnpm-lock.yaml',
102
+ 'pnpm-workspace.yaml',
103
+ 'yarn.lock',
104
+ ]);
105
+
106
+ function isTypeFile(file: string): boolean {
107
+ return typeFilePattern.test(file) || lockfileNames.has(basename(file));
108
+ }
109
+
110
+ // sh splits words only on ASCII blanks, so a script with a character outside printable ASCII,
111
+ // such as a non-breaking space, runs whole rather than risk a filter in the wrong word.
112
+ const turboTypecheckPattern = /\bturbo run typecheck(?=$|[ \t\n;&|)])/gu;
113
+ const nonASCIIPattern = /[^\t\n\r -~]/u;
114
+
115
+ function pickTurboPlan(
116
+ script: string | null,
117
+ scope: Extract<TypecheckScope, { kind: 'turbo' }>,
118
+ globalFiles: readonly string[],
119
+ typeFiles: readonly string[],
120
+ ): TypecheckPlan {
121
+ const [globalFile] = globalFiles;
122
+
123
+ if (globalFile !== undefined) {
124
+ return {
125
+ kind: 'whole',
126
+ reason: `the branch changes ${globalFile}, which the turbo config lists in globalDependencies`,
127
+ };
128
+ }
129
+
130
+ const owners = typeFiles.map((file) => ({ file, owner: findOwner(file, scope.packages) }));
131
+ const rootFile = owners.find((entry) => entry.owner === null);
132
+
133
+ if (rootFile !== undefined) {
134
+ return {
135
+ kind: 'whole',
136
+ reason: `the branch changes ${rootFile.file}, which no workspace package holds`,
137
+ };
138
+ }
139
+
140
+ const turboCalls = script?.match(turboTypecheckPattern)?.length ?? 0;
141
+
142
+ if (script === null || turboCalls !== 1 || nonASCIIPattern.test(script)) {
143
+ return {
144
+ kind: 'whole',
145
+ reason: 'the typecheck script holds no single `turbo run typecheck` to narrow',
146
+ };
147
+ }
148
+
149
+ const packageNames = [
150
+ ...new Set(owners.flatMap((entry) => (entry.owner === null ? [] : [entry.owner.name]))),
151
+ ].toSorted();
152
+
153
+ const filters = packageNames.map((name) => `'--filter=...${name}'`).join(' ');
154
+
155
+ return {
156
+ kind: 'scoped',
157
+ packageNames,
158
+ command: script.replaceAll(turboTypecheckPattern, `turbo run typecheck ${filters}`),
159
+ };
160
+ }
161
+
162
+ // The package with the longest path that holds the file, so a package nested in another owns its
163
+ // own files.
164
+ function findOwner(file: string, packages: readonly WorkspacePackage[]): WorkspacePackage | null {
165
+ return packages
166
+ .filter((candidate) => file.startsWith(`${candidate.path}/`))
167
+ .reduce<WorkspacePackage | null>(
168
+ (longest, candidate) =>
169
+ longest === null || candidate.path.length > longest.path.length ? candidate : longest,
170
+ null,
171
+ );
172
+ }
@@ -0,0 +1,245 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { isRecord, readOptionalText } from '@zgeoff/std';
4
+ import { match } from 'ts-pattern';
5
+ import { readBranchFiles } from '../branch/read-branch-files.ts';
6
+ import type { RunProgram } from '../program/run-program.ts';
7
+ import { runProgram } from '../program/run-program.ts';
8
+ import type { BranchFiles, TypecheckScope, WorkspacePackage } from './pick-typecheck-plan.ts';
9
+ import { pickTypecheckPlan } from './pick-typecheck-plan.ts';
10
+
11
+ export interface TypecheckCheckOptions {
12
+ readonly cwd: string;
13
+ readonly env: Readonly<Record<string, string | undefined>>;
14
+ readonly runProgram: RunProgram;
15
+
16
+ // Returns undefined for a file that does not exist.
17
+ readonly readText: (path: string) => Promise<string | undefined>;
18
+
19
+ readonly probeFile: (path: string) => boolean;
20
+
21
+ // Runs a command with this process's output streams, and returns its exit code.
22
+ readonly runScript: (
23
+ argv: readonly string[],
24
+ env: Readonly<Record<string, string | undefined>>,
25
+ ) => Promise<number>;
26
+
27
+ readonly writeOutput: (text: string) => void;
28
+ }
29
+
30
+ // Returns the exit code of the typecheck it runs, and 0 when it skips.
31
+ export async function runTypecheckCheck(options: Readonly<TypecheckCheckOptions>): Promise<number> {
32
+ const scripts = await readPackageScripts(options);
33
+
34
+ const script = scripts['typecheck'] ?? null;
35
+
36
+ const globalDependencies = await readGlobalDependencies(options);
37
+
38
+ const plan = pickTypecheckPlan({
39
+ branchFiles: readTypecheckBranchFiles(options),
40
+ script,
41
+ scope: readTypecheckScope(options, scripts, globalDependencies),
42
+ globalDependencies,
43
+ });
44
+
45
+ return match(plan)
46
+ .with({ kind: 'skip' }, (skip) => {
47
+ options.writeOutput(`typecheck: skipped, because ${skip.reason}\n`);
48
+
49
+ return Promise.resolve(0);
50
+ })
51
+ .with({ kind: 'whole' }, (whole) => {
52
+ options.writeOutput(`typecheck: the whole repo, because ${whole.reason}\n`);
53
+
54
+ return options.runScript(['bun', 'run', 'typecheck'], options.env);
55
+ })
56
+ .with({ kind: 'scoped' }, (scoped) => {
57
+ options.writeOutput(
58
+ `typecheck: ${scoped.packageNames.join(', ')} and the packages that depend on them\n`,
59
+ );
60
+
61
+ // bun run puts the repo's node_modules/.bin on the PATH of a script, so this run does too.
62
+ const searchPath = [join(options.cwd, 'node_modules/.bin'), options.env['PATH']]
63
+ .filter((entry) => entry !== undefined && entry !== '')
64
+ .join(':');
65
+
66
+ return options.runScript(['sh', '-c', scoped.command], {
67
+ ...options.env,
68
+ PATH: searchPath,
69
+ });
70
+ })
71
+ .exhaustive();
72
+ }
73
+
74
+ async function readPackageScripts(
75
+ options: Readonly<TypecheckCheckOptions>,
76
+ ): Promise<Readonly<Record<string, string>>> {
77
+ const text = await options.readText(join(options.cwd, 'package.json'));
78
+
79
+ if (text === undefined) {
80
+ return {};
81
+ }
82
+
83
+ const manifest: unknown = JSON.parse(text);
84
+ const scripts = isRecord(manifest) ? manifest['scripts'] : undefined;
85
+
86
+ return isRecord(scripts)
87
+ ? Object.fromEntries(
88
+ Object.entries(scripts).flatMap(([name, body]) =>
89
+ typeof body === 'string' ? [[name, body]] : [],
90
+ ),
91
+ )
92
+ : {};
93
+ }
94
+
95
+ // turbo reads turbo.json, or turbo.jsonc when the repo has no turbo.json. Returns null for a
96
+ // config chex cannot read.
97
+ async function readGlobalDependencies(
98
+ options: Readonly<TypecheckCheckOptions>,
99
+ ): Promise<string[] | null> {
100
+ const text = await readTurboConfigText(options);
101
+
102
+ if (text === null) {
103
+ return null;
104
+ }
105
+
106
+ if (text === undefined) {
107
+ return [];
108
+ }
109
+
110
+ try {
111
+ const config: unknown = Bun.JSONC.parse(text);
112
+ const entries = isRecord(config) ? (config['globalDependencies'] ?? []) : null;
113
+
114
+ return Array.isArray(entries) && entries.every((entry) => typeof entry === 'string')
115
+ ? entries
116
+ : null;
117
+ } catch {
118
+ return null;
119
+ }
120
+ }
121
+
122
+ // A config chex cannot read, such as a folder named turbo.jsonc, returns null.
123
+ async function readTurboConfigText(
124
+ options: Readonly<TypecheckCheckOptions>,
125
+ ): Promise<string | undefined | null> {
126
+ try {
127
+ const json = await options.readText(join(options.cwd, 'turbo.json'));
128
+
129
+ if (json !== undefined) {
130
+ return json;
131
+ }
132
+
133
+ return await options.readText(join(options.cwd, 'turbo.jsonc'));
134
+ } catch {
135
+ return null;
136
+ }
137
+ }
138
+
139
+ // A deleted file can break the files that import it, so the list keeps deletions.
140
+ function readTypecheckBranchFiles(options: Readonly<TypecheckCheckOptions>): BranchFiles {
141
+ try {
142
+ return {
143
+ kind: 'read',
144
+ files: readBranchFiles({ ...options, withDeleted: true }),
145
+ };
146
+ } catch (error) {
147
+ return {
148
+ kind: 'unread',
149
+ reason: `chex cannot read the branch's files: ${error instanceof Error ? error.message : String(error)}`,
150
+ };
151
+ }
152
+ }
153
+
154
+ function readTypecheckScope(
155
+ options: Readonly<TypecheckCheckOptions>,
156
+ scripts: Readonly<Record<string, string>>,
157
+ globalDependencies: readonly string[] | null,
158
+ ): TypecheckScope {
159
+ if (!(scripts['typecheck'] ?? '').includes('turbo')) {
160
+ return { kind: 'none', reason: 'the typecheck script does not run turbo' };
161
+ }
162
+
163
+ // bun run typecheck runs these around the script, and a narrowed run calls the script itself.
164
+ if (scripts['pretypecheck'] !== undefined || scripts['posttypecheck'] !== undefined) {
165
+ return { kind: 'none', reason: 'the repo has a pretypecheck or posttypecheck script' };
166
+ }
167
+
168
+ const turboPath = join(options.cwd, 'node_modules/.bin/turbo');
169
+
170
+ if (!options.probeFile(turboPath)) {
171
+ return { kind: 'none', reason: 'turbo is not installed' };
172
+ }
173
+
174
+ if (globalDependencies === null) {
175
+ return { kind: 'none', reason: "chex cannot read the turbo config's globalDependencies" };
176
+ }
177
+
178
+ const packages = readTurboPackages(options, turboPath);
179
+
180
+ if (packages === null) {
181
+ return { kind: 'none', reason: 'turbo ls cannot list the workspace packages' };
182
+ }
183
+
184
+ if (packages.length < 2) {
185
+ return { kind: 'none', reason: 'the repo has one package' };
186
+ }
187
+
188
+ return { kind: 'turbo', packages };
189
+ }
190
+
191
+ function readTurboPackages(
192
+ options: Readonly<TypecheckCheckOptions>,
193
+ turboPath: string,
194
+ ): WorkspacePackage[] | null {
195
+ const result = options.runProgram([turboPath, 'ls', '--output=json'], {
196
+ cwd: options.cwd,
197
+ env: options.env,
198
+ });
199
+
200
+ if (result.exitCode !== 0) {
201
+ return null;
202
+ }
203
+
204
+ try {
205
+ const listing: unknown = JSON.parse(result.stdout);
206
+ const packages = isRecord(listing) ? listing['packages'] : undefined;
207
+ const items = isRecord(packages) ? packages['items'] : undefined;
208
+
209
+ if (!Array.isArray(items)) {
210
+ return null;
211
+ }
212
+
213
+ const parsed = items.flatMap((item: unknown) =>
214
+ isRecord(item) && typeof item['name'] === 'string' && typeof item['path'] === 'string'
215
+ ? [{ name: item['name'], path: item['path'].replace(/\/$/u, '') }]
216
+ : [],
217
+ );
218
+
219
+ return parsed.length === items.length ? parsed : null;
220
+ } catch {
221
+ return null;
222
+ }
223
+ }
224
+
225
+ // Returns the exit code: the typecheck's own, 0 when it skips, and 2 when it cannot run.
226
+ export async function runTypecheckCommand(): Promise<number> {
227
+ try {
228
+ return await runTypecheckCheck({
229
+ cwd: process.cwd(),
230
+ env: process.env,
231
+ runProgram,
232
+ readText: readOptionalText,
233
+ probeFile: existsSync,
234
+ runScript: (argv, env) =>
235
+ Bun.spawn([...argv], { env: { ...env }, stdio: ['inherit', 'inherit', 'inherit'] }).exited,
236
+ writeOutput: (text) => {
237
+ process.stdout.write(text);
238
+ },
239
+ });
240
+ } catch (error) {
241
+ process.stderr.write(`typecheck: ${error instanceof Error ? error.message : String(error)}\n`);
242
+
243
+ return 2;
244
+ }
245
+ }
@@ -94,8 +94,12 @@ function collectChecksFindings(
94
94
  },
95
95
  ];
96
96
 
97
+ // A main gate whose workflow-level group never cancels queues every run, so no job beside the
98
+ // release needs a cancelling group of its own: a newer run cancels nothing.
99
+ const isMainQueue = isMainGate(context) && isQueueGroup(workflowConcurrency);
100
+
97
101
  const jobFindings =
98
- deployJobs.length === 0
102
+ deployJobs.length === 0 || isMainQueue
99
103
  ? []
100
104
  : otherJobs
101
105
  .filter((job) => !isChecksGroup(context, findMember(job.definition, 'concurrency')))