Skip to content

Commit 4338cfc

Browse files
richardhuo-nvclaude
andcommitted
Merge origin/main into codex/qwen35-gb300-trt-agentx-recipes
Resolve the perf-changelog.yaml append conflict by keeping main's entries and moving this PR's entry to the end. Picks up #4438, which fixes the single-node recipe matching that failed check-changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 parents a790302 + 9f50076 commit 4338cfc

280 files changed

Lines changed: 17765 additions & 1949 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/commands/recover-failed-ingest.md‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ ETL or mapping. Missing output is not repaired by rerunning a database ingest.
5656
recovery PR below. Never rerun the failed InferenceX target workflow or job.
5757
- For a failed reused AgentX dispatch, the existing
5858
[recover-reused-ingest workflow](../../.github/workflows/recover-reused-ingest.yml)
59-
accepts a verified `source-run-id`/`merge-run-id` pair. It is not a generic
60-
fixed-sequence repair. Do not create another recovery workflow.
59+
accepts a verified `source-run-id`/`merge-run-id` pair. If the original
60+
merge-ingest run failed before uploading `changelog-metadata`, pass
61+
`original-merge-sha` instead of `merge-run-id`: the recovery run regenerates and
62+
uploads that metadata with `infx.matrix.plan` for `<sha>^..<sha>` and dispatches
63+
itself as the merge run (`ingest-results` or `ingest-agentic-results` by scope).
64+
It is not a generic fixed-sequence repair. Do not create another recovery workflow.
6165
- Rerun PR sweeps only for diagnosed flakes, not deterministic code/config errors.
6266
For cluster faults, use [sweep debugging](../../.agents/skills/debug-runs/SKILL.md),
6367
[MI355X workspace cleanup](clean-amd-mi355-runner-root-files.md), or
@@ -125,6 +129,23 @@ intended entries from the original PR diff or stop on ambiguity.
125129

126130
## Create the recovery PR
127131

132+
`create-pr` automates this section. It verifies the original PR merged, that no
133+
merge-ingest push run for its merge commit is pending or succeeded, and that the
134+
source is completed, belongs to the PR, carries unexpired results, and passes the
135+
pinned `/use` reuse rules. It then extracts the merge's changelog append and fails
136+
closed on any ambiguity. It is a dry run by default; review the printed entries,
137+
then add `--execute`, which runs every step below through the push in a temporary
138+
worktree. `--post-use` also posts `/use`; post it yourself if you are not an
139+
authorized maintainer.
140+
141+
```bash
142+
uv run --project inferencex-e2e --extra workflows python -m infx.workflows.recover_failed_ingest \
143+
create-pr --pr-number "$ORIGINAL_PR" --source-run-id "$SOURCE_RUN_ID"
144+
# then: ... create-pr ... --execute --ai-disclosure "<model and role>" [--post-use]
145+
```
146+
147+
The manual procedure it automates:
148+
128149
Create an empty bootstrap branch/commit from current `origin/main`, then open the
129150
PR before changing the changelog. Use a bilingual title/body and the required AI
130151
disclosure; set `BRANCH` and `RECOVERY_PR` to its branch and number.

‎.github/codeowner-signoff-verify-prompt.md‎

Lines changed: 220 additions & 59 deletions
Large diffs are not rendered by default.

‎.github/dependabot.yml‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,52 @@ updates:
88
github-actions:
99
patterns:
1010
- "*"
11+
security:
12+
applies-to: security-updates
13+
patterns: ["*"]
14+
cooldown:
15+
default-days: 7
16+
- package-ecosystem: "uv"
17+
directory: "/inferencex-e2e"
18+
schedule:
19+
interval: "weekly"
20+
open-pull-requests-limit: 0
21+
groups:
22+
security:
23+
applies-to: security-updates
24+
patterns: ["*"]
25+
cooldown:
26+
default-days: 7
27+
- package-ecosystem: "uv"
28+
directory: "/operatorx"
29+
schedule:
30+
interval: "weekly"
31+
open-pull-requests-limit: 0
32+
groups:
33+
security:
34+
applies-to: security-updates
35+
patterns: ["*"]
36+
cooldown:
37+
default-days: 7
38+
- package-ecosystem: "pip"
39+
directory: "/inferencex-e2e/infx/bench/agentic"
40+
schedule:
41+
interval: "weekly"
42+
open-pull-requests-limit: 0
43+
groups:
44+
security:
45+
applies-to: security-updates
46+
patterns: ["*"]
47+
cooldown:
48+
default-days: 7
49+
- package-ecosystem: "pip"
50+
directory: "/power_model"
51+
schedule:
52+
interval: "weekly"
53+
open-pull-requests-limit: 0
54+
groups:
55+
security:
56+
applies-to: security-updates
57+
patterns: ["*"]
1158
cooldown:
1259
default-days: 7

‎.github/klaud-candidate-prompt.md‎

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,34 @@ Treat candidate.source only as a published benchmark baseline. It is not authori
1414
for current repository state, upstream releases or image compatibility. Resolve the exact
1515
current family/image from the checkout, then independently inspect the actual bundled engine
1616
source, official upstream releases and available images; stop if retired, ambiguous, updated
17-
or owned. Normalize registry `/` versus enroot `#` spelling when comparing the same image.
17+
or owned by another Klaud Cold PR. Open PRs on other branches never block a candidate.
18+
Normalize registry `/` versus enroot `#` spelling when comparing the same image.
1819
Use the canonical generator, inferencex-e2e/configs/runners.yaml and public OpenAPI/repository mappings
1920
for all points, exact cluster routes and physical node demand; never invent aliases or
2021
substitute sibling clusters. The planner already owns the family claim; leave claim refs
21-
to the lifecycle helper. Recheck all open PRs before atomically creating the supplied
22+
to the lifecycle helper. Recheck open Klaud Cold PRs (`klaud/auto-*`) before atomically creating the supplied
2223
exact candidate branch at its base SHA. An existing branch means stop, not takeover,
2324
unless KLAUD_RESUME=true.
2425
Create one draft PR after a real change, titled `[Klaud Cold] English / 简体中文`.
2526
Start its body with only `<!-- klaud-baseline -->`; the report helper fills it.
2627

27-
When KLAUD_RESUME=true, an earlier session ended (ran out or was cancelled) before finishing
28+
When KLAUD_RESUME=true, an earlier session parked, ran out or was cancelled before finishing
2829
this candidate, and recovery started this session in a new run to continue it. The branch,
2930
draft PR, frozen baseline (prepare-baseline returns it), attempt comments and runs are yours;
3031
never recreate them. Check out origin/$KLAUD_BRANCH before editing. Recover the attempt
3132
counter, repairs used and run IDs from your attempt comments; a commit pushed after the head
3233
of your last attempt comment, other than the perf-changelog entry, counts as a used repair.
33-
Inspect those runs (queued, running, preempted or finished) and continue. Repair budget,
34-
infrastructure-retry limits and failure rules carry over.
34+
Recovery starts a session only after every owned run ended, and it already reran the newest
35+
run if someone preempted it. Inspect those runs (finished or preempted) and continue. Repair
36+
budget, infrastructure-retry limits and failure rules carry over.
3537

3638
Compare the actual old/new bundled engine source at its tags/commits in vLLM, SGLang,
3739
ATOM or TensorRT-LLM, including coupled dependencies and used flags/config parsers.
3840
Check changed defaults/semantics, renamed/removed options and hardware/CUDA/ROCm support.
3941
Release notes alone are insufficient; retain source links and provenance uncertainty in
4042
attempt comments. Pin mutable image tags by digest. Before GPU dispatch, inspect the
4143
actual launcher/recipe's effective image, staged weights/config/tokenizer and mount paths.
42-
Missing assets are readiness-blocked; never map to an older image or different weights.
44+
Missing assets mean outcome missing-assets; never map to an older image or different weights.
4345
When the model checkpoint itself is not staged on the target cluster, add
4446
`reason-code: weights-missing` so the planner pauses that model and precision on that hardware.
4547
Check the exact selected launch path for existing engine patches as well as proposed ones.
@@ -55,9 +57,9 @@ overlays, monkey patches or forked/rebuilt engine wheels, including pre-existing
5557
If the shipped stack needs one, report incompatible. Preserve nodes:N, MTP chat templates,
5658
workspace permissions and artifact contracts; follow the CODEOWNER checklist.
5759

