From 024bb6e2a554bfdb06e38ad43f555a7200a72ffd Mon Sep 17 00:00:00 2001 From: dietrich ayala Date: Wed, 14 Oct 2026 05:56:10 +0200 Subject: [PATCH] after-land: reinstall job-check so the submit scripts follow main A landing that changed the manifest rules left $JOBS_STATE_DIR/bin/job-check at the rules of an earlier main, and the next submit was refused by them. bench/after-land.sh now runs jobs/scripts/install-job-check.sh as its last step, skipped by --dry-run; a failure is one line on stderr and never changes the exit status. --- bench/after-land.sh | 14 ++++++++++++++ docs/infrastructure.md | 4 ++-- docs/local-lane.md | 6 +++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/bench/after-land.sh b/bench/after-land.sh index 95983d8f..b80282fd 100755 --- a/bench/after-land.sh +++ b/bench/after-land.sh @@ -37,6 +37,11 @@ # longer have a worktree here (the most recently used one stays while # KEEP_JOB_OUTPUT is yes). A failure is one line on stderr and never changes the # exit status. +# 6. jobs/scripts/install-job-check.sh: rebuilds the job-check binary that +# jobs/scripts/submit.sh and jobs/scripts/poll-and-land.sh run from +# $JOBS_STATE_DIR/bin, so a landing that changed the manifest rules does not leave +# the next submit refused by the old binary's rules. A failure (no lane answering, +# say) is one line on stderr and never changes the exit status. # # --track the landed track's worktree name, whose ledger gives the post its numbers. # Default: the one track/* branch merged into HEAD (as it was before step 1) @@ -139,5 +144,14 @@ fi # With --dry-run the sweep only lists what it would remove. bench/lane-sweep.sh "${DRY[@]+"${DRY[@]}"}" \ || echo "lane sweep: old build-lane copies not all removed; the landing stands (rerun bench/lane-sweep.sh)" >&2 + +# 6. Rebuild the job-check binary the submit and poll scripts run, from the landed tree +# (jobs/scripts/install-job-check.sh builds it on a build lane and copies it to +# $JOBS_STATE_DIR/bin). The landing stands without it; the next submit is refused by +# the old binary's manifest rules until it is rerun. Skipped by --dry-run. +if [ "${#DRY[@]}" = 0 ]; then + jobs/scripts/install-job-check.sh \ + || echo "job-check: not reinstalled; the landing stands (rerun jobs/scripts/install-job-check.sh before a submit)" >&2 +fi if [ "$DASHBOARD_STATUS" != 0 ]; then exit 1; fi exit 0 diff --git a/docs/infrastructure.md b/docs/infrastructure.md index 255456b0..89f164c5 100644 --- a/docs/infrastructure.md +++ b/docs/infrastructure.md @@ -693,8 +693,8 @@ unless `WEBENGINE_DAGU_LANE` is unset and `WEBENGINE_LANE_SSH` names a lane, whi `jobs/scripts/submit.sh` and `jobs/scripts/poll-and-land.sh` check manifests and results with the `job-check` binary from `$JOBS_STATE_DIR/bin` (default `~/.local/state/webengine-jobs/bin`) on the development box; `jobs/scripts/install-job-check.sh` -builds it on a lane (`bench/on-lane.sh --lane-only --pull`) and installs it there, and is -rerun after a change to `jobs/`. +builds it on a lane (`bench/on-lane.sh --lane-only --pull`) and installs it there; +`bench/after-land.sh` runs it after every landing, so the binary follows `main`. - *The requirements check.* Before the `run` step's `job-run` starts the first stage that is not `passed`, on every start and every resume, it checks that the lane has what the diff --git a/docs/local-lane.md b/docs/local-lane.md index 1bd98a37..ae911e51 100644 --- a/docs/local-lane.md +++ b/docs/local-lane.md @@ -43,9 +43,9 @@ separate `lane` user, because `bench/lane-provision.sh` needs root and the box h - **Shared-directory stand-ins** under `~/lane-shared`, made by hand: `archive/job-logs` (a job's preflight exits 9 without it) and `ledger`. - **The installed `job-check`** under `~/.local/state/webengine-jobs/bin`, which - `jobs/scripts/submit.sh` runs. It does not follow `main`: after `main` changes `jobs/`, - reinstall it with `jobs/scripts/install-job-check.sh` and the four `WEBENGINE_LANE_*` - overrides. + `jobs/scripts/submit.sh` runs. `bench/after-land.sh` reinstalls it after every landing; + after a change to `jobs/` that did not land that way, reinstall it with + `jobs/scripts/install-job-check.sh` and the four `WEBENGINE_LANE_*` overrides. - **The inventory probe**, from cron every 10 minutes through `~/folknet/probe-kimi.sh`, a wrapper that reads the Dagu key file so the cron line holds no key. It stays while `bench/e2e-gate.sh` gates landings, since the scenario jobs need a snapshot under 15 -- 2.54.0