@@ -4,8 +4,8 @@ argument-hint: <failed-run-or-job-url | pr-number> [source-run-id]
44---
55
66Recover the official database ingest for a failed or skipped InferenceX
7- push-to-main ` Run Sweep ` workflow by creating a recovery PR that reuses validated
8- artifacts from an earlier PR sweep. Do not add a one-off recovery workflow.
7+ push-to-main ` Run Sweep ` workflow by creating a recovery PR that reuses artifacts
8+ from an earlier PR sweep. Do not add a one-off recovery workflow.
99
1010Inputs from ` $ARGUMENTS ` :
1111
@@ -29,9 +29,8 @@ Run from a clean InferenceX checkout with authenticated `gh`, `git`, `jq`, and
2929 ` .github/workflows/run-sweep.yml ` on ` main ` whose official ingest did not
3030 complete.
3131- Reuse only a completed ` pull_request ` run of ` run-sweep.yml ` . Unpinned reuse
32- requires success. A specifically pinned failed run is allowed only when
33- artifact validation proves its available result set is internally consistent;
34- only completed points are recovered.
32+ requires success. A specifically pinned failed run is allowed; normal
33+ ingestion skips failed benchmark rows, so only completed points are recovered.
3534- The source run must belong to the original PR being recovered.
3635- Stop if that PR changed the recovered configuration's execution semantics
3736 after the source SHA: image, model, recipe, runner, launcher, benchmark
@@ -111,10 +110,10 @@ TARGET_RUN_ID=<matching-run-id>
111110Require event ` push ` , workflow path ` .github/workflows/run-sweep.yml ` , and branch
112111` main ` ; confirm the target is no longer running before recovering. The
113112disqualifying state is broader than ` failure ` /` skipped ` : when ` /reuse-sweep-run `
114- was forgotten before merge, ` reuse-ingest-artifacts ` is skipped , the GPU jobs run
115- (often ` cancelled ` to save cost), and because ` collect-results ` /` collect-evals `
116- are not skipped, ` trigger-ingest ` still fires ` always() ` and lands a * bogus*
117- ingest under the target's own ` run_id ` . So a target showing
113+ was forgotten before merge, setup leaves reuse disabled , the GPU jobs run (often
114+ ` cancelled ` to save cost), and because ` collect-results ` /` collect-evals ` are not
115+ skipped, ` trigger-ingest ` still fires ` always() ` and lands a * bogus* ingest under
116+ the target's own ` run_id ` . So a target showing
118117` trigger-ingest=success ` (and concluding ` success ` or ` cancelled ` ) can still hold
119118no valid benchmark data — recovery is required. That bogus row is keyed on the
120119target ` run_id ` and is superseded by the recovery ingest under a new ` run_id ` ;
@@ -132,7 +131,7 @@ git diff "$ORIGINAL_BASE_SHA" "$ORIGINAL_MERGE_SHA" -- \
132131 perf-changelog.yaml
133132```
134133
135- ## 2. Select and validate the source run
134+ ## 2. Select the source run
136135
137136Find candidates from the original PR branch when no run ID was supplied:
138137
@@ -238,7 +237,7 @@ Keep exactly one of `full-sweep-enabled`,
238237` non-canary-full-sweep-enabled ` , ` full-sweep-fail-fast ` , or
239238` full-sweep-fail-fast-no-canary ` .
240239
241- ## 5. Append the recovery changelog and validate source artifacts
240+ ## 5. Append and validate the recovery changelog
242241
243242Append recovery entries to the end of ` perf-changelog.yaml ` . Preserve the
244243original entries' ` config-keys ` , ` description ` , ` evals-only ` , and
@@ -281,61 +280,6 @@ python3 utils/process_changelog.py \
281280Confirm the generated config contains only the intended recovery scope. Its row
282281counts may differ from the source run.
283282
284- Download only the result artifacts needed for local validation. This avoids the
285- large server-log artifacts retained in the official ingest bundle. Raw per-config
286- ` bmk_<model>_* ` artifacts are intentionally not selected — they fall through the
287- ` case ` below; the aggregate ` results_bmk ` is what the validator reads:
288-
289- ``` bash
290- rm -rf /tmp/source-artifacts
291- ARTIFACT_ARGS=()
292- while IFS= read -r name; do
293- case " $name " in
294- results_bmk|eval_results_all|run-stats|bmk_agentic_* |agentic_* )
295- ARTIFACT_ARGS+=(-n " $name " )
296- ;;
297- eval_server_logs_* |eval_gpu_metrics_* )
298- ;;
299- eval_* )
300- ARTIFACT_ARGS+=(-n " $name " )
301- ;;
302- esac
303- done < <(
304- gh api \
305- " repos/SemiAnalysisAI/InferenceX/actions/runs/$SOURCE_RUN_ID /artifacts?per_page=100" \
306- --paginate --jq ' .artifacts[] | select(.expired == false) | .name' |
307- sort -u
308- )
309-
310- (( ${# ARTIFACT_ARGS[@]} )) || {
311- echo " No unexpired result artifacts found" >&2
312- exit 1
313- }
314- gh run download " $SOURCE_RUN_ID " \
315- --repo SemiAnalysisAI/InferenceX \
316- -D /tmp/source-artifacts \
317- " ${ARTIFACT_ARGS[@]} "
318- ```
319-
320- Validate the source artifacts:
321-
322- ``` bash
323- python3 utils/validate_reusable_sweep_artifacts.py \
324- --artifacts-dir /tmp/source-artifacts
325- ```
326-
327- The validator first collapses reran (flaky) eval duplicates in place — keeping
328- the latest result per eval identity when a retried eval left duplicate raw dirs
329- / aggregate rows — so a legitimate rerun does not fail validation. It only
330- collapses identities with a clear latest result; genuinely ambiguous duplicates
331- are still rejected.
332-
333- The validator does not compare source coverage with
334- ` /tmp/recovery-full-config.json ` . It rejects duplicate fixed rows, missing run
335- stats, inconsistent agentic artifacts, malformed eval metadata, raw/aggregate
336- eval mismatches, or an empty result set. For a pinned failed batched eval run,
337- only ` completed_eval_concs ` are recovered.
338-
339283## 6. Attach the source SHA without changing the tree
340284
341285Make the ancestry carrier the final branch commit. ` git commit-tree ` guarantees
@@ -449,15 +393,15 @@ The push-to-main `Run Sweep` must:
449393- run ` setup ` even if the merge message contains ` [skip-sweep] ` ;
450394- resolve the recovery PR and pinned source run;
451395- set ` reuse-enabled=true ` ;
452- - pass ` reuse-ingest-artifacts ` consistency validation;
453396- upload recovery changelog metadata;
454- - run ` trigger-ingest ` .
397+ - dispatch ` source- run-id ` and ` merge-run-id ` from ` trigger-ingest ` .
455398
456399Then locate the resulting ` repository_dispatch ` run in
457400` SemiAnalysisAI/InferenceX-app ` . In the forgotten-` /reuse ` case the target's
458401bogus ingest is also a recent successful ` ingest-results ` run, so do not pick by
459- recency — pick the run whose ` Download artifacts from InferenceX run ` step logs
460- ` RUN_ID: <RECOVERY_RUN_ID> ` :
402+ recency — pick the run whose ` Prepare artifacts from InferenceX ` step logs both
403+ the expected source run and recovery merge run. That app workflow must download
404+ the source artifacts, substitute the merge changelog, and complete ingestion:
461405
462406``` bash
463407gh run list --repo SemiAnalysisAI/InferenceX-app \
@@ -467,19 +411,22 @@ gh run list --repo SemiAnalysisAI/InferenceX-app \
467411
468412INGEST_RUN_ID=< candidate-run-id>
469413gh run view " $INGEST_RUN_ID " --repo SemiAnalysisAI/InferenceX-app --log \
470- | grep -m1 " RUN_ID: $RECOVERY_RUN_ID " # must match before you trust this run
414+ | grep -m1 " Source run: $SOURCE_RUN_ID " # must match before you trust this run
415+
416+ gh run view " $INGEST_RUN_ID " --repo SemiAnalysisAI/InferenceX-app --log \
417+ | grep -m1 " Merge run: $RECOVERY_RUN_ID " # must also match
471418
472419gh run watch " $INGEST_RUN_ID " \
473420 --repo SemiAnalysisAI/InferenceX-app --exit-status
474421```
475422
476- The ingest's first step is a ` sleep 300 ` " wait for source run to finish", so the
477- run idles ~ 5 minutes before doing work — that is normal, not a hang .
423+ Reused ingests skip the normal five-minute wait because the source run is already
424+ complete .
478425
479426Verify its logs identify ` RECOVERY_RUN_ID ` as the trigger and ` SOURCE_RUN_ID `
480427plus ` SOURCE_RUN_ATTEMPT ` as the reused source. Require successful artifact
481- download, flattening, database ingest, run overrides, database verification,
482- cache invalidation, and unmapped-entity checks.
428+ download, database ingest, run overrides, database verification, cache
429+ invalidation, and unmapped-entity checks.
483430
484431Post a final recovery PR comment with the original failed or skipped run/job,
485432source run/attempt/SHA, recovery merge run, downstream ingest run, recovered
0 commit comments