autonomous-sdlc-harness 0.6.2 → 0.6.3
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 +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/config/check.js +3 -2
- package/dist/config/check.js.map +1 -1
- package/dist/config/model.js +1 -1
- package/dist/config/model.js.map +1 -1
- package/dist/doctor/checks.js +7 -6
- package/dist/doctor/checks.js.map +1 -1
- package/dist/remote/githubActions.js +3 -2
- package/dist/remote/githubActions.js.map +1 -1
- package/package.json +1 -1
- package/templates/github/workflows/harness-resume.yml +6 -5
- package/templates/github/workflows/harness-run.yml +29 -7
- package/templates/scripts/autonomous-watcher.sh +121 -21
- package/templates/scripts/lib/harness-run-lib.sh +140 -13
- package/templates/scripts/push-branch.sh +69 -11
- package/templates/scripts/remote-run.sh +1249 -242
- package/templates/state-dir/user_reviews/README.md +1 -1
|
@@ -63,8 +63,9 @@ export const COMMAND_HANDLE = '@sdlc-harness';
|
|
|
63
63
|
export const COMMAND_VERBS = ['answer', 'pause', 'resume', 'stop', 'clear', 'status'];
|
|
64
64
|
/**
|
|
65
65
|
* The prefix of the hidden line every harness comment carries; the whole line is
|
|
66
|
-
* `<!-- sdlc-harness event=<event> branch=<branch>[ question=<n>]
|
|
67
|
-
*
|
|
66
|
+
* `<!-- sdlc-harness event=<event> branch=<branch>[ question=<n>][ engine=<engine>] -->`, where
|
|
67
|
+
* `engine=` is carried only by a `reply` posted after a successful dispatch. A comment containing
|
|
68
|
+
* the prefix anywhere is never a command.
|
|
68
69
|
*/
|
|
69
70
|
export const COMMENT_MARKER = '<!-- sdlc-harness';
|
|
70
71
|
/** The `review.state` that starts a review round, lowercase as the webhook payload carries it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubActions.js","sourceRoot":"","sources":["../../src/remote/githubActions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;AAC7F,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autonomous-sdlc-harness",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "The outer loop of the autonomous SDLC harness: init, doctor, config and daemon management for the harness Claude Code plugin, plus opt-in local docs retrieval.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "firu-daniel",
|
|
@@ -34,12 +34,13 @@
|
|
|
34
34
|
# cost nothing.
|
|
35
35
|
#
|
|
36
36
|
# WHAT IT READS.
|
|
37
|
-
# Secrets: HARNESS_PUSH_URL (optional notifications: the poller's own
|
|
38
|
-
#
|
|
37
|
+
# Secrets: HARNESS_PUSH_URL (optional notifications: the poller's own notice
|
|
38
|
+
# when it cannot resume a run or cannot download its bundle).
|
|
39
39
|
# Variables: HARNESS_RUNNER, HARNESS_REMOTE_STOP (any value: the tick
|
|
40
40
|
# dispatches nothing), HARNESS_MAX_CHAIN (the automatic-dispatch limit),
|
|
41
41
|
# HARNESS_POLL_MAX_DISPATCH_FAILURES (failed re-dispatches of one paused
|
|
42
|
-
# run
|
|
42
|
+
# run, or consecutive failed downloads of one run's listed bundle, before
|
|
43
|
+
# the poller gives up on it; 3 when unset) and
|
|
43
44
|
# HARNESS_POLL_GIVE_UP_AFTER_MINUTES (minutes after the usage reset past
|
|
44
45
|
# which it gives up; 360 when unset).
|
|
45
46
|
# harness.config.json, at run time: `scriptsDir` and `stateDir`. No
|
|
@@ -53,8 +54,8 @@
|
|
|
53
54
|
# workflow-level `permissions:` block sets every permission it does not list to
|
|
54
55
|
# `none`.
|
|
55
56
|
#
|
|
56
|
-
# WHAT IT WRITES. The `harness-poll-state` artifact: the failed-dispatch
|
|
57
|
-
# `poll` carries to the next tick, kept 7 days.
|
|
57
|
+
# WHAT IT WRITES. The `harness-poll-state` artifact: the failed-dispatch and
|
|
58
|
+
# failed-download counts `poll` carries to the next tick, kept 7 days.
|
|
58
59
|
#
|
|
59
60
|
# THE RULE EVERY EDIT KEEPS. Every GitHub expression has a space after its
|
|
60
61
|
# opening braces, and every value reaches a shell line through `env:`. `init`
|
|
@@ -60,8 +60,11 @@
|
|
|
60
60
|
# the two never place a round at once; and the settledness test reads "the
|
|
61
61
|
# `run` job is completed", which no step inside that job could see. Under
|
|
62
62
|
# `!cancelled()` a failed `run` job still reaches it, and the run's state bundle
|
|
63
|
-
# decides whether the run ended or only paused or parked
|
|
64
|
-
#
|
|
63
|
+
# decides whether the run ended or only paused or parked. A `run` job GitHub
|
|
64
|
+
# cancelled before any step ran, for example one no runner acquired, reaches it
|
|
65
|
+
# too, and `collect` reports that run once (remote-run.sh's header, its
|
|
66
|
+
# `collect` paragraph), because the job itself could report nothing; a workflow
|
|
67
|
+
# run cancelled or stopped as a whole skips it. The group name mirrors harness-control.yml's, and
|
|
65
68
|
# RUN_JOB_NAME in remote-run.sh mirrors the `run` job's key (DECLARED MIRRORS
|
|
66
69
|
# above). It reads no secret: its own token pushes the round, dispatches it and
|
|
67
70
|
# comments. It checks out the default branch, as harness-control.yml's review
|
|
@@ -123,8 +126,9 @@
|
|
|
123
126
|
# Secrets: CLAUDE_CODE_OAUTH_TOKEN and/or ANTHROPIC_API_KEY (one is required;
|
|
124
127
|
# billing follows the API key when both are set), HARNESS_GIT_TOKEN (optional:
|
|
125
128
|
# a personal or App token, so the job's pushes trigger your own CI, which
|
|
126
|
-
# GITHUB_TOKEN pushes never do; it also opens the run's draft pull request
|
|
127
|
-
#
|
|
129
|
+
# GITHUB_TOKEN pushes never do; it also opens the run's draft pull request
|
|
130
|
+
# when the run starts, and `deliver` opens one only when none is open at
|
|
131
|
+
# completion, so your CI runs on it without an approval click), HARNESS_PUSH_URL
|
|
128
132
|
# (optional notifications).
|
|
129
133
|
# Variables: HARNESS_RUNNER, HARNESS_REMOTE_STOP (any value stops every job
|
|
130
134
|
# before it launches anything), HARNESS_RUN_ACTORS (THE RUN-ACTOR GATE),
|
|
@@ -141,7 +145,7 @@
|
|
|
141
145
|
# actions to dispatch, poll and enable the poller
|
|
142
146
|
# issues to comment and set labels on the issue and the pull request,
|
|
143
147
|
# which both use the issues API
|
|
144
|
-
# pull-requests to open the
|
|
148
|
+
# pull-requests to open the run's pull request, update it and label it
|
|
145
149
|
#
|
|
146
150
|
# WHY THE REPORT STEP MAY FAIL. `Open the pull request and report` runs
|
|
147
151
|
# `remote-run.sh deliver` after the push, so the pull request's head carries the
|
|
@@ -149,6 +153,17 @@
|
|
|
149
153
|
# this file without `init --force` still runs scripts with no `deliver` verb,
|
|
150
154
|
# and a finished run must not be marked failed for its report.
|
|
151
155
|
#
|
|
156
|
+
# WHY THE OPEN STEP RUNS ONLY WHEN chain IS 0. `Open the draft pull request`
|
|
157
|
+
# runs `remote-run.sh open` before the harness, so the run's draft pull request
|
|
158
|
+
# exists from its first job. `chain` counts automatic dispatches since the last
|
|
159
|
+
# user action, so 0 is a job a person's action started: the first job, a
|
|
160
|
+
# resume, an answer, a round. An automatic continuation therefore never retries
|
|
161
|
+
# a create that failed, and the attempts per run stay bounded by people's
|
|
162
|
+
# actions; `deliver`'s fallback at completion is the last attempt, and its
|
|
163
|
+
# `completed` comment names the error. It is `continue-on-error` for the report
|
|
164
|
+
# step's reason above: scripts older than this file carry no `open` verb, and a
|
|
165
|
+
# run must not fail for its pull request.
|
|
166
|
+
#
|
|
152
167
|
# THE SELF-PAUSE POINT, MEASURED. On a hosted runner the job drops its own PAUSE
|
|
153
168
|
# REMOTE_SELF_PAUSE_AFTER_SECS after it started, the run yields at its next
|
|
154
169
|
# dispatch boundary, and `remote-run.sh continue` chains a new job.
|
|
@@ -364,7 +379,7 @@ jobs:
|
|
|
364
379
|
else
|
|
365
380
|
why="it is unset, and this repository has no single owner to admit (its owner type is ${IN_OWNER_TYPE:-unreadable}), so it admits nobody."
|
|
366
381
|
fi
|
|
367
|
-
echo "::error::@${actor:-(no actor)} dispatched or re-ran this run, and the repository variable HARNESS_RUN_ACTORS does not admit them: $why Nothing was launched and no credential was read. Add the login to the comma-separated repository variable HARNESS_RUN_ACTORS, or set it to * for every writer (docs/remote-execution.md, section
|
|
382
|
+
echo "::error::@${actor:-(no actor)} dispatched or re-ran this run, and the repository variable HARNESS_RUN_ACTORS does not admit them: $why Nothing was launched and no credential was read. Add the login to the comma-separated repository variable HARNESS_RUN_ACTORS, or set it to * for every writer (docs/remote-execution.md, section 7 step 4, and section 11)."
|
|
368
383
|
exit 1
|
|
369
384
|
|
|
370
385
|
- name: Compute the time budget
|
|
@@ -529,6 +544,13 @@ jobs:
|
|
|
529
544
|
if: env.HARNESS_STOPPED != '1'
|
|
530
545
|
run: bash "$SCRIPTS_DIR/remote-run.sh" restore "$HARNESS_INPUT_BRANCH" --resume "$HARNESS_INPUT_RESUME"
|
|
531
546
|
|
|
547
|
+
- name: Open the draft pull request
|
|
548
|
+
if: env.HARNESS_STOPPED != '1' && inputs.chain == 0
|
|
549
|
+
continue-on-error: true
|
|
550
|
+
env:
|
|
551
|
+
HARNESS_PR_TOKEN: ${{ secrets.HARNESS_GIT_TOKEN }}
|
|
552
|
+
run: bash "$SCRIPTS_DIR/remote-run.sh" open "$HARNESS_INPUT_BRANCH"
|
|
553
|
+
|
|
532
554
|
- name: Run the harness
|
|
533
555
|
if: env.HARNESS_STOPPED != '1'
|
|
534
556
|
timeout-minutes: ${{ fromJSON(env.HARNESS_STEP_TIMEOUT_MINUTES || env.HARNESS_HOSTED_JOB_LIMIT_MINUTES) }}
|
|
@@ -634,7 +656,7 @@ jobs:
|
|
|
634
656
|
else
|
|
635
657
|
why="it is unset, and this repository has no single owner to admit (its owner type is ${IN_OWNER_TYPE:-unreadable}), so it admits nobody."
|
|
636
658
|
fi
|
|
637
|
-
echo "::error::@${actor:-(no actor)} dispatched or re-ran this run, and the repository variable HARNESS_RUN_ACTORS does not admit them: $why Nothing was launched and no credential was read. Add the login to the comma-separated repository variable HARNESS_RUN_ACTORS, or set it to * for every writer (docs/remote-execution.md, section
|
|
659
|
+
echo "::error::@${actor:-(no actor)} dispatched or re-ran this run, and the repository variable HARNESS_RUN_ACTORS does not admit them: $why Nothing was launched and no credential was read. Add the login to the comma-separated repository variable HARNESS_RUN_ACTORS, or set it to * for every writer (docs/remote-execution.md, section 7 step 4, and section 11)."
|
|
638
660
|
exit 1
|
|
639
661
|
|
|
640
662
|
- name: Check out the default branch for collecting
|
|
@@ -357,9 +357,21 @@
|
|
|
357
357
|
# restored bundle's under HARNESS_INPUT_CHAIN above 0, else at this run's own
|
|
358
358
|
# `createdAt` (`remote-run.sh run-created-at "$GITHUB_RUN_ID"`), else at
|
|
359
359
|
# HARNESS_JOB_STARTED_EPOCH — NEVER at the job's own start alone, which
|
|
360
|
-
# would lose a pause sent while the job was queued.
|
|
361
|
-
#
|
|
362
|
-
# advances
|
|
360
|
+
# would lose a pause sent while the job was queued. That starting bound is
|
|
361
|
+
# the job's FLOOR. The verb's exit decides: `0` a pause, `5` none — each
|
|
362
|
+
# advances the bound to the larger of the floor and the epoch taken just
|
|
363
|
+
# before the query less CONTROL_POLL_OVERLAP_SECS, so a run the listing
|
|
364
|
+
# shows late is still read; anything else, `1` included, is a failed poll,
|
|
365
|
+
# which advances nothing and pauses nothing. Every poll logs one line,
|
|
366
|
+
# `job: control poll of '<branch>' since <since> (exit <rc>): <last line>`.
|
|
367
|
+
# * THE RUNNER WAIT: the job logs HARNESS_JOB_STARTED_EPOCH less this run's
|
|
368
|
+
# `createdAt` — read once per job, the same read the control poll's
|
|
369
|
+
# starting bound takes. On a re-run attempt (`GITHUB_RUN_ATTEMPT` above 1)
|
|
370
|
+
# that `createdAt` is the first attempt's, so the wait is not measured and
|
|
371
|
+
# no note is added. A wait of at least RUNNER_WAIT_NOTE_SECS is noted on
|
|
372
|
+
# the `resumed` comment the job posts as it starts, never on a later
|
|
373
|
+
# automatic resume's. The budget already starts at
|
|
374
|
+
# HARNESS_JOB_STARTED_EPOCH, so a wait costs no budget.
|
|
363
375
|
# * THE DECISION, when the run leaves `running`: `paused` for `budget` ->
|
|
364
376
|
# `continue`; for `user` -> `stop`; by the usage gate (`usage`) -> a lost
|
|
365
377
|
# `usage_resume_at` is first given the gate's fallback and reported as
|
|
@@ -396,6 +408,19 @@
|
|
|
396
408
|
# issue and moves its state label when `forge` is `github`; `autonomous-notify.sh`
|
|
397
409
|
# is unchanged, and `completed` is reported by the workflow's `deliver` step
|
|
398
410
|
# after the push.
|
|
411
|
+
# * THE PROGRESS PASS (job_progress_pass): every `running` pass reads the
|
|
412
|
+
# flow-progress ledger the flow pushes in this checkout through
|
|
413
|
+
# lib/harness-run-lib.sh's `hr_ledger_phases`, and calls `remote-run.sh
|
|
414
|
+
# report progress <branch>` when that reading differs from the last one
|
|
415
|
+
# this job reported, and once more when the job ends, so a tick landing
|
|
416
|
+
# after the last poll is still reported. It reads nothing from GitHub to
|
|
417
|
+
# decide and keeps no state across jobs: the render is deterministic and
|
|
418
|
+
# `report progress` edits the comment only when its body differs, so a
|
|
419
|
+
# job's first pass syncs once and a budget continuation posts nothing new
|
|
420
|
+
# unless a phase moved — consistent with `docs/github-run-control.md` ->
|
|
421
|
+
# §5's *The budget is silent*, because what is posted is a phase, not the
|
|
422
|
+
# continuation. What is posted, where, and whether at all is `report
|
|
423
|
+
# progress`'s to decide; the watcher decides only when to call it.
|
|
399
424
|
# * THE INTERACTIVE-TEST PHASE IS SKIPPED, not run: a runner has no browser
|
|
400
425
|
# wiring, application dependencies or QA credentials for it. With
|
|
401
426
|
# `phases.qa` true, the task and user_review launch prompts gain one clause
|
|
@@ -686,8 +711,14 @@
|
|
|
686
711
|
# A stub writing PAUSE_ACK unrequested, then exiting 0 ->
|
|
687
712
|
# one auto-resume, `job: completed stop`; a stub ending
|
|
688
713
|
# `exit 2` with REMOTE_AUTO_RESUME_DELAY_SECS=0 -> launched
|
|
689
|
-
# 1 + REMOTE_AUTO_RESUME_MAX times, `job: failed stop
|
|
690
|
-
#
|
|
714
|
+
# 1 + REMOTE_AUTO_RESUME_MAX times, `job: failed stop`. A
|
|
715
|
+
# stub writing a task ledger at
|
|
716
|
+
# "$d/sdlc-harness/flow_progress/feat_x_progress.md" and
|
|
717
|
+
# sleeping past a few polls, the ledger never ticked ->
|
|
718
|
+
# the watcher log carries one `remote-run.sh: report:` line
|
|
719
|
+
# from the first pass and one from the job's end, none
|
|
720
|
+
# between
|
|
721
|
+
# remote drop `a drop`'s fixture, with "$d"'s own files committed and pushed
|
|
691
722
|
# to origin's default branch, `"execution":{"target":
|
|
692
723
|
# "github-actions"}` in its harness.config.json, and
|
|
693
724
|
# HARNESS_GH_CLI pointed at a recorder (see remote-run.sh's
|
|
@@ -1111,6 +1142,11 @@ USAGE_WARNING_STREAK=0
|
|
|
1111
1142
|
# none of them. How often the control poll asks GitHub for a `harness pause
|
|
1112
1143
|
# <branch>` run — each poll is one `gh run list`.
|
|
1113
1144
|
REMOTE_CONTROL_POLL_SECS="${REMOTE_CONTROL_POLL_SECS:-60}"
|
|
1145
|
+
# Not a tunable. How far each control poll's next lower bound reaches back:
|
|
1146
|
+
# GitHub's run listing is eventually consistent, so the window re-reads the last
|
|
1147
|
+
# five minutes. A marker seen twice is harmless — JOB_USER_PAUSE_DROPPED drops
|
|
1148
|
+
# PAUSE once per job.
|
|
1149
|
+
CONTROL_POLL_OVERLAP_SECS=300
|
|
1114
1150
|
# The longest usage-reset wait a HOSTED job sits through rather than handing
|
|
1115
1151
|
# the run to the resume poller, since a hosted job bills for the minutes it
|
|
1116
1152
|
# waits. A self-hosted job waits for any reset before its deadline.
|
|
@@ -1121,6 +1157,9 @@ REMOTE_AUTO_RESUME_MAX="${REMOTE_AUTO_RESUME_MAX:-2}"
|
|
|
1121
1157
|
# How long job mode waits before each of those resumes, so a transient outage
|
|
1122
1158
|
# has time to clear.
|
|
1123
1159
|
REMOTE_AUTO_RESUME_DELAY_SECS="${REMOTE_AUTO_RESUME_DELAY_SECS:-300}"
|
|
1160
|
+
# The runner wait at or above which the job's `resumed` comment says so (see
|
|
1161
|
+
# THE RUNNER WAIT in the header).
|
|
1162
|
+
RUNNER_WAIT_NOTE_SECS=300
|
|
1124
1163
|
|
|
1125
1164
|
# JOB MODE (see the header). Assigned HERE, after the override channel and every
|
|
1126
1165
|
# tunable default, so neither the file nor an inherited value can turn a
|
|
@@ -1129,9 +1168,18 @@ REMOTE_AUTO_RESUME_DELAY_SECS="${REMOTE_AUTO_RESUME_DELAY_SECS:-300}"
|
|
|
1129
1168
|
JOB_MODE=0
|
|
1130
1169
|
# Job mode's pass state, for the same reason: when the control poll last ran,
|
|
1131
1170
|
# whether each pass has already dropped its one PAUSE, and the job's start
|
|
1132
|
-
# (HARNESS_JOB_STARTED_EPOCH, else when run_job began)
|
|
1171
|
+
# (HARNESS_JOB_STARTED_EPOCH, else when run_job began), and the control poll's
|
|
1172
|
+
# starting bound, below which no later bound falls.
|
|
1133
1173
|
JOB_START_EPOCH=0
|
|
1174
|
+
JOB_CONTROL_FLOOR=0
|
|
1175
|
+
# This run's `createdAt`, read once per job (empty when unread), and the note
|
|
1176
|
+
# job_report adds to a `resumed` report when the runner wait was long.
|
|
1177
|
+
JOB_RUN_CREATED_AT=""
|
|
1178
|
+
JOB_RUNNER_WAIT_NOTE=""
|
|
1134
1179
|
LAST_CONTROL_POLL=0
|
|
1180
|
+
# The ledger reading the progress pass last reported; empty, so a job's first
|
|
1181
|
+
# pass always reports once.
|
|
1182
|
+
JOB_PROGRESS_LAST=""
|
|
1135
1183
|
JOB_USER_PAUSE_DROPPED=0
|
|
1136
1184
|
JOB_BUDGET_PAUSE_DROPPED=0
|
|
1137
1185
|
if [ "${1:-}" = "job" ]; then
|
|
@@ -1185,16 +1233,21 @@ notify() {
|
|
|
1185
1233
|
|
|
1186
1234
|
# job_report <event> <branch> [<log>] — the only route to GitHub. The detail is
|
|
1187
1235
|
# withheld: it names local slash commands, and `report` words its comment from
|
|
1188
|
-
# the registry record itself.
|
|
1236
|
+
# the registry record itself. A `resumed` report carries JOB_RUNNER_WAIT_NOTE
|
|
1237
|
+
# when it is set.
|
|
1189
1238
|
job_report() {
|
|
1239
|
+
local note=()
|
|
1190
1240
|
if [ ! -r "$REMOTE_RUN" ]; then
|
|
1191
1241
|
log "notify: '$REMOTE_RUN' is not readable — '${1:-?}' event for '${2:-?}' not reported on GitHub"
|
|
1192
1242
|
return 0
|
|
1193
1243
|
fi
|
|
1244
|
+
if [ "$1" = "resumed" ] && [ -n "$JOB_RUNNER_WAIT_NOTE" ]; then
|
|
1245
|
+
note=(--note "$JOB_RUNNER_WAIT_NOTE")
|
|
1246
|
+
fi
|
|
1194
1247
|
if [ -n "${3:-}" ]; then
|
|
1195
|
-
bash "$REMOTE_RUN" report "$1" "$2" --repo "$MAIN_REPO" >>"$3" 2>&1 || true
|
|
1248
|
+
bash "$REMOTE_RUN" report "$1" "$2" ${note[@]+"${note[@]}"} --repo "$MAIN_REPO" >>"$3" 2>&1 || true
|
|
1196
1249
|
else
|
|
1197
|
-
bash "$REMOTE_RUN" report "$1" "$2" --repo "$MAIN_REPO" >/dev/null 2>&1 || true
|
|
1250
|
+
bash "$REMOTE_RUN" report "$1" "$2" ${note[@]+"${note[@]}"} --repo "$MAIN_REPO" >/dev/null 2>&1 || true
|
|
1198
1251
|
fi
|
|
1199
1252
|
}
|
|
1200
1253
|
|
|
@@ -1330,11 +1383,11 @@ job_report() {
|
|
|
1330
1383
|
# 0, else `0` — so ANY USER ACTION (a drop, an answer, a
|
|
1331
1384
|
# resume: each a chain-0 dispatch) resets it and restores
|
|
1332
1385
|
# the full allowance
|
|
1333
|
-
# control_polled_at job mode only: the
|
|
1334
|
-
#
|
|
1335
|
-
#
|
|
1336
|
-
#
|
|
1337
|
-
#
|
|
1386
|
+
# control_polled_at job mode only: the lower bound of the next control poll,
|
|
1387
|
+
# this job's or the next chained one's — set at start (see
|
|
1388
|
+
# JOB MODE), and after each successful poll the larger of
|
|
1389
|
+
# that starting bound and the epoch before the query less
|
|
1390
|
+
# CONTROL_POLL_OVERLAP_SECS
|
|
1338
1391
|
# pause_note_stale job mode only: `1` when a `pause` job's restored
|
|
1339
1392
|
# `status.json` was not `paused` or named another engine,
|
|
1340
1393
|
# so spawn_engine's pause-resume prompt says there is no
|
|
@@ -4022,6 +4075,30 @@ job_int() {
|
|
|
4022
4075
|
printf '%s\n' "$((10#$1))"
|
|
4023
4076
|
}
|
|
4024
4077
|
|
|
4078
|
+
# job_runner_wait — the job's one `run-created-at` read, into JOB_RUN_CREATED_AT,
|
|
4079
|
+
# then THE RUNNER WAIT's log line and JOB_RUNNER_WAIT_NOTE (the header).
|
|
4080
|
+
job_runner_wait() {
|
|
4081
|
+
local wait mins
|
|
4082
|
+
if [ -n "${GITHUB_RUN_ID:-}" ]; then
|
|
4083
|
+
JOB_RUN_CREATED_AT="$(job_int "$(bash "$REMOTE_RUN" run-created-at "$GITHUB_RUN_ID" --repo "$MAIN_REPO" 2>>"$WATCHER_LOG")")" || JOB_RUN_CREATED_AT=""
|
|
4084
|
+
fi
|
|
4085
|
+
if [ -z "$JOB_RUN_CREATED_AT" ]; then
|
|
4086
|
+
log "job: this run's createdAt could not be read — the runner wait is unknown"
|
|
4087
|
+
return 0
|
|
4088
|
+
fi
|
|
4089
|
+
if [ "${GITHUB_RUN_ATTEMPT:-1}" != 1 ]; then
|
|
4090
|
+
log "job: run attempt ${GITHUB_RUN_ATTEMPT} — this run's createdAt is its first attempt's, so the runner wait is not measured"
|
|
4091
|
+
return 0
|
|
4092
|
+
fi
|
|
4093
|
+
wait=$((JOB_START_EPOCH - JOB_RUN_CREATED_AT))
|
|
4094
|
+
[ "$wait" -ge 0 ] || wait=0
|
|
4095
|
+
log "job: waited ${wait}s for a runner (run created $JOB_RUN_CREATED_AT, job started $JOB_START_EPOCH)"
|
|
4096
|
+
if [ "$wait" -ge "$RUNNER_WAIT_NOTE_SECS" ]; then
|
|
4097
|
+
mins=$(((wait + 59) / 60))
|
|
4098
|
+
JOB_RUNNER_WAIT_NOTE="GitHub took $mins minutes to start this job, so nothing moved until then."
|
|
4099
|
+
fi
|
|
4100
|
+
}
|
|
4101
|
+
|
|
4025
4102
|
# job_start_control_bound <branch> <remote_status> — the control poll's first
|
|
4026
4103
|
# lower bound, in the order the header's JOB MODE block states.
|
|
4027
4104
|
job_start_control_bound() {
|
|
@@ -4029,35 +4106,40 @@ job_start_control_bound() {
|
|
|
4029
4106
|
if [ "$HARNESS_INPUT_CHAIN" -gt 0 ] && [ -f "$remote_status" ]; then
|
|
4030
4107
|
bound="$(job_int "$(hr_remote_status_get "$remote_status" control_polled_at)")" || bound=""
|
|
4031
4108
|
fi
|
|
4032
|
-
|
|
4033
|
-
bound="$(job_int "$(bash "$REMOTE_RUN" run-created-at "$GITHUB_RUN_ID" --repo "$MAIN_REPO" 2>>"$WATCHER_LOG")")" || bound=""
|
|
4034
|
-
fi
|
|
4109
|
+
[ -n "$bound" ] || bound="$JOB_RUN_CREATED_AT"
|
|
4035
4110
|
if [ -z "$bound" ]; then
|
|
4036
4111
|
bound="$JOB_START_EPOCH"
|
|
4037
4112
|
log "job: could not read this run's createdAt — the control poll starts from the job's start ($bound)"
|
|
4038
4113
|
fi
|
|
4114
|
+
JOB_CONTROL_FLOOR="$bound"
|
|
4039
4115
|
registry_set "$branch" control_polled_at "$bound"
|
|
4040
4116
|
}
|
|
4041
4117
|
|
|
4042
4118
|
# job_control_poll <branch> <state_abs> <remote_status> — the `user` pass.
|
|
4119
|
+
# Exit map of `pause-requested`: 0 a pause, 5 none, anything else a failed poll
|
|
4120
|
+
# that neither moves the bound nor pauses.
|
|
4043
4121
|
job_control_poll() {
|
|
4044
|
-
local branch="$1" state_abs="$2" remote_status="$3" now since before rc
|
|
4122
|
+
local branch="$1" state_abs="$2" remote_status="$3" now since before rc out next
|
|
4045
4123
|
[ "$JOB_USER_PAUSE_DROPPED" = "0" ] || return 0
|
|
4046
4124
|
now="$(date +%s)"
|
|
4047
4125
|
[ $((now - LAST_CONTROL_POLL)) -ge "$REMOTE_CONTROL_POLL_SECS" ] || return 0
|
|
4048
4126
|
LAST_CONTROL_POLL="$now"
|
|
4049
4127
|
since="$(job_int "$(registry_get "$branch" control_polled_at)")" || since="$JOB_START_EPOCH"
|
|
4050
4128
|
before="$(date +%s)"
|
|
4051
|
-
bash "$REMOTE_RUN" pause-requested "$branch" "$since" --repo "$MAIN_REPO"
|
|
4129
|
+
out="$(bash "$REMOTE_RUN" pause-requested "$branch" "$since" --repo "$MAIN_REPO" 2>&1)"
|
|
4052
4130
|
rc=$?
|
|
4131
|
+
[ -z "$out" ] || printf '%s\n' "$out" >>"$WATCHER_LOG"
|
|
4132
|
+
log "job: control poll of '$branch' since $since (exit $rc): $(printf '%s\n' "$out" | awk 'NF { l = $0 } END { print l }')"
|
|
4053
4133
|
case "$rc" in
|
|
4054
|
-
0 |
|
|
4134
|
+
0 | 5) ;;
|
|
4055
4135
|
*)
|
|
4056
4136
|
log "job: the control poll for '$branch' failed (exit $rc) — not pausing; control_polled_at stays $since"
|
|
4057
4137
|
return 0
|
|
4058
4138
|
;;
|
|
4059
4139
|
esac
|
|
4060
|
-
|
|
4140
|
+
next=$((before - CONTROL_POLL_OVERLAP_SECS))
|
|
4141
|
+
[ "$next" -ge "$JOB_CONTROL_FLOOR" ] || next="$JOB_CONTROL_FLOOR"
|
|
4142
|
+
registry_set "$branch" control_polled_at "$next"
|
|
4061
4143
|
if [ "$rc" = "0" ]; then
|
|
4062
4144
|
JOB_USER_PAUSE_DROPPED=1
|
|
4063
4145
|
registry_set "$branch" pause_reason user
|
|
@@ -4080,6 +4162,17 @@ job_budget_pass() {
|
|
|
4080
4162
|
log "job: ${after}s of the hosted time budget have passed — dropped PAUSE (reason budget)"
|
|
4081
4163
|
}
|
|
4082
4164
|
|
|
4165
|
+
# job_progress_pass <branch> <state_abs> [final] — THE PROGRESS PASS (the
|
|
4166
|
+
# header's JOB MODE block). `final` reports even an unchanged reading.
|
|
4167
|
+
job_progress_pass() {
|
|
4168
|
+
local branch="$1" state_abs="$2" line
|
|
4169
|
+
[ "$JOB_MODE" = "1" ] || return 0
|
|
4170
|
+
line="$(hr_ledger_phases "$state_abs/flow_progress/${branch}_progress.md")" || return 0
|
|
4171
|
+
[ "$line" != "$JOB_PROGRESS_LAST" ] || [ "${3:-}" = "final" ] || return 0
|
|
4172
|
+
JOB_PROGRESS_LAST="$line"
|
|
4173
|
+
bash "$REMOTE_RUN" report progress "$branch" --repo "$MAIN_REPO" >>"$WATCHER_LOG" 2>&1 || true
|
|
4174
|
+
}
|
|
4175
|
+
|
|
4083
4176
|
# job_usage_wait_ok <branch> — 0 when a usage pause is waited out in the job;
|
|
4084
4177
|
# leaves usage_resume_at_var's USAGE_RESUME_AT and USAGE_RESUME_REPAIRED set.
|
|
4085
4178
|
# With no usable usage_resume_at: `paused_by=usage` still set means the value was
|
|
@@ -4145,6 +4238,7 @@ run_job() {
|
|
|
4145
4238
|
local prev_status="" prev_engine="" aside_rc
|
|
4146
4239
|
|
|
4147
4240
|
JOB_START_EPOCH="$(job_int "${HARNESS_JOB_STARTED_EPOCH:-}")" || JOB_START_EPOCH="$(date +%s)"
|
|
4241
|
+
job_runner_wait
|
|
4148
4242
|
state_rel="$(run_state_dir "$worktree")" || fatal "job: the state directory in '$worktree' is unresolvable"
|
|
4149
4243
|
state_abs="$worktree/$state_rel"
|
|
4150
4244
|
clar_dir="$state_abs/clarifications/$branch"
|
|
@@ -4248,6 +4342,10 @@ run_job() {
|
|
|
4248
4342
|
;;
|
|
4249
4343
|
esac || registry_set "$branch" status failed
|
|
4250
4344
|
|
|
4345
|
+
# The runner-wait note belongs to the job's own start: a later automatic
|
|
4346
|
+
# resume's `resumed` comment never carries it (THE RUNNER WAIT in the header).
|
|
4347
|
+
JOB_RUNNER_WAIT_NOTE=""
|
|
4348
|
+
|
|
4251
4349
|
# The supervision loop: the header's JOB MODE block states each decision.
|
|
4252
4350
|
local status reason ra when decision="stop" detail="" usage_waiting=0 restarts
|
|
4253
4351
|
local wait_ok=1 usage_wait_start=0 usage_wait_ra=0
|
|
@@ -4263,6 +4361,7 @@ run_job() {
|
|
|
4263
4361
|
[ "$(registry_get "$branch" status)" = "running" ] || continue
|
|
4264
4362
|
job_control_poll "$branch" "$state_abs" "$remote_status"
|
|
4265
4363
|
job_budget_pass "$branch" "$state_abs"
|
|
4364
|
+
job_progress_pass "$branch" "$state_abs"
|
|
4266
4365
|
;;
|
|
4267
4366
|
paused)
|
|
4268
4367
|
reason="$(registry_get "$branch" pause_reason)"
|
|
@@ -4354,6 +4453,7 @@ run_job() {
|
|
|
4354
4453
|
[ "$final" = "paused" ] || registry_set "$branch" pause_reason ""
|
|
4355
4454
|
[ -n "$detail" ] || detail="the run ended $final in this job"
|
|
4356
4455
|
[ "$final" != "failed" ] || job_report failed "$branch" "$log_path"
|
|
4456
|
+
job_progress_pass "$branch" "$state_abs" final
|
|
4357
4457
|
job_write_status "$branch" "$remote_status" "$decision" "$detail"
|
|
4358
4458
|
echo "job: $final $decision"
|
|
4359
4459
|
exit 0
|