feat(xce-harness-component): xce-test-multihost builds/checks harness explicitly
run-multihost-verify.sh's XT default now points at \$BUILD_DIR/harness/xce_test and fails fast (actionable "run /xce-build harness" message) if missing. xce_test is the sole mechanism (xtest()) by which the script's job-scenario functions talk to the cluster, so a hard failure is correct, matching task 3.2's already-approved precedent. SKILL.md's Prerequisites, env-var docs, and Dependencies sections updated to match. Verified live: sourced the script (main() guarded from running), called precondition_checks() with the binary present and then moved aside, confirmed the exact failure message, restored the binary (checksum-verified intact). Task 3.4 of xce-harness-component. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
parent
5bd1c75c8e
commit
0626234792
3 changed files with 48 additions and 10 deletions
|
|
@ -172,8 +172,10 @@ bash .claude/skills/xce-test-multihost/run-multihost-verify.sh [--keep-running]
|
|||
- Other overridable env vars: `$XCE_MULTIHOST_BUILD_DIR` (default
|
||||
`src/xce.build`), `$XCE_MULTIHOST_BIN` (controller),
|
||||
`$XCE_MULTIHOST_SCHED_BIN`, `$XCE_MULTIHOST_WORKER_BIN`,
|
||||
`$XCE_MULTIHOST_XT` (`xce_test` -- REQUIRED as of task 4.2's job scenario,
|
||||
a hard precondition failure if missing),
|
||||
`$XCE_MULTIHOST_XT` (`xce_test` -- default `$XCE_MULTIHOST_BUILD_DIR/harness/xce_test`
|
||||
since xce-harness-component task 3.1 decoupled it from the controller
|
||||
build; REQUIRED as of task 4.2's job scenario, a hard precondition failure
|
||||
if missing),
|
||||
`$XCE_MULTIHOST_PORT` (default `9991` -- single-node controller port),
|
||||
`$XCE_MULTIHOST_WORKER1`/`$XCE_MULTIHOST_WORKER2` (default
|
||||
`mh-worker-1`/`mh-worker-2`), `$XCE_MULTIHOST_WAITMS` (default `5000` --
|
||||
|
|
@ -198,21 +200,33 @@ verified safe for this exact pattern by the sibling skills above).
|
|||
|
||||
## Prerequisites
|
||||
|
||||
Controller, scheduler, and worker components must already be built in the
|
||||
same meson build dir (default `src/xce.build`):
|
||||
Controller, scheduler, worker, and harness (`xce_test`) components must
|
||||
already be built in the same meson build dir (default `src/xce.build`).
|
||||
`xce_test` is decoupled from the controller build as of
|
||||
xce-harness-component task 3.1 -- it lives in the standalone `harness`
|
||||
component (`src/xce.build/harness/xce_test`) with its own `/xce-build
|
||||
harness` entry, and a controller-only build no longer produces it:
|
||||
|
||||
```
|
||||
/xce-build controller --incremental
|
||||
/xce-build scheduler --incremental
|
||||
/xce-build worker --incremental
|
||||
/xce-build harness --incremental
|
||||
```
|
||||
|
||||
(`--incremental` matters here specifically because a plain, non-incremental
|
||||
`/xce-build <component>` wipes the whole build dir before rebuilding just
|
||||
that one component -- see this project's own bug-1719 lesson -- so building
|
||||
controller/scheduler/worker one at a time into the same dir needs
|
||||
controller/scheduler/worker/harness one at a time into the same dir needs
|
||||
`--incremental` on every call after the first.)
|
||||
|
||||
`run-multihost-verify.sh` itself also checks for all four binaries at
|
||||
startup (`precondition_checks()`) and fails fast with the exact `/xce-build`
|
||||
command to run if any is missing -- `xce_test` is this script's own driver
|
||||
client (every job submit/poll/verify step runs through it), so a missing
|
||||
harness binary is a hard `FAIL`, not a silently-skipped step or a raw
|
||||
spawn/connect error from the first `xtest()` call.
|
||||
|
||||
## Worker sizing (researched during task 4.1, wired in by task 4.2)
|
||||
|
||||
`xcecd_virtual` has **no** command-line or config override for its reported
|
||||
|
|
@ -328,8 +342,8 @@ allocation decision, not a copy of the plain job's.
|
|||
- `xce-deploy-ha`'s `deploy-ha.sh` and its generated `start.sh` /
|
||||
`start-scheduler.sh` / `start-worker.sh` (single-controller-node path,
|
||||
two named worker instances against the same `--peers` config).
|
||||
- Controller, scheduler, and worker binaries in the same build dir (see
|
||||
Prerequisites above).
|
||||
- Controller, scheduler, worker, and harness (`xce_test`) binaries in the
|
||||
same build dir (see Prerequisites above).
|
||||
|
||||
## Requirements traceability
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,17 @@
|
|||
# silently breaking the match (confirmed live: reproduced the exact false
|
||||
# negative, then confirmed ere_escape() fixes it, before wiring it in below).
|
||||
#
|
||||
# xce-harness-component task 3.4 (THIS revision): xce_test is no longer a
|
||||
# byproduct of the controller build (task 3.1 gave it its own standalone
|
||||
# `src/harness/` component and `/xce-build harness` entry) -- $XT's default
|
||||
# now points at `$BUILD_DIR/harness/xce_test`, and precondition_checks()
|
||||
# below fails with "run /xce-build harness" instead of "run /xce-build
|
||||
# controller" when it is missing. xce_test is this script's own driver
|
||||
# client (every job submit/poll/verify step in
|
||||
# run_multihost_job_scenario()/run_multihost_array_job_scenario() runs
|
||||
# through xtest()), so this stays a hard precondition failure, same as
|
||||
# controller/scheduler/worker above -- not a soft-skip.
|
||||
#
|
||||
# Requirements this task helps satisfy: 4.1 (controller ensures every
|
||||
# allocated host has launch info), 4.2 (worker starts tasks on every
|
||||
# allocated host), 4.3 (scheduler reports running via the existing
|
||||
|
|
@ -137,7 +148,12 @@ WORKER_BIN="${XCE_MULTIHOST_WORKER_BIN:-$BUILD_DIR/worker/xcecd_virtual}"
|
|||
# xce_test -- required by THIS task's submit_multihost_job()/jobinfo_of()
|
||||
# scripted sessions, following the exact idiom run-ha-soak.sh's
|
||||
# submit_worker_job()/jobinfo_of() already established.
|
||||
XT="${XCE_MULTIHOST_XT:-$BUILD_DIR/controller/xce_test}"
|
||||
# xce-harness-component task 3.1: xce_test now builds from the standalone
|
||||
# `src/harness/` component (its own `/xce-build harness` entry), not as a
|
||||
# side effect of `/xce-build controller` -- its default path here follows
|
||||
# that move. XCE_MULTIHOST_XT still lets a caller point at any build
|
||||
# dir/layout (e.g. a release build) explicitly.
|
||||
XT="${XCE_MULTIHOST_XT:-$BUILD_DIR/harness/xce_test}"
|
||||
|
||||
# xce_test client-session tuning (run_multihost_job_scenario() below):
|
||||
# WAITMS wait-primary budget per xtest() session, ms. Single-
|
||||
|
|
@ -324,7 +340,15 @@ precondition_checks() {
|
|||
[ -x "$BINARY" ] || fail "controller binary missing: $BINARY (run /xce-build controller)"
|
||||
[ -x "$SCHED_BIN" ] || fail "scheduler binary missing: $SCHED_BIN (run /xce-build scheduler)"
|
||||
[ -x "$WORKER_BIN" ] || fail "worker binary missing: $WORKER_BIN (run /xce-build worker)"
|
||||
[ -x "$XT" ] || fail "xce_test binary missing: $XT (run /xce-build controller) -- required by this task's job-scenario scripted sessions"
|
||||
# xce-harness-component task 3.1 decoupled xce_test from the controller
|
||||
# build -- it is this script's own driver client (every job
|
||||
# submit/poll/verify step in run_multihost_job_scenario()/
|
||||
# run_multihost_array_job_scenario() runs through xtest()), so a missing
|
||||
# binary here is fatal, not soft-skippable like an optional dependency.
|
||||
# Fail with the harness-specific build command instead of a raw
|
||||
# spawn/connect error the first time xtest() tries to exec a
|
||||
# nonexistent path.
|
||||
[ -x "$XT" ] || fail "xce_test binary missing: $XT (run /xce-build harness) -- required by this task's job-scenario scripted sessions"
|
||||
command -v nix >/dev/null 2>&1 || fail "nix not found on PATH -- required to resolve the deploy-environment bash and invoke deploy-ha.sh"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
- _Requirements: 5.2, 5.4_
|
||||
- _Boundary: xce-deploy-ha skill_
|
||||
- _Depends: 3.1_
|
||||
- [ ] 3.4 (P) Update the multi-host verification workflow's harness prerequisite
|
||||
- [x] 3.4 (P) Update the multi-host verification workflow's harness prerequisite
|
||||
- Update `.claude/skills/xce-test-multihost/run-multihost-verify.sh` and `SKILL.md`
|
||||
- Observable: running the workflow from a build dir where only controller was built either builds the harness itself or reports a clear, actionable message
|
||||
- _Requirements: 5.3, 5.4_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue