Repository navigation
Description
Summary
At current main 66da3877e9e77f01083c4aac0cb9f94ab6e11fe6, the Sirius parity harness executes the complete 1,860-run campaign before validating per-run evidence. An invalid first result is rejected only after all executions finish. That validation error also prevents this invocation from writing any campaign artifacts.
This is a harness efficiency/diagnostics issue, not a claim that Sirius produces incorrect SQL results. Related: #29211 and #28966. The approved performance matrix itself does not need to be reduced.
Reproduction (CPU-only, no database/GPU)
From a checkout of the revision above:
import sys
from pathlib import Path
from unittest import mock
sys.path.insert(0, "optools")
import sirius_parity as p
from sirius_parity_test import SiriusParityTest
fixture = SiriusParityTest()
campaign = p.build_campaign(fixture.provenance())
calls = 0
def runner(spec):
global calls
calls += 1
output = fixture.output(spec)
if calls == 1:
output["fallback"] = True
return output
runs = p.execute_campaign(campaign, runner)
with mock.patch.object(Path, "mkdir") as mkdir, \
mock.patch.object(Path, "write_text") as write:
try:
p.write_artifacts(campaign, runs, Path("/unused-mocked-output"))
except p.CampaignError as error:
print(error)
print(calls, mkdir.call_count, write.call_count)Observed in a fresh in-memory load of the exact revision's harness and fixture:
fallback observed at sequence 1
1860 0 0
The output path is mocked; this reproduction does not write artifacts or invoke a real runner. No GPU runtime or elapsed-time saving is claimed.
Root cause
- execute_campaign, lines 351–358 collects all outputs without checking per-run constraints.
- _validate_output can detect forbidden fallback and invalid route/identity evidence immediately, but is called later through validate_runs.
- write_artifacts calls summarize/validate_runs before creating or writing output files.
- main catches the error and prints a message; the new invocation's accumulated evidence is not persisted by the harness.
Expected behavior / acceptance
- Validate per-run hard constraints as results arrive; stop an invalid campaign before scheduling unrelated remaining work.
- Compare cross-route results once the corresponding native oracle is available; do not require full performance statistics prematurely.
- Preserve bounded, strictly sanitized failure diagnostics (sequence, route, validation category, completed-run count). Do not persist arbitrary runner fields, raw result rows, credentials, paths, or deployment-local data.
- Keep the full valid-campaign schedule and existing correctness/performance gates unchanged.
- Add deterministic fake-runner tests proving an early violation prevents later execution and yields useful sanitized diagnostics; include a valid-campaign control.
- Keep diagnostic/continue-on-error behavior explicit if desired, rather than implicitly spending the entire campaign budget before rejecting invalid evidence.
Verification scope
Source inspection plus the deterministic fake-runner reproduction above. No live GPU, database, full BVT, or production performance measurements were run for this report.
Activity
XuPeng-SH commentedon Sep 22, 2026
修复、优化及下一步建议
以下是实施建议,不代表已经完成修复或验证。优先用现有 harness 的小范围改动解决,不引入新的调度框架。
1. 在正确的边界修复根因
_validate_output检查 identity、route、fallback、execution stats 等硬约束;失败后不再调用后续 runner。validate_runs应共享检查函数,不能维护两套略有差异的规则。最终仍检查 schedule 完整性、顺序及最终统计条件。summarize。顶层失败出口负责保存最小、结构化、严格脱敏的诊断,再返回原来的失败语义;不得为输出报告而继续执行无效 campaign。2. 失败产物的最小契约
建议记录:失败 sequence、预期 route、固定错误类别、attempted/validated 数量、campaign 状态(incomplete/invalid),以及可安全复用的 campaign 身份信息。
3. 正交的验收测试
使用确定性的 fake runner 和临时目录,不需要 GPU/数据库,也不依赖耗时阈值:
少量表驱动用例覆盖各硬约束即可,不需要每个非法字段都重新跑完整 campaign。
4. 范围与实施顺序
本次不缩减批准的性能矩阵,不改变 fallback 禁止策略,不放宽 provenance/capacity 检查,不增加自动重试、恢复执行、并行调度或默认 continue-on-error。原始结果内存占用优化可后续单独评估,不能在没有独立证据时与本问题捆绑扩大改造。
fix: consolidate engineering quality fixes and regression coverage (#…