@rt-tools/agent-kit 0.23.0 → 0.26.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 +8 -2
- package/assets/agents/business-analyst.md +51 -50
- package/assets/agents/conscience.md +37 -35
- package/assets/agents/project-manager.md +49 -48
- package/assets/agents/prose-editor.md +31 -29
- package/assets/agents/qa-engineer.md +50 -48
- package/assets/agents/rules-reviewer.md +63 -58
- package/assets/agents/skill-curator.md +83 -78
- package/assets/agents/spec-critic.md +34 -29
- package/assets/agents/spec-writer.md +35 -32
- package/assets/agents/strict-teacher.md +39 -37
- package/assets/checks/archive-age.mjs +48 -28
- package/assets/checks/archive-prune.mjs +16 -14
- package/assets/checks/board-epics.github.mjs +75 -41
- package/assets/checks/board-folders.mjs +61 -0
- package/assets/checks/board-gh.github.mjs +35 -26
- package/assets/checks/board-long-work.github.mjs +24 -24
- package/assets/checks/board-paths.github.mjs +21 -16
- package/assets/checks/board-runs.github.mjs +45 -43
- package/assets/checks/board-titles.github.mjs +19 -17
- package/assets/checks/board.github.mjs +150 -128
- package/assets/checks/check-archive-age.mjs +23 -19
- package/assets/checks/check-board.github.mjs +179 -157
- package/assets/checks/check-descriptions.mjs +30 -29
- package/assets/checks/check-doc-paths.mjs +104 -82
- package/assets/checks/check-dupes.mjs +84 -80
- package/assets/checks/check-file-size.mjs +79 -70
- package/assets/checks/check-glossary.mjs +47 -37
- package/assets/checks/check-hook-scope.mjs +30 -27
- package/assets/checks/check-lib-layers.mjs +22 -21
- package/assets/checks/check-profile-drift.mjs +48 -43
- package/assets/checks/check-prose-style.mjs +125 -33
- package/assets/checks/check-push-gate.mjs +53 -50
- package/assets/checks/check-reuse.mjs +50 -40
- package/assets/checks/check-schema-drift.mjs +87 -83
- package/assets/checks/check-specs.mjs +155 -134
- package/assets/checks/check-state-next.mjs +66 -52
- package/assets/checks/check-states.mjs +32 -30
- package/assets/checks/check-styles.mjs +52 -51
- package/assets/checks/check-turn-map.mjs +54 -46
- package/assets/checks/lib-boundaries.mjs +32 -30
- package/assets/checks/lib-common.mjs +30 -29
- package/assets/checks/lib-domains.mjs +34 -34
- package/assets/checks/lib-manifests.mjs +17 -15
- package/assets/checks/lib-reexports.mjs +18 -18
- package/assets/checks/rt-kit-checks.config.mjs +174 -142
- package/assets/checks/signals.mjs +43 -39
- package/assets/checks/spec-anchors.mjs +114 -87
- package/assets/checks/spec-common.mjs +128 -84
- package/assets/checks/spec-contract.mjs +30 -30
- package/assets/checks/spec-proposed.mjs +27 -24
- package/assets/checks/spec-scenarios.mjs +51 -28
- package/assets/checks/task-new.github.mjs +85 -56
- package/assets/commands/feedback.md +65 -59
- package/assets/commands/next-session.md +64 -57
- package/assets/commands/skill-curator.md +83 -79
- package/assets/defaults/gate-map.sh +115 -91
- package/assets/defaults/project.sh +228 -178
- package/assets/defaults/shell.sh +85 -65
- package/assets/defaults/turn-map.md +45 -44
- package/assets/docs/GLOSSARY.md +142 -65
- package/assets/hooks/browser-device-id.sh +12 -12
- package/assets/hooks/browser-guard-device-id.sh +46 -14
- package/assets/hooks/browser-guard-no-asking.sh +5 -4
- package/assets/hooks/browser-guard-no-listing.sh +12 -11
- package/assets/hooks/browser-guard-no-other-drivers.sh +48 -42
- package/assets/hooks/browser-guard-require-select.sh +34 -23
- package/assets/hooks/claim-guard.sh +62 -56
- package/assets/hooks/commit-msg.sh +11 -10
- package/assets/hooks/conscience-guard.sh +91 -45
- package/assets/hooks/constitution-index.sh +16 -16
- package/assets/hooks/deny-tail.sh +28 -26
- package/assets/hooks/dev-server-guard.sh +46 -43
- package/assets/hooks/dispatch.sh +84 -39
- package/assets/hooks/docs-guard.sh +105 -86
- package/assets/hooks/exam-guard.sh +146 -84
- package/assets/hooks/git-guard-delivery-conflict.sh +38 -36
- package/assets/hooks/git-guard-delivery-draft.sh +85 -0
- package/assets/hooks/git-guard-delivery-folder.sh +50 -43
- package/assets/hooks/git-guard-delivery-signature.sh +88 -52
- package/assets/hooks/git-guard-delivery.sh +207 -253
- package/assets/hooks/git-guard-main.sh +65 -26
- package/assets/hooks/git-guard-push-tests.sh +133 -75
- package/assets/hooks/glossary-load.sh +23 -22
- package/assets/hooks/grill-gate-ask.sh +12 -11
- package/assets/hooks/grill-gate.sh +94 -87
- package/assets/hooks/guard-note.sh +20 -19
- package/assets/hooks/handoff-entry-guard.sh +26 -24
- package/assets/hooks/handoff-write.sh +74 -67
- package/assets/hooks/hook-input.sh +70 -50
- package/assets/hooks/lint-after-edit.sh +95 -61
- package/assets/hooks/observe.sh +28 -26
- package/assets/hooks/override-write-guard.sh +23 -21
- package/assets/hooks/postmortem-guard.sh +42 -39
- package/assets/hooks/profile-check.sh +22 -20
- package/assets/hooks/proposal-guard.sh +57 -49
- package/assets/hooks/prose-style-guard.sh +19 -17
- package/assets/hooks/qa-dataid-guard.sh +52 -49
- package/assets/hooks/rerun-guard.sh +31 -30
- package/assets/hooks/reuse-first-guard.sh +108 -87
- package/assets/hooks/roles.sh +14 -14
- package/assets/hooks/rule-article.sh +36 -34
- package/assets/hooks/rule-source-guard.sh +52 -36
- package/assets/hooks/skill-gate-layers.sh +59 -57
- package/assets/hooks/skill-gate-rearm.sh +15 -8
- package/assets/hooks/skill-gate.sh +89 -81
- package/assets/hooks/skill-loaded.sh +6 -6
- package/assets/hooks/sql-guard-parse.sh +68 -66
- package/assets/hooks/sql-guard-request.sh +48 -46
- package/assets/hooks/sql-guard-target.sh +57 -51
- package/assets/hooks/sql-guard-write.sh +84 -79
- package/assets/hooks/sql-guard.sh +52 -47
- package/assets/hooks/stand-login-guard.sh +104 -0
- package/assets/hooks/task-context-load.sh +60 -55
- package/assets/hooks/task-flow-context.sh +87 -69
- package/assets/hooks/task-flow-draft-guard.sh +55 -48
- package/assets/hooks/task-flow-guard.sh +67 -64
- package/assets/hooks/turn-entry-load.sh +39 -32
- package/assets/hooks/turn-exit-guard.sh +256 -204
- package/assets/hooks/turn-exit-patterns.sh +53 -0
- package/assets/hooks/utf8.sh +11 -11
- package/assets/hooks/waiting-turn-guard.sh +94 -94
- package/assets/hooks/window-fill-guard.sh +70 -62
- package/assets/hooks/work-start-guard.sh +52 -49
- package/assets/hooks/write-targets.sh +115 -30
- package/assets/laws/autonomous-work.md +29 -27
- package/assets/laws/code-structure.md +31 -30
- package/assets/laws/delivery.md +148 -137
- package/assets/laws/entity-editing.md +52 -50
- package/assets/laws/entity-models.md +14 -13
- package/assets/laws/frontend-application.md +39 -38
- package/assets/laws/lib-imports.md +27 -27
- package/assets/laws/lists.md +31 -29
- package/assets/laws/navigation.md +37 -37
- package/assets/laws/observability.md +41 -40
- package/assets/laws/project-documentation.md +106 -99
- package/assets/laws/reuse-first.md +31 -29
- package/assets/laws/shared-code.md +27 -27
- package/assets/laws/verifiability.md +131 -114
- package/assets/laws/work-conduct.md +250 -250
- package/assets/patterns/admin-lists-screen.md +72 -69
- package/assets/patterns/admin-nav-item.md +51 -46
- package/assets/patterns/angular-patterns-state.md +32 -31
- package/assets/patterns/api-layer-pair.md +33 -31
- package/assets/patterns/autonomous-work-run.md +50 -49
- package/assets/patterns/browser-verification-measure.md +143 -67
- package/assets/patterns/browser-verification-stand.md +181 -128
- package/assets/patterns/component-structure-new.md +51 -42
- package/assets/patterns/dependencies-upgrade.md +55 -39
- package/assets/patterns/doc-style-human.md +93 -0
- package/assets/patterns/doc-style-sweep.md +82 -79
- package/assets/patterns/doc-style-trace.md +87 -81
- package/assets/patterns/doc-style-write.md +130 -122
- package/assets/patterns/entity-aside.md +77 -63
- package/assets/patterns/entity-models-new.md +37 -37
- package/assets/patterns/entity-store.md +33 -33
- package/assets/patterns/git-workflow-commit.azure.md +94 -75
- package/assets/patterns/git-workflow-commit.github.md +153 -129
- package/assets/patterns/git-workflow-commit.gitlab.md +96 -78
- package/assets/patterns/git-workflow-docker.md +165 -147
- package/assets/patterns/git-workflow-freshness.md +45 -45
- package/assets/patterns/git-workflow-merge.md +99 -86
- package/assets/patterns/git-workflow-migration.md +54 -52
- package/assets/patterns/git-workflow-pr-ready.md +57 -56
- package/assets/patterns/git-workflow-pr.azure.md +126 -121
- package/assets/patterns/git-workflow-pr.github.md +179 -175
- package/assets/patterns/git-workflow-pr.gitlab.md +138 -131
- package/assets/patterns/git-workflow-restart.md +35 -31
- package/assets/patterns/git-workflow-secrets.md +80 -73
- package/assets/patterns/git-workflow-stack.md +131 -106
- package/assets/patterns/lib-layers-move.md +62 -53
- package/assets/patterns/lib-layers-new.md +59 -45
- package/assets/patterns/observability-record.md +72 -67
- package/assets/patterns/platform-access-di.md +31 -29
- package/assets/patterns/reuse-first-extend.md +66 -61
- package/assets/patterns/shared-code-new.md +39 -38
- package/assets/patterns/spec-driven-domain.md +161 -151
- package/assets/patterns/spec-driven-rule.md +179 -168
- package/assets/patterns/spec-driven-sweep.md +41 -39
- package/assets/patterns/status-report-table.github.md +37 -36
- package/assets/patterns/styling-bem-component.md +42 -42
- package/assets/patterns/styling-bem-layout.md +39 -34
- package/assets/patterns/styling-bem-sheet.md +59 -58
- package/assets/patterns/task-flow-archive.md +222 -215
- package/assets/patterns/task-flow-close.md +215 -203
- package/assets/patterns/task-flow-handoff.md +154 -145
- package/assets/patterns/task-flow-resume.md +138 -133
- package/assets/patterns/task-flow-start.md +204 -192
- package/assets/patterns/testing-e2e.md +103 -92
- package/assets/patterns/testing-unit.md +77 -70
- package/assets/patterns/ts-procedure.md +32 -29
- package/assets/patterns/turn-entry-map.md +50 -48
- package/assets/pitfalls/agent-kit.md +152 -141
- package/assets/pitfalls/doc-style.md +96 -91
- package/assets/pitfalls/git-workflow.azure.md +49 -46
- package/assets/pitfalls/git-workflow.github.md +264 -234
- package/assets/pitfalls/git-workflow.gitlab.md +49 -45
- package/assets/pitfalls/spec-driven.md +73 -71
- package/assets/pitfalls/styling-bem.md +46 -40
- package/assets/pitfalls/task-flow.md +262 -246
- package/assets/pitfalls/testing.md +99 -92
- package/assets/pitfalls/turn-conduct.md +96 -81
- package/assets/rules/angular-patterns.md +81 -80
- package/assets/rules/api-layer.md +77 -74
- package/assets/rules/autonomous-work.md +75 -74
- package/assets/rules/browser-verification.md +223 -188
- package/assets/rules/component-structure.md +72 -69
- package/assets/rules/dependencies.md +74 -67
- package/assets/rules/deploy-flow.azure.md +118 -108
- package/assets/rules/deploy-flow.github.md +145 -135
- package/assets/rules/deploy-flow.gitlab.md +120 -110
- package/assets/rules/doc-style.md +209 -148
- package/assets/rules/entity-conventions.needs-admin.md +81 -79
- package/assets/rules/entity-models.md +73 -70
- package/assets/rules/git-workflow.azure.md +224 -228
- package/assets/rules/git-workflow.github.md +250 -242
- package/assets/rules/git-workflow.gitlab.md +218 -217
- package/assets/rules/lib-layers.md +85 -86
- package/assets/rules/lists.md +101 -97
- package/assets/rules/navigation.md +78 -78
- package/assets/rules/observability.needs-app.md +165 -153
- package/assets/rules/platform-access.md +76 -75
- package/assets/rules/reuse-first.md +153 -137
- package/assets/rules/shared-code.md +82 -79
- package/assets/rules/spec-driven.md +272 -260
- package/assets/rules/status-report.md +55 -58
- package/assets/rules/styling-bem.md +83 -72
- package/assets/rules/task-flow.md +282 -270
- package/assets/rules/testing.md +224 -188
- package/assets/rules/turn-conduct.md +255 -258
- package/assets/rules/turn-entry.md +92 -87
- package/assets/rules/typescript-conventions.md +94 -88
- package/assets/samples/specs/_template/spec.md +47 -47
- package/assets/samples/tasks/_template/grill.md +20 -20
- package/assets/samples/tasks/_template/plan.md +32 -30
- package/assets/samples/tasks/_template/progress.md +16 -16
- package/assets/skills/agent-kit-extend.md +129 -113
- package/assets/skills/agent-kit.md +236 -222
- package/assets/skills/write-a-skill.md +76 -71
- package/assets/templates/findings.md +19 -19
- package/assets/templates/gate-map.sh +16 -14
- package/assets/templates/implementation.md +28 -27
- package/assets/templates/pattern.md +17 -17
- package/assets/templates/pitfalls.md +6 -6
- package/assets/templates/postmortem.md +24 -23
- package/assets/templates/project.sh +24 -24
- package/assets/templates/proposal.md +62 -60
- package/assets/templates/rule.md +38 -38
- package/assets/workflows/feature.js +46 -46
- package/assets/workflows/plan.js +54 -54
- package/lib/catalog.d.ts +2 -0
- package/lib/catalog.d.ts.map +1 -1
- package/lib/catalog.js +4 -3
- package/lib/catalog.js.map +1 -1
- package/lib/commands.d.ts.map +1 -1
- package/lib/commands.js +68 -4
- package/lib/commands.js.map +1 -1
- package/lib/companion.js +3 -2
- package/lib/companion.js.map +1 -1
- package/lib/enroll.d.ts +7 -1
- package/lib/enroll.d.ts.map +1 -1
- package/lib/enroll.js +13 -4
- package/lib/enroll.js.map +1 -1
- package/lib/observations.d.ts +10 -1
- package/lib/observations.d.ts.map +1 -1
- package/lib/observations.js +1 -0
- package/lib/observations.js.map +1 -1
- package/lib/override-marks.d.ts +24 -0
- package/lib/override-marks.d.ts.map +1 -0
- package/lib/override-marks.js +98 -0
- package/lib/override-marks.js.map +1 -0
- package/lib/plan.d.ts +11 -0
- package/lib/plan.d.ts.map +1 -1
- package/lib/plan.js +10 -1
- package/lib/plan.js.map +1 -1
- package/lib/ship.d.ts +0 -7
- package/lib/ship.d.ts.map +1 -1
- package/lib/ship.js +10 -2
- package/lib/ship.js.map +1 -1
- package/lib/shipment.d.ts.map +1 -1
- package/lib/shipment.js +7 -3
- package/lib/shipment.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +45 -11
- package/lib/sync.js.map +1 -1
- package/package.json +1 -1
- package/rt-tools-agent-kit-0.26.0.tgz +0 -0
- package/rt-tools-agent-kit-0.23.0.tgz +0 -0
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Audit of the work queue against what the delivery law requires of a task and its PR.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* The delivery guard refuses a miss at the moment it is made, but it acts only on the agent's
|
|
6
|
+
* commands: a task created past it and a PR opened by hand it does not see. This audit answers
|
|
7
|
+
* a different question — "is the whole queue in order right now" — and so it looks at the state,
|
|
8
|
+
* not at the command.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* It judges only what is open. Closed tasks and merged PRs are history: of the last forty merged
|
|
11
|
+
* PRs, thirty-six came from branches with no task behind them, and a check that is red forever
|
|
12
|
+
* would be no different from no check at all.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* PR
|
|
16
|
-
*
|
|
14
|
+
* It does not judge the branch name. An open PR cannot have its branch renamed — that is a new
|
|
15
|
+
* branch and a new PR — and a check that demands the impossible gets bypassed, not carried out.
|
|
16
|
+
* The branch name is watched by the guard at the moment of `git checkout -b` and `gh pr create`.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* The task's column is judged by its PR: an open PR means review, none means no review. The
|
|
19
|
+
* moment a task is taken into work is not visible from here at all — the board has no branch —
|
|
20
|
+
* and "In progress" is required of nobody here.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* The run on the head is asked by this audit too: a PR page without a run looks the same as a
|
|
23
|
+
* page with a green one — it has no colour in either case — and a head with no run behind it is
|
|
24
|
+
* found only when someone opens the list of runs by hand.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
* перестаёт что-либо значить.
|
|
26
|
+
* No network or no token — exit code zero: a check that fails on a plane stops meaning anything.
|
|
28
27
|
*
|
|
29
|
-
*
|
|
28
|
+
* A non-zero exit code and the list of discrepancies.
|
|
30
29
|
*/
|
|
31
30
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
32
31
|
import { join } from 'node:path';
|
|
@@ -50,6 +49,7 @@ import {
|
|
|
50
49
|
taskDirs,
|
|
51
50
|
} from './board.mjs';
|
|
52
51
|
import { onlyIgnoredPaths } from './board-paths.mjs';
|
|
52
|
+
import { checkBranchFolders } from './board-folders.mjs';
|
|
53
53
|
import { checkLongWork } from './board-long-work.mjs';
|
|
54
54
|
import { HAS_PIPELINE, deployLag, evictedOnHead, headCommittedAt, lastDeploy, runsOnHead, verdictOnHead } from './board-runs.mjs';
|
|
55
55
|
import { checkEpicLinks } from './board-epics.mjs';
|
|
@@ -58,30 +58,31 @@ import { CONFIG, ROOT } from './rt-kit-checks.config.mjs';
|
|
|
58
58
|
|
|
59
59
|
const IN_REVIEW = STATUS_OPTIONS[IN_REVIEW_STATUS].name;
|
|
60
60
|
const TASKS_DIR = join(ROOT, CONFIG.tasksDir);
|
|
61
|
-
/**
|
|
61
|
+
/** Age of an abandoned draft after which it stops looking like one started today. */
|
|
62
62
|
const DRAFT_DAYS = 7;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
64
|
+
* How long a head is given for a run to start behind it. The event does not reach the hosting
|
|
65
|
+
* instantly, and an audit called right after a push would otherwise go red on a healthy branch.
|
|
66
66
|
*/
|
|
67
67
|
const RUN_GRACE_MINUTES = 10;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
69
|
+
* The tree's pipeline. Runs are asked for only where they have somewhere to come from: a tree
|
|
70
|
+
* without a pipeline would get a line for every open PR, and about nothing.
|
|
71
71
|
*/
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
73
|
+
* The rollout workflow and the branch production is compared with. A tree that names no workflow
|
|
74
|
+
* gets no production audit — and the audit says so out loud: silence would read as "production
|
|
75
|
+
* matches".
|
|
75
76
|
*/
|
|
76
77
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
78
|
+
* Labels that mark cargo in the work queue — incident analyses and proposals sent by trees. They
|
|
79
|
+
* are not tasks: their title has no number, they have no executor, they are not on the board — and
|
|
80
|
+
* the audit printed three lines for each, among which a real discrepancy could no longer be read.
|
|
81
|
+
* Such records are no longer created in the queue, and those created the old way are not going
|
|
82
|
+
* anywhere: closing them is the owner's decision, not the audit's.
|
|
82
83
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
84
|
+
* The label name names the tree: each has its own, and an invented default would match nothing
|
|
85
|
+
* and silently switch the filtering off. A tree that names no label is judged as before.
|
|
85
86
|
*/
|
|
86
87
|
const CARGO_LABELS = new Set(CONFIG.board?.cargoLabels ?? []);
|
|
87
88
|
|
|
@@ -92,10 +93,10 @@ const problems = [];
|
|
|
92
93
|
const report = (message) => problems.push(message);
|
|
93
94
|
|
|
94
95
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
96
|
+
* The grill of the owner's request goes before the task is created and lives in `_draft-<slug>`.
|
|
97
|
+
* Abandoned halfway, it stays on disk outside history and looks the same as one started today:
|
|
98
|
+
* the second session takes up the same thing anew. Age is the only sign available here: there is
|
|
99
|
+
* no task behind the draft yet, and nobody to ask about it.
|
|
99
100
|
*/
|
|
100
101
|
function checkDrafts() {
|
|
101
102
|
const now = Date.now();
|
|
@@ -105,34 +106,35 @@ function checkDrafts() {
|
|
|
105
106
|
}
|
|
106
107
|
const age = Math.floor((now - statSync(join(TASKS_DIR, name)).mtimeMs) / 86400000);
|
|
107
108
|
if (age >= DRAFT_DAYS) {
|
|
108
|
-
report(`${CONFIG.tasksDir}/${name}/:
|
|
109
|
+
report(`${CONFIG.tasksDir}/${name}/: the grill was abandoned ${age} days ago — create the task or delete the folder`);
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
/**
|
|
114
|
-
*
|
|
115
|
+
* The meaningful words of a title: the task key and short function words are thrown out.
|
|
115
116
|
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
117
|
+
* The parsing is deliberately rough — a match of words here is not a verdict but a reason to
|
|
118
|
+
* look: exact comparison of titles finds nothing, because a duplicate is written in other words.
|
|
118
119
|
*/
|
|
119
120
|
function closesNumbers(body) {
|
|
120
121
|
return [...String(body ?? '').matchAll(/\bCloses\s+#(\d+)\b/gi)].map((match) => Number(match[1]));
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
125
|
+
* The bypass line in the PR body. The form is the same one the delivery guard reads: it starts
|
|
126
|
+
* the line and accepts no placeholders — otherwise a text that names this line would lift the
|
|
127
|
+
* requirement by itself.
|
|
126
128
|
*/
|
|
127
129
|
const FOLDER_SKIP = /^[ \t]*Task-folder-skip:[ \t]*[^\s<"'][^\s"']{2,}/im;
|
|
128
130
|
|
|
129
131
|
/**
|
|
130
|
-
*
|
|
132
|
+
* Whether the PR branch carries its task folder.
|
|
131
133
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
134
|
+
* The branch is asked, not the working tree: a folder removed on the machine and not committed
|
|
135
|
+
* arrives together with the branch. Local references are of little use here — the PR branch may
|
|
136
|
+
* not be fetched here at all — so the contents are taken from the hosting. The refusal "no such
|
|
137
|
+
* path" means there is no folder; everything else goes up and is treated as no connection.
|
|
136
138
|
*/
|
|
137
139
|
function folderInBranch(branch, options) {
|
|
138
140
|
const path = `${CONFIG.tasksDir}/${branch}`;
|
|
@@ -149,23 +151,23 @@ function folderInBranch(branch, options) {
|
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
/**
|
|
152
|
-
*
|
|
154
|
+
* The run on the head of an open PR.
|
|
153
155
|
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
156
|
+
* A silent page and a green run read the same, and the event does not always reach the hosting:
|
|
157
|
+
* in the hour of its failures the push went through and no run started behind it. The audit names
|
|
158
|
+
* such a head while the PR is still open — after the merge it is too late to learn about it.
|
|
157
159
|
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
+
* What counts is the fact of a run, not its colour. A running and a failed run are both visible
|
|
161
|
+
* on the PR page; only absence is invisible, and the audit speaks of exactly that.
|
|
160
162
|
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
+
* A fresh head is not judged: time passes between the push and the run, and a red line in that
|
|
164
|
+
* gap would mean "wait", not "fix".
|
|
163
165
|
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
166
|
+
* A conflicting PR gets no run at all, and the cause is not a lost event: the pipeline checks the
|
|
167
|
+
* merge of the branch with its base, and under a conflict there is no merge. The advice to bring
|
|
168
|
+
* the event back is followed literally and does not help — in one session a PR was closed and
|
|
169
|
+
* reopened twice in a row, and the run started only after the main branch was merged in. So the
|
|
170
|
+
* line names the cause that can be fixed.
|
|
169
171
|
*/
|
|
170
172
|
function checkHeadRun(pull, options) {
|
|
171
173
|
if (checkEvicted(pull, options)) {
|
|
@@ -188,35 +190,52 @@ function checkHeadRun(pull, options) {
|
|
|
188
190
|
|
|
189
191
|
if (pull.mergeable === 'CONFLICTING') {
|
|
190
192
|
report(
|
|
191
|
-
`PR #${pull.number}:
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
`PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)} and there will be none while it conflicts — ` +
|
|
194
|
+
`the pipeline checks the merge of the branch with the base, and there is no merge while it conflicts; merge the main branch in and push, ` +
|
|
195
|
+
`reopening the PR does not help here`
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// A PR on top of a neighbouring one gets no run: the workflow listens for PRs into the main
|
|
202
|
+
// branch and does not see events with another base. The line about a lost event is wrong
|
|
203
|
+
// here twice: the event was not lost, and closing and reopening will not bring it back — the
|
|
204
|
+
// advice is followed literally, no run starts, and on the second try the breakage is looked
|
|
205
|
+
// for in the hosting.
|
|
206
|
+
if (pull.baseRefName && pull.baseRefName !== MAIN_BRANCH) {
|
|
207
|
+
report(
|
|
208
|
+
`PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)} and there will be none — ` +
|
|
209
|
+
`the request is opened into the branch «${pull.baseRefName}», and the workflow listens to requests into the main one; ` +
|
|
210
|
+
`move the base to «${MAIN_BRANCH}» once the lower request is merged`
|
|
194
211
|
);
|
|
195
212
|
|
|
196
213
|
return;
|
|
197
214
|
}
|
|
198
215
|
|
|
199
216
|
report(
|
|
200
|
-
`PR #${pull.number}:
|
|
201
|
-
|
|
217
|
+
`PR #${pull.number}: there is no run on the tip ${pull.headRefOid.slice(0, 8)}, and it has lain there ${minutes} min — ` +
|
|
218
|
+
`the pipeline received no event; bring it back by a new commit or by reopening the PR ` +
|
|
202
219
|
`(gh pr close ${pull.number} && gh pr reopen ${pull.number})`
|
|
203
220
|
);
|
|
204
221
|
}
|
|
205
222
|
|
|
206
223
|
/**
|
|
207
|
-
*
|
|
224
|
+
* A head run evicted from the pipeline queue.
|
|
208
225
|
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
226
|
+
* The queue group protects a running run and does not protect a waiting one: the hosting keeps
|
|
227
|
+
* one waiting run per group, and the next one to start evicts the previous. The branch behind
|
|
228
|
+
* such a run was not checked by a single line, yet by the work queue it looks checked — there is
|
|
229
|
+
* a run on the head, and the audit counts exactly the fact.
|
|
213
230
|
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
231
|
+
* Judged before the absence of a run and before the colour: otherwise one head gets two lines
|
|
232
|
+
* about one thing. Returns `true` when the line has been said, and the other head checks are
|
|
233
|
+
* skipped.
|
|
216
234
|
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
235
|
+
* The line names both commands, in the order they are called. The guard refuses a rerun until the
|
|
236
|
+
* output of that step has been read within the same turn, and the order in the line meets the
|
|
237
|
+
* requirement by itself: the executor calls what is written and does not hit a refusal on the
|
|
238
|
+
* second step.
|
|
220
239
|
*/
|
|
221
240
|
function checkEvicted(pull, options) {
|
|
222
241
|
const evicted = evictedOnHead(pull.headRefOid, options);
|
|
@@ -226,23 +245,23 @@ function checkEvicted(pull, options) {
|
|
|
226
245
|
|
|
227
246
|
const run = evicted[0];
|
|
228
247
|
report(
|
|
229
|
-
`PR #${pull.number}:
|
|
230
|
-
|
|
231
|
-
|
|
248
|
+
`PR #${pull.number}: the run ${run} on the tip ${pull.headRefOid.slice(0, 8)} was pushed out of the pipeline queue — ` +
|
|
249
|
+
`it has zero steps, the branch was not checked, and in the list it looks failed; ` +
|
|
250
|
+
`read the run and restart it (gh run view ${run} && gh run rerun ${run})`
|
|
232
251
|
);
|
|
233
252
|
return true;
|
|
234
253
|
}
|
|
235
254
|
|
|
236
255
|
/**
|
|
237
|
-
*
|
|
256
|
+
* Finished work left as a draft.
|
|
238
257
|
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
258
|
+
* On a draft the merge button is blocked by the hosting itself, so a green PR page allows the
|
|
259
|
+
* owner nothing: a list in which everything is grey reads as "the work is not done". The
|
|
260
|
+
* draft-lifting guard does not reach here — it judges one turn and stays silent while the branch
|
|
261
|
+
* carries its task folder; the audit looks at the state of the whole queue.
|
|
243
262
|
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
263
|
+
* Four PRs stood as drafts for two days — the analysis is the record
|
|
264
|
+
* "2026-08-18-ready-work-left-in-drafts" in the intake.
|
|
246
265
|
*/
|
|
247
266
|
function checkReadyDraft(pull, options) {
|
|
248
267
|
if (pull.isDraft !== true) {
|
|
@@ -253,21 +272,23 @@ function checkReadyDraft(pull, options) {
|
|
|
253
272
|
}
|
|
254
273
|
|
|
255
274
|
report(
|
|
256
|
-
`PR #${pull.number}:
|
|
257
|
-
|
|
275
|
+
`PR #${pull.number}: the run on the tip ${pull.headRefOid.slice(0, 8)} is green, and the PR is a draft — ` +
|
|
276
|
+
`take the task folder apart and lift the draft (gh pr ready ${pull.number}) or tell the owner what you are waiting for`
|
|
258
277
|
);
|
|
259
278
|
}
|
|
260
279
|
|
|
261
280
|
/**
|
|
262
|
-
*
|
|
281
|
+
* A PR that conflicts with the main branch.
|
|
263
282
|
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
283
|
+
* A conflict arrives in a handed-over PR through someone else's merge, without a single action by
|
|
284
|
+
* its author: the base checked at opening goes stale the minute the owner merges a neighbouring
|
|
285
|
+
* piece of work. The draft-lifting guard does not reach here — it judges one turn, and a PR stands
|
|
286
|
+
* in the queue for days.
|
|
267
287
|
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
288
|
+
* Only a direct "conflicting" is judged: `UNKNOWN` means the hosting is still computing
|
|
289
|
+
* mergeability, and a line about it would go red on every fresh head. Two PRs went to review with
|
|
290
|
+
* a conflict this way — the analysis is the record
|
|
291
|
+
* "2026-08-20-drafts-cleared-without-re-reading-pr-state" in the intake.
|
|
271
292
|
*/
|
|
272
293
|
function checkConflicting(pull) {
|
|
273
294
|
if (pull.mergeable !== 'CONFLICTING') {
|
|
@@ -275,15 +296,16 @@ function checkConflicting(pull) {
|
|
|
275
296
|
}
|
|
276
297
|
|
|
277
298
|
report(
|
|
278
|
-
`PR #${pull.number}:
|
|
279
|
-
|
|
299
|
+
`PR #${pull.number}: it conflicts with the main branch — merge it into the task branch, resolve the conflict and push; ` +
|
|
300
|
+
`the owner cannot merge this request, and on the page that shows only inside it`
|
|
280
301
|
);
|
|
281
302
|
}
|
|
282
303
|
|
|
283
304
|
let checked = { issues: 0, pulls: 0, cargo: 0 };
|
|
284
305
|
|
|
285
|
-
//
|
|
306
|
+
// Drafts are judged by the disk and so are checked always: no connection is needed for that.
|
|
286
307
|
checkDrafts();
|
|
308
|
+
checkBranchFolders(report, MAIN_BRANCH);
|
|
287
309
|
|
|
288
310
|
let offline = false;
|
|
289
311
|
try {
|
|
@@ -291,28 +313,28 @@ try {
|
|
|
291
313
|
const board = fetchBoard(options);
|
|
292
314
|
const issues = fetchIssues('all', options);
|
|
293
315
|
const allOpen = issues.filter((issue) => issue.state === 'OPEN');
|
|
294
|
-
//
|
|
295
|
-
//
|
|
296
|
-
//
|
|
316
|
+
// Filtering happens once and before all task checks: a labelled record is not a task as a
|
|
317
|
+
// whole, not by half — it is judged neither by title, nor by executor, nor by the board, nor
|
|
318
|
+
// by the digest of matching titles, nor by the link to an epic.
|
|
297
319
|
const open = CARGO_LABELS.size === 0 ? allOpen : allOpen.filter((issue) => !(issue.labels ?? []).some((label) => CARGO_LABELS.has(label.name)));
|
|
298
320
|
const pulls = fetchOpenPulls(options);
|
|
299
321
|
checked = { issues: issues.length, pulls: pulls.length, cargo: allOpen.length - open.length };
|
|
300
322
|
|
|
301
323
|
for (const item of board.foreign) {
|
|
302
|
-
report(
|
|
324
|
+
report(`the board: ${item} — the board holds tasks, not PRs about them`);
|
|
303
325
|
}
|
|
304
|
-
//
|
|
305
|
-
//
|
|
306
|
-
//
|
|
326
|
+
// The board is checked only for open tasks. A closed one left the queue by a merge, and the
|
|
327
|
+
// board has no column for it: a line about it has nothing to close it with. Six such lines
|
|
328
|
+
// hung in every run and drowned out the real task that never made it to the board.
|
|
307
329
|
for (const issue of open) {
|
|
308
330
|
if (!board.issues.has(issue.number)) {
|
|
309
|
-
report(`#${issue.number}:
|
|
331
|
+
report(`#${issue.number}: the task is not on the board — nobody watches it`);
|
|
310
332
|
}
|
|
311
333
|
if (numberFromTitle(issue.title) !== issue.number) {
|
|
312
|
-
report(`#${issue.number}:
|
|
334
|
+
report(`#${issue.number}: the title does not start with [${TASK_KEY}-${issue.number}] — «${issue.title}»`);
|
|
313
335
|
}
|
|
314
336
|
if (issue.assignees.length === 0) {
|
|
315
|
-
report(`#${issue.number}:
|
|
337
|
+
report(`#${issue.number}: the task has no assignee — by the work queue there is no seeing who took it`);
|
|
316
338
|
}
|
|
317
339
|
}
|
|
318
340
|
|
|
@@ -325,40 +347,40 @@ try {
|
|
|
325
347
|
for (const pull of pulls) {
|
|
326
348
|
const titleNumber = numberFromTitle(pull.title);
|
|
327
349
|
if (titleNumber === null) {
|
|
328
|
-
report(`PR #${pull.number}:
|
|
350
|
+
report(`PR #${pull.number}: the title does not start with [${TASK_KEY}-<number>] — «${pull.title}»`);
|
|
329
351
|
continue;
|
|
330
352
|
}
|
|
331
353
|
if (!closesNumbers(pull.body).includes(titleNumber)) {
|
|
332
|
-
report(`PR #${pull.number}:
|
|
354
|
+
report(`PR #${pull.number}: the body carries no line «Closes #${titleNumber}» — on the board it will not attach to the task`);
|
|
333
355
|
}
|
|
334
356
|
if (!openNumbers.has(titleNumber)) {
|
|
335
|
-
report(`PR #${pull.number}:
|
|
357
|
+
report(`PR #${pull.number}: the task #${titleNumber} is not among the open ones — a task has one branch`);
|
|
336
358
|
}
|
|
337
359
|
if (claimed.has(titleNumber)) {
|
|
338
|
-
report(`PR #${pull.number}:
|
|
360
|
+
report(`PR #${pull.number}: the task #${titleNumber} is already closed by PR #${claimed.get(titleNumber)} — a task has one branch`);
|
|
339
361
|
} else {
|
|
340
362
|
claimed.set(titleNumber, pull.number);
|
|
341
363
|
}
|
|
342
364
|
|
|
343
|
-
//
|
|
344
|
-
//
|
|
345
|
-
//
|
|
346
|
-
//
|
|
347
|
-
//
|
|
365
|
+
// A task folder lying in the branch of an open PR is a discrepancy from the PR's first
|
|
366
|
+
// minute: the clean-up comes before it opens, and opening with the folder in place is
|
|
367
|
+
// refused by the delivery guard. A folder that got this far means a bypass — or a PR
|
|
368
|
+
// opened past the guard. Said after the merge, this line is no longer fixed by the same
|
|
369
|
+
// PR: the work has moved on, and a second task is created for the clean-up.
|
|
348
370
|
if (HAS_PIPELINE && pull.headRefOid) {
|
|
349
371
|
checkHeadRun(pull, options);
|
|
350
372
|
}
|
|
351
373
|
|
|
352
374
|
checkConflicting(pull);
|
|
353
375
|
|
|
354
|
-
//
|
|
355
|
-
//
|
|
356
|
-
//
|
|
376
|
+
// The PR falling behind the main branch: the guard judges the base once, at the minute of
|
|
377
|
+
// opening, and a PR stands for days. Merged while behind, it carries into main a
|
|
378
|
+
// combination nobody checked — and the PR page does not show this: the run on it is green.
|
|
357
379
|
const behind = behindMain(pull.headRefName, MAIN_BRANCH, options);
|
|
358
380
|
if (behind > 0) {
|
|
359
381
|
report(
|
|
360
|
-
`PR #${pull.number}:
|
|
361
|
-
|
|
382
|
+
`PR #${pull.number}: the branch lags «${MAIN_BRANCH}» by ${behind} commits — the run went from a base ` +
|
|
383
|
+
`the main branch no longer carries. Merge the main branch in, revise the check set by what the branch carries now, and run again`
|
|
362
384
|
);
|
|
363
385
|
}
|
|
364
386
|
|
|
@@ -366,45 +388,45 @@ try {
|
|
|
366
388
|
const folder = folderInBranch(pull.headRefName, options);
|
|
367
389
|
if (folder !== null) {
|
|
368
390
|
report(
|
|
369
|
-
`PR #${pull.number}:
|
|
391
|
+
`PR #${pull.number}: the branch carries the task folder «${folder}/» — the request opens after the folder is taken apart. Take it apart by this same PR or put the line «Task-folder-skip: <reason>» into the body`
|
|
370
392
|
);
|
|
371
393
|
}
|
|
372
394
|
}
|
|
373
395
|
}
|
|
374
396
|
|
|
375
|
-
//
|
|
376
|
-
//
|
|
377
|
-
//
|
|
397
|
+
// The task's column and its PR are audited both ways: an open PR with the task in "Backlog"
|
|
398
|
+
// reads as work not yet started, and "In review" without an open PR as a review nobody is
|
|
399
|
+
// waiting for.
|
|
378
400
|
for (const issue of open) {
|
|
379
401
|
const status = board.items.get(issue.number)?.status ?? null;
|
|
380
402
|
const pull = claimed.get(issue.number);
|
|
381
403
|
if (pull !== undefined && status !== IN_REVIEW) {
|
|
382
404
|
report(
|
|
383
|
-
`#${issue.number}: PR #${pull}
|
|
405
|
+
`#${issue.number}: PR #${pull} is open, and the task stands at «${status ?? 'outside the columns'}» — npm run task:move -- ${issue.number} ${IN_REVIEW_STATUS}`
|
|
384
406
|
);
|
|
385
407
|
}
|
|
386
408
|
if (pull === undefined && status === IN_REVIEW) {
|
|
387
|
-
report(`#${issue.number}:
|
|
409
|
+
report(`#${issue.number}: the task awaits review, and there is no open PR behind it — the column lags the work`);
|
|
388
410
|
}
|
|
389
411
|
}
|
|
390
412
|
|
|
391
|
-
//
|
|
392
|
-
//
|
|
393
|
-
//
|
|
413
|
+
// The task folder dies with the task: what explains a settled decision moves to
|
|
414
|
+
// `docs/archive/`, the rest is deleted. Left next to the current ones, it reads as current —
|
|
415
|
+
// the more convincingly, the older it is.
|
|
394
416
|
for (const name of taskDirs()) {
|
|
395
417
|
const number = numberFromTaskDir(name.split('/').pop());
|
|
396
418
|
if (number === null || openNumbers.has(number)) {
|
|
397
419
|
continue;
|
|
398
420
|
}
|
|
399
421
|
if (issues.some((issue) => issue.number === number)) {
|
|
400
|
-
report(`${CONFIG.tasksDir}/${name}/:
|
|
422
|
+
report(`${CONFIG.tasksDir}/${name}/: the task #${number} is closed, and the folder lies among the current ones — take it apart`);
|
|
401
423
|
}
|
|
402
424
|
}
|
|
403
425
|
} catch (error) {
|
|
404
426
|
if (error instanceof OfflineError) {
|
|
405
|
-
//
|
|
406
|
-
//
|
|
407
|
-
console.log(`check-board:
|
|
427
|
+
// The work queue cannot be checked without a connection, but the folders on disk can:
|
|
428
|
+
// staying silent about them would mean losing the only thing that can still be said here.
|
|
429
|
+
console.log(`check-board: the work queue is skipped, there is nothing to check with — ${error.message}`);
|
|
408
430
|
offline = true;
|
|
409
431
|
} else {
|
|
410
432
|
console.error(`check-board: ${String(error.message ?? error)}`);
|
|
@@ -412,60 +434,60 @@ try {
|
|
|
412
434
|
}
|
|
413
435
|
}
|
|
414
436
|
|
|
415
|
-
//
|
|
416
|
-
//
|
|
417
|
-
//
|
|
437
|
+
// Production is audited against the main branch by the last successful rollout. A task leaves the
|
|
438
|
+
// queue by a merge, but a merge is not yet production: where the rollout is started by hand, any
|
|
439
|
+
// number of commits may lie between them, and there is nowhere to notice this from.
|
|
418
440
|
if (!offline && DEPLOY_WORKFLOW) {
|
|
419
441
|
try {
|
|
420
442
|
const token = botToken() ?? undefined;
|
|
421
443
|
const lag = deployLag(DEPLOY_WORKFLOW, MAIN_BRANCH, { token });
|
|
422
444
|
if (lag === null) {
|
|
423
|
-
report(
|
|
445
|
+
report(`there was not a single rollout by «${DEPLOY_WORKFLOW}» — there is nothing to compare production against`);
|
|
424
446
|
} else if (lag.behind > 0) {
|
|
425
447
|
report(
|
|
426
|
-
|
|
448
|
+
`production lags «${MAIN_BRANCH}» by ${lag.behind} commits: the last rollout is ${lag.sha.slice(0, 8)} of ${String(lag.at).slice(0, 10)}`
|
|
427
449
|
);
|
|
428
450
|
}
|
|
429
451
|
|
|
430
|
-
//
|
|
431
|
-
//
|
|
432
|
-
//
|
|
452
|
+
// Why production fell behind, the lag does not say: it is counted by the last SUCCESSFUL
|
|
453
|
+
// rollout, and "not started" and "failed" look the same through it. They lead to different
|
|
454
|
+
// things — the first is started, the second is read by its output and fixed.
|
|
433
455
|
const deploy = lastDeploy(DEPLOY_WORKFLOW, { token });
|
|
434
456
|
if (deploy.verdict === 'failure') {
|
|
435
457
|
report(
|
|
436
|
-
|
|
437
|
-
|
|
458
|
+
`the rollout «${DEPLOY_WORKFLOW}» failed on ${String(deploy.sha).slice(0, 8)} of ${String(deploy.at).slice(0, 10)}: ` +
|
|
459
|
+
`the main branch is ahead of production, and merges on top will travel the same way — ${deploy.url}`
|
|
438
460
|
);
|
|
439
461
|
}
|
|
440
462
|
} catch (error) {
|
|
441
463
|
if (error instanceof OfflineError) {
|
|
442
|
-
console.log(`check-board:
|
|
464
|
+
console.log(`check-board: production was not checked — ${error.message}`);
|
|
443
465
|
} else {
|
|
444
466
|
throw error;
|
|
445
467
|
}
|
|
446
468
|
}
|
|
447
469
|
}
|
|
448
470
|
|
|
449
|
-
//
|
|
471
|
+
// What was not checked is named out loud: silence about runs would read as "the runs are there".
|
|
450
472
|
if (!offline && !DEPLOY_WORKFLOW) {
|
|
451
|
-
console.log('check-board:
|
|
473
|
+
console.log('check-board: production was not checked against the main branch — the rollout workflow is not named in the tree config');
|
|
452
474
|
}
|
|
453
475
|
|
|
454
|
-
//
|
|
455
|
-
//
|
|
476
|
+
// What was filtered out is named by number: silent filtering is indistinguishable from a broken
|
|
477
|
+
// audit — a label named with a typo would switch the check off entirely and say nothing about it.
|
|
456
478
|
if (!offline && checked.cargo > 0) {
|
|
457
|
-
console.log(`check-board:
|
|
479
|
+
console.log(`check-board: cargo records in the queue ${checked.cargo} — they are not judged as tasks`);
|
|
458
480
|
}
|
|
459
481
|
|
|
460
482
|
if (!offline && !HAS_PIPELINE) {
|
|
461
|
-
console.log('check-board:
|
|
483
|
+
console.log('check-board: the runs on the tips were not asked — the tree has no pipeline file');
|
|
462
484
|
}
|
|
463
485
|
|
|
464
486
|
if (problems.length > 0) {
|
|
465
|
-
console.error(`check-board:
|
|
487
|
+
console.error(`check-board: divergences ${problems.length}\n`);
|
|
466
488
|
problems.forEach((problem) => console.error(` ${problem}`));
|
|
467
|
-
console.error('\
|
|
468
|
-
console.error('
|
|
489
|
+
console.error('\nA task is created by the command npm run task:new — it does all four steps at once.');
|
|
490
|
+
console.error('The task folder and taking it apart — the rule task-flow.');
|
|
469
491
|
process.exit(1);
|
|
470
492
|
}
|
|
471
493
|
|
|
@@ -473,4 +495,4 @@ if (offline) {
|
|
|
473
495
|
process.exit(0);
|
|
474
496
|
}
|
|
475
497
|
|
|
476
|
-
console.log(`check-board:
|
|
498
|
+
console.log(`check-board: tasks ${checked.issues}, open PRs ${checked.pulls}, no divergences`);
|