Repository navigation
examples: add MiniMax-H3 nightly optimization protocol #1054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
fd6fa1e
b5c73db
d231b4b
95493b9
3cb9cf6
d50133f
d13def9
7afcda7
f4a91d5
fa44832
79a8b4c
df36a76
53f2e6f
173baa4
1bffd2e
4e73bf0
8fc03d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,205 @@ | ||
| # MiniMax-H3 nightly — a scaffold, not one workload | ||
|
|
||
| A measurement protocol and a nightly driver for optimizing vLLM-Omni MiniMax-H3 T2VA on | ||
| four GPUs. The scaffold is generic over the H3 workload: scenarios, request parameters and | ||
| launch flags all live in `protocol/workload.json`, so another H3 variant changes config, | ||
| not code. The configuration shipped here is one instance and its numbers are not portable. | ||
|
|
||
| Nothing here has been executed on four GPUs. It is written against the contracts in this | ||
| checkout (`src/inferrsi/harness/executor/_project.py`, `evaluator/project.py`) and the | ||
| request semantics of `client_bench.py`. An earlier revision of the chain was validated by | ||
| a 1-GPU wiring smoke (server health, client runs, reference write); that proves the wiring, | ||
| not a four-card baseline, and predates the current measurement and provenance rules. The | ||
| first supervised four-GPU run must confirm the integration points listed at the bottom. | ||
| `tests/examples/test_minimax_h3_nightly_protocol.py` covers the CPU paths: result parsing, | ||
| the cap decision, provenance, quality, the real project freeze on CPU, and two stub nights | ||
| of the driver. `full-check` and the nightly lane run the whole suite; the draft and merge | ||
| lanes run only `tests/repository/test_smoke.py` and `tests/contracts/test_claim.py`. No lane | ||
| runs the GPU protocol. | ||
|
|
||
| ## Files | ||
|
|
||
| | File | Role | | ||
| | --- | --- | | ||
| | `protocol/workload.json` | The only place a workload instance is defined: request parameters, scenario list, serve defaults | | ||
| | `protocol/task.md` | The task description handed to the executing agent | | ||
| | `protocol/client_bench.py` | Request client, adapted from the reference script; every request field is a CLI flag | | ||
| | `protocol/h3bench.py` | Server lifecycle, launch-argument whitelist, scenario runners | | ||
| | `protocol/measure.py` | One server, every scenario in `workload.json`, one gating ratio | | ||
| | `protocol/quality.py` | One server, determinism plus fidelity against a retained video | | ||
| | `protocol/quality-policy.json` | Fidelity tiers and the retained video per scenario | | ||
| | `protocol/reference.example.json` | Shape of the frozen baseline; the real file is produced per machine | | ||
| | `setup_reference.sh` | Measures the frozen baseline on this machine from environment variables | | ||
| | `nightly.sh` | Lock, per-night threshold and caps, campaign start, agent placeholder | | ||
|
|
||
| ## The gate | ||
|
|
||
| For each scenario `i` in `workload.json`, with `r_i = e2e_i / reference_i`: | ||
|
|
||
| ``` | ||
| gate_ratio = max_i(r_i / cap_i) minimize | ||
| ``` | ||
|
|
||
| Each scenario is judged against its own incumbent cap, so the worst scenario decides and | ||
| one shape cannot regress while another improves. Caps come from the last accepted result | ||
| (`state.json`, normalized the same way). Before any accepted night they are `1.0`, which | ||
| makes the reference itself the limit: a scenario slower than the reference is rejected. | ||
| A stored cap above `1.0` is clamped to `1.0` so a slower incumbent cannot loosen the gate. | ||
| Caps must be finite numbers; booleans and `NaN` are rejected. | ||
|
|
||
| Caps only tighten. Tonight's cap for a scenario is the smaller of the accepted value in | ||
| `state.json` and the last issued cap, so editing the state file can lower a cap but never | ||
| raise one. Each night writes its caps into its own copy of the protocol | ||
| (`$H3_CAMPAIGN_ROOT/protocol-<stamp>/caps.json`) and the measurement command names | ||
| `{protocol}`, which the harness freezes per session. A session that started earlier keeps | ||
| reading the caps it froze, even after a later night runs. | ||
|
|
||
| A scenario above its cap is an eligibility decision, not a ratio. The measurement writes | ||
| `status: "candidate_failure"` with the offending scenarios under `violations` and | ||
| `reason: "cap_exceeded_..."`, while `gate_ratio` keeps its unpenalized value for the record. | ||
| The harness then applies the decision per side: a candidate is a FAIL, and a baseline that | ||
| is itself past its cap is reported as incomparable (INCONCLUSIVE) instead of being compared. | ||
| No score penalty is added, so an over-cap incumbent cannot turn a 0.1 % gain into a pass. | ||
|
|
||
| A nightly must lower `gate_ratio` by the configured percentage, so both the worst scenario | ||
| and the ladder have to improve together. The fidelity gate runs every scenario listed in | ||
| `workload.json`, not only the first one. | ||
|
|
||
| ## Setup on the target machine | ||
|
|
||
| 1. Install this InferRSI checkout and the vllm-omni environment. | ||
| 2. Check out the frozen baseline and record its commit. | ||
| 3. Measure the reference once, with exclusive access to all four GPUs. Every path comes | ||
| from the environment: | ||
|
|
||
| ```bash | ||
| export H3_PYTHON=/path/to/venv/bin/python | ||
| export H3_MODEL_ROOT=/path/to/MiniMax-H3/snapshot | ||
| export H3_BASELINE_TREE=/path/to/vllm-omni-main | ||
| export H3_PROTOCOL=$PWD/protocol | ||
| bash setup_reference.sh | ||
| ``` | ||
|
|
||
| The script refuses to replace an existing `reference.json` unless `H3_OUT` points | ||
| elsewhere or `H3_FORCE=1`. It writes the per-scenario numbers, host, baseline commit, | ||
| workload fingerprint, model revision and the leased GPU UUIDs, copies one reference | ||
| video per scenario, and registers those videos in `quality-policy.json`. | ||
| 4. Re-measure if the GPU set, driver or model revision changes. `measure.py` checks the | ||
| recorded host, GPU UUIDs, workload fingerprint and model revision before it starts a | ||
| gated server, so a reference copied from another machine or model is rejected instead | ||
| of used. Produce the reference and the nightly measurements under the same | ||
| `CUDA_VISIBLE_DEVICES` lease: unset records every card on the host, while a subset | ||
| records only that subset. | ||
|
|
||
| The model revision hashes the resolved content of every file under `H3_MODEL_ROOT` | ||
| (`.../snapshots/<commit>:<digest>`, or `model-tree:<digest>` for another layout). Links | ||
| are followed, so changing a blob's bytes under an unchanged name changes the revision, | ||
| and a deleted target fails the check. A full read of a multi-gigabyte model costs tens of | ||
| seconds on local storage; the page cache makes repeated checks cheaper. Point | ||
| `H3_MODEL_ROOT` at the snapshot itself, not at a parent directory. | ||
|
|
||
| ## Nightly | ||
|
|
||
| ```bash | ||
| export H3_PROJECT=/path/to/incumbent/vllm-omni \ | ||
| H3_CAMPAIGN_ROOT=/path/to/campaigns H3_PROTOCOL=$PWD/protocol \ | ||
| H3_PYTHON=/path/to/venv/bin/python H3_MODEL_ROOT=/path/to/snapshot \ | ||
| H3_TARGET_REVIEW=/path/to/review.json H3_DEVICE_SCOPE="4xH100 NVLink" \ | ||
| H3_INTAKE=/path/to/intake.json H3_REFERENCE_GUARD=/path/to/guard.json \ | ||
| H3_INCLUDE=vllm_omni | ||
| bash nightly.sh | ||
| ``` | ||
|
|
||
| `H3_INCLUDE` lists the paths inside `H3_PROJECT` that the session freezes (space | ||
| separated). For a vllm-omni checkout the package directory is `vllm_omni`; the value copied | ||
| from a generic project-session example (`src/inferrsi`) does not exist there. Only the | ||
| included paths are frozen and measured: an edit to `csrc/`, `setup.py` or a requirements | ||
| file is outside the measured tree and registers as no change. | ||
|
|
||
| `H3_TARGET_REVIEW`, `H3_DEVICE_SCOPE`, `H3_INTAKE` and `H3_REFERENCE_GUARD` are required | ||
| to start a session on current `main`: the CLI refuses a project campaign without an approved | ||
| intake record, the default `reference_then_candidate` comparison needs an approved reference | ||
| guard, and the freeze (#699) compares the requested gain with recorded calibration before it | ||
| creates a campaign. The guard is a small JSON object; for example | ||
| `{"max_age_seconds": 90000}` refreshes the reference when it is older than a day. | ||
|
|
||
| Because the driver now adds tonight's `caps.json` to the protocol, a review prepared from | ||
| the source protocol no longer matches. The driver therefore runs in two steps: | ||
|
|
||
| 1. Run `bash nightly.sh` without `H3_TARGET_REVIEW`. It stages | ||
| `$H3_CAMPAIGN_ROOT/protocol-<stamp>/` with `caps.json` and prints the path and the | ||
| `H3_STAMP` to reuse. | ||
| 2. Calibrate that staged directory, write the goal declaration and calibration record, then | ||
| re-run with `H3_TARGET_REVIEW=<review.json>` and the same `H3_STAMP`. The freeze checks | ||
| the review against the staged files, including `caps.json`. | ||
|
|
||
| The review binds the baseline snapshot, the protocol files, the launcher and the sampling | ||
| counts. Because those change whenever `H3_PROJECT` changes, the review is regenerated after | ||
| every accepted night. The scaffold does not produce one: the calibration records measured | ||
| baseline samples and a defensible attainable value, which is an operator decision. If | ||
| `state.json` changes between staging and the start, the driver refuses and asks for a new | ||
| stage, because the caps would no longer match the reviewed files. Approve the intake once | ||
| with `session start project --prepare-intake` and `task intake answer`, then pass the | ||
| approved record as `H3_INTAKE`. | ||
|
|
||
| `tests/examples/test_minimax_h3_nightly_protocol.py` stages the protocol, builds a review | ||
| against it, and runs the real freeze on CPU, so the wiring is checked without a GPU. | ||
|
|
||
| The driver takes an exclusive lock, stages the protocol for this night with tonight's caps, | ||
| and starts one project session with `--min-improvement-pct 5` (configurable) once a review | ||
| for that staged protocol is supplied. After an accepted night, record the accepted | ||
| normalized values in `state.json`; the next night takes the smaller of that value and the | ||
| last issued cap, so a cap can tighten but never loosen. | ||
|
|
||
| ## How the session baseline is taken | ||
|
|
||
| Verified in `src/inferrsi/harness/executor/_ordinary.py`: the baseline is a retained copy | ||
| of the **working tree** of `H3_PROJECT` at session start, restricted to `H3_INCLUDE`. It is | ||
| a file snapshot, not a git object; a clean checkout at HEAD and an uncommitted tree are | ||
| both accepted as they are. | ||
|
|
||
| Two consequences: | ||
|
|
||
| - The harness already compares the candidate against the incumbent measured in the same | ||
| session, so `--min-improvement-pct` is "5 % better than last night" without extra work. | ||
| - An accepted change must still be present in `H3_PROJECT` when the next session starts | ||
| (left in the tree or committed). Reverting it reverts the ladder. | ||
|
|
||
| The per-scenario caps in `state.json` are a hard eligibility limit against one scenario | ||
| regressing. A measurement past its cap cannot support a comparison at all, so a night whose | ||
| incumbent is already past a cap reports an incomparable baseline instead of a verdict; that | ||
| points at environment drift or a stale cap, not at the candidate. | ||
|
|
||
| ## What is measured, and what is not | ||
|
|
||
| - Measured: client end-to-end latency from submission to a complete MP4, per scenario, | ||
| median of three runs, one server per measurement. | ||
| - Gated: PSNR/SSIM against the retained video and same-seed determinism, for every | ||
| scenario; the session rejects a candidate when `passed` is false. | ||
| - Reported only: the per-run spread. | ||
| - Not established by this protocol: hardware qualification, memory headroom on an 80 GB | ||
| card, or that a gain transfers to another GPU set. | ||
|
|
||
| ## Integration points to confirm on the first run | ||
|
|
||
| 1. **Placeholder substitution.** This protocol assumes the harness replaces `{python}`. | ||
| If it only replaces `{protocol}` and `{result}`, name an absolute interpreter instead. | ||
| 2. **`--warmups 0 --repetitions 1`.** Warmups and the three timed runs happen inside | ||
| `client_bench.py`; the harness therefore records one sample. | ||
| 3. **Environment passthrough.** `H3_MODEL_ROOT`, `H3_STATE_DIR`, `H3_PYTHON` must reach the | ||
| measurement process. If the harness scrubs the environment, pass them as argv instead. | ||
| 4. **`reference` argument.** `quality.py` uses `--reference` only when it names an existing | ||
| file, and only if the workload has one scenario; with several scenarios a single file | ||
| cannot cover them, so the retained per-scenario videos are used and the harness | ||
| normally passes a baseline directory. | ||
|
|
||
| ## Box (hot-patching) — why it is not used here | ||
|
|
||
| `inferrsi.box` can patch a live Python worker and measure without restarting, which would | ||
| remove the server startup per measurement. Its vLLM-Omni adapter | ||
| (`src/inferrsi/box/repos/vllm_omni`) already speaks `/v1/videos/sync` with admission drain | ||
| and MP4 receipts, but is a single-stage, single-NPU, pure-eager pilot: its topology guard | ||
| returns `restart_required` for multi-rank, graph capture or `torch.compile`. Multi-rank | ||
| hot-swap is tracked separately (#937 / #863). Until that lands this protocol starts a | ||
| server per measurement; swapping `h3bench.start_server` / `stop_server` for Box calls is | ||
| the only change Box would require. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| #!/usr/bin/env bash | ||
| # MiniMax-H3 nightly e2e optimization driver (general scaffold). | ||
| # | ||
| # Stage 1 (implemented): take the campaign lock, derive tonight's threshold and per-scenario | ||
| # caps from the accepted-result record, and start one project session. | ||
| # Stage 2 (placeholder): run a headless coding agent that drives start -> round -> final. | ||
| # Set H3_AGENT_CMD to enable; it is intentionally unset here. | ||
| # | ||
| # Required environment: | ||
| # H3_PROJECT vllm-omni tree of the current incumbent | ||
| # H3_CAMPAIGN_ROOT writable directory for sessions, results and state | ||
| # H3_PROTOCOL this protocol directory (a copy, not the live one) | ||
| # H3_PYTHON interpreter that has inferrsi and vllm-omni installed | ||
| # H3_MODEL_ROOT model snapshot directory | ||
| # Required to start a session (not to stage one): | ||
| # H3_TARGET_REVIEW target review JSON calibrated against tonight's staged protocol; | ||
| # the freeze rejects a review that does not match those files | ||
| # H3_DEVICE_SCOPE device model and topology, for example "4xH100 NVLink" | ||
| # H3_INTAKE approved intake record for this campaign shape; the CLI refuses to | ||
| # start a project campaign without one | ||
| # H3_REFERENCE_GUARD approved reference freshness JSON, required for the default | ||
| # reference_then_candidate comparison | ||
| # The driver runs in two steps. Without H3_TARGET_REVIEW it stages tonight's protocol | ||
| # (including caps.json) and prints the path and the command to continue. Calibrate that | ||
| # staged directory, write the review, then re-run with the same H3_STAMP and the review. | ||
| # Optional: | ||
| # H3_ROUNDS (6), H3_MAX_MINUTES (180), H3_EVAL_TIMEOUT (1200) | ||
| # H3_QUALITY_TIER (strict), H3_IMPROVEMENT (5) | ||
| # H3_INCLUDE (vllm_omni) space-separated paths inside H3_PROJECT that the session | ||
| # freezes and measures; an edit outside them is invisible | ||
| # H3_STAMP fixed timestamp for a replay or test; defaults to the wall clock | ||
| # H3_AGENT_CMD (unset) | ||
| # | ||
| # state.json shape (written after an accepted night): | ||
| # {"best": {"8step": 0.94, "50step": 0.97}} normalized against protocol/reference.json | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| : "${H3_PROJECT:?set H3_PROJECT}" | ||
| : "${H3_CAMPAIGN_ROOT:?set H3_CAMPAIGN_ROOT}" "${H3_PROTOCOL:?set H3_PROTOCOL}" | ||
| : "${H3_PYTHON:?set H3_PYTHON}" "${H3_MODEL_ROOT:?set H3_MODEL_ROOT}" | ||
|
|
||
| ROUNDS=${H3_ROUNDS:-6} | ||
| MAX_MINUTES=${H3_MAX_MINUTES:-180} | ||
| EVAL_TIMEOUT=${H3_EVAL_TIMEOUT:-1200} | ||
| QUALITY_TIER=${H3_QUALITY_TIER:-strict} | ||
| IMPROVEMENT=${H3_IMPROVEMENT:-5} | ||
| INCLUDES=${H3_INCLUDE:-vllm_omni} | ||
|
|
||
| mkdir -p "$H3_CAMPAIGN_ROOT" | ||
| STATE="$H3_CAMPAIGN_ROOT/state.json" | ||
| CAPS="$H3_CAMPAIGN_ROOT/caps.json" | ||
| STAMP=${H3_STAMP:-$(date +%Y%m%d-%H%M%S)} | ||
| SESSION="$H3_CAMPAIGN_ROOT/session-$STAMP" | ||
| NIGHT_PROTOCOL="$H3_CAMPAIGN_ROOT/protocol-$STAMP" | ||
| LOG="$H3_CAMPAIGN_ROOT/nightly-$STAMP.log" | ||
|
|
||
| # One nightly at a time. A second invocation exits 75 instead of corrupting a lease. | ||
| exec 9>"$H3_CAMPAIGN_ROOT/.nightly.lock" | ||
| if ! flock -n 9; then | ||
| echo "another nightly holds $H3_CAMPAIGN_ROOT/.nightly.lock; exiting" | ||
| exit 75 | ||
| fi | ||
|
|
||
| # Each night freezes its own copy of the protocol, so a cap cannot change under a session | ||
| # that already started: the measurement command names {protocol}, and that is the frozen | ||
| # copy. Caps only tighten. Tonight's cap is the smaller of the accepted value and the last | ||
| # issued one, clamped to the reference at 1.0; a later state file cannot loosen an earlier | ||
| # limit. The last issued caps are kept in the campaign root as tomorrow's floor. | ||
| CAPS_TMP="$H3_CAMPAIGN_ROOT/caps-$STAMP.json" | ||
| "$H3_PYTHON" - "$STATE" "$CAPS" "$CAPS_TMP" <<'PY' | ||
| import json, sys | ||
| state_path, floor_path, out_path = sys.argv[1], sys.argv[2], sys.argv[3] | ||
| try: | ||
| accepted = json.load(open(state_path, encoding="utf-8")).get("best") or {} | ||
| except FileNotFoundError: | ||
| accepted = {} | ||
| try: | ||
| floor = json.load(open(floor_path, encoding="utf-8")) | ||
| except FileNotFoundError: | ||
| floor = {} | ||
| caps = {} | ||
| for name in sorted(set(accepted) | set(floor)): | ||
| caps[name] = min(float(accepted.get(name, 1.0)), float(floor.get(name, 1.0)), 1.0) | ||
| json.dump(caps, open(out_path, "w", encoding="utf-8"), indent=2) | ||
| json.dump({**floor, **caps}, open(floor_path, "w", encoding="utf-8"), indent=2) | ||
| print("caps:", caps or "first night, all 1.0") | ||
| PY | ||
|
|
||
| if [ -d "$NIGHT_PROTOCOL" ]; then | ||
| # Staging is what the review was calibrated against. If state changed since then, the | ||
| # caps would differ from the reviewed files, so refuse instead of mutating them. | ||
| if ! cmp -s "$CAPS_TMP" "$NIGHT_PROTOCOL/caps.json"; then | ||
| echo "state.json changed after $NIGHT_PROTOCOL was staged; re-stage with a new H3_STAMP and recalibrate" >&2 | ||
| exit 2 | ||
| fi | ||
| rm -f "$CAPS_TMP" | ||
| else | ||
| mkdir -p "$NIGHT_PROTOCOL" | ||
| cp -a "$H3_PROTOCOL/." "$NIGHT_PROTOCOL/" | ||
| mv "$CAPS_TMP" "$NIGHT_PROTOCOL/caps.json" | ||
| fi | ||
|
|
||
| if [ -z "${H3_TARGET_REVIEW:-}" ]; then | ||
| echo "[$(date '+%F %T')] staged $NIGHT_PROTOCOL" | tee -a "$LOG" | ||
| echo "calibrate that protocol, write its target review, then re-run with:" | ||
| echo " H3_TARGET_REVIEW=<review.json> H3_STAMP=$STAMP bash $0" | ||
| exit 0 | ||
| fi | ||
|
|
||
| : "${H3_DEVICE_SCOPE:?set H3_DEVICE_SCOPE}" "${H3_INTAKE:?set H3_INTAKE}" | ||
| : "${H3_REFERENCE_GUARD:?set H3_REFERENCE_GUARD}" | ||
|
|
||
| echo "[$(date '+%F %T')] threshold=${IMPROVEMENT}% vs incumbent, tier ${QUALITY_TIER}" | tee -a "$LOG" | ||
|
|
||
| MEASURE="\"{python}\" \"{protocol}/measure.py\" --project \"{candidate}\" --result \"{result}\" --model-root \"$H3_MODEL_ROOT\" --caps \"{protocol}/caps.json\"" | ||
| QUALITY="\"{python}\" \"{protocol}/quality.py\" --project \"{candidate}\" --reference \"{baseline}\" --result \"{result}\" --model-root \"$H3_MODEL_ROOT\" --tier \"$QUALITY_TIER\"" | ||
|
|
||
| run_session() { | ||
| local include_args=() | ||
| for path in $INCLUDES; do include_args+=(--include "$path"); done | ||
| "$H3_PYTHON" -m inferrsi session start project \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking:这条启动命令没有传 |
||
| --intake "$H3_INTAKE" \ | ||
| --repo "$H3_PROJECT" \ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "${include_args[@]}" \ | ||
| --protocol "$NIGHT_PROTOCOL" \ | ||
| --instructions "$NIGHT_PROTOCOL/task.md" \ | ||
| --target-review "$H3_TARGET_REVIEW" \ | ||
| --device-scope "$H3_DEVICE_SCOPE" \ | ||
| --reference-guard "$H3_REFERENCE_GUARD" \ | ||
| --measure-command "$MEASURE" \ | ||
| --quality-command "$QUALITY" \ | ||
| --metric-key gate_ratio --metric-unit ratio --direction minimize \ | ||
| --quality-key passed \ | ||
| --quality-benchmark "$("$H3_PYTHON" -c 'import json,sys; print(json.load(open(sys.argv[1]))["dataset"])' "$H3_PROTOCOL/quality-policy.json")" \ | ||
| --scope "4 GPU, every scenario in workload.json, client e2e" \ | ||
| --min-improvement-pct "$IMPROVEMENT" \ | ||
| --warmups 0 --repetitions 1 --decision point --round-mode up_to \ | ||
| --rounds "$ROUNDS" --max-minutes "$MAX_MINUTES" \ | ||
| --evaluation-timeout-seconds "$EVAL_TIMEOUT" \ | ||
| --python "$H3_PYTHON" \ | ||
| --knowledge on \ | ||
| --session "$SESSION" | ||
| } | ||
|
|
||
| # Stage 2 hook. Left empty on purpose: the executing agent, its host and its credentials | ||
| # are not decided yet. When chosen, wrap run_session in that agent's headless invocation, | ||
| # for example `claude -p "$(cat "$H3_PROTOCOL/task.md")" --max-turns N` or `codex exec`. | ||
| if [ -n "${H3_AGENT_CMD:-}" ]; then | ||
| echo "[$(date '+%F %T')] agent mode: $H3_AGENT_CMD" | tee -a "$LOG" | ||
| H3_AGENT_CMD="$H3_AGENT_CMD" bash -c "$H3_AGENT_CMD" 2>&1 | tee -a "$LOG" | ||
| else | ||
| echo "[$(date '+%F %T')] no H3_AGENT_CMD: starting the campaign only" | tee -a "$LOG" | ||
| run_session 2>&1 | tee -a "$LOG" | ||
| fi | ||
|
|
||
| # After a PASS, record the accepted normalized values so tomorrow's caps tighten. The driver | ||
| # keeps the smaller of this value and the last issued cap, so an edit can tighten a cap but | ||
| # never loosen one: | ||
| # {"best": {"8step": <e2e/reference>, "50step": <e2e/reference>}} | ||
| echo "[$(date '+%F %T')] nightly finished; session at $SESSION" | tee -a "$LOG" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dot, acting for zengchuang-hw.
[P1] 两个不同夜晚的会话都把同一绝对路径
$H3_CAMPAIGN_ROOT/caps.json写进测量命令。默认模式只启动会话后便释放锁;下一夜覆盖该文件。旧会话恢复时读取新上限,虽然已冻结的命令和协议文件都没变。这违反 A7 的冻结证据边界。CPU 控制:两次执行实际 Bash 驱动(启动 CLI 用桩,使用不同夜间时间戳),首夜
8step上限 0.80、次夜改为 0.75。在同一个首夜测量命令下,用measure.main桩入固定耗时 78、参考 100,结果从合规(0.975)变成candidate_failure(1.04)。请让每夜的 caps 进入它自己的冻结协议,用{protocol}下的保留文件;回归需验证第二个会话启动后,第一个会话仍读到原来的 caps,并给出同一资格判定。