autonomous-sdlc-harness 0.4.2 → 0.5.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/dist/commands/init.js +101 -13
- package/dist/commands/init.js.map +1 -1
- package/dist/config/check.js +1 -1
- package/dist/config/check.js.map +1 -1
- package/dist/config/model.js +17 -1
- package/dist/config/model.js.map +1 -1
- package/dist/core/writer.js +9 -5
- package/dist/core/writer.js.map +1 -1
- package/dist/core/yamlScalar.js +14 -0
- package/dist/core/yamlScalar.js.map +1 -0
- package/dist/doctor/checks.js +169 -15
- package/dist/doctor/checks.js.map +1 -1
- package/dist/generators/githubWorkflows.js +115 -20
- package/dist/generators/githubWorkflows.js.map +1 -1
- package/dist/generators/repoRoot.js +17 -8
- package/dist/generators/repoRoot.js.map +1 -1
- package/dist/remote/githubActions.js +51 -7
- package/dist/remote/githubActions.js.map +1 -1
- package/package.json +1 -1
- package/templates/README.md +1 -1
- package/templates/github/workflows/harness-resume.yml +2 -0
- package/templates/github/workflows/harness-run.yml +27 -11
- package/templates/github/workflows/harness-trigger.yml +143 -0
- package/templates/repo/gitignore +5 -0
- package/templates/scripts/autonomous-watcher.sh +92 -247
- package/templates/scripts/create-worktree.sh +52 -10
- package/templates/scripts/lib/harness-run-lib.sh +432 -11
- package/templates/scripts/remote-run.sh +1179 -106
package/dist/core/writer.js
CHANGED
|
@@ -46,8 +46,9 @@
|
|
|
46
46
|
* | `.gitignore` | `merge-lines` (a managed block, lines not already present) | Every repo already has one. |
|
|
47
47
|
* | The `stateDir` tree and its per-directory READMEs | `ensure-dir` + `create-if-absent` | Creating what is missing is the whole operation; an adopter may have rewritten a contract sentence. |
|
|
48
48
|
* | The ledgers `lessons.md` / `improvement_suggestions.md` | `create-if-absent`, **not upgraded by `--force`** | Ledgers accumulate and nothing can re-derive one; the engine's `.bak` is single-generation, so `--force` may not touch them. |
|
|
49
|
-
* | `.github/workflows/harness-run.yml` | `create-if-absent` | Written only when `execution.target` is `github-actions`; the adopter tunes the timeouts and the runner
|
|
50
|
-
* | `.github/workflows/harness-resume.yml` | `create-if-absent` | Written only when `execution.target` is `github-actions`; the adopter tunes the cron,
|
|
49
|
+
* | `.github/workflows/harness-run.yml` | `create-if-absent` | Written only when `execution.target` is `github-actions`; the adopter tunes the timeouts and the runner. `init --upgrade-workflows` is the upgrade path: it replaces the file after a `.bak`, only when its rendered CLI-version pin differs from this CLI's, and re-pins it. `--force` after a `.bak` is the blunt alternative. |
|
|
50
|
+
* | `.github/workflows/harness-resume.yml` | `create-if-absent` | Written only when `execution.target` is `github-actions`; the adopter tunes the cron. `init --upgrade-workflows` is the upgrade path: after a `.bak`, only when `harness-run.yml`'s rendered pin differs, carrying the file's `- cron:` lines into the re-render. `--force` after a `.bak` is the blunt alternative. |
|
|
51
|
+
* | `.github/workflows/harness-trigger.yml` | `create-if-absent` | Written only when `forge` is `github` and `execution.target` is `github-actions`; no pin, so `init --upgrade-workflows` leaves it; `--force` after a `.bak` is its upgrade path, as for the scripts it calls. |
|
|
51
52
|
* | Git hook `pre-push`, wrapper scripts | `create-if-absent` | Adopter may have edited the guard. The hook alone is also replaced, after a `.bak`, by the one run that rebuilt the config it is rendered from (`init --reset-config`) — and only where its rendered `case` label no longer matches the set that config resolves, never where the label cannot be read. |
|
|
52
53
|
*
|
|
53
54
|
* `--force` upgrades **`create-if-absent` only** to overwrite-after-backup, and only where the
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
* callers take it up **for a whole artifact class**: `config/io.ts`'s `saveConfig` for
|
|
61
62
|
* `harness.config.json` — `'never'` on an ordinary `init`, `'always'` on `init --reset-config` —
|
|
62
63
|
* and `generators/stateDir.ts` for the two ledgers, `'never'` and nothing else, because no command
|
|
63
|
-
* rebuilds a ledger. **
|
|
64
|
+
* rebuilds a ledger. **Three more** read the tree and answer **per request**: `generators/claudeContext.ts`
|
|
64
65
|
* sets `'never'` on a conventions stub that is already a skeleton whose `.bak` holds a filled
|
|
65
66
|
* document, because that one write would replace the only surviving copy of the analysis with a
|
|
66
67
|
* skeleton — and on `.claude/CLAUDE.md` when its bytes already are the text that run renders, because
|
|
@@ -68,8 +69,11 @@
|
|
|
68
69
|
* `generators/githooks.ts` sets `'always'` on the `pre-push` hook when the run rebuilt
|
|
69
70
|
* `harness.config.json` (`init --reset-config`) **and** the hook's rendered `case` label no longer
|
|
70
71
|
* matches the set that config resolves, so the run that made the guard wrong is the run that
|
|
71
|
-
* re-renders it
|
|
72
|
-
*
|
|
72
|
+
* re-renders it; and `generators/githubWorkflows.ts` sets `'always'` on both workflows under
|
|
73
|
+
* `init --upgrade-workflows` when `harness-run.yml`'s rendered CLI-version pin differs from this CLI's
|
|
74
|
+
* (on `harness-resume.yml` only when its bytes differ from the re-render). None of them is a further
|
|
75
|
+
* row above — all keep `create-if-absent`, and every other forced run over them still replaces after
|
|
76
|
+
* a `.bak`.
|
|
73
77
|
*
|
|
74
78
|
* The reason the default is create-if-absent rather than overwrite is `docs/config.md` §1: the
|
|
75
79
|
* files `init` generates are ones "the adopter then owns and edits like any other checked-in
|
package/dist/core/writer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writer.js","sourceRoot":"","sources":["../../src/core/writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7G,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,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QACL,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,IAAY;IACxD,OAAO,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC7E,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,eAAe,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;IAChE,IAAI,CAAC;QACH,aAAa,CAAC,KAAK,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO,iBAAiB,MAAM,EAAE,CAAC;IACnC,CAAC;IACD,IAAI,CAAC;QACH,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO,+CAA+C,KAAK,MAAM,MAAM,EAAE,CAAC;IAC5E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading a single-line YAML scalar's value with its one matching pair of quotes removed.
|
|
3
|
+
*
|
|
4
|
+
* The rule this module exists to enforce: the pin `doctor` reads from `harness-run.yml`
|
|
5
|
+
* (`remote/githubActions.ts` → `renderedCliVersions`) and the schedule `--upgrade-workflows` carries
|
|
6
|
+
* into `harness-resume.yml` (`generators/githubWorkflows.ts` → `cronExpression`) are unquoted by one
|
|
7
|
+
* definition, so the two cannot come to parse the same quoting differently.
|
|
8
|
+
*/
|
|
9
|
+
/** `value` without one matching pair of surrounding `'` or `"`; unchanged when it has none. */
|
|
10
|
+
export function unquoteYamlScalar(value) {
|
|
11
|
+
const quote = value[0];
|
|
12
|
+
return (quote === "'" || quote === '"') && value.length >= 2 && value.endsWith(quote) ? value.slice(1, -1) : value;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=yamlScalar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yamlScalar.js","sourceRoot":"","sources":["../../src/core/yamlScalar.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+FAA+F;AAC/F,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACvB,OAAO,CAAC,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACrH,CAAC"}
|
package/dist/doctor/checks.js
CHANGED
|
@@ -22,9 +22,10 @@
|
|
|
22
22
|
* push-settings precedence is `generators/notifications.ts`'s {@link pushEnvCandidates}, the
|
|
23
23
|
* repository registry's location, reader and staleness grading are `machine/registry.ts`'s {@link registryPath},
|
|
24
24
|
* {@link readRegistry} and {@link inspect} — the same three `daemon list` enumerates through — the
|
|
25
|
-
* remote-execution switch is `config/model.ts`'s {@link remoteExecutionApplies}
|
|
26
|
-
* paths and the binary run as
|
|
27
|
-
*
|
|
25
|
+
* remote-execution switch is `config/model.ts`'s {@link remoteExecutionApplies} and the
|
|
26
|
+
* issue-trigger switch its {@link forgeTriggerApplies}, the workflow paths and the binary run as
|
|
27
|
+
* `gh` are `remote/githubActions.ts`'s ({@link WORKFLOW_RUN_PATH}, {@link WORKFLOW_RESUME_PATH},
|
|
28
|
+
* {@link WORKFLOW_TRIGGER_PATH}, {@link GH_CLI_VARIABLE}, {@link ghCli}), whether a ref carries a
|
|
28
29
|
* file is `core/git.ts`'s {@link pathAtRef}, and
|
|
29
30
|
* the writability probe is the write engine's {@link probeWritable}. A
|
|
30
31
|
* check that wanted a slightly different answer would be a second definition of the thing being
|
|
@@ -59,8 +60,8 @@
|
|
|
59
60
|
* be fetched.
|
|
60
61
|
*
|
|
61
62
|
* **Remote setup keeps the same line: it is graded from local evidence by default and asks GitHub
|
|
62
|
-
* only under `--check-github`.** {@link REMOTE_EXECUTION_CHECK}
|
|
63
|
-
*
|
|
63
|
+
* only under `--check-github`.** {@link REMOTE_EXECUTION_CHECK} and {@link FORGE_CHECK} read files,
|
|
64
|
+
* refs and `PATH`, and spawn no `gh` subcommand; {@link REMOTE_GITHUB_CHECK} spawns them only under
|
|
64
65
|
* {@link CheckContext.probeGithub}, and each is a read.
|
|
65
66
|
*
|
|
66
67
|
* **The three docs-retrieval checks keep that line.** `retrieval-dependencies` and
|
|
@@ -84,14 +85,14 @@ import { accessSync, constants as fsConstants, existsSync, readFileSync, statSyn
|
|
|
84
85
|
import { delimiter, join, posix, resolve as resolvePath } from 'node:path';
|
|
85
86
|
import { formatProblem } from '../config/check.js';
|
|
86
87
|
import { loadConfig } from '../config/io.js';
|
|
87
|
-
import { answersNone, browserWiringApplies, COMMAND_NONE_SENTINEL, CONFIG_FILENAME, DEFAULTS, FALLBACK_PRESET, isPlaceholder, LAYER_CATCH_ALL_PATH, remoteExecutionApplies, retrievalApplies, STATE_DIR_DOT_PATTERN, STATE_DIR_PATTERN, } from '../config/model.js';
|
|
88
|
+
import { answersNone, browserWiringApplies, COMMAND_NONE_SENTINEL, CONFIG_FILENAME, DEFAULTS, FALLBACK_PRESET, FORGE_KINDS, forgeTriggerApplies, isPlaceholder, LAYER_CATCH_ALL_PATH, remoteExecutionApplies, retrievalApplies, STATE_DIR_DOT_PATTERN, STATE_DIR_PATTERN, } from '../config/model.js';
|
|
88
89
|
import { branchResolves, checkedOutBranch, commitsAhead, configuredRemotes, hasCommits, mainWorktreeRoot, pathAtRef, pathIsIgnored, remoteTrackingBranchResolves, resolveRepoRoot, worktreeList, } from '../core/git.js';
|
|
89
90
|
import { isJsonObject, readJsonFile } from '../core/json.js';
|
|
90
91
|
import { defaultBranchPushCommand, defaultBranchPushReason, WORKFLOW_SCOPE_COMMAND, WORKFLOW_SCOPE_REASON, } from '../core/defaultBranchPush.js';
|
|
91
92
|
import { layerCoverage } from '../core/layerCoverage.js';
|
|
92
93
|
import { layerGapRemedy, recordedVerdictClause } from '../core/layerGapRemedy.js';
|
|
93
94
|
import { nameList } from '../core/nameList.js';
|
|
94
|
-
import { readTemplate, workRoot } from '../core/paths.js';
|
|
95
|
+
import { ownManifestString, readTemplate, workRoot } from '../core/paths.js';
|
|
95
96
|
import { ANALYZE_COMMAND } from '../core/pluginIdentity.js';
|
|
96
97
|
import { normalizeRepoPathStrict } from '../core/repoPaths.js';
|
|
97
98
|
import { probeWritable } from '../core/writer.js';
|
|
@@ -102,6 +103,7 @@ import { FORCED_SIGNAL_ID } from '../detect/signals.js';
|
|
|
102
103
|
import { CLAUDE_MD_PATH, SETUP_PENDING_CLOSE, SETUP_PENDING_OPEN, SKELETON_GUIDANCE_MARKER, TASK_OFFER_PATH, UNFILLED_STUB_MARKER, } from '../generators/claudeContext.js';
|
|
103
104
|
import { caseLabelMatches, isGlobPattern, PRE_PUSH_HOOK, readProtectedCaseLabel, resolveGithooksDir, resolveProtectedBranches, } from '../generators/githooks.js';
|
|
104
105
|
import { PUSH_CMD_KEY, PUSH_DESTINATION_PLACEHOLDER, PUSH_URL_KEY, pushEnvCandidates, } from '../generators/notifications.js';
|
|
106
|
+
import { IN_FLIGHT_RUNS_NOTE, pinnedCliCommand, upgradeWorkflowsCommand } from '../generators/githubWorkflows.js';
|
|
105
107
|
import { DOCS_SEARCH_SERVER_SCRIPT_NAME, outerLoopScriptsDir } from '../generators/outerLoopScripts.js';
|
|
106
108
|
import { bashScriptRule, entryWord, isUnderDirectory, namesBrowserTool, normalizedRoot, pluginRootDirectories, pluginRootEntries, pluginRootEntryTarget, pluginRootHelpers, PLUGIN_ROOT_ENTRIES_FLAG, PROFILE_PATH, renderProfile, TEMPLATE_PATH as PROFILE_TEMPLATE_PATH, } from '../generators/permissionProfile.js';
|
|
107
109
|
import { ENABLED_PLUGINS_KEY, MARKETPLACE_ENTRY_SHAPE, MARKETPLACE_FLAG, MARKETPLACES_KEY, MARKETPLACE_NAME, marketplaceEntryDefect, PLUGIN_KEY, SETTINGS_PATH, SLUG_SHAPE, } from '../generators/projectSettings.js';
|
|
@@ -111,7 +113,7 @@ import { selectedStateDirs } from '../generators/stateDir.js';
|
|
|
111
113
|
import { machineConfigDir } from '../machine/paths.js';
|
|
112
114
|
import { installedPluginsPath, knownMarketplacesPath, pluginInstallRoot, pluginRuntimeRoot, pluginScriptsDir, } from '../machine/plugins.js';
|
|
113
115
|
import { inspect, readRegistry, registryPath } from '../machine/registry.js';
|
|
114
|
-
import { API_KEY_SECRET, DEFAULT_GH_CLI, GH_CLI_VARIABLE, ghCli, GIT_TOKEN_SECRET, OAUTH_TOKEN_SECRET, PUSH_URL_SECRET, REMOTE_STOP_VARIABLE, runGh, RUNNER_VARIABLE, WORKFLOW_RESUME_FILE, WORKFLOW_RESUME_PATH, WORKFLOW_RUN_FILE, WORKFLOW_RUN_PATH, } from '../remote/githubActions.js';
|
|
116
|
+
import { API_KEY_SECRET, CLI_VERSION_VARIABLE, DEFAULT_GH_CLI, DEFAULT_TRIGGER_LABEL, GH_CLI_VARIABLE, ghCli, GIT_TOKEN_SECRET, OAUTH_TOKEN_SECRET, PUSH_URL_SECRET, REMOTE_STOP_VARIABLE, renderedCliVersions, runGh, RUNNER_VARIABLE, TRIGGER_ALLOWED_BOTS_VARIABLE, TRIGGER_LABEL_VARIABLE, WORKFLOW_RESUME_FILE, WORKFLOW_RESUME_PATH, WORKFLOW_RUN_FILE, WORKFLOW_RUN_PATH, WORKFLOW_TRIGGER_FILE, WORKFLOW_TRIGGER_PATH, } from '../remote/githubActions.js';
|
|
115
117
|
import { modelFilesPresent } from '../retrieval/models.js';
|
|
116
118
|
import { retrievalCliEntry, retrievalModelCacheDir, retrievalRuntimeDir, retrievalRuntimeState, } from '../retrieval/runtime.js';
|
|
117
119
|
/**
|
|
@@ -1849,8 +1851,16 @@ const DAEMON_PATH_CHECK = {
|
|
|
1849
1851
|
*
|
|
1850
1852
|
* **Every finding is reported, and the grade is the worst of them.** Two `fail`s: no
|
|
1851
1853
|
* `harness-run.yml`, because no remote run can be dispatched; and no `gh`, because the watcher
|
|
1852
|
-
* dispatches through it.
|
|
1853
|
-
*
|
|
1854
|
+
* dispatches through it. Four `warn`s: a `harness-run.yml` pinned (`remote/githubActions.ts` →
|
|
1855
|
+
* {@link renderedCliVersions}) to a version other than this CLI's — never a `fail`, because the job
|
|
1856
|
+
* installs its pin and the adopter may stay on it deliberately; the remedy is
|
|
1857
|
+
* `generators/githubWorkflows.ts` → {@link upgradeWorkflowsCommand}, the alternative `doctor` at the
|
|
1858
|
+
* pin, both prefixed by that module's {@link pinnedCliCommand} so the two cannot name different
|
|
1859
|
+
* packages. The warning also prints that module's {@link IN_FLIGHT_RUNS_NOTE}; its move route names
|
|
1860
|
+
* no commit set of its own but the paths the upgrade's printed `git add` names; and its `push`
|
|
1861
|
+
* fragment is a complete sentence in both of its forms, so the join adds no punctuation of its own.
|
|
1862
|
+
* Under `--remote-job` the job runs `doctor` at its own pin, so this cannot arise there. A file with no pin, or unreadable, is a note. No `harness-resume.yml`, because a usage-paused
|
|
1863
|
+
* hosted run then waits for `/autonomous-sdlc-harness:branch-resume`; a `harness-run.yml` that
|
|
1854
1864
|
* `origin/<defaultBranch>` does not carry, because GitHub dispatches only a workflow its default
|
|
1855
1865
|
* branch has — the run starts once it is pushed, so nothing is broken here, and its remedy's push
|
|
1856
1866
|
* skips the hook because the `pre-push` hook `init` wired refuses every push to the default branch
|
|
@@ -1905,9 +1915,32 @@ const REMOTE_EXECUTION_CHECK = {
|
|
|
1905
1915
|
if (ctx.config.phases?.qa === true) {
|
|
1906
1916
|
warnings.push("phases.qa is true, but a remote run skips the interactive-test phase — GitHub Actions jobs have no browser wiring, application dependencies or QA credentials for it (docs/remote-execution.md → §3, The interactive-test phase): run /autonomous-sdlc-harness:branch-qa-test <branch> locally before merging a remote run's branch");
|
|
1907
1917
|
}
|
|
1918
|
+
const version = ownManifestString('version');
|
|
1919
|
+
let pinnedHere = false;
|
|
1908
1920
|
if (runPresent) {
|
|
1909
1921
|
const branch = ctx.config.defaultBranch;
|
|
1910
|
-
|
|
1922
|
+
const branchUsable = typeof branch === 'string' && branch.trim() !== '';
|
|
1923
|
+
let text;
|
|
1924
|
+
try {
|
|
1925
|
+
text = readFileSync(join(root, ...WORKFLOW_RUN_PATH.split('/')), 'utf8');
|
|
1926
|
+
}
|
|
1927
|
+
catch (error) {
|
|
1928
|
+
notes.push(`which version ${WORKFLOW_RUN_PATH} was rendered for is not graded, because it could not be read (${messageOf(error)})`);
|
|
1929
|
+
}
|
|
1930
|
+
const pins = text === undefined ? undefined : renderedCliVersions(text);
|
|
1931
|
+
if (pins !== undefined && pins.length === 0) {
|
|
1932
|
+
notes.push(`which version ${WORKFLOW_RUN_PATH} was rendered for could not be read, because it carries no ${CLI_VERSION_VARIABLE} line`);
|
|
1933
|
+
}
|
|
1934
|
+
else if (pins !== undefined && pins[0] !== undefined && pins.some((pin) => pin !== version)) {
|
|
1935
|
+
const push = branchUsable
|
|
1936
|
+
? `run \`${WORKFLOW_SCOPE_COMMAND}\`, then \`${defaultBranchPushCommand(branch)}\`. ${WORKFLOW_SCOPE_REASON} ${defaultBranchPushReason(branch)}`
|
|
1937
|
+
: 'push them to the default branch.';
|
|
1938
|
+
warnings.push(`${WORKFLOW_RUN_PATH} was rendered for ${nameList(pins)} (${CLI_VERSION_VARIABLE}), and this CLI is ${version}; the job installs and runs the version it names, so nothing is broken, and moving is your choice. To move to ${version}: run \`${upgradeWorkflowsCommand(version)}\`, commit the paths its printed \`git add\` names, then ${push} ${IN_FLIGHT_RUNS_NOTE} To stay on ${nameList(pins)}: run doctor at that version instead, \`${pinnedCliCommand(pins[0])} doctor\``);
|
|
1939
|
+
}
|
|
1940
|
+
else if (pins !== undefined) {
|
|
1941
|
+
pinnedHere = true;
|
|
1942
|
+
}
|
|
1943
|
+
if (!branchUsable) {
|
|
1911
1944
|
notes.push(`whether GitHub's default branch carries ${WORKFLOW_RUN_PATH} is not graded, because defaultBranch is not a branch name (see the config check)`);
|
|
1912
1945
|
}
|
|
1913
1946
|
else if (!remoteTrackingBranchResolves(root, branch)) {
|
|
@@ -1923,7 +1956,7 @@ const REMOTE_EXECUTION_CHECK = {
|
|
|
1923
1956
|
return fail(`${on}: ${[...failures, ...warnings].join('; ')}${noted}`);
|
|
1924
1957
|
if (warnings.length > 0)
|
|
1925
1958
|
return warn(`${on}: ${warnings.join('; ')}${noted}`);
|
|
1926
|
-
return pass(`${on}: ${WORKFLOW_RUN_PATH} and ${WORKFLOW_RESUME_PATH} are present and ${gh} resolves on PATH${noted}. What this cannot see lives on GitHub — a credential secret (${OAUTH_TOKEN_SECRET} or ${API_KEY_SECRET}), the ${PUSH_URL_SECRET} and ${GIT_TOKEN_SECRET} secrets, and the ${RUNNER_VARIABLE} and ${REMOTE_STOP_VARIABLE} variables; \`${CLI} doctor --check-github\` asks GitHub`);
|
|
1959
|
+
return pass(`${on}: ${WORKFLOW_RUN_PATH} and ${WORKFLOW_RESUME_PATH} are present${pinnedHere ? `, ${WORKFLOW_RUN_PATH} is rendered for this CLI's own version, ${version},` : ''} and ${gh} resolves on PATH${noted}. What this cannot see lives on GitHub — a credential secret (${OAUTH_TOKEN_SECRET} or ${API_KEY_SECRET}), the ${PUSH_URL_SECRET} and ${GIT_TOKEN_SECRET} secrets, and the ${RUNNER_VARIABLE} and ${REMOTE_STOP_VARIABLE} variables; \`${CLI} doctor --check-github\` asks GitHub`);
|
|
1927
1960
|
},
|
|
1928
1961
|
};
|
|
1929
1962
|
/**
|
|
@@ -1990,10 +2023,14 @@ function retentionDaysOf(stdout) {
|
|
|
1990
2023
|
* - `fail` — `gh` does not spawn or `gh auth status` refuses (nothing further is asked); GitHub does
|
|
1991
2024
|
* not know `harness-run.yml`; neither credential secret is set.
|
|
1992
2025
|
* - `warn` — `HARNESS_PUSH_URL` absent; `harness-resume.yml` unknown to GitHub; `HARNESS_REMOTE_STOP`
|
|
1993
|
-
* set; artifact retention below {@link ARTIFACT_RETENTION_WARN_DAYS} days;
|
|
2026
|
+
* set; artifact retention below {@link ARTIFACT_RETENTION_WARN_DAYS} days; when
|
|
2027
|
+
* {@link forgeTriggerApplies}, `harness-trigger.yml` unknown to GitHub, or no label named by
|
|
2028
|
+
* `HARNESS_TRIGGER_LABEL` (default {@link DEFAULT_TRIGGER_LABEL}); and any call that timed
|
|
1994
2029
|
* out, could not reach GitHub, or answered in a shape not understood — *cannot tell* is not
|
|
1995
2030
|
* *missing*, so it never fails.
|
|
1996
2031
|
* - both credential secrets present is a note, not a finding: billing follows `ANTHROPIC_API_KEY`.
|
|
2032
|
+
* - a non-empty `HARNESS_TRIGGER_ALLOWED_BOTS` is a note naming the bots, which start runs without a
|
|
2033
|
+
* permission check. When the trigger does not apply, neither trigger read is made.
|
|
1997
2034
|
* - the retention read refused (typically HTTP 403: the endpoint needs admin access) is a note too —
|
|
1998
2035
|
* the read is best-effort, and a collaborator without admin can still run remotely.
|
|
1999
2036
|
*
|
|
@@ -2110,13 +2147,128 @@ const REMOTE_GITHUB_CHECK = {
|
|
|
2110
2147
|
warnings.push(`the repository keeps artifacts for ${retentionDays} days, so a remote run parked or paused longer than that loses its state bundle: raise it under Settings → Actions → General → Artifact and log retention`);
|
|
2111
2148
|
}
|
|
2112
2149
|
}
|
|
2150
|
+
let triggerKnown = '';
|
|
2151
|
+
if (forgeTriggerApplies(ctx.config)) {
|
|
2152
|
+
const trigger = ask(['workflow', 'view', WORKFLOW_TRIGGER_FILE]);
|
|
2153
|
+
if (trigger.answer === undefined)
|
|
2154
|
+
return fail(noSpawn);
|
|
2155
|
+
if (trigger.answer.kind === 'unknown')
|
|
2156
|
+
warnings.push(cannotTell(trigger.call, trigger.answer.why, `whether GitHub knows ${WORKFLOW_TRIGGER_FILE}`));
|
|
2157
|
+
if (trigger.answer.kind === 'refused') {
|
|
2158
|
+
warnings.push(`GitHub does not know ${WORKFLOW_TRIGGER_FILE} (${trigger.call}: ${trigger.answer.why}), so labelling an issue starts nothing: push ${WORKFLOW_TRIGGER_PATH} to the repository's default branch`);
|
|
2159
|
+
}
|
|
2160
|
+
// The label's name is a repository variable, so an unread variable listing leaves nothing to compare.
|
|
2161
|
+
const configured = variableValues?.get(TRIGGER_LABEL_VARIABLE)?.trim() ?? '';
|
|
2162
|
+
const labelName = configured === '' ? DEFAULT_TRIGGER_LABEL : configured;
|
|
2163
|
+
let labelFound = false;
|
|
2164
|
+
if (variableValues === undefined) {
|
|
2165
|
+
warnings.push(`cannot tell whether the trigger label exists: its name is the ${TRIGGER_LABEL_VARIABLE} variable, and ${variables.call} gave no readable answer`);
|
|
2166
|
+
}
|
|
2167
|
+
else {
|
|
2168
|
+
const labels = ask(['label', 'list', '--json', 'name', '--limit', '1000']);
|
|
2169
|
+
if (labels.answer === undefined)
|
|
2170
|
+
return fail(noSpawn);
|
|
2171
|
+
const labelNames = labels.answer.kind === 'answered' ? ghJsonEntries(labels.answer.stdout) : undefined;
|
|
2172
|
+
if (labels.answer.kind !== 'answered') {
|
|
2173
|
+
warnings.push(cannotTell(labels.call, labels.answer.why, `whether the label \`${labelName}\` exists`));
|
|
2174
|
+
}
|
|
2175
|
+
else if (labelNames === undefined) {
|
|
2176
|
+
warnings.push(`cannot tell whether the label \`${labelName}\` exists: ${labels.call} answered in a shape this check does not read`);
|
|
2177
|
+
}
|
|
2178
|
+
else if (!labelNames.has(labelName)) {
|
|
2179
|
+
warnings.push(`no label \`${labelName}\` exists, so nobody can apply it: \`gh label create ${labelName}\``);
|
|
2180
|
+
}
|
|
2181
|
+
else {
|
|
2182
|
+
labelFound = true;
|
|
2183
|
+
}
|
|
2184
|
+
const bots = (variableValues.get(TRIGGER_ALLOWED_BOTS_VARIABLE) ?? '').split(',').map((bot) => bot.trim()).filter((bot) => bot !== '');
|
|
2185
|
+
if (bots.length > 0) {
|
|
2186
|
+
notes.push(`${TRIGGER_ALLOWED_BOTS_VARIABLE} admits ${nameList(bots)}, each of which can start a run without a permission check`);
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
if (trigger.answer.kind === 'answered' && labelFound)
|
|
2190
|
+
triggerKnown = `; GitHub knows ${WORKFLOW_TRIGGER_FILE} and the label \`${labelName}\` exists`;
|
|
2191
|
+
}
|
|
2113
2192
|
const noted = notes.length > 0 ? `; ${notes.join('; ')}` : '';
|
|
2114
2193
|
if (failures.length > 0)
|
|
2115
2194
|
return fail(`${[...failures, ...warnings].join('; ')}${noted}`);
|
|
2116
2195
|
if (warnings.length > 0)
|
|
2117
2196
|
return warn(`${warnings.join('; ')}${noted}`);
|
|
2118
2197
|
const kept = retentionDays === undefined ? '' : `, and the repository keeps artifacts for ${retentionDays} days`;
|
|
2119
|
-
return pass(`gh is authenticated, GitHub knows ${WORKFLOW_RUN_FILE} and ${WORKFLOW_RESUME_FILE}, a credential secret and ${PUSH_URL_SECRET} are set, and remote runs use ${runner}${kept}${noted}`);
|
|
2198
|
+
return pass(`gh is authenticated, GitHub knows ${WORKFLOW_RUN_FILE} and ${WORKFLOW_RESUME_FILE}, a credential secret and ${PUSH_URL_SECRET} are set, and remote runs use ${runner}${kept}${triggerKnown}${noted}`);
|
|
2199
|
+
},
|
|
2200
|
+
};
|
|
2201
|
+
/**
|
|
2202
|
+
* The configured `forge`, and what starts a run from it — the key's reporter.
|
|
2203
|
+
*
|
|
2204
|
+
* **Every state is named, the absent one included**, because a declared seam needs something that
|
|
2205
|
+
* observes it (`ARCHITECTURE.md` → `## 8. Declaring a seam before building it`), and the config
|
|
2206
|
+
* check speaks only about a value outside {@link FORGE_KINDS}. An absent key is a decision not yet
|
|
2207
|
+
* made, and this line is where an operator learns the decision exists.
|
|
2208
|
+
*
|
|
2209
|
+
* **Graded from local evidence only** (the module header's choice 3): the trigger workflow, one git
|
|
2210
|
+
* ref and the configuration. Whether the label exists and whether GitHub knows the workflow are left
|
|
2211
|
+
* to `--check-github`.
|
|
2212
|
+
*
|
|
2213
|
+
* **Its worst grade is `warn`**: no `forge` state stops a run, because the inbox path works whatever
|
|
2214
|
+
* the key says. The three `warn`s are all `github`: remote execution off, because a run started from
|
|
2215
|
+
* GitHub always executes through {@link WORKFLOW_RUN_FILE}; the trigger workflow absent; and the
|
|
2216
|
+
* trigger workflow not carried by `origin/<defaultBranch>`, because GitHub runs an `issues` workflow
|
|
2217
|
+
* only from its default branch — that last with {@link REMOTE_EXECUTION_CHECK}'s push remedy and its
|
|
2218
|
+
* two *not graded* notes, on the same reasoning.
|
|
2219
|
+
*
|
|
2220
|
+
* Draft-pull-request output and comment park-and-ask are not graded, because nothing implements them
|
|
2221
|
+
* yet; the `github` pass names them as still to come, so the line never implies the whole coupling
|
|
2222
|
+
* exists. A value outside {@link FORGE_KINDS} is the config check's `fail`, and is not graded here.
|
|
2223
|
+
*/
|
|
2224
|
+
const FORGE_CHECK = {
|
|
2225
|
+
id: 'forge',
|
|
2226
|
+
title: 'the configured forge, and what starts a run from it',
|
|
2227
|
+
run: (ctx) => {
|
|
2228
|
+
if (ctx.repoRoot === undefined)
|
|
2229
|
+
return unevaluated('the repository root did not resolve (see the git check)');
|
|
2230
|
+
if (ctx.config === undefined)
|
|
2231
|
+
return unevaluated(`${CONFIG_FILENAME} could not be read (see the config check)`);
|
|
2232
|
+
const root = ctx.repoRoot;
|
|
2233
|
+
const forge = ctx.config.forge;
|
|
2234
|
+
const triggerPresent = existsSync(join(root, ...WORKFLOW_TRIGGER_PATH.split('/')));
|
|
2235
|
+
if (forge === undefined) {
|
|
2236
|
+
return pass(`forge is not set, so the decision is not yet made and nothing starts a run from an issue. \`${CLI} config set forge github\`, with execution.target github-actions, turns the issue trigger on; \`${CLI} config set forge none\` records that this repository has no forge integration`);
|
|
2237
|
+
}
|
|
2238
|
+
if (!FORGE_KINDS.includes(forge)) {
|
|
2239
|
+
return pass('not graded, because forge holds a value this CLI does not know (see the config check)');
|
|
2240
|
+
}
|
|
2241
|
+
if (forge === 'none') {
|
|
2242
|
+
const left = triggerPresent
|
|
2243
|
+
? `. ${WORKFLOW_TRIGGER_PATH} is present and unused: the job it starts refuses every event while forge is not github`
|
|
2244
|
+
: '';
|
|
2245
|
+
return pass(`forge is none: this repository has no forge integration, and nothing starts a run from an issue${left}`);
|
|
2246
|
+
}
|
|
2247
|
+
if (forge === 'gitlab') {
|
|
2248
|
+
return pass("forge is gitlab, and this release has no GitLab trigger: GitLab has no issue-label pipeline trigger, so starting a run from a GitLab issue needs a webhook relay calling GitHub's repository_dispatch or a GitLab pipeline trigger (docs/github-integration-research.md → T6). Nothing is written for it, and runs start from this machine as before");
|
|
2249
|
+
}
|
|
2250
|
+
if (!remoteExecutionApplies(ctx.config)) {
|
|
2251
|
+
return warn(`forge is github, but remote execution is off (\`execution.target\`), so no trigger workflow is written: a run started from GitHub always executes through ${WORKFLOW_RUN_FILE}, because GitHub cannot reach this machine. Run \`${CLI} config set execution.target github-actions\`, then \`${CLI} init\`; to run such runs on your own hardware, register a self-hosted runner and name its label in the ${RUNNER_VARIABLE} repository variable (docs/remote-execution.md → ## 8. Choosing a runner)`);
|
|
2252
|
+
}
|
|
2253
|
+
const on = 'forge is github and remote execution is on';
|
|
2254
|
+
if (!triggerPresent) {
|
|
2255
|
+
return warn(`${on}, but ${WORKFLOW_TRIGGER_PATH} is absent, so labelling an issue starts nothing: re-run \`${CLI} init\`, which writes it create-if-absent`);
|
|
2256
|
+
}
|
|
2257
|
+
const branch = ctx.config.defaultBranch;
|
|
2258
|
+
let carried;
|
|
2259
|
+
if (typeof branch !== 'string' || branch.trim() === '') {
|
|
2260
|
+
carried = `; whether GitHub's default branch carries it is not graded, because defaultBranch is not a branch name (see the config check)`;
|
|
2261
|
+
}
|
|
2262
|
+
else if (!remoteTrackingBranchResolves(root, branch)) {
|
|
2263
|
+
carried = `; whether origin/${branch} carries it is not graded, because there is no origin/${branch} (see the remote check)`;
|
|
2264
|
+
}
|
|
2265
|
+
else if (!pathAtRef(root, `origin/${branch}`, WORKFLOW_TRIGGER_PATH)) {
|
|
2266
|
+
return warn(`${on}, but origin/${branch} does not carry ${WORKFLOW_TRIGGER_PATH}, as this checkout last fetched it, and GitHub runs an issues workflow only from its default branch, so labelling an issue starts nothing yet: commit it, then run \`${WORKFLOW_SCOPE_COMMAND}\`, then \`${defaultBranchPushCommand(branch)}\`. ${WORKFLOW_SCOPE_REASON} ${defaultBranchPushReason(branch)}`);
|
|
2267
|
+
}
|
|
2268
|
+
else {
|
|
2269
|
+
carried = ` and origin/${branch} carries it`;
|
|
2270
|
+
}
|
|
2271
|
+
return pass(`${on}: ${WORKFLOW_TRIGGER_PATH} is present${carried}. Labelling an issue with the ${TRIGGER_LABEL_VARIABLE} label (default \`${DEFAULT_TRIGGER_LABEL}\`) starts a task run; draft-pull-request output and comment park-and-ask are still to come. What this cannot see lives on GitHub — whether that label exists and whether GitHub knows ${WORKFLOW_TRIGGER_FILE}; \`${CLI} doctor --check-github\` asks GitHub`);
|
|
2120
2272
|
},
|
|
2121
2273
|
};
|
|
2122
2274
|
/**
|
|
@@ -3985,7 +4137,8 @@ const RETRIEVAL_INDEX_CHECK = {
|
|
|
3985
4137
|
* five above it are answered, and it says so rather than guessing.
|
|
3986
4138
|
* `remote-execution` follows it because it asks the same "can this run unattended" question of a run
|
|
3987
4139
|
* the watcher dispatches to GitHub rather than spawns here, and `remote-github` follows that because it
|
|
3988
|
-
* asks GitHub the half of the same question local evidence cannot answer.
|
|
4140
|
+
* asks GitHub the half of the same question local evidence cannot answer. `forge` closes that block
|
|
4141
|
+
* because the trigger it grades starts a run through the same remote setup the two above it grade.
|
|
3989
4142
|
*
|
|
3990
4143
|
* `profile-tracked` sits under `profile-paths` because the two name the same file carried somewhere it
|
|
3991
4144
|
* does not belong, and a committed profile is the usual reason a job's `profile-paths` fails.
|
|
@@ -4016,6 +4169,7 @@ export const CHECKS = Object.freeze([
|
|
|
4016
4169
|
DAEMON_PATH_CHECK,
|
|
4017
4170
|
REMOTE_EXECUTION_CHECK,
|
|
4018
4171
|
REMOTE_GITHUB_CHECK,
|
|
4172
|
+
FORGE_CHECK,
|
|
4019
4173
|
CONFIG_CHECK,
|
|
4020
4174
|
COMMAND_WRAPPERS_CHECK,
|
|
4021
4175
|
COMMAND_PERMISSIONS_CHECK,
|