58-
Before every PR/branch mutation or cancellation, re-read labels. `klaud-abort` means a
60+
Before every PR/branch mutation or cancellation, re-read the PR. If someone else closed it, a
5961
maintainer stopped this candidate: stop immediately without further changes; the job's
60-
cleanup cancels your runs and closes the PR. Never add or remove that label yourself.
62+
cleanup cancels your runs and deletes the branch. Never reopen it.
6163

6264
The planner checks capacity once, when it selects a candidate; never check or defer for
6365
capacity inside this session. Klaud runs at the lowest scheduler priority: dispatch every
@@ -107,18 +109,25 @@ test-name=$KLAUD_TEST_NAME, and
107109
Autosweeps cover only the family's AgentX (agentic-coding) points; never run fixed-seq-len points.
108110
Smoke retains minimum-concurrency throughput and canonical representative eval concurrency;
109111
it is startup evidence, not a full curve. Persist each run ID/head/attempt and typed progress
110-
comment immediately, before waiting. Use `gh run watch --interval 60`, resume after tool
111-
timeouts, and inspect jobs because queued workflows can contain active jobs and failed
112-
benchmarks can leave evals running. Diagnose the FIRST server error, not teardown symptoms.
113-
Empty aggregates or green collectors do not prove success.
112+
comment immediately, before waiting. Inspect jobs because queued workflows can contain active
113+
jobs and failed benchmarks can leave evals running. Diagnose the FIRST server error, not
114+
teardown symptoms. Empty aggregates or green collectors do not prove success.
115+
116+
Never idle on queued work. Once every owned run you need is queued or running and nothing
117+
else is left to do, publish an attempt report for each of them, then run `park` and end the
118+
session as below. Recovery reruns the newest run if it is preempted and starts your next
119+
session after every owned run ended, so parking costs no repair. You may watch a run that is
120+
already running with `gh run watch --interval 60` for at most 30 minutes; park instead of
121+
watching anything longer or still queued. When a hook says the session is near its time
122+
limit, report progress and park, or finish if the outcome is already terminal.
114123

115124
One initial update plus $MAX_REPAIRS repairs TOTAL, including final-sweep repairs.
116125
A confirmed transient client-download/runner/network retry does not consume a recipe
117126
repair: keep the same head and classify it as infrastructure-retry, numbered 1 then 2 per attempt.
118127
Do not repeat deterministic failures as infrastructure retries. Stop after validation,
119128
exhausted repairs, or the same failure twice without progress.
120-
Benchmarks may take three hours. Do not cancel healthy or queued work to fit the agent job
121-
limit; leave it queued when the session ends, and a later session resumes it.
129+
Benchmarks may take three hours. Never cancel healthy or queued work to fit the session limit;
130+
park instead.
122131

123132
After smoke benchmarks AND selected evals pass, append one exact-family inferencex-e2e/perf-changelog.yaml
124133
entry at the physical tail with this PR URL, preserving every prior byte. Set exactly
@@ -179,10 +188,12 @@ other outcome or any run except the verified final sweep.
179188
Otherwise finish reports the failure/deferral, cancels owned work, confirms every job
180189
terminal, removes sweep labels, drafts/closes the PR, deletes the candidate branch and releases
181190
the family claim so a later wave may retry it. Pending cleanup means wait and retry finish.
182-
Uncertainty is not incompatibility. Open PRs block the family until cleanup completes.
191+
Uncertainty is not incompatibility. Your open PR blocks the family until cleanup completes.
183192
Without an owned PR, report without a placeholder or deleting someone else's claim.
184193

