@mark1russell7/conventions 0.49.4 → 0.50.0

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
@@ -34,6 +34,7 @@ Each break shows the file, the line, the rule and the fix. In GitHub Actions, th
34
34
  - `security-overrides`: the line of a shared override in `overrides` of `pnpm-workspace.yaml`, with a comment that names its advisories. The fix also removes a line whose parent is not in the lockfile. After the fix, start `pnpm install` and commit the lockfile.
35
35
  - `main-check`: a compare of `process.argv[1]` with the path of the script. The fix writes `import.meta.main` when each Node version of `engines.node` has it (`^22.18`, `>=24.2`). Else it writes a compare of the two real paths, and it adds the imports. It removes the imports that only the old compare used.
36
36
  - `gate-trigger`: a path filter on the pull request trigger of a gate. The fix removes the filter and adds a job `changes` with the same patterns. Each other job needs it and has an `if` on its match. A summary job `<Name> OK` with the action `gate-summary` needs each job. A job with its own `if`, and each job that needs such a job, can be skipped (`allow-skip`). Some workflows need a person, because the fix cannot convert them with certainty. Examples are a trigger in the flow form, an `if` of more than one line, and a job `changes` that already exists.
37
+ - `summary-job`: a gate workflow (`ci.yml`, `security.yml`) with a pull request trigger and no summary job. The fix adds a job `<Name> OK` with the action `gate-summary` after the last job. It needs each job. A job with its own `if`, and each job that needs such a job, can be skipped. A job that already has the id of the summary job needs a person. The fix leaves a caller of `reusable-security.yml` to `security-one-job`.
37
38
 
38
39
  The text output marks each break that has a fix. In the JSON output, such a break has `fixable: true`. The release train starts `conventions fix` in its update pull requests. Thus a break that a script can fix does not block a repository.
39
40
 
@@ -76,6 +77,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
76
77
  | `setup-cue` | No workflow or action installs the cue CLI with its own command (a download of a release asset of `cue-lang/cue`, or `go install`). A caller of `reusable-ci.yml` gives the input `cue-version`. Another job uses the action `setup-cue` of the template. The action installs the CLI from a cache, or with retries and a sha256 check. On 2026-11-08, a 504 of GitHub failed each bare `curl` of the CLI. |
77
78
  | `playwright-install` | No workflow, action or site config installs the Playwright browsers with its own command (`playwright install` or `install-deps`). A job step uses the action `setup-playwright` of the template. The build of `reusable-pages.yml` gives the key `playwright-browsers`. The action has a cache, a time limit and one more try. On 2026-11-11 the package mirror did not resolve, and each bare install of client and lag stopped in apt. The rule fails from 2026-12-01. | client run 43034026417, lag #113 and #115, template #315 (2026-11-11). |
78
79
  | `gate-trigger` | No workflow has `paths` or `paths-ignore` on `on.pull_request` or `on.pull_request_target`. The ruleset needs the summary check `<Name> OK` of each gate, and a workflow with a path filter does not start on each pull request. Then its check is not there, the ruleset cannot ask for it, and a pull request can merge before the gate ends. A gate uses the actions `changes` and `gate-summary` of the template (`CI.md`, "A gate with paths"). | private `gate-trigger` (a decision of 2026-11-02). |
80
+ | `summary-job` | Each gate workflow (`ci.yml`, `security.yml`) that starts on pull requests has one summary job `<Name> OK` that needs each of its jobs. The ruleset names only the summary checks. Without them, it must name each job: then it does not wait for a new job, and a renamed job blocks each pull request. On 2026-11-09, 21 of 43 public repositories had a gate with no summary job. | private `summary-job` (a decision of 2026-11-09). |
79
81
  | `license-file` | Each public package has a license field, and a license file with the same license in its own folder. A public repository, or a repository with a public package, has a license file at its root. In a GitHub Actions run, the event file tells if the repository is public, and the option `license` (MIT by default) is the license of a root with no public package. npm packs only the license file of the folder of the package, and GitHub reads only the one of the root: on 2026-11-02 five public repositories showed no license on GitHub while npm said MIT. `conventions fix` writes the missing files. | private strategy (2026-11-02). |
80
82
  | `coverage-provider` | When a workflow calls the shared CI and the CI starts the action `coverage`, each package whose test script starts Vitest has `@vitest/coverage-v8`. The provider has the range of `vitest`. The package or the root can hold both. On `main` of a public repository, the action skips a package with no provider, so the artifact `coverage` has no report of it. On 2026-11-09, 15 of 43 public repositories had no provider. `conventions fix` adds it at the range of `vitest`. A caller with `coverage-on-main: false` does not break. The rule fails from 2026-11-25. | template `packages/cli` (`package add`), ireko `packages/ireko/package.json`, codeatlas `packages/*/package.json`. |
81
83
  | `pack-no-buildinfo` | npm does not pack the build info file of tsc. The rule finds the file of each tsconfig of a public package after its `extends` chain. When `incremental` and `composite` are off, tsc writes no file. When an entry of `files` takes the file and no `!<path>` removes it, the rule breaks. A package with no field `files` packs each file, so it breaks too. The file changes on each build, and the release stops when the files of an unchanged version differ from npm. On 2026-11-09 this made the main of splay-react red. `conventions fix` adds the negation after its entry. A changed list of packed files needs a PATCH version. The rule fails from 2026-11-25. | splay-react `package.json` (1.0.2), splay `package.json`, cue `npm/package/ts.cue` (2.1.3). |
@@ -160,6 +162,7 @@ An unknown rule, an unknown option, or an exception or a changed option without
160
162
  | `runner-budget.minute` | `true` | When `false`, the rule does not examine the minute of the schedules. |
161
163
  | `runner-budget.grouped` | `["reusable-ai-review.yml", "reusable-codex-review.yml"]` | The shared workflows that give a concurrency group in each of their jobs. |
162
164
  | `gate-trigger.allow` | `[]` | The file names of the workflows that can filter pull requests by path, because they are not a gate (for example a preview). |
165
+ | `summary-job.gates` | `["ci.yml", "security.yml"]` | The file names of the gate workflows that must have a summary job. |
163
166
  | `push-main-only.branches` | `[]` | More branches that `on.push.branches` can name, for example a long-lived release branch. |
164
167
  | `home-module.scope` | `"change"` | `"change"`: only the lines that a pull request or `--base` adds. `"all"`: each line of each tracked file, for a sweep of the imports that exist. |
165
168
  | `home-package.scope` | `"change"` | `"change"`: only the lines that a pull request or `--base` adds. `"all"`: each line of each tracked file, for a sweep of the copies that exist. |
