Repository navigation
feat(klaud): exempt baseline points retired by a dated MODELS.md deprecation - #3766
Conversation
…ecation A published baseline that still contains a workload the family later dropped can never validate, so select defers those families on every wave. The planner now records a frozen point as retired only when the current family no longer runs any point with its single-turn ISL/OSL, the MODELS.md Scenarios table deprecates that ISL/OSL with a date after the baseline date and a link to the deprecating PR, and the model's support-matrix row lists the scenario as deprecated and not active. Absence from the current family alone retires nothing. Retirements are part of the frozen baseline. Retired points keep their published values in the roster, the PR body and the final report name them with the scenario, date and PR link, and select, check-final, finish and recovery exempt only those points. Every other missing point still fails coverage.
The candidate agent can rewrite the PR-body baseline and the preflight it is copied from, so check-final, finish and recovery trusted any well-formed retirement. They now re-run the planner's rule on the recorded roster and baseline date against the family and MODELS.md at the candidate base, never the PR head, and fail unless it derives exactly the recorded retirements. Each retirement records its model prefix and ISL/OSL, read from the frozen point labels, so the check needs no public API call. Retirements may only name fixed-seq-len points, and dates are compared as validated YYYY-MM-DD calendar days. The MODELS.md parser treats a table with a malformed row as unreadable and groups differently spaced ISL/OSL cells, so a duplicate row stays ambiguous. Records without retirements omit the field, so code that predates it can still read them. Tests cover forged retirements in check-final and in the validation that finish and recovery run, a correctly recorded retirement, each fail-closed MODELS.md case and the record format. The MODELS.md notes and the reporting guide state the exact conditions and the re-check.
|
Claude finished @adibarra's task in 57s —— View job Review of PR #3766
LGTM - no blocking issues found. What I checked
Not verified
|
There was a problem hiding this comment.
Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.
Beyond the inline finding, I also examined two other candidate concerns raised during the bug hunt and ruled them out: the [model] = {...} unpacking crash in retirements() (reporting.py:1151) when a family currently generates zero points, and a baseline-point-reordering worry in check_baseline_coverage (reporting.py:945) — the retirement re-derivation always replays over the baseline's own recorded point order, not the live matrix's order, so reordering doesn't affect it.
Extended reasoning...
This PR adds a strict retirements list to the frozen Klaud baseline model and makes check-final/finish/recovery re-derive it from MODELS.md at the candidate base to fail closed against a tampered record, touching reporting.py, validation.py, lifecycle.py, main.py and several docs. It is security/trust-sensitive anti-forgery validation logic and a large, intricate change; one confirmed reporting-duplication bug (a retired-and-failed point listed under two separate Note lines) was found and filed inline. I additionally traced two other candidate crash/correctness concerns in the retirement derivation code and ruled both out from reading the surrounding logic.
| for label, point in zip(labels, points, strict=False): | ||
| shown = f"c{label}" if heading == "Concurrency" else label | ||
| if point.result != "passed": | ||
| issues.setdefault(point.result, []).append( | ||
| f"c{label}" if heading == "Concurrency" else label | ||
| ) | ||
| issues.setdefault(point.result, []).append(shown) | ||
| if point.key in retired: | ||
| issues.setdefault(retired[point.key], []).append(shown) |
There was a problem hiding this comment.
🟡 (optional) Readers of the PR body and final report can see one baseline point listed under two separate 'Note:' lines, duplicating and muddling its status. In baseline_table (reporting.py:511-516), a point that is both retired and has result != "passed" (e.g. "unavailable", which resolve_baseline assigns to legacy points it adds from the historical producer family with no matching published row) is appended to issues under both point.result and retired[point.key]. Fix: when point.key in retired, skip or merge the result-based note so each point contributes exactly one explanatory line; the same two-bucket append pattern is the root cause, not just this one site.
Why this was flagged
Trigger: a frozen baseline point whose producer-revision entry was never matched to a published API row (result="unavailable", set in resolve_baseline's Point(... result="unavailable") fallback at reporting.py:1212-1220) and whose workload is later retired via a MODELS.md deprecation after the baseline date. In baseline_table, the for-loop at reporting.py:511-516 appends shown to issues[point.result] (line 514) and separately to issues[retired[point.key]] (line 516) for the same point, since both conditions are independent ifs, not elif. On the base branch retirements did not exist, so a point could only ever get one Note. Nothing in render_body/baseline_table dedupes or merges per-point reasons, so the rendered PR body and klaud.md-documented report show the same label twice with differing, redundant explanations.
Verification: nit. The double-listing is real and reachable, but cosmetic. In baseline_table (reporting.py:511-516) the two appends are independent with no elif/dedup: line 514 adds shown under point.result when point.result != "passed", and line 516 adds the same shown under retired[point.key]. note_lines (reporting.py:359-363) emits one **Note:** line per reason key, so a point meeting both conditions appears in two Note lines.
Summary
Some Klaud Cold families can never validate: their published baseline still contains points that a later, deliberate retirement removed from the master config (for example the Single-turn 1k1k workload). Since #3764,
selectdefers them before dispatch, but it does so on every wave, so these families can never be refreshed until a newer full public baseline exists.This lets the frozen roster exempt a point only when the repository explicitly retired it after the baseline date. Every other missing point still fails coverage.
Which signal counts as a retirement
I checked how retirements are recorded today:
perf-changelog.yaml: retirement PRs (Deprecate 1k1k benchmark configurations #2263, [Klaud Cold] Enact the August 3, 2026 scenario and precision deprecations / 执行 2026 年 8 月 3 日场景与精度下线 #2493, [Klaud Cold] Enact the August 6, 2026 Kimi-K2.5/2.6/2.7-Code retirement / 执行 2026 年 8 月 6 日 Kimi-K2.5/2.6/2.7-Code 完全退役 #2527, [Klaud Cold] Enact the September 8, 2026 DeepSeek-V4-Pro Single-turn 8k1k deprecation / 执行 2026 年 9 月 8 日 DeepSeek-V4-Pro 单轮 8k1k 场景下线 #2921, [Klaud Cold] Retire GLM-5.1 and its B200 TileRT config / [Klaud Cold] 退役 GLM-5.1 及其 B200 TileRT 配置 #3638) add no entries. Entries are sweep triggers whose config keys must still exist, and their descriptions are free text.configs/deprecated/archives: deleted in [Klaud Cold] Remove pointers to the deleted single-node bash folders; delete configs/deprecated and amd_utils/deprecated #3463.AGENTS.mdnow says retired entries are deleted, not archived.docs/MODELS.md: the documented source of truth for retirements.AGENTS.mdrequires its retirement statements to match the active configs in the same PR. The Scenarios table gives each deprecated workload a date and a PR link, and the Model support matrix lists the deprecated scenarios per model.So the planner uses
MODELS.mdat the candidate's base. It retires a frozen point only when all of these hold:Deprecated since YYYY-MM-DD ([#N](PR link))(or the boldDeprecated for all modelsform), links a PR of this repository, and its date is later than the baseline date;Absence from the current family, a removal commit or a changelog entry retires nothing. A partial topology or concurrency removal has no such statement, so it still fails coverage.
Recording and reporting
Baselinegains a strictretirementslist. Each entry holds the scenario, date, PR link and the retired point keys. The model rejects retirements that are not after the baseline date, that name unknown or repeated points, or that would retire every point. Older records without the field still load.baseline-preflight.jsonand the frozen PR-body record keep them.missing_baseline_pointsskips only recorded retirements, soselect,check-final,finishand recovery all apply the same exemption.klaud-reporting.md,klaud.mdandMODELS.md(with their Chinese versions) describe the rule. TheMODELS.mdnote tells editors that Klaud reads this wording.Verification
infx/tests/klaud/test_klaud_github.py:selectkeeps a family whose only missing points were deprecated after the baseline, and the preflight records the retirement. It still defers withbaseline-point-mismatchwhen the deprecation is dated on the baseline day, when MODELS.md has no deprecation, when the model row does not list the scenario, or when the family still runs that workload.Baselinemodel rejects retirements it cannot justify.infx/tests/klaud: 31 passed.ruff check infxandruff format --check infxpass.216e6558), with live public API data, producer regeneration andMODELS.mdat that base. The re-resolved rosters match the wave's preflights exactly.Notes
MODELS.mdwording is now load-bearing. If the Scenarios or support-matrix rows are reworded, retirements stop applying and those families are deferred again. Nothing is waived by accident.retirements.Update
check-final,finishand recovery no longer trust recorded retirements. The candidate agent can edit the PR-body record and the preflight, so these steps re-run the planner's rule on the recorded roster and baseline date against the family andMODELS.mdat the candidate base, never the PR head. They fail unless it derives exactly the recorded retirements. This replaces the prompt-only rule in the last note.YYYY-MM-DDcalendar days.MODELS.mdparser treats a table with a malformed row as unreadable. It groups ISL/OSL cells regardless of spacing, so a duplicate row stays ambiguous.MODELS.mdnotes and the reporting guide state the exact conditions and describe the re-check.check-finaland the validation thatfinishand recovery run, and a correctly recorded retirement passes. Further tests cover each fail-closedMODELS.mdcase and the record format. On the previous commit,check-finalaccepts every forged record. Each fail-closed case fails when its guard is removed.infx/tests/klaud: 47 passed.ruff check infxandruff format --check infxpass.