185-
After finish succeeds, read verified $KLAUD_EVIDENCE/outcome.json and invoke StructuredOutput
186-
exactly once with that exact JSON object. Return no prose, Markdown, code fence, file path or
187-
JSON-encoded string. Never forge completion markers or disable the Stop hook. Recovery can
188-
preserve healthy children after SDK/job interruption; never abandon an unfinished session.
194+
After finish succeeds, read verified $KLAUD_EVIDENCE/session-end.json and invoke
195+
StructuredOutput exactly once with that exact JSON object. After park succeeds, do the same
196+
with the `{"status": "parked"}` it writes there. Return no prose, Markdown, code fence, file
197+
path or JSON-encoded string. Never forge completion or park markers or disable the hooks.
198+
Recovery can preserve healthy children after SDK/job interruption; never abandon an
199+
unfinished session.

‎.github/workflows/README.md‎

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ usage: python -m infx.matrix.generate full-sweep
5050

5151
If neither `--single-node` nor `--multi-node` is specified, both types are generated.
5252

53-
By default, throughput runs for every generated config and eval-only jobs run for the selected 8k1k subset and the AgentX GSM8K subset. `--no-evals` disables eval jobs, `--evals-only` emits only that selected subset, and adding `--all-evals` expands it to every fixed-sequence config. `--all-evals` alone is an equivalent eval-only shorthand, but it cannot be combined with `--no-evals`.
53+
By default, throughput runs for every generated config and eval-only jobs run for the selected 8k1k subset and the AgentX GSM8K subset. `--no-evals` disables eval jobs, `--evals-only` emits only that selected subset, and adding `--all-evals` expands it to every eligible 8k1k fixed-sequence and agentic config. `--all-evals` always emits only those eval-only jobs, with or without `--evals-only`, but it cannot be combined with `--no-evals`.
5454

55-
`--step-size` must be greater than 1 and applies to concurrency ranges. Explicit `conc-list` values are emitted directly and are filtered by `--min-conc` / `--max-conc` when provided. When both bounds are set, `--min-conc` must not exceed `--max-conc`.
55+
`--step-size` must be greater than 1 and applies to concurrency ranges. `--min-conc` / `--max-conc` drop concurrencies outside the bounds, including explicit `conc-list` values. A single-node fixed-sequence `conc-start`/`conc-end` range that crosses a bound is clamped to it, and a fixed-sequence config with no concurrency left under `--max-conc` runs at the cap. When both bounds are set, `--min-conc` must not exceed `--max-conc`.
5656

5757
`--trim-conc` (the `trim-conc` input of `e2e-tests.yml`) keeps only the minimum concurrency of every generated single- and multi-node deployment shape, after eval selection, for a lowest-concurrency smoke run; in changelog-ref mode only throughput rows are trimmed, and evals keep their selected concurrency. No PR label enables trimming.
5858

@@ -65,7 +65,7 @@ full-sweep --config-files configs/nvidia-master.yaml
6565

6666
**Test all single-node dsr1 configurations on B200 with 8k1k sequence lengths:**
6767
```
68-
full-sweep --single-node --model-prefix dsr1 --runner-type b200 --seq-lens 8k1k --config-files configs/nvidia-master.yaml
68+
full-sweep --single-node --model-prefix dsr1 --runner-type cluster:b200-nscale --seq-lens 8k1k --config-files configs/nvidia-master.yaml
6969
```
7070

7171
**Test all single-node fp8 precision configs for 8k1k workloads:**
@@ -75,12 +75,12 @@ full-sweep --single-node --precision fp8 --seq-lens 8k1k --config-files configs/
7575

7676
**Test all single-node TRT configs on H200 runners:**
7777
```
78-
full-sweep --single-node --framework trt --runner-type h200 b200-trt --config-files configs/nvidia-master.yaml
78+
full-sweep --single-node --framework trt --runner-type h200 cluster:h200-dgxc --config-files configs/nvidia-master.yaml
7979
```
8080

8181
**Test specific single-node model on specific hardware with specific sequence lengths:**
8282
```
83-
full-sweep --single-node --model-prefix dsr1 --runner-type b200 --precision fp4 --framework sglang --seq-lens 8k1k --config-files configs/nvidia-master.yaml
83+
full-sweep --single-node --model-prefix dsr1 --runner-type cluster:b200-nscale --precision fp4 --framework sglang --seq-lens 8k1k --config-files configs/nvidia-master.yaml
8484
```
8585

8686
**Limit concurrency and parallelism for faster testing:**
@@ -238,8 +238,14 @@ Remove and re-add the primary sweep label to approve the new SHA. The trusted
238238
dispatcher never checks out or executes PR code itself.
239239

240240
This proof of concept produces benchmark and evaluation artifacts through the
241-
End-to-End Tests workflow. Those runs are not yet eligible for
242-
`/use`, which currently accepts only `run-sweep.yml` runs. The PoC
241+
End-to-End Tests workflow. The dispatch also uploads a `source-identity`
242+
artifact (PR number, full approved head SHA, merge SHA, and the `evals-only`,
243+
`agentx-fast`, `all-evals`, and fail-fast modifiers) and `changelog-metadata`.
244+
A pinned `/use <run_id>` accepts these runs; reuse and staging report the
245+
recorded PR head and judge modifiers from the recorded dispatch rather than the
246+
PR's current labels. Older runs without the artifact fall back to the run title
247+
and the PR's current labels. On the fork PR, `/stage-results <run_id>` stages
248+
such a run when its recorded head is one of the PR's commits. The PoC
243249
also fans out the selected matrix immediately. It does not reproduce
244250
`run-sweep.yml`'s canary-first sequencing: no label runs a canary here, and
245251
only `full-sweep-fail-fast` sets fail-fast, so the other two primary labels
@@ -251,7 +257,7 @@ behave identically.
251257
run. The push-to-`main` `merge-ingest.yml` run ignores it.
252258

253259
An authorized maintainer can reuse an eligible completed sweep without keeping
254-
a primary sweep label on the PR, although staging its results requires one:
260+
a primary sweep label on the PR:
255261

256262
```
257263
/use <run_id>
@@ -276,8 +282,10 @@ pinned run's commit is not part of the PR, it also posts one warning comment for
276282
that request and run; reuse still proceeds. Details are in the Actions run summary.
277283
Edits replace the bot's old reaction. `/use <run_id>` also triggers `stage-results.yml`.
278284
Staging requires a primary sweep label on the PR and a source run created while
279-
one was applied. It posts a staging comment, or a rejection comment when the PR
280-
has no primary label. Comments do not trigger or cancel GPU sweeps. Later commits
285+
one was applied. A PR without a primary label can instead stage only the run
286+
pinned by its latest authorized `/use <run_id>`, after the same validation that
287+
acknowledges the request. It posts a staging comment, or a rejection comment
288+
when neither applies. Comments do not trigger or cancel GPU sweeps. Later commits
281289
skip a new sweep after changelog/matrix and source-run validation. Merge-time
282290
validation remains authoritative; an acknowledgment cannot override expired or
283291
invalid artifacts. Reuse is rejected while the PR currently carries
@@ -308,6 +316,13 @@ normal ingestion code skips failed benchmark rows. Benchmark rows and public
308316
links retain source-run provenance. Source coverage is authoritative, so later
309317
matrix/eval policy changes do not invalidate reuse.
310318

319+
When the app's ingest finishes, on success or failure, it sends
320+
`ingest-results-completed` back with per-run counts (benchmark, eval, trace and
321+
power rows: new, duplicate, skipped, unmapped, failed). `ingest-results-callback.yml`
322+
checks that `merge-run-id` is a Merge Ingest push to `main`, resolves the PR merged
323+
by that commit, and posts one comment per merge run, updated in place on reruns
324+
(marker `<!-- ingest-results-report merge-run=<id> -->`).
325+
311326
Reuse fails closed when authorized but ineligible or invalid. Pushes to `main`
312327
never run a sweep: `run-sweep.yml` is PR-only, and without reuse authorization
313328
the Merge Ingest run fails and nothing is benchmarked or ingested.

0 commit comments

Comments
 (0)