package/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { c as runCli } from "./run-CcAO5DRq.js";
2
+ import { c as runCli } from "./run-DNe9I3-M.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  // src/cli.ts
5
5
  try {
package/build/index.d.ts CHANGED
@@ -239,6 +239,22 @@ export declare function prPathFilters(text: string): PathFilter[];
239
239
  export declare const ACTIONS_COMMIT: string;
240
240
  /** This function gives the name of the summary check of a workflow: its name with "OK", in the form that ruleset-ci-ok.ts reads. */
241
241
  export declare function summaryName(workflowName: string): string;
242
+ /** A job with its own `if` can be skipped when the gate runs, and so can each job that needs such a job. */
243
+ export declare function skippableJobs(needsOf: ReadonlyMap<string, readonly string[]>, own: ReadonlySet<string>): Set<string>;
244
+ /** The parts of a summary job: its indents, its id and name, the jobs that it needs and the jobs that can be skipped. */
245
+ interface SummaryJob {
246
+ readonly jobIndent: string;
247
+ readonly unit: string;
248
+ readonly id: string;
249
+ readonly name: string;
250
+ readonly needs: readonly string[];
251
+ readonly allow: readonly string[];
252
+ /** True when the workflow has its own `concurrency`, so the job needs no group of its own. */
253
+ readonly grouped: boolean;
254
+ readonly commit: string;
255
+ }
256
+ /** This function gives the lines of a summary job `<Name> OK` with the action gate-summary, after one empty line. */
257
+ export declare function summaryJob(s: SummaryJob): string[];
242
258
  /**
243
259
  * This function converts a gate workflow with a path filter on its pull request trigger. The trigger loses the filter,
244
260
  * and a job `changes` gets the same patterns. Each other job needs it and runs only on a match. A summary job
@@ -276,6 +292,23 @@ export declare function withOneJob(text: string, commit?: string): {
276
292
  reason: string;
277
293
  };
278
294
  export declare const securityOneJob: Rule;
295
+ /** The gate workflows of the template: each one gives one summary check that the ruleset names. */
296
+ export declare const SUMMARY_GATES: readonly string[];
297
+ /** This function tells if a workflow starts on a pull request: `on: pull_request`, the flow form, or a key of the block. */
298
+ export declare function startsOnPullRequest(text: string): boolean;
299
+ /** This function tells if a workflow has a summary job: a job with a name that ends with ` OK`, or with the action gate-summary. */
300
+ export declare function hasSummaryJob(text: string): boolean;
301
+ /**
302
+ * This function adds a summary job `<Name> OK` with the action gate-summary at the end of the jobs. It needs each job.
303
+ * A job with its own `if`, and each job that needs one, can be skipped. The function gives the new text, or the reason
304
+ * why a person must add the job.
305
+ */
306
+ export declare function addSummaryJob(text: string, file: string, commit?: string): {
307
+ text: string;
308
+ } | {
309
+ reason: string;
310
+ };
311
+ export declare const summaryJobRule: Rule;
279
312
  export declare const setupCue: Rule;
280
313
  /** The shared workflows of the template, by file name. */
281
314
  export declare const SHARED_WORKFLOWS: readonly string[];
@@ -1113,5 +1146,5 @@ export declare function npmUrl(name: string, version: string): string;
1113
1146
  * link to npm. The Releases page of `site-pages` reads each list item as a change.
1114
1147
  */
1115
1148
  export declare function releaseNotes(name: string, version: string, changelog: string | undefined): string;
1116
- export { type Advisory, type AllowedHit, type AuditSource, type Break, type CheckOptions, type CheckResult, type CliIo, type ConventionsConfig, type Edit, type FixResult, type HiddenFailure, type Home, type HomeAnswer, type HomeFetch, type HomeModule, type HomeState, type HookOptions, type LinePlace, type Manifest, type Minor, type ModuleUse, type NameHit, type NameRule, type NpmDrift, type NpmDriftKind, type NpmPresence, OWNERS, type OptionSpec, type OptionValue, type Options, type Owner, type PackageInfo, type PagesCall, type ParsedJob, type ParsedStep, type ParsedWorkflow, type PathFilter, type PrePushArgs, type PrePushOptions, type PrivateNameList, type PrivatePattern, type PrivateSources, type RegistryAnswer, type RegistryLookup, type Rule, type RuleConfig, type RuleContext, type RuleOutcome, type RuleResult, type SecurityCaller, type TextBreakOptions, type Workflow, type WorkflowInput, type WorkflowJob, type WorkflowPermissions, type WorkflowStep, type YamlFault, globFolders, globToRegExp, isWorkspaceFolder, ownerOf, ownersOf, packageFolders, parseWorkspaceGlobs, sharedNames, workspaceGlobs };
1149
+ export { type Advisory, type AllowedHit, type AuditSource, type Break, type CheckOptions, type CheckResult, type CliIo, type ConventionsConfig, type Edit, type FixResult, type HiddenFailure, type Home, type HomeAnswer, type HomeFetch, type HomeModule, type HomeState, type HookOptions, type LinePlace, type Manifest, type Minor, type ModuleUse, type NameHit, type NameRule, type NpmDrift, type NpmDriftKind, type NpmPresence, OWNERS, type OptionSpec, type OptionValue, type Options, type Owner, type PackageInfo, type PagesCall, type ParsedJob, type ParsedStep, type ParsedWorkflow, type PathFilter, type PrePushArgs, type PrePushOptions, type PrivateNameList, type PrivatePattern, type PrivateSources, type RegistryAnswer, type RegistryLookup, type Rule, type RuleConfig, type RuleContext, type RuleOutcome, type RuleResult, type SecurityCaller, type SummaryJob, type TextBreakOptions, type Workflow, type WorkflowInput, type WorkflowJob, type WorkflowPermissions, type WorkflowStep, type YamlFault, globFolders, globToRegExp, isWorkspaceFolder, ownerOf, ownersOf, packageFolders, parseWorkspaceGlobs, sharedNames, workspaceGlobs };
1117
1150
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/workflow.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/home-exports.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;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N;;;;;WAKA;;;;;WAKA;;;;;WAKA;;WAEA;WACA,KAAK,SAAS;;WAEd;;WAEA,MAAM;;WAEN,YAAY;;;;;;;;;;;;wBA0MP,QAAQ,SAAS,gBAAgB,IAAI,KAAK;;UA6GzC;;WAEN;WACA;WACA;WACA;;;;;;wBAOK,iBAAiB,0BAA0B;;;;;wBAuB3C,eAAe,MAAM,aAAa,IAAI,KAAK;;qBAS9C;;;;;;;;qBAgCA;;UAgBI;;WAEN;WACA,KAAK,SAAS;;WAEd,MAAM;;;;;;;wBAQD,YAAY,SAAS,aAAa,IAAI,KAAK;;qBCnd9C,cAAc,SAAS;WAA0B;WAA0B;;;;;;;;;qBCM3E;;wBAGG,QAAQ,cAAc,iBAAiB;;;;;;;;wBAavC,iBAAiB,kBAAkB,iBAAiB;;wBA+BpD,OAAO,cAAc;;;;;wBAQrB,aAAa,cAAc,iBAAiB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/rule.ts","../src/config.ts","../src/rules/cue-preset.ts","../src/rules/gate-after-cancel.ts","../src/rules/gate-trigger.ts","../src/rules/security-one-job.ts","../src/rules/summary-job.ts","../src/rules/setup-cue.ts","../src/rules/shared-ci.ts","../src/rules/service-run-main.ts","../src/map.ts","../src/rules/home-module.ts","../src/rules/home-package.ts","../src/rules/license-file.ts","../src/rules/coverage-provider.ts","../src/rules/main-check.ts","../src/rules/no-build-output.ts","../src/private-names.ts","../src/rules/no-local-paths.ts","../src/rules/pack-no-buildinfo.ts","../src/rules/publish-text-safe.ts","../src/rules/exports-require.ts","../src/rules/api-report-script.ts","../src/rules/pages-after-release.ts","../src/rules/pages-site.ts","../src/rules/site-check-in-ci.ts","../src/rules/pinned-git-deps.ts","../src/rules/pipe-fails.ts","../src/rules/job-fails.ts","../src/rules/playwright-install.ts","../src/rules/push-main-only.ts","../src/rules/unreleased-change.ts","../src/rules/published-minor.ts","../src/rules/release-files.ts","../src/rules/required-scripts.ts","../src/rules/roadmap-parses.ts","../src/rules/runner-budget.ts","../src/rules/shared-docs.ts","../src/rules/source-main.ts","../src/rules/tests-required.ts","../src/rules/tsconfig-test.ts","../src/rules/typed-files.ts","../src/rules/typed-scripts.ts","../src/rules/trust-policy.ts","../src/rules/version-title.ts","../src/workflow.ts","../src/rules/workflow-parses.ts","../src/rules/workspace-protocol.ts","../src/rules/index.ts","../src/run.ts","../src/pre-push.ts","../src/home-exports.ts","../src/release-text.ts"],"mappings":";;;;;;;;;;;;;;;;;;UASiB;WACN;WACA;WACA;;;UAIM;;WAEN;;WAEA;WACA;;WAEA;;WAEA,iBAAiB;;;;;;UAOX;;WAEN;;WAEA;;WAEA;;;wBAIK,YAAY,cAAc,cAAc;;KAQ5C;;KAGA,UAAU,SAAS,eAAe;;UAG7B;WACN;WACA,SAAS;WACT;;;KAIC,WAAW,SAAS;;UAGf;;WAEN;;WAEA;;WAEA;;WAEA;WACA,UAAU;;;UAIJ;;WAEN;;WAEA,aAAa;;WAEb,mBAAmB;;WAEnB,KAAK,SAAS;;WAEd;;WAEA;;EAET;;EAEA,IAAI;;;;;;EAMJ,SAAS;;;wBAIK,UAAU,SAAS,KAAK,iCAAiC;;KAM7D,uBAAuB;WAAqB;;;qBAG3C;;UAGI;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB,SAAS,SAAS,eAAe;;;;;WAKjC;;;;;;;WAOA;EACT,MAAM,SAAS,aAAa,SAAS,UAAU;;;;;;EAM/C,QAAQ,SAAS,aAAa,SAAS;;;qBAO5B;;wBAGG,aAAa,UAAU,UAAU;;wBAOjC,OAAO,cAAc,gBAAgB;;wBAOrC,QAAQ,cAAc,eAAe;;qBAMxC,WAAY,gBAAgB;;qBAG5B,YAAa;;wBAGV,WAAW,cAAc;;;;;;wBASzB,WAAW;;wBA2BX,UAAU;;;;;;wBAcV,WAAW,cAAc;;;;;;wBAmBzB,kBAAkB,KAAK,YAAY;;wBAsBnC,OAAO,cAAc;;wBAOrB,mBAAmB;;qBActB,UAAW,aAAa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licenseFileOf, A as scriptsOf, An as callsSharedCi, At as privateNamesFiles, B as roadmapOfLine, Bn as convertGate, Bt as mergePrivateNames, C as setVersions, Cn as runCalls, Ct as HOME_PATTERNS, D as trustPolicy, Dn as SHARED_ACTIONS, Dt as invalidPatternBreaks, E as TRAIN_SCOPES, En as tsconfigTest, Et as PRIVATE_PATTERNS_VARIABLE, F as sourceMain, Fn as SECURITY_TIMEOUT_MINUTES, Ft as firstNameMatch, G as minorOf, Gn as parseWorkflow, Gt as REAL_COMPARE, H as requiredScripts, Hn as prPathFilters, Ht as parsePrivateNames, I as HOME_TIMEOUT_MS, In as securityCallers, It as isAllowedHit, J as reachOf, Jn as yamlFaults, Jt as coverageProvider, K as publishedMinor, Kn as readAction, Kt as hasImportMetaMain, L as blockHash, Ln as securityOneJob, Lt as isCommonUse, M as testsRequired, Mn as setupCue, Mt as privateTextBreaks, N as isSourcePath, Nn as SECURITY_SCAN_COMMIT, Nt as PRIVATE_NAME_LIST, O as typedScripts, On as SHARED_CI, Ot as noLocalPaths, P as pathsOf, Pn as SECURITY_SCAN_INPUTS, Pt as PrivateNameListError, Q as npmLookup, Qn as RULE_WARN_DAYS, Qt as licenseFile, R as githubFetch, Rn as withOneJob, Rt as lineNameHit, S as namedVersions, Sn as SERVICE_PACKAGE, St as DEFAULT_ALLOWED, T as IGNORE_AFTER, Tn as hasTests, Tt as PRIVATE_NAMES_FILE_VARIABLE, U as releaseFiles, Un as summaryName, Ut as pathNameHit, V as roadmapParses, Vn as gateTrigger, Vt as nameMatches, W as lockedVersions, Wn as gateAfterCancel, Wt as noBuildOutput, X as SHIPPED_FIELDS, Xn as cuePreset, Xt as LICENSE_TEXTS, Y as NPM_REGISTRY, Yn as STRICT_OPTIONS, Yt as apiReportScript, Z as UNSHIPPED_FILES, Zn as DEPENDENCY_FIELDS, Zt as authorOf, _ as runPrePushArgs, _n as mapText, _r as parseRuleConfig, _t as pagesCalls, a as listRules, an as modulesOf, ar as matchesAny, at as startsTests, b as GITHUB_YAML, bn as npmNames, bt as publishTextSafe, c as runCli, cn as messageOf, cr as readJsonc, ct as isGitSpecifier, d as HOOK_MARKER, dn as signaturesOf, dr as runGit, dt as siteCheckInCi, en as mitText, er as codePackages, et as unreleasedChangeRule, f as NO_READ_LINE, fn as HOME_EXPORTS, fr as runGitShow, ft as pagesAfterRelease, g as prePush, gn as mapMarkdown, gr as parseConfig, gt as PAGES_WORKFLOWS, h as parsePrePushArgs, hn as findHomes, hr as defaultOptions, ht as pushMainOnly, i as formatResult, in as moduleUses, ir as lineOf, it as parseAdvisory, j as typedFiles, jn as sharedCi, jt as privatePatterns, k as configsOfScript, kn as SHARED_WORKFLOWS, kt as privateNamesFile, l as runFix, ln as repoOf, lr as replaceLine, lt as isPinned, m as installHook, mn as MAP_RULE, mr as specifiersOf, mt as scheduleMinute, n as annotations, nn as homeModule, nr as inFolder, nt as hiddenFailures, o as readConfig, on as declaredName, or as parseCatFileBatch, ot as swallowsTests, p as PRE_PUSH_HOOK, pn as HOMES, pr as showFiles, pt as runnerBudget, q as publishedMinorRule, qn as readWorkflow, qt as mainCheck, r as createContext, rn as moduleMessage, rr as keyLine, rt as jobFails, s as runChecks, sn as homePackage, sr as parseJsonc, st as pipeFails, t as USAGE, tn as repositoryIsPublic, tr as hasFile, tt as playwrightInstall, u as summaryMarkdown, un as reposOf, ur as repositoryOfRemote, ut as pinnedGitDeps, v as RULES, vn as mergeHomes, vt as pagesSite, w as versionTitle, wn as serviceRunMain, wt as PRIVATE_NAMES_FILE_CONFIG, x as workflowParses, xn as readOverlay, xt as packNoBuildinfo, y as workspaceProtocol, yn as npmDrift, yt as exportsRequire, z as sharedDocsRule, zn as ACTIONS_COMMIT, zt as lineNameHits } from "./run-CcAO5DRq.js";
1
+ import { $ as unreleasedChange, $n as readAction, $t as licenseFileOf, A as scriptsOf, An as callsSharedCi, At as privateNamesFiles, B as roadmapOfLine, Bn as SECURITY_TIMEOUT_MINUTES, Bt as mergePrivateNames, C as setVersions, Cn as runCalls, Cr as parseConfig, Ct as HOME_PATTERNS, D as trustPolicy, Dn as SHARED_ACTIONS, Dt as invalidPatternBreaks, E as TRAIN_SCOPES, En as tsconfigTest, Et as PRIVATE_PATTERNS_VARIABLE, F as sourceMain, Fn as hasSummaryJob, Ft as firstNameMatch, G as minorOf, Gn as convertGate, Gt as REAL_COMPARE, H as requiredScripts, Hn as securityOneJob, Ht as parsePrivateNames, I as HOME_TIMEOUT_MS, In as startsOnPullRequest, It as isAllowedHit, J as reachOf, Jn as skippableJobs, Jt as coverageProvider, K as publishedMinor, Kn as gateTrigger, Kt as hasImportMetaMain, L as blockHash, Ln as summaryJobRule, Lt as isCommonUse, M as testsRequired, Mn as setupCue, Mt as privateTextBreaks, N as isSourcePath, Nn as SUMMARY_GATES, Nt as PRIVATE_NAME_LIST, O as typedScripts, On as SHARED_CI, Ot as noLocalPaths, P as pathsOf, Pn as addSummaryJob, Pt as PrivateNameListError, Q as npmLookup, Qn as parseWorkflow, Qt as licenseFile, R as githubFetch, Rn as SECURITY_SCAN_COMMIT, Rt as lineNameHit, S as namedVersions, Sn as SERVICE_PACKAGE, Sr as defaultOptions, St as DEFAULT_ALLOWED, T as IGNORE_AFTER, Tn as hasTests, Tt as PRIVATE_NAMES_FILE_VARIABLE, U as releaseFiles, Un as withOneJob, Ut as pathNameHit, V as roadmapParses, Vn as securityCallers, Vt as nameMatches, W as lockedVersions, Wn as ACTIONS_COMMIT, Wt as noBuildOutput, X as SHIPPED_FIELDS, Xn as summaryName, Xt as LICENSE_TEXTS, Y as NPM_REGISTRY, Yn as summaryJob, Yt as apiReportScript, Z as UNSHIPPED_FILES, Zn as gateAfterCancel, Zt as authorOf, _ as runPrePushArgs, _n as mapText, _r as repositoryOfRemote, _t as pagesCalls, a as listRules, an as modulesOf, ar as RULE_WARN_DAYS, at as startsTests, b as GITHUB_YAML, bn as npmNames, br as showFiles, bt as publishTextSafe, c as runCli, cn as messageOf, cr as hasFile, ct as isGitSpecifier, d as HOOK_MARKER, dn as signaturesOf, dr as lineOf, dt as siteCheckInCi, en as mitText, er as readWorkflow, et as unreleasedChangeRule, f as NO_READ_LINE, fn as HOME_EXPORTS, fr as matchesAny, ft as pagesAfterRelease, g as prePush, gn as mapMarkdown, gr as replaceLine, gt as PAGES_WORKFLOWS, h as parsePrePushArgs, hn as findHomes, hr as readJsonc, ht as pushMainOnly, i as formatResult, in as moduleUses, ir as DEPENDENCY_FIELDS, it as parseAdvisory, j as typedFiles, jn as sharedCi, jt as privatePatterns, k as configsOfScript, kn as SHARED_WORKFLOWS, kt as privateNamesFile, l as runFix, ln as repoOf, lr as inFolder, lt as isPinned, m as installHook, mn as MAP_RULE, mr as parseJsonc, mt as scheduleMinute, n as annotations, nn as homeModule, nr as STRICT_OPTIONS, nt as hiddenFailures, o as readConfig, on as declaredName, or as cleanPath, ot as swallowsTests, p as PRE_PUSH_HOOK, pn as HOMES, pr as parseCatFileBatch, pt as runnerBudget, q as publishedMinorRule, qn as prPathFilters, qt as mainCheck, r as createContext, rn as moduleMessage, rr as cuePreset, rt as jobFails, s as runChecks, sn as homePackage, sr as codePackages, st as pipeFails, t as USAGE, tn as repositoryIsPublic, tr as yamlFaults, tt as playwrightInstall, u as summaryMarkdown, un as reposOf, ur as keyLine, ut as pinnedGitDeps, v as RULES, vn as mergeHomes, vr as runGit, vt as pagesSite, w as versionTitle, wn as serviceRunMain, wr as parseRuleConfig, wt as PRIVATE_NAMES_FILE_CONFIG, x as workflowParses, xn as readOverlay, xr as specifiersOf, xt as packNoBuildinfo, y as workspaceProtocol, yn as npmDrift, yr as runGitShow, yt as exportsRequire, z as sharedDocsRule, zn as SECURITY_SCAN_INPUTS, zt as lineNameHits } from "./run-DNe9I3-M.js";
2
2
  import { OWNERS, ownerOf, ownersOf, sharedNames } from "./owners.js";
3
3
  import { a as packageFolders, i as isWorkspaceFolder, l as workspaceGlobs, n as globFolders, o as parseWorkspaceGlobs, r as globToRegExp } from "./workspace-_CIq-8ei.js";
4
4
  // src/release-text.ts
@@ -66,6 +66,6 @@ function releaseNotes(name, version, changelog) {
66
66
  if (section.length <= 1e5) return section;
67
67
  return `${section.slice(0, MAX_NOTES)}\n\n(The CHANGELOG.md of \`${name}\` has the full text.)`;
68
68
  }
69
- export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MAX_NOTES, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, TRAIN_SCOPES, UNSHIPPED_FILES, USAGE, annotations, apiReportScript, authorOf, blockHash, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasTests, hiddenFailures, homeModule, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSourcePath, isWorkspaceFolder, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, mergeHomes, mergePrivateNames, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseCatFileBatch, parseConfig, parseJsonc, parsePrePushArgs, parsePrivateNames, parseRuleConfig, parseWorkflow, parseWorkspaceGlobs, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privateNamesFiles, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runGitShow, runPrePushArgs, runnerBudget, scheduleMinute, scriptsOf, securityCallers, securityOneJob, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, sharedNames, showFiles, signaturesOf, siteCheckInCi, sourceMain, specifiersOf, startsTests, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
69
+ export { ACTIONS_COMMIT, DEFAULT_ALLOWED, DEPENDENCY_FIELDS, GITHUB_YAML, HOMES, HOME_EXPORTS, HOME_PATTERNS, HOME_TIMEOUT_MS, HOOK_MARKER, IGNORE_AFTER, LICENSE_TEXTS, MAP_RULE, MAX_NOTES, NO_READ_LINE, NPM_REGISTRY, OWNERS, PAGES_WORKFLOWS, PRE_PUSH_HOOK, PRIVATE_NAMES_FILE_CONFIG, PRIVATE_NAMES_FILE_VARIABLE, PRIVATE_NAME_LIST, PRIVATE_PATTERNS_VARIABLE, PrivateNameListError, REAL_COMPARE, RULES, RULE_WARN_DAYS, SECURITY_SCAN_COMMIT, SECURITY_SCAN_INPUTS, SECURITY_TIMEOUT_MINUTES, SERVICE_PACKAGE, SHARED_ACTIONS, SHARED_CI, SHARED_WORKFLOWS, SHIPPED_FIELDS, STRICT_OPTIONS, SUMMARY_GATES, TRAIN_SCOPES, UNSHIPPED_FILES, USAGE, addSummaryJob, annotations, apiReportScript, authorOf, blockHash, callsSharedCi, changelogSection, cleanPath, codePackages, configsOfScript, convertGate, coverageProvider, createContext, cuePreset, declaredName, defaultOptions, exportsRequire, findHomes, firstNameMatch, formatResult, gateAfterCancel, gateTrigger, githubFetch, globFolders, globToRegExp, hasFile, hasImportMetaMain, hasSummaryJob, hasTests, hiddenFailures, homeModule, homePackage, inFolder, installHook, invalidPatternBreaks, isAllowedHit, isCommonUse, isGitSpecifier, isPinned, isSourcePath, isWorkspaceFolder, jobFails, keyLine, licenseFile, licenseFileOf, lineNameHit, lineNameHits, lineOf, listRules, lockedVersions, mainCheck, mapMarkdown, mapText, matchesAny, mergeHomes, mergePrivateNames, messageOf, minorOf, mitText, moduleMessage, moduleUses, modulesOf, nameMatches, namedVersions, noBuildOutput, noLocalPaths, npmDrift, npmLookup, npmNames, npmUrl, ownerOf, ownersOf, packNoBuildinfo, packageFolders, pagesAfterRelease, pagesCalls, pagesSite, parseAdvisory, parseCatFileBatch, parseConfig, parseJsonc, parsePrePushArgs, parsePrivateNames, parseRuleConfig, parseWorkflow, parseWorkspaceGlobs, pathNameHit, pathsOf, pinnedGitDeps, pipeFails, playwrightInstall, prPathFilters, prePush, privateNamesFile, privateNamesFiles, privatePatterns, privateTextBreaks, publishTextSafe, publishedMinor, publishedMinorRule, pushMainOnly, reachOf, readAction, readConfig, readJsonc, readOverlay, readWorkflow, releaseFiles, releaseNotes, replaceLine, repoOf, reposOf, repositoryIsPublic, repositoryOfRemote, requiredScripts, roadmapOfLine, roadmapParses, runCalls, runChecks, runCli, runFix, runGit, runGitShow, runPrePushArgs, runnerBudget, scheduleMinute, scriptsOf, securityCallers, securityOneJob, serviceRunMain, setVersions, setupCue, sharedCi, sharedDocsRule, sharedNames, showFiles, signaturesOf, siteCheckInCi, skippableJobs, sourceMain, specifiersOf, startsOnPullRequest, startsTests, summaryJob, summaryJobRule, summaryMarkdown, summaryName, swallowsTests, tagName, testsRequired, trustPolicy, tsconfigTest, typedFiles, typedScripts, unreleasedChange, unreleasedChangeRule, versionTitle, withOneJob, workflowParses, workspaceGlobs, workspaceProtocol, yamlFaults };
70
70
 
