@mark1russell7/conventions 0.45.0 → 0.46.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 +2 -2
- package/build/cli.js +1 -1
- package/build/index.js +1 -1
- package/build/{run-BezUWj3N.js → run-BjeSmSx-.js} +848 -63
- package/build/run-BjeSmSx-.js.map +1 -0
- package/package.json +2 -2
- package/build/run-BezUWj3N.js.map +0 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Each break shows the file, the line, the rule and the fix. In GitHub Actions, th
|
|
|
23
23
|
`conventions fix` writes the fixes that the rules know, and checks again. It continues until no fix applies. Each fix is an exact change of a file, and the fix writes it only when the file did not change after the check. These breaks have a fix:
|
|
24
24
|
|
|
25
25
|
- `runner-budget`: the minute of a schedule, a `max-parallel` of a matrix, and a concurrency group at the top of a workflow. A new run of a pull request stops the old run. A run of another event waits for the old run.
|
|
26
|
-
- `main-runs-finish`: a `cancel-in-progress: true` or a concurrency group that ends with `${{ github.ref }}`, in a workflow that starts on `push` or on `
|
|
26
|
+
- `main-runs-finish`: a `cancel-in-progress: true` or a concurrency group that ends with `${{ github.ref }}`, in a workflow that starts on `push`, `workflow_call` or `workflow_run`. The rule does not examine the group of a workflow that starts only on `workflow_run`. The fix writes `${{ github.event_name == 'pull_request' }}` and `${{ github.event_name == 'pull_request' && github.ref || github.sha }}`.
|
|
27
27
|
- `push-main-only`: a workflow that starts on `push` and on `pull_request`, with no limit of `push` to the default branch or with no `workflow_dispatch`. The fix adds `branches` and `workflow_dispatch`, and keeps the comments and each other trigger. It keeps a tag run when the workflow reads the tag. It does not edit `release.yml`, and a person chooses the change for `branches-ignore` or for another named branch.
|
|
28
28
|
- `pipe-fails`: a step with a pipe and no `pipefail`. The fix adds `defaults: { run: { shell: bash } }` to the workflow. It does not write over another shell.
|
|
29
29
|
- `gate-after-cancel`: a summary job of a gate with `always()` in its condition. The fix writes `if: ${{ !cancelled() }}`. A condition with other parts needs a person.
|
|
@@ -65,7 +65,7 @@ The rules come from the invariants audit of 2026-10-26 (strategy item s38). The
|
|
|
65
65
|
| `roadmap-parses` | Each call of the Pages workflow of the template (`reusable-pages.yml`) gives a `roadmap`, or `site-pages: false`. Without it, the Status page shows no item of the plan. Each roadmap that a workflow gives to the Status page (a `roadmap:` key) parses as `@mark1russell7/site-pages` reads it. The rule uses the parser of site-pages. Thus a pull request finds a bad row, and the Pages job on `main` does not stop on it. | private `fail-closed` (STRATEGY.md, 2026-10-30). |
|
|
66
66
|
| `workflow-parses` | Each workflow of `.github/workflows` and each file `action.yml` of `.github/actions` parses as YAML, with the parser of the package `yaml`. GitHub refuses a workflow that does not parse, and starts no job. A workflow that starts only on a schedule, a dispatch or `workflow_run` does not start on its pull request. So the rule finds its fault before the merge. The break names the first fault of each file. | layout-contract `memory-probe.yml`, run 42172612147 (2026-11-06). |
|
|
67
67
|
| `runner-budget` | The repositories of each owner share the runners of its plan: 40 for the personal account, 60 for the organization (`OWNERS`). Each `strategy` with a `matrix` has a `max-parallel` of 3 or less. Each workflow has a concurrency group at the top or in each job. A job that calls a shared workflow of the option `grouped` gets its group from that workflow, and each job of that workflow has a group. The minute of each `cron` comes from a hash of the repository and the file (1 to 59), so the schedules of the repositories do not start together. The repository comes from `GITHUB_REPOSITORY` or from the remote `origin`. | private `runner-slots` (STRATEGY.md, 2026-10-30). |
|
|
68
|
-
| `main-runs-finish` | A workflow that starts on `push` or
|
|
68
|
+
| `main-runs-finish` | A workflow that starts on `push`, `workflow_call` or `workflow_run` does not cancel a run in progress. A called workflow gets the event of its caller. A run of `workflow_run` is a run of the default branch. A newer push cancels only the run of a pull request: `cancel-in-progress: ${{ github.event_name == 'pull_request' }}`. A run of `push` or `workflow_call` has the concurrency group of its commit: `${{ github.event_name == 'pull_request' && github.ref || github.sha }}`. GitHub gives a run of `workflow_run` the last commit of the default branch, so the rule does not examine its group: a newer run that takes the place of a waiting run tests the same commit or a newer one. In one group, GitHub cancels a run that waits when a newer run comes, whatever `cancel-in-progress` says. On 2026-11-03 four waiting CI runs of `main` in client were cancelled, so its version commit had no result and no release. On 2026-11-03 the next merge cancelled the CI run of a commit on `main`, so the main check of that commit had no result. A bench run on `main` was cancelled too, and its claim had no measurement. | private `main-runs-finish` (STRATEGY.md, 2026-11-03). |
|
|
69
69
|
| `push-main-only` | A workflow that starts on `push` and on `pull_request` limits `push` to the default branch with `branches`, and has `workflow_dispatch`. Without the limit, each commit of a pull request starts two runs. A `push` with only a tag filter, a `pull_request` with `types` that do not have `synchronize`, and `pull_request_target` are not breaks. `CI.md` tells each case in "One run for each commit". |
|
|
70
70
|
| `pipe-fails` | A failure on the left of a pipe fails its step. With no `shell` key, GitHub has no `pipefail`, so `tests \| tee out.txt` passes when the tests fail. The fix adds `shell: bash` as the default of the workflow. A step that then turns red had a failure that the pipe hid. |
|
|
71
71
|
| `job-fails` | A failed job fails its run and each job that reads it. When a job with `continue-on-error` fails, `needs.<job>.result` is `success`, so a summary job of a gate passes over a crash. The rule also finds `continue-on-error` on a test step that no later step reads, and a `|| true` after a test command. The option `advisory` keeps a job for a time, as `<file>#<job> until <YYYY-MM-DD>: <reason>`. An entry fails after its day, and when its job hides no failure. The rule fails from 2026-12-07. | coeval run 42034457935 (2026-11-05), vex-testkit `workflow-faults.ts`, lag `ci.yml`. |
|
package/build/cli.js
CHANGED
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as unreleasedChangeRule, $n as keyLine, $t as repositoryIsPublic, A as typedFiles, An as setupCue, At as privatePatterns, B as roadmapParses, Bn as prPathFilters, Bt as parsePrivateNames, C as versionTitle, Cn as hasTests, Ct as HOME_PATTERNS, D as typedScripts, Dn as SHARED_WORKFLOWS, Dt as invalidPatternBreaks, E as trustPolicy, En as SHARED_CI, Et as PRIVATE_PATTERNS_VARIABLE, F as HOME_TIMEOUT_MS, Fn as securityOneJob, Ft as isAllowedHit, G as publishedMinor, Gn as STRICT_OPTIONS, Gt as mainCheck, H as releaseFiles, Hn as gateAfterCancel, Ht as noBuildOutput, I as blockHash, In as withOneJob, It as isCommonUse, J as NPM_REGISTRY, Jn as RULE_WARN_DAYS, Jt as LICENSE_TEXTS, K as publishedMinorRule, Kn as cuePreset, Kt as coverageProvider, L as githubFetch, Ln as ACTIONS_COMMIT, Lt as lineNameHit, M as isSourcePath, Mn as SECURITY_SCAN_INPUTS, Mt as PRIVATE_NAME_LIST, N as pathsOf, Nn as SECURITY_TIMEOUT_MINUTES, Nt as PrivateNameListError, O as configsOfScript, On as callsSharedCi, Ot as noLocalPaths, P as sourceMain, Pn as securityCallers, Pt as firstNameMatch, Q as unreleasedChange, Qn as inFolder, Qt as mitText, R as sharedDocsRule, Rn as convertGate, Rt as lineNameHits, S as setVersions, Sn as serviceRunMain, St as DEFAULT_ALLOWED, T as TRAIN_SCOPES, Tn as SHARED_ACTIONS, Tt as PRIVATE_NAMES_FILE_VARIABLE, U as lockedVersions, Un as readAction, Ut as REAL_COMPARE, V as requiredScripts, Vn as summaryName, Vt as pathNameHit, W as minorOf, Wn as readWorkflow, Wt as hasImportMetaMain, X as UNSHIPPED_FILES, Xn as codePackages, Xt as licenseFile, Y as SHIPPED_FIELDS, Yn as cleanPath, Yt as authorOf, Z as npmLookup, Zn as hasFile, Zt as licenseFileOf, _ as workspaceProtocol, _n as npmDrift, _t as pagesCalls, a as listRules, an as homePackage, ar as runGit, at as swallowsTests, b as yamlFaults, bn as SERVICE_PACKAGE, bt as publishTextSafe, c as runCli, cn as reposOf, cr as parseConfig, ct as isPinned, d as HOOK_MARKER, dn as HOMES, dt as pagesAfterRelease, en as homeModule, er as lineOf, et as playwrightInstall, f as NO_READ_LINE, fn as MAP_RULE, ft as repositoryOfRemote, g as RULES, gn as mergeHomes, gt as PAGES_WORKFLOWS, h as prePush, hn as mapText, ht as pushMainOnly, i as formatResult, in as declaredName, ir as replaceLine, it as startsTests, j as testsRequired, jn as SECURITY_SCAN_COMMIT, jt as privateTextBreaks, k as scriptsOf, kn as sharedCi, kt as privateNamesFile, l as runFix, ln as signaturesOf, lt as pinnedGitDeps, m as installHook, mn as mapMarkdown, mt as scheduleMinute, n as annotations, nn as moduleUses, nr as parseJsonc, nt as jobFails, o as readConfig, on as messageOf, or as specifiersOf, ot as pipeFails, p as PRE_PUSH_HOOK, pn as findHomes, pt as runnerBudget, q as reachOf, qn as DEPENDENCY_FIELDS, qt as apiReportScript, r as createContext, rn as modulesOf, rr as readJsonc, rt as parseAdvisory, s as runChecks, sn as repoOf, sr as defaultOptions, st as isGitSpecifier, t as USAGE, tn as moduleMessage, tr as matchesAny, tt as hiddenFailures, u as summaryMarkdown, un as HOME_EXPORTS, ut as siteCheckInCi, v as GITHUB_YAML, vn as npmNames, vt as pagesSite, w as IGNORE_AFTER, wn as tsconfigTest, wt as PRIVATE_NAMES_FILE_CONFIG, x as namedVersions, xn as runCalls, xt as packNoBuildinfo, y as workflowParses, yn as readOverlay, yt as exportsRequire, z as roadmapOfLine, zn as gateTrigger, zt as nameMatches } from "./run-
|
|
1
|
+
import { $ as unreleasedChangeRule, $n as keyLine, $t as repositoryIsPublic, A as typedFiles, An as setupCue, At as privatePatterns, B as roadmapParses, Bn as prPathFilters, Bt as parsePrivateNames, C as versionTitle, Cn as hasTests, Ct as HOME_PATTERNS, D as typedScripts, Dn as SHARED_WORKFLOWS, Dt as invalidPatternBreaks, E as trustPolicy, En as SHARED_CI, Et as PRIVATE_PATTERNS_VARIABLE, F as HOME_TIMEOUT_MS, Fn as securityOneJob, Ft as isAllowedHit, G as publishedMinor, Gn as STRICT_OPTIONS, Gt as mainCheck, H as releaseFiles, Hn as gateAfterCancel, Ht as noBuildOutput, I as blockHash, In as withOneJob, It as isCommonUse, J as NPM_REGISTRY, Jn as RULE_WARN_DAYS, Jt as LICENSE_TEXTS, K as publishedMinorRule, Kn as cuePreset, Kt as coverageProvider, L as githubFetch, Ln as ACTIONS_COMMIT, Lt as lineNameHit, M as isSourcePath, Mn as SECURITY_SCAN_INPUTS, Mt as PRIVATE_NAME_LIST, N as pathsOf, Nn as SECURITY_TIMEOUT_MINUTES, Nt as PrivateNameListError, O as configsOfScript, On as callsSharedCi, Ot as noLocalPaths, P as sourceMain, Pn as securityCallers, Pt as firstNameMatch, Q as unreleasedChange, Qn as inFolder, Qt as mitText, R as sharedDocsRule, Rn as convertGate, Rt as lineNameHits, S as setVersions, Sn as serviceRunMain, St as DEFAULT_ALLOWED, T as TRAIN_SCOPES, Tn as SHARED_ACTIONS, Tt as PRIVATE_NAMES_FILE_VARIABLE, U as lockedVersions, Un as readAction, Ut as REAL_COMPARE, V as requiredScripts, Vn as summaryName, Vt as pathNameHit, W as minorOf, Wn as readWorkflow, Wt as hasImportMetaMain, X as UNSHIPPED_FILES, Xn as codePackages, Xt as licenseFile, Y as SHIPPED_FIELDS, Yn as cleanPath, Yt as authorOf, Z as npmLookup, Zn as hasFile, Zt as licenseFileOf, _ as workspaceProtocol, _n as npmDrift, _t as pagesCalls, a as listRules, an as homePackage, ar as runGit, at as swallowsTests, b as yamlFaults, bn as SERVICE_PACKAGE, bt as publishTextSafe, c as runCli, cn as reposOf, cr as parseConfig, ct as isPinned, d as HOOK_MARKER, dn as HOMES, dt as pagesAfterRelease, en as homeModule, er as lineOf, et as playwrightInstall, f as NO_READ_LINE, fn as MAP_RULE, ft as repositoryOfRemote, g as RULES, gn as mergeHomes, gt as PAGES_WORKFLOWS, h as prePush, hn as mapText, ht as pushMainOnly, i as formatResult, in as declaredName, ir as replaceLine, it as startsTests, j as testsRequired, jn as SECURITY_SCAN_COMMIT, jt as privateTextBreaks, k as scriptsOf, kn as sharedCi, kt as privateNamesFile, l as runFix, ln as signaturesOf, lt as pinnedGitDeps, m as installHook, mn as mapMarkdown, mt as scheduleMinute, n as annotations, nn as moduleUses, nr as parseJsonc, nt as jobFails, o as readConfig, on as messageOf, or as specifiersOf, ot as pipeFails, p as PRE_PUSH_HOOK, pn as findHomes, pt as runnerBudget, q as reachOf, qn as DEPENDENCY_FIELDS, qt as apiReportScript, r as createContext, rn as modulesOf, rr as readJsonc, rt as parseAdvisory, s as runChecks, sn as repoOf, sr as defaultOptions, st as isGitSpecifier, t as USAGE, tn as moduleMessage, tr as matchesAny, tt as hiddenFailures, u as summaryMarkdown, un as HOME_EXPORTS, ut as siteCheckInCi, v as GITHUB_YAML, vn as npmNames, vt as pagesSite, w as IGNORE_AFTER, wn as tsconfigTest, wt as PRIVATE_NAMES_FILE_CONFIG, x as namedVersions, xn as runCalls, xt as packNoBuildinfo, y as workflowParses, yn as readOverlay, yt as exportsRequire, z as roadmapOfLine, zn as gateTrigger, zt as nameMatches } from "./run-BjeSmSx-.js";
|
|
2
2
|
import { OWNERS, ownerOf, ownersOf, sharedNames } from "./owners.js";
|
|
3
3
|
import { i as packageFolders, n as globFolders, r as globToRegExp, s as workspaceGlobs } from "./workspace-Cx7p7bWn.js";
|
|
4
4
|
// src/release-text.ts
|