Skip to content

ci(release): journey gate delivered once by git pathspec, end to end (run 38481728706) - #333

Merged
caomengxuan666 merged 1 commit into
masterfrom
fix/journey-gate-delivery-chain
Oct 14, 2026
Merged

caomengxuan666 merged 1 commit into
masterfrom
fix/journey-gate-delivery-chain

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

取证结论:golden-journey.py 为什么不在 scripts\journey\(run 38481728706,tag v1.4.0 @ c7b9ae2)

journey job 死于 verdict self-check:FileNotFoundError: scripts\journey\golden-journey.py,而 test_verdict_exit.py 本身找到了。不是 Copy 静默失败——两次 Copy 都成功了,是 Copy-Item 目录嵌套在两跳同时发生(已用 workflow 逐字命令本地实证,scripts/journey/golden-journey.py → False):

步骤 命令(当时 master 版 release.yml 行号) 实际效果
Preserve current journey gate New-Item RUNNER_TEMP\journey 后 Copy-Item -Recurse scripts/journey -Destination RUNNER_TEMP\journey(原 :1128-1129) 目标已存在 → Copy-Item 把源目录拷进目标 → RUNNER_TEMP\journey\journey\*(嵌套①;与 #327 在 restore 跳发现并注释的是同一 Copy-Item 语义,但从另一头命中,且静默成功)
Checkout release tag(restore 段) Remove-Item scripts/journey 后 Copy-Item -Recurse RUNNER_TEMP\journey scripts/journey(原 :1141-1142) 目标不存在 → 源目录作为 scripts/journey 落地,把嵌套①原样带进来 → scripts\journey\journey\*
Verdict-exit contract self-check(#330) git checkout origin/master -- scripts/journey/test_verdict_exit.py → python …(原 :1170-1171) 只恢复了一个文件到正确路径(所以 test 找得到);test_verdict_exit.py:21 MODULE_PATH = HERE / "golden-journey.py" 指向 scripts\journey\golden-journey.py → 不存在 → :28 exec_module 抛 FileNotFoundError

对照组:perfbudget job 的同款 relay 之所以没炸,是它的 restore 显式取嵌套子目录 RUNNER_TEMP\perf\perf(release.yml:1244)。journey 的 restore 取的是父目录。另外 job 若活到 "Run the golden user journey" 一步,其自身的 git checkout origin/master -- scripts/journey(72b1f10 引入)本可修复工作树——死在它之前一步。

修复:一条 delivery 链,一种机制,三处同款

统一用 gate body 自 72b1f10 已验证的机制 git checkout origin/master -- scripts/journey(选 git pathspec 而非 Preserve 副本的理由:① checkout@v4 fetch-depth 0 已取全部 refs,run 日志 L84-89 可证 origin/master 恒在,任何触发模式都成立;② Preserve 副本在 tag-push 触发时复制的是 tag 树的 gate(本轮 checkout 的就是 refs/tags/v1.4.0,日志 L151)而非 current gate,dispatch 触发时才是 master 树——跨触发模式语义不一致;③ git pathspec 无目录拷贝语义可错,正是 #330 已在本 job 验证过的机制):

  1. 删除 "Preserve current journey gate"(72b1f10 起即冗余,且是嵌套源头)。
  2. "Checkout release tag":fetch + checkout tag 后 Remove-Item scripts/journey + git checkout origin/master -- scripts/journey。Remove 保留(pathspec checkout 只覆盖不删除,防 tag 树泄漏 master 已删除的陈旧文件)。
  3. "Verdict-exit contract self-check":单文件 delivery → 整目录 delivery(本次崩溃的直接修复点),幂等 re-assert,步骤自洽不依赖上文顺序。
  4. "Run the golden user journey" 原样(已是同款 delivery)。

预-flight 与 journey 本体现在跑同一份 current gate。

timing job 残余:选 (c) 维持现状仅记录 + owner 决策包(gate 零改动)

runs 38462805309(6 over)+ 38481728706(9 over)全量记录进 budgets.toml ledger(纯注释,零数字零规则变更)。数据:四轮 windows-2025 类中位数稳定(omb.theme fp 4500→4616)、0 hard-fail(5x)从未触发、over 集合逐轮漂移(仅 modern/minimal-gh/elixr 复现且比率不同)、fp over 按字母序聚集(=时间窗聚集)且尾部逐轮抬升 6.0→7.4→9.9s——#328 的 runner 慢定性被细化为"同机族分钟级争用窗"。mairan/helm/elixr 与 baseline 矛盾(1723→9925 / 678→4005 / 基线 rr 本身 171>120),按本文件纪律保持 unratified。

不实施 (a) 的依据:覆盖 fp 尾部需把 omb.theme first_prompt_ms 推过 12s phase cap(该相位预算彻底失去牙齿);1.0-1.6x 容差带或类内 p90 界都无法区分 fp 尾部与真实回归(n=3、ConPTY 传输尾随输出量走)。不实施 (b) 的依据:iron directive 是 "any asset over its budget FAILS the release",语义变更属裁决级。PR 供 owner 裁决的方案:① hard-fail-only 挡发布 + soft-over 警告(仍入 verdict/job summary,不静默);② over 相位可复现性复测(与文件内既有 "measurement artifact, not a verdict" 先例及 Fetch-Pinned 重试惯例同构)。在此之前 gate 按既批准预算原样咬合。

自检(本地已过)

  • release.yml YAML 解析(10 jobs,Preserve 已移除,journey 步骤序列正确)
  • 4 个改动 pwsh 块过 PowerShell 语言解析器(${{ }} 替换为字面量后 parse,零错误)
  • 新 delivery 链在沙箱 repo 演练:陈旧 tag 树(含 master 已删文件)→ 精确交付 current gate、无嵌套、幂等 re-assert
  • py_compile:test_verdict_exit.py / golden-journey.py / asset-timing.py;tomllib:budgets.toml
  • golden-journey.py:987 的 SyntaxWarning 为既有,未触碰

release.yml 真实行为 dispatch 人工验证清单(主会话执行)

  • 等 PR CI 绿后 merge,然后 workflow_dispatch Niubash Release(tag=v1.4.0,winuxcmd_tag=v1.1.7,winuxcmd_sha256 按 pin JSON)或直接 re-run tag push
  • journey job:"Checkout release tag" 步骤无 New-Item/Copy-Item,以 git checkout origin/master -- scripts/journey 收尾
  • journey job:"Verdict-exit contract self-check" 步骤:先 git checkout origin/master -- scripts/journey 再 python scripts/journey/test_verdict_exit.py,预期输出 self-check 通过(exit 0,无 traceback)
  • journey job:"Run the golden user journey" 步骤:golden-journey.py 正常启动(无 FileNotFoundError),跑完出 journey-artifacts
  • (可选,验证 dispatch 模式)dispatch 一个旧 tag(如 v1.3.4,其树无 verdict self-check):journey 仍应跑 current gate 全目录——这是 "Preserve" 原意图的等价保障
  • perfbudget job(预期仍可能红,属 owner 裁决项非本 PR 缺陷):比对 verdict 里 over 集合是否仍逐轮漂移、0 hard-fail;owner 对 ledger 中两方案裁决后再动 gate

红线核对

  • labeling never waiving 未动:test_verdict_exit.py、gate_exit_code、KNOWN-FAIL 标注原样
  • release.ps1 / 其他 workflow 未触碰;perfbudget job 步骤未触碰(其 relay 恰好自洽,仅作为观察记录在案)
  • 无 stash / force / 未动其他工作树

… to end (run 38481728706)

Release run 38481728706 (tag v1.4.0 @ c7b9ae2, pushed) died in the
journey job's verdict self-check: FileNotFoundError on
scripts\journey\golden-journey.py while test_verdict_exit.py itself was
found. Root cause: the RUNNER_TEMP/Copy-Item gate-delivery relay nested
the directory at BOTH hops, and #330's single-file self-check delivery
masked the misdelivery for exactly one file.

1. The Preserve hop (deleted here) pre-created RUNNER_TEMP\journey with
   New-Item, so Copy-Item -Recurse copied scripts/journey INTO the
   existing destination: RUNNER_TEMP\journey\journey\*. The same
   Copy-Item semantics #327's remove-then-copy comment documented for
   the restore hop alone (release runs 2-5) - hitting from the other
   end, silently (Copy-Item exits 0).
2. The restore hop then copied the ALREADY-NESTED parent: after
   Remove-Item, `Copy-Item -Recurse RUNNER_TEMP\journey scripts/journey`
   lands the tree as scripts\journey\journey\*. (The perfbudget job
   escapes this because its restore grabs the nested child explicitly -
   RUNNER_TEMP\perf\perf, release.yml "Checkout release tag".)
3. The self-check (#330) restored exactly test_verdict_exit.py to the
   correct path - which is why the test was "found" - and its
   load_module() (test_verdict_exit.py:21, MODULE_PATH = HERE /
   "golden-journey.py") then found no module beside it.

Fix: one delivery mechanism, the one the gate body has used since
72b1f10 and #330 extended to the self-check - `git checkout
origin/master -- scripts/journey` - used at all three points:

- "Preserve current journey gate" is deleted (redundant since 72b1f10,
  and the source of the nested relay).
- "Checkout release tag" now ends with Remove-Item + git pathspec
  checkout of scripts/journey: the tag tree cannot leak files master
  deleted (pathspec checkout overlays, never deletes), and no
  Copy-Item semantics exist anywhere in the chain anymore.
- "Verdict-exit contract self-check" delivers the WHOLE current
  directory, not one file - the self-check loads golden-journey.py
  from beside itself, so a single-file delivery hands it a test with
  no module. The re-assert is idempotent and keeps the step
  self-contained against reordering.

origin/master is present in every trigger mode: checkout@v4 with
fetch-depth 0 fetches refs/remotes/origin/* (run log), and the job
checks out unixwin/niubash unconditionally.

Verified locally: release.yml YAML-parses (10 jobs, Preserve gone);
the four edited pwsh blocks pass the PowerShell language parser (with
${{ }} templating substituted); the new delivery chain was exercised
in a scratch repo with a stale-tag tree carrying a master-deleted file
- exact current-gate delivery, no nesting, idempotent re-assert;
test_verdict_exit.py / golden-journey.py / asset-timing.py byte-compile.

perfbudget: NO gate change in this commit - runs 38462805309 (6 over /
0 hard-fail) and 38481728706 (9 over / 0 hard-fail) are recorded in
the budgets.toml ledger as measured: class medians stable across four
windows-2025 runs, the over-set moves between runs, fp overs cluster
alphabetically (= temporally) with the fp tail growing 6.0 -> 7.4 ->
9.9s - transient runner contention, not per-asset regressions.
mairan / helm / elixr stay deliberately unratified (unexplained vs
baseline). A class-default bump would push omb.theme first_prompt_ms
over the 12s phase cap - the residual is a gate-semantics decision
(hard-fail-only blocking, soft-over warning; optionally a
reproducibility re-measure) and goes to owner adjudication in the PR
description; until then the gate keeps its teeth exactly as ratified.
@caomengxuan666
caomengxuan666 merged commit 7c9a10d into master Oct 14, 2026
11 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/journey-gate-delivery-chain branch October 14, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant