Repository navigation
fix(m8): 启动前按 resolved commit 校验源码资产,失败快速报错 (#488) - #491
Merged
Merged
Conversation
This was referenced Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is by an automated agent, not a human.
问题
生产运行
e996315d-ae5d-45a8-bc04-bf2cd60bb601(模板702e7b83-...,运行名「评测 · SWE-bench Verified · train · v2026.11-split-train」)启动成功,但 100/100 用例在 init 阶段失败,failure_counts只有asset_source_init_failed。直接根因是 OpenSpec-cn 的源码构建只跑 tsc、不把design.md复制进dist;平台侧的resolve_assets只使用历史 load test 冻结生成资产,没有按 resolved commit 执行 install/init,所以启动预检显示 ready,问题直到 Runner 逐用例重建资产才暴露。修改
manifest.load_test,不再沿用历史 load test 的生成内容。_execute_load_test增加timeout与require_generated;resolve 侧允许 init 生成空集(只选 Git 资产时),但选中生成资产缺失时返回asset_source_init_incomplete。manifest.source_validation记录校验版本、resolved commit、ran_at/duration;SOURCE_VALIDATION_VERSION进入 request/selection digest,旧快照(含49c118ed)失效并重新校验;复用路径额外校验 manifest 的版本和 commit。asset_source_init_failed/asset_source_install_failed/asset_source_init_incomplete(422,permanent),asset_source_validation_timeout/asset_source_validation_unavailable(503,retryable);details 使用asset_phase(不是phase,避免与启动步骤键冲突),保留 boundedlog_tail;校验日志不写命令文本,避免把 admin 配置里的 URL/token 暴露给非管理员。m8-source-launch-validation,关联 [m8-22] 源码构建资产缺失未在启动前校验,全量模板 100/100 资产初始化失败 #488。验证
pytest tests/backend/test_agent_assets.py tests/backend/test_eval_templates.py tests/backend/test_eval_launch_jobs.py -q:106 passed on Python 3.12.ruff checkon the changed backend/test files: passed.npm test: 130 passed;npm run verify:flow: ok.asset_source_init_failed,不创建 run(截图见下)。prototype/index.html启动弹层基线asset_source_init_failed、阶段:init、无 runBefore / After
Before(生产旧行为):启动成功、创建 run,100/100 用例在 init 阶段失败(
asset_source_init_failed),没有机会在启动阶段阻断。After(本 PR 本地冒烟):启动在资产解析阶段失败,弹层显示
asset_source_init_failed与阶段:init,不创建 run;布局与prototype/index.html的启动弹层一致(无前端代码改动)。限制
chenmr0/OpenSpec-cn的build.js修复不在本仓库;本 PR 先保证平台快速失败,不再派发 100 个必失败用例。6 个全量模板要恢复执行,需要上游修复后重新加载测试,或把asset_ref固定到a7ec200/8fdc456并重跑 load test。paths)会各自执行一次 install/init;后续可加 validation 缓存优化。ready仍是默认 ref 的旧 load-test 记录;per-commit 记录在 snapshot 的source_validation里。dsh-superagent produced this pull request under the ZTGolem account.