71
71
  //# sourceMappingURL=index.js.map
@@ -2073,6 +2073,44 @@ const ifValue = (expression) => {
2073
2073
  const value = `\${{ ${expression} }}`;
2074
2074
  return value.includes(": ") || value.includes(" #") ? `"${value.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"")}"` : value;
2075
2075
  };
2076
+ /** A job with its own `if` can be skipped when the gate runs, and so can each job that needs such a job. */
2077
+ function skippableJobs(needsOf, own) {
2078
+ const skippable = new Set(own);
2079
+ for (let grew = true; grew;) {
2080
+ grew = false;
2081
+ for (const [id, needs] of needsOf) {
2082
+ if (skippable.has(id) || !needs.some((need) => skippable.has(need))) continue;
2083
+ skippable.add(id);
2084
+ grew = true;
2085
+ }
2086
+ }
2087
+ return skippable;
2088
+ }
2089
+ /** This function gives the lines of a summary job `<Name> OK` with the action gate-summary, after one empty line. */
2090
+ function summaryJob(s) {
2091
+ const job = s.jobIndent + s.unit;
2092
+ const step = job + s.unit;
2093
+ return [
2094
+ "",
2095
+ `${s.jobIndent}${s.id}:`,
2096
+ `${job}name: ${s.name}`,
2097
+ `${job}if: ${NOT_CANCELLED}`,
2098
+ `${job}needs: [${s.needs.join(", ")}]`,
2099
+ `${job}runs-on: ubuntu-latest`,
2100
+ `${job}timeout-minutes: 2`,
2101
+ ...s.grouped ? [] : [
2102
+ `${job}concurrency:`,
2103
+ `${job}${s.unit}group: \${{ github.workflow }}-${s.id}-${OWN_GROUP}`,
2104
+ `${job}${s.unit}cancel-in-progress: ${PULL_REQUEST_ONLY}`
2105
+ ],
2106
+ `${job}permissions: {}`,
2107
+ `${job}steps:`,
2108
+ `${step}- uses: mark1russell7/template/.github/actions/gate-summary@${s.commit} # main`,
2109
+ `${step} with:`,
2110
+ `${step} ${s.unit}needs: \${{ toJSON(needs) }}`,
2111
+ ...s.allow.length === 0 ? [] : [`${step} ${s.unit}allow-skip: ${s.allow.join(" ")}`]
2112
+ ];
2113
+ }
2076
2114
  /**
2077
2115
  * This function converts a gate workflow with a path filter on its pull request trigger. The trigger loses the filter,
2078
2116
  * and a job `changes` gets the same patterns. Each other job needs it and runs only on a match. A summary job
@@ -2182,15 +2220,7 @@ function convertGate(text, file, commit = ACTIONS_COMMIT) {
2182
2220
  });
2183
2221
  }
2184
2222
  }
2185
- const skippable = new Set(own);
2186
- for (let grew = true; grew;) {
2187
- grew = false;
2188
- for (const [id, needs] of needsOf) {
2189
- if (skippable.has(id) || !needs.some((need) => skippable.has(need))) continue;
2190
- skippable.add(id);
2191
- grew = true;
2192
- }
2193
- }
2223
+ const skippable = skippableJobs(needsOf, own);
2194
2224
  const action = (step) => `mark1russell7/template/.github/actions/${step}@${commit} # main`;
2195
2225
  const block = (indent, key, items) => [`${indent}${key}: |`, ...items.map((item) => `${indent}${unit}${item}`)];
2196
2226
  const job = jobIndent + unit;
@@ -2219,23 +2249,16 @@ function convertGate(text, file, commit = ACTIONS_COMMIT) {
2219
2249
  ...filters["paths-ignore"] === void 0 ? [] : block(`${step} ${unit}`, "paths-ignore", filters["paths-ignore"]),
2220
2250
  ""
2221
2251
  ];
2222
- const allow = ids.filter((id) => skippable.has(id));
2223
- const summary = [
2224
- "",
2225
- `${jobIndent}${summaryId}:`,
2226
- `${job}name: ${name}`,
2227
- `${job}if: ${NOT_CANCELLED}`,
2228
- `${job}needs: [${["changes", ...ids].join(", ")}]`,
2229
- `${job}runs-on: ubuntu-latest`,
2230
- `${job}timeout-minutes: 2`,
2231
- ...group(summaryId),
2232
- `${job}permissions: {}`,
2233
- `${job}steps:`,
2234
- `${step}- uses: ${action("gate-summary")}`,
2235
- `${step} with:`,
2236
- `${step} ${unit}needs: \${{ toJSON(needs) }}`,
2237
- ...allow.length === 0 ? [] : [`${step} ${unit}allow-skip: ${allow.join(" ")}`]
2238
- ];
2252
+ const summary = summaryJob({
2253
+ jobIndent,
2254
+ unit,
2255
+ id: summaryId,
2256
+ name,
2257
+ needs: ["changes", ...ids],
2258
+ allow: ids.filter((id) => skippable.has(id)),
2259
+ grouped,
2260
+ commit
2261
+ });
2239
2262
  let last = blockEnd(lines, jobsAt);
2240
2263
  while (last > jobsAt + 1 && (lines[last - 1] ?? "").trim() === "") last -= 1;
2241
2264
  splices.push({
@@ -2497,6 +2520,134 @@ const securityOneJob = {
2497
2520
  return breaks;
2498
2521
  }
2499
2522
  };
2523
+ // src/rules/summary-job.ts
2524
+ /**
2525
+ * The rule `summary-job`: each gate workflow of a repository (by default `ci.yml` and `security.yml`) has one summary job
2526
+ * `<Name> OK`. The ruleset of `main` names only the summary checks (CI.md, "The check of the ruleset"). Without a summary
2527
+ * job, the ruleset must name each job of the gate. Then it does not wait for a new job.
2528
+ */
2529
+ /** The gate workflows of the template: each one gives one summary check that the ruleset names. */
2530
+ const SUMMARY_GATES = ["ci.yml", "security.yml"];
2531
+ /** The deprecated shared workflow of the scans. The rule `security-one-job` replaces its caller and the summary job with one job. */
2532
+ const REUSABLE_SECURITY = /(^|\/)\.github\/workflows\/reusable-security\.ya?ml(@|$)/;
2533
+ const PULL_REQUEST$1 = /^(pull_request|pull_request_target)$/;
2534
+ /** This function tells if a workflow starts on a pull request: `on: pull_request`, the flow form, or a key of the block. */
2535
+ function startsOnPullRequest(text) {
2536
+ const lines = workflowLines(text);
2537
+ const on = lines.findIndex((line) => indentOf$1(line) === 0 && keyValue(line, "on") !== void 0);
2538
+ if (on < 0) return false;
2539
+ const value = keyValue(lines[on] ?? "", "on") ?? "";
2540
+ if (value !== "") return value.replace(/^\[|\]$/g, "").split(",").some((item) => PULL_REQUEST$1.test(item.trim().replace(/^["']|["']$/g, "")));
2541
+ return childKeys(lines, on).some((at) => PULL_REQUEST$1.test((lines[at] ?? "").trim().replace(/:.*$/, "").replace(/^["']|["']$/g, "")));
2542
+ }
2543
+ /** This function tells if a workflow has a summary job: a job with a name that ends with ` OK`, or with the action gate-summary. */
2544
+ function hasSummaryJob(text) {
2545
+ const lines = workflowLines(text);
2546
+ const jobs = lines.findIndex((line) => indentOf$1(line) === 0 && keyValue(line, "jobs") !== void 0);
2547
+ return jobs >= 0 && childKeys(lines, jobs).some((job) => isSummary(lines, job));
2548
+ }
2549
+ /**
2550
+ * This function adds a summary job `<Name> OK` with the action gate-summary at the end of the jobs. It needs each job.
2551
+ * A job with its own `if`, and each job that needs one, can be skipped. The function gives the new text, or the reason
2552
+ * why a person must add the job.
2553
+ */
2554
+ function addSummaryJob(text, file, commit = ACTIONS_COMMIT) {
2555
+ const lines = workflowLines(text);
2556
+ const top = (key) => lines.findIndex((line) => indentOf$1(line) === 0 && keyValue(line, key) !== void 0);
2557
+ const jobsAt = top("jobs");
2558
+ if (jobsAt < 0) return { reason: "the workflow has no jobs block" };
2559
+ const jobs = childKeys(lines, jobsAt);
2560
+ const first = jobs[0];
2561
+ if (first === void 0) return { reason: "the workflow has no job" };
2562
+ const ids = jobs.map((at) => (lines[at] ?? "").trim().replace(/:$/, ""));
2563
+ const jobIndent = " ".repeat(indentOf$1(lines[first] ?? ""));
2564
+ const unit = " ".repeat((childIndent(lines, first) ?? indentOf$1(lines[first] ?? "") + 2) - jobIndent.length);
2565
+ const nameAt = top("name");
2566
+ const name = summaryName(nameAt >= 0 ? keyValue(lines[nameAt] ?? "", "name") ?? "" : (file.split("/").pop() ?? "").replace(/\.ya?ml$/, ""));
2567
+ const id = name.toLowerCase().replaceAll(" ", "-");
2568
+ if (ids.includes(id)) return { reason: `the workflow already has a job ${id}` };
2569
+ const needsOf = /* @__PURE__ */ new Map();
2570
+ const own = /* @__PURE__ */ new Set();
2571
+ for (const [index, at] of jobs.entries()) {
2572
+ const job = ids[index] ?? "";
2573
+ const keys = childKeys(lines, at);
2574
+ const needsAt = keys.find((key) => keyValue(lines[key] ?? "", "needs") !== void 0);
2575
+ if (needsAt === void 0) needsOf.set(job, []);
2576
+ else {
2577
+ const value = keyValue(lines[needsAt] ?? "", "needs") ?? "";
2578
+ const list = value === "" || value.startsWith("[") ? listItems(lines, needsAt, value) : {
2579
+ items: [value],
2580
+ end: needsAt + 1
2581
+ };
2582
+ if (list === void 0) return { reason: `the needs of the job ${job} is not a list` };
2583
+ needsOf.set(job, list.items);
2584
+ }
2585
+ if (keys.some((key) => keyValue(lines[key] ?? "", "if") !== void 0)) own.add(job);
2586
+ }
2587
+ const skippable = skippableJobs(needsOf, own);
2588
+ const summary = summaryJob({
2589
+ jobIndent,
2590
+ unit,
2591
+ id,
2592
+ name,
2593
+ needs: ids,
2594
+ allow: ids.filter((job) => skippable.has(job)),
2595
+ grouped: top("concurrency") >= 0,
2596
+ commit
2597
+ });
2598
+ let last = blockEnd(lines, jobsAt);
2599
+ while (last > jobsAt + 1 && (lines[last - 1] ?? "").trim() === "") last -= 1;
2600
+ return { text: applySplices(text, [{
2601
+ at: last,
2602
+ remove: 0,
2603
+ insert: summary
2604
+ }]) };
2605
+ }
2606
+ const summaryJobRule = {
2607
+ id: "summary-job",
2608
+ failsFrom: "2026-12-06",
2609
+ title: "Each gate workflow (ci.yml, security.yml) has one summary job <Name> OK that needs each of its jobs.",
2610
+ reason: "The ruleset of main requires only the summary checks \"CI OK\" and \"Security OK\" (CI.md, \"The check of the ruleset\"). A gate with no summary job forces the ruleset to name each job: a new job is then not required, gh pr merge --auto merges before it ends, and a rename of a job blocks each pull request. On 2026-11-09, 21 of 43 public repositories of the account had a gate with no summary job.",
2611
+ fix: "Add a job \"<Name> OK\" with \"if: ${{ !cancelled() }}\", \"needs\" with each job, and the action gate-summary (CI.md, \"The check of the ruleset\"). Then start ruleset-ci-ok.ts with --only-summary.",
2612
+ sources: [{
2613
+ repo: "private",
2614
+ rule: "summary-job",
2615
+ doc: "a decision of 2026-11-09 (the audit of the summary checks of 43 public repositories)"
2616
+ }],
2617
+ options: { gates: {
2618
+ type: "strings",
2619
+ default: [...SUMMARY_GATES],
2620
+ description: "The file names of the gate workflows that must have a summary job."
2621
+ } },
2622
+ check(context, options) {
2623
+ const files = context.gitFiles();
2624
+ if (files === void 0) return { skipped: "the root is not in a git repository" };
2625
+ const gates = Array.isArray(options["gates"]) ? options["gates"] : SUMMARY_GATES;
2626
+ const workflows = files.filter((path) => WORKFLOW$1.test(path) && gates.includes(path.slice(path.lastIndexOf("/") + 1))).sort(byCode);
2627
+ if (workflows.length === 0) return { skipped: "the repository has no gate workflow" };
2628
+ const breaks = [];
2629
+ for (const file of workflows) {
2630
+ let text;
2631
+ try {
2632
+ text = readFileSync(join(context.root, file), "utf8");
2633
+ } catch {
2634
+ continue;
2635
+ }
2636
+ if (!startsOnPullRequest(text) || hasSummaryJob(text) || REUSABLE_SECURITY.test(text)) continue;
2637
+ const added = addSummaryJob(text, file);
2638
+ breaks.push({
2639
+ file,
2640
+ message: `${file} has no summary job "<Name> OK", so the ruleset must name each of its jobs.`,
2641
+ ..."text" in added ? { edits: [{
2642
+ file,
2643
+ before: text,
2644
+ after: added.text
2645
+ }] } : { fix: `A person must add it, because ${added.reason}. ${summaryJobRule.fix}` }
2646
+ });
2647
+ }
2648
+ return breaks;
2649
+ }
2650
+ };
2500
2651
  // src/rules/setup-cue.ts
2501
2652
  /**
2502
2653
  * The rule `setup-cue`: no workflow or action downloads the cue CLI with its own command. The shared action `setup-cue`
@@ -3426,7 +3577,7 @@ const HOMES = [
3426
3577
  {
3427
3578
  area: "system-io",
3428
3579
  title: "Files, commands, git, GitHub and npm",
3429
- covers: "atomic file and JSON writes, globs, safe commands with argv and no shell, git, the GitHub CLI and API, npm registry lookups and the use measures of a package (weekly downloads, dependents from deps.dev, jsDelivr hits, each a pure request builder and extractor with the fetch as a parameter), HTTP requests, JSON, YAML and CSV, environment variables",
3580
+ covers: "atomic file and JSON writes, globs, safe commands with argv and no shell, git, the GitHub CLI and API, npm registry lookups and the use measures of a package (weekly downloads, dependents from deps.dev, jsDelivr hits, each a pure request builder and extractor with the fetch as a parameter), HTTP requests, the frame and CSP rules of a response, JSON, YAML and CSV, environment variables",
3430
3581
  packages: [
3431
3582
  "@procedures/fs",
3432
3583
  "@procedures/shell",
@@ -21006,6 +21157,7 @@ const RULES = [
21006
21157
  gateAfterCancel,
21007
21158
  gateTrigger,
21008
21159
  securityOneJob,
21160
+ summaryJobRule,
21009
21161
  sharedCi,
21010
21162
  setupCue,
21011
21163
  playwrightInstall,
@@ -22028,6 +22180,6 @@ function runHook(args, io) {
22028
22180
  git: (gitArgs) => runGit(io.cwd, gitArgs)
22029
22181
  }, io);
22030
22182
  }
22031
- export { unreleasedChange as $, cleanPath as $n, licenseFileOf as $t, scriptsOf as A, callsSharedCi as An, privateNamesFiles as At, roadmapOfLine as B, convertGate as Bn, mergePrivateNames as Bt, setVersions as C, runCalls as Cn, HOME_PATTERNS as Ct, trustPolicy as D, SHARED_ACTIONS as Dn, invalidPatternBreaks as Dt, TRAIN_SCOPES as E, tsconfigTest as En, PRIVATE_PATTERNS_VARIABLE as Et, sourceMain as F, SECURITY_TIMEOUT_MINUTES as Fn, firstNameMatch as Ft, minorOf as G, parseWorkflow as Gn, REAL_COMPARE as Gt, requiredScripts as H, prPathFilters as Hn, parsePrivateNames as Ht, HOME_TIMEOUT_MS as I, securityCallers as In, isAllowedHit as It, reachOf as J, yamlFaults as Jn, coverageProvider as Jt, publishedMinor as K, readAction as Kn, hasImportMetaMain as Kt, blockHash as L, securityOneJob as Ln, isCommonUse as Lt, testsRequired as M, setupCue as Mn, privateTextBreaks as Mt, isSourcePath as N, SECURITY_SCAN_COMMIT as Nn, PRIVATE_NAME_LIST as Nt, typedScripts as O, SHARED_CI as On, noLocalPaths as Ot, pathsOf as P, SECURITY_SCAN_INPUTS as Pn, PrivateNameListError as Pt, npmLookup as Q, RULE_WARN_DAYS as Qn, licenseFile as Qt, githubFetch as R, withOneJob as Rn, lineNameHit as Rt, namedVersions as S, SERVICE_PACKAGE as Sn, DEFAULT_ALLOWED as St, IGNORE_AFTER as T, hasTests as Tn, PRIVATE_NAMES_FILE_VARIABLE as Tt, releaseFiles as U, summaryName as Un, pathNameHit as Ut, roadmapParses as V, gateTrigger as Vn, nameMatches as Vt, lockedVersions as W, gateAfterCancel as Wn, noBuildOutput as Wt, SHIPPED_FIELDS as X, cuePreset as Xn, LICENSE_TEXTS as Xt, NPM_REGISTRY as Y, STRICT_OPTIONS as Yn, apiReportScript as Yt, UNSHIPPED_FILES as Z, DEPENDENCY_FIELDS as Zn, authorOf as Zt, runPrePushArgs as _, mapText as _n, parseRuleConfig as _r, pagesCalls as _t, listRules as a, modulesOf as an, matchesAny as ar, startsTests as at, GITHUB_YAML as b, npmNames as bn, publishTextSafe as bt, runCli as c, messageOf as cn, readJsonc as cr, isGitSpecifier as ct, HOOK_MARKER as d, signaturesOf as dn, runGit as dr, siteCheckInCi as dt, mitText as en, codePackages as er, unreleasedChangeRule as et, NO_READ_LINE as f, HOME_EXPORTS as fn, runGitShow as fr, pagesAfterRelease as ft, prePush as g, mapMarkdown as gn, parseConfig as gr, PAGES_WORKFLOWS as gt, parsePrePushArgs as h, findHomes as hn, defaultOptions as hr, pushMainOnly as ht, formatResult as i, moduleUses as in, lineOf as ir, parseAdvisory as it, typedFiles as j, sharedCi as jn, privatePatterns as jt, configsOfScript as k, SHARED_WORKFLOWS as kn, privateNamesFile as kt, runFix as l, repoOf as ln, replaceLine as lr, isPinned as lt, installHook as m, MAP_RULE as mn, specifiersOf as mr, scheduleMinute as mt, annotations as n, homeModule as nn, inFolder as nr, hiddenFailures as nt, readConfig as o, declaredName as on, parseCatFileBatch as or, swallowsTests as ot, PRE_PUSH_HOOK as p, HOMES as pn, showFiles as pr, runnerBudget as pt, publishedMinorRule as q, readWorkflow as qn, mainCheck as qt, createContext as r, moduleMessage as rn, keyLine as rr, jobFails as rt, runChecks as s, homePackage as sn, parseJsonc as sr, pipeFails as st, USAGE as t, repositoryIsPublic as tn, hasFile as tr, playwrightInstall as tt, summaryMarkdown as u, reposOf as un, repositoryOfRemote as ur, pinnedGitDeps as ut, RULES as v, mergeHomes as vn, pagesSite as vt, versionTitle as w, serviceRunMain as wn, PRIVATE_NAMES_FILE_CONFIG as wt, workflowParses as x, readOverlay as xn, packNoBuildinfo as xt, workspaceProtocol as y, npmDrift as yn, exportsRequire as yt, sharedDocsRule as z, ACTIONS_COMMIT as zn, lineNameHits as zt };
22183
+ export { unreleasedChange as $, readAction as $n, licenseFileOf as $t, scriptsOf as A, callsSharedCi as An, privateNamesFiles as At, roadmapOfLine as B, SECURITY_TIMEOUT_MINUTES as Bn, mergePrivateNames as Bt, setVersions as C, runCalls as Cn, parseConfig as Cr, HOME_PATTERNS as Ct, trustPolicy as D, SHARED_ACTIONS as Dn, invalidPatternBreaks as Dt, TRAIN_SCOPES as E, tsconfigTest as En, PRIVATE_PATTERNS_VARIABLE as Et, sourceMain as F, hasSummaryJob as Fn, firstNameMatch as Ft, minorOf as G, convertGate as Gn, REAL_COMPARE as Gt, requiredScripts as H, securityOneJob as Hn, parsePrivateNames as Ht, HOME_TIMEOUT_MS as I, startsOnPullRequest as In, isAllowedHit as It, reachOf as J, skippableJobs as Jn, coverageProvider as Jt, publishedMinor as K, gateTrigger as Kn, hasImportMetaMain as Kt, blockHash as L, summaryJobRule as Ln, isCommonUse as Lt, testsRequired as M, setupCue as Mn, privateTextBreaks as Mt, isSourcePath as N, SUMMARY_GATES as Nn, PRIVATE_NAME_LIST as Nt, typedScripts as O, SHARED_CI as On, noLocalPaths as Ot, pathsOf as P, addSummaryJob as Pn, PrivateNameListError as Pt, npmLookup as Q, parseWorkflow as Qn, licenseFile as Qt, githubFetch as R, SECURITY_SCAN_COMMIT as Rn, lineNameHit as Rt, namedVersions as S, SERVICE_PACKAGE as Sn, defaultOptions as Sr, DEFAULT_ALLOWED as St, IGNORE_AFTER as T, hasTests as Tn, PRIVATE_NAMES_FILE_VARIABLE as Tt, releaseFiles as U, withOneJob as Un, pathNameHit as Ut, roadmapParses as V, securityCallers as Vn, nameMatches as Vt, lockedVersions as W, ACTIONS_COMMIT as Wn, noBuildOutput as Wt, SHIPPED_FIELDS as X, summaryName as Xn, LICENSE_TEXTS as Xt, NPM_REGISTRY as Y, summaryJob as Yn, apiReportScript as Yt, UNSHIPPED_FILES as Z, gateAfterCancel as Zn, authorOf as Zt, runPrePushArgs as _, mapText as _n, repositoryOfRemote as _r, pagesCalls as _t, listRules as a, modulesOf as an, RULE_WARN_DAYS as ar, startsTests as at, GITHUB_YAML as b, npmNames as bn, showFiles as br, publishTextSafe as bt, runCli as c, messageOf as cn, hasFile as cr, isGitSpecifier as ct, HOOK_MARKER as d, signaturesOf as dn, lineOf as dr, siteCheckInCi as dt, mitText as en, readWorkflow as er, unreleasedChangeRule as et, NO_READ_LINE as f, HOME_EXPORTS as fn, matchesAny as fr, pagesAfterRelease as ft, prePush as g, mapMarkdown as gn, replaceLine as gr, PAGES_WORKFLOWS as gt, parsePrePushArgs as h, findHomes as hn, readJsonc as hr, pushMainOnly as ht, formatResult as i, moduleUses as in, DEPENDENCY_FIELDS as ir, parseAdvisory as it, typedFiles as j, sharedCi as jn, privatePatterns as jt, configsOfScript as k, SHARED_WORKFLOWS as kn, privateNamesFile as kt, runFix as l, repoOf as ln, inFolder as lr, isPinned as lt, installHook as m, MAP_RULE as mn, parseJsonc as mr, scheduleMinute as mt, annotations as n, homeModule as nn, STRICT_OPTIONS as nr, hiddenFailures as nt, readConfig as o, declaredName as on, cleanPath as or, swallowsTests as ot, PRE_PUSH_HOOK as p, HOMES as pn, parseCatFileBatch as pr, runnerBudget as pt, publishedMinorRule as q, prPathFilters as qn, mainCheck as qt, createContext as r, moduleMessage as rn, cuePreset as rr, jobFails as rt, runChecks as s, homePackage as sn, codePackages as sr, pipeFails as st, USAGE as t, repositoryIsPublic as tn, yamlFaults as tr, playwrightInstall as tt, summaryMarkdown as u, reposOf as un, keyLine as ur, pinnedGitDeps as ut, RULES as v, mergeHomes as vn, runGit as vr, pagesSite as vt, versionTitle as w, serviceRunMain as wn, parseRuleConfig as wr, PRIVATE_NAMES_FILE_CONFIG as wt, workflowParses as x, readOverlay as xn, specifiersOf as xr, packNoBuildinfo as xt, workspaceProtocol as y, npmDrift as yn, runGitShow as yr, exportsRequire as yt, sharedDocsRule as z, SECURITY_SCAN_INPUTS as zn, lineNameHits as zt };
22032
22184
 
22033
- //# sourceMappingURL=run-CcAO5DRq.js.map
22185
+ //# sourceMappingURL=run-DNe9I3-M.js.map