Skip to content

fix(ci): scope pull requests from tested merge - #1107

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/1106-pr-merge-scope
Oct 21, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/1106-pr-merge-scope

Conversation

@MatrixAdventurer

@MatrixAdventurer MatrixAdventurer commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Capability assessment: N/A: CI routing changes do not alter Astra product capabilities, profiles, or public behavior.

由 LW 授权的 ChatGPT Personal 智能体提交。

Summary

  • diff pull requests from the tested GitHub merge commit instead of directly comparing the base tip with the feature head
  • verify that the tested commit's parents exactly match the event base and head before using it
  • keep the existing fail-safe behavior by enabling every scope when merge identity cannot be established
  • preserve rename coverage for both push and pull-request events

This prevents base-only changes from starting unrelated expensive lanes for a pull request that is otherwise lightweight.

Related issue

Related to #1106 (addresses the PR scope-detection item; the build invalidation and macOS path-alias items remain separate).

Change type

  • Bug fix
  • Build, CI, or maintenance

User and compatibility impact

None. CI selects lanes from the actual merge result GitHub tests; ambiguous or mismatched history still runs every lane.

Architecture and complexity delta

N/A.

  • Canonical owner changed or extended: scripts/ci/ci_scope.py remains the sole scope classifier.
  • Existing implementations and callers searched: .github/workflows/test.yml and the existing classifier contract tests.
  • Superseded code, states, tables, shims, or self-only tests removed: direct PR base-tip to feature-head comparison.
  • If parallel implementations remain, their boundary and retirement condition: None.

Verification

  • Current head: 0414699bb79d7b791a979310cffdd07612899c32, rebased on main b232c4a570daee85b96c195f6b4703cde9db8540 after fix(deps): update webpki crates for RustSec advisories #1104 merged. No exact upstream dev exists; main is used as explicitly authorized.
  • Complete scope remains 2 files, +141/-4. Both target blobs equal the original reviewed head; main did not alter those files.
  • Current-base RED: applying only the two new real-Git regressions to unchanged production yields 2 failures. GREEN after replaying the production patch: cd scripts/ci && python3 -m unittest test_ci_scope — 25 passed; python3 -m py_compile ci_scope.py test_ci_scope.py and git diff --check passed.
  • Independent sync review: Approve, with independently executed 25/25 tests and verification of merge-parent visibility under workflow fetch-depth 2. Remote head was independently fetched; full-tree equality was confirmed in the conversation record.
  • Published full tree d361a9df9bb10931b2942f1b056f3a51f789e4cc equals tested local commit 82c8c5d05a32db41de9a30b10d8e1665f7d68ff0.
  • Current-head Static Checks 39641603120 and Test Suite 39641602638 both completed SUCCESS; PR Title also succeeded. The former audit blocker is resolved on this head. Local Rust installation was blocked by missing /proc/self/exe; complete gate results above come from actual GitHub CI.
  • Public entrypoint exercised: python3 scripts/ci/ci_scope.py with synthetic push/PR events in actual temporary Git repositories. Unhappy paths: missing/non-merge GITHUB_SHA, parent mismatch, fail-safe all-scopes fallback and rename coverage.
  • Database verification: N/A for this Python CI routing change; selected upstream CI must still pass.
  • Backup MatrixAdventurer/Astra:archive/1107-before-sync-20261022 preserves old head and history. Only the verified own-fork feature branch was updated with an expected-SHA lease. Branch, commit and read-only verification operations were performed by the signed execution subject; no default branch written, merge, deployment or issue closure.

Final checklist

  • I added or updated tests at the layer that owns the behavior.
  • The change needs no public or design documentation update.
  • I checked the diff for credentials, private URLs, customer data, generated files, and other sensitive information.
  • The PR title follows the repository's Conventional Commit format.

由 LW 授权的 ChatGPT Personal 智能体提交。

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 MOI 智能体提交。

CI 回访记录(2026-10-21 18:36 CST,无人值守运行,对象:本 PR,head 5e549f187bb2e15a9f32929e0f138ad63ee6bebb):

最新 CI 状态

  • Test Suite run #39569549455:PR checks 列表中全部 Test Suite 相关 job 均 success(astra-cli 全组合、terminal PTY、macOS workspace、online core/core-services/integration、dev-tty-reader 等)。
  • Static Checks run #39569549575:6 个 job 中仅 lint 失败;check 聚合 job 因第 2 步 Require static gates 失败。

失败归因(证据)

  1. lint job 唯一失败步骤是第 13 步 cargo audit (RustSec advisory DB);同一 job 内与本 PR 直接相关的门禁全部成功:Test CI contracts、Validate GitHub Actions workflows、Validate offline script contracts、clippy、Check formatting。
  2. 本 PR 仅改动 scripts/ci/ci_scope.py 与 scripts/ci/test_ci_scope.py(2 文件 +141/-4),不触及任何 Rust 依赖或 Cargo.lock。
  3. 失败机制与 [Bug]: fresh RustSec advisories block required audit gate #1103 完全一致:锁定的 rustls-webpki 0.103.15 触发 RUSTSEC-2026-0381/-0382/-0383,当前 main(cd8109d)同样失败。
  4. 对照实验:fix(deps): update webpki crates for RustSec advisories #1104 仅更新 Cargo.lock 的 webpki 相关依赖后,同一静态检查流程全绿(Static Checks run #39566600232 SUCCESS),证明本 PR 的红色门禁与自身 diff 无关。

处理与后续

  • 不在本 PR 重复 fix(deps): update webpki crates for RustSec advisories #1104 的依赖修复(避免重复修复与 review 冲突);本 PR 代码无需修改,独立 review 结论维持 Approve(见正文 Verification 记录)。
  • 本轮不 rerun:advisory DB 与锁定依赖的失败是确定性的,重跑必然同样失败。待 fix(deps): update webpki crates for RustSec advisories #1104 合入 main 后,再更新本分支并重跑 Static Checks。
  • 目标分支记录:上游仓库无 dev 分支(另有 protected moi-dev),本 PR 沿用既有交付选择以 main 为 base;如需改投其它 base 请在审阅时说明,我不擅自改支或建支。
  • 已 assign XuPeng-SH 并请求其审阅(本轮已读回确认 requested reviewers 状态为 XuPeng-SH)。不自动合并、不自动关闭。

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 MOI 智能体提交。

CI 回访与后续(2026-10-21 22:23 CST 无人值守定时运行,对象:本 PR,head 5e549f187bb2e15a9f32929e0f138ad63ee6bebb)。

1. 上游阻塞已解除(实测)

  • fix(deps): update webpki crates for RustSec advisories #1104 已于 2026-10-21T13:36:21Z 合入 main(merge commit b232c4a,本轮读取 main 提交记录确认)。修复后的 Cargo.lock(rustls-webpki 0.103.16、webpki-roots / webpki-root-certs 1.0.10 及全部版本限定引用,源 commit 309c8ca)现已在 main。
  • 佐证:同一套静态门禁在该 lockfile 上已全绿(Static Checks run #39566600232:make audit 加载 1,348 条 advisory、扫描 776 个锁定依赖通过)。这也回答了 [Bug]: fresh RustSec advisories block required audit gate #1103 评论中"webpki-roots 0.26.11 是否需同步升级"的待核实点:合入的 lockfile 原样通过 audit,无需额外改动。

2. 本 PR 红色门禁的处理(本轮动作)

  • 维持此前归因:本 PR 仅改 scripts/ci/ci_scope.py 及其测试(2 文件 +141/-4),失败仅来自 lint job 第 13 步 cargo audit (RustSec advisory DB) 与聚合 check(Run #39569549575),根源是触发时(08:28Z)合入快照里 main 的旧锁定 webpki 版本(RUSTSEC-2026-0381/-0382/-0383),与本 PR diff 无关。
  • 2026-10-21T14:23:01Z 已对 Run #39569549575 触发 rerun(run_attempt 2),即时读回状态 queued,lint 等 5 个 job 均为本次 attempt 新建。
  • 诚实说明:rere­run 若按最新 merge ref 解析,audit 应转绿;GitHub rerun 也可能固定原合入快照——此为推断,最终以 attempt 2 实际结论为准,下一轮定时回访将读回并在此记录。

3. 交接

  • 本 PR diff 无需修改;独立 review 结论维持 Approve;requested reviewers 仍为 @XuPeng-SH。
  • 若 attempt 2 仍红,请 @XuPeng-SH 做一次分支更新(merge main)后再跑:本运行面无代码推送能力,无法更新 fork 分支,如实记录;不自动合并、不自动关闭。

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 MOI 智能体提交。

CI attempt 2 读回记录(2026-10-21 22:34 CST 无人值守定时回访,对象:本 PR,head 5e549f187bb2e15a9f32929e0f138ad63ee6bebb)

1. 实测结果(Static Checks Run #39569549575,attempt 2,14:23:01Z 由上一轮触发)

  • lint(job 119278464843):27 步中仅第 13 步 cargo audit (RustSec advisory DB) failure;与 PR diff 直接相关的门禁全部 success——Test CI contracts、Validate GitHub Actions workflows、Validate Terminal-Bench harness contracts、Validate offline script contracts、Run clippy、Check formatting。
  • check(job 119281230675):第 2 步 Require static gates failure(聚合自 lint)。
  • 其余 4 个 job(Determine static-check scope、Validate Docker dependency inputs、web、Astra SDK)全部 success。

2. 归因(上轮两种可能中的后者,已被实测排除前者)
上一轮预判两种走向:rerun 按最新 merge ref 解析则 audit 转绿,或 rerun 固定原合入快照则继续红。实际为后者:attempt 2 仍失败在相同步骤,说明 rerun 沿用 08:28Z 的原合入快照,其基线 Cargo.lock 仍锁 rustls-webpki 0.103.15(RUSTSEC-2026-0381/-0382/-0383,确定性失败);#1104 于 13:36Z 合入 main 的修复(0.103.16、webpki 系 1.0.10)不在该快照内。对照证据:同一静态门禁在修复后 lockfile 上全绿(run #39566600232)。

3. 处理

  • 不再 rerun:两次 attempt 已实证失败确定性,第三次 rerun 不改变结果,不重复无效操作。
  • 本 PR diff(scripts/ci/ci_scope.py 及其测试,2 文件 +141/-4)无需修改;独立 review 结论维持 Approve。
  • 转绿唯一途径是对分支做一次更新(merge main,生成含新 lockfile 的合入快照后重跑静态检查)。本运行面无代码推送能力,无法自行更新 fork 分支,如实记录;请 @XuPeng-SH 审阅时顺手 update branch(或由任一维护者执行),更新后静态检查预期全绿。
  • 本轮读回:无新增 review 意见(reviews 仍为空),requested reviewers 仍为 @XuPeng-SH。不自动合并、不自动关闭。

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 MOI 智能体提交。

回访与核查记录(2026-10-22 00:2x CST 无人值守定时运行,本轮对象:本 PR,head 5e549f187bb2e15a9f32929e0f138ad63ee6bebb)。

1. 增量读回(本轮新核实)

2. 处置(维持前两轮结论,本轮不重复无效操作)

  • Static Checks Run #39569549575 attempt 2 唯一失败仍为 lint 第 13 步 cargo audit (RustSec advisory DB) 及聚合 check,根源是 08:28Z 原合入快照的旧 Cargo.lock(rustls-webpki 0.103.15,RUSTSEC-2026-0381/-0382/-0383),确定性失败且与本 PR diff 无关;两次 attempt 已实证 rerun 无效,不再触发第三次。
  • 本运行面再次核实无代码 / 分支推送能力(当前 MOI GitHub 连接器工具面无 commit/push 工具,沙箱无 git 凭据),无法自行 update branch 重出合入快照,如实记录。
  • 待办不变:请 @XuPeng-SH 审阅时 update branch 并重跑 Static Checks,预期全绿(同 lockfile 之上 make audit 1,348 条 advisory 全过的对照证据见 fix(deps): update webpki crates for RustSec advisories #1104 / run #39566600232)。在本 PR 出现新事件(review 意见、分支更新或新 CI 运行)之前,后续定时回访不再在本 PR 追加重复记录。不自动合并、不自动关闭。

Replay the reviewed two-file PR matrixorigin#1107 patch on main b232c4a after the RustSec lockfile update. Reproduce both regressions and pass all 25 scope tests on this baseline.

由 LW 授权的 ChatGPT Personal 智能体提交。

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 ChatGPT Personal 智能体提交。

接续此前无法更新分支的待办:本轮已实时确认认证主体 MatrixAdventurer、本人 fork 的 matrixorigin/Astra 上游关系与 push 权限。已在本人 fork 创建 archive/1107-before-sync-20261022 保留原 head 5e549f1;随后以 expected_sha 租约把 fix/1106-pr-merge-scope 重放到包含 #1104 的 main b232c4a,当前 head 0414699。未改写上游或本人 fork 默认分支。

完整修复仍仅2文件 +141/-4,两个目标 blob 与原已审补丁完全相同,上游期间未改目标文件。新基线实际重做 RED:仅应用两条回归测试、保留原生产实现时 2 failed;恢复已审生产补丁后 cd scripts/ci && python3 -m unittest test_ci_scope 25/25、py_compile、git diff --check 均通过。独立 review agent 完整审查同步补丁及工作流 fetch-depth:2 兼容性,独立运行25/25并明确 Approve。

连接器发布完整 tree d361a9df9bb10931b2942f1b056f3a51f789e4cc 与固定本地提交 82c8c5d05a32db41de9a30b10d8e1665f7d68ff0 相同;发布后独立读回待完成。新 head 的完整 CI 待实际结果,不重复重跑旧快照、不以旧CI或局部测试冒充新CI通过。保留现有 XuPeng-SH assignee/review request,不合并、不部署、不关闭Issue。以上分支操作、只读核验与记录均由署名主体执行。

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 ChatGPT Personal 智能体提交。

发布后独立复审已完成并明确 Approve:审查者独立 fetch 远程0414699bb79d7b791a979310cffdd07612899c32,确认 parent b232c4a、完整 tree d361a9df9bb10931b2942f1b056f3a51f789e4cc 与固定本地提交完全一致、全树 diff 为空,diff --check与commit署名通过。未新增源码修订;新 head 的完整CI仍须实际完成。

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 ChatGPT Personal 智能体提交。

同步后完整门禁已实际转绿:固定 head 0414699 的 Static Checks #39641603120、Test Suite #39641602638 和 PR Title 均 SUCCESS。已读回静态工作流的六个job(含lint/audit、Web、SDK与聚合check)全部成功;旧快照安全审计阻塞已解除,不再以历史或局部测试替代新head结果。

无新增review、inline thread或requested changes,源码与独立Approve时一致。PR为open、非draft、mergeable;XuPeng-SH assignee和requested reviewer均已重新读回确认。正文已同步实际结果。以上只读核验与正文更新主体同上署名;不合并、不部署、不关闭Issue。

@MatrixAdventurer

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 MOI 智能体提交。

新 head 完整 CI 读回记录(2026-10-22 04:0x CST 无人值守定时回访,本轮对象:本 PR,head 0414699bb79d7b791a979310cffdd07612899c32;本轮无代码修改、未重跑/重派任何 CI)。

  • 新 head 全部 workflow 运行实测结论(按 head_sha 列表,共 6 个、无一失败):
    • Test Suite #39641602638 SUCCESS(17:11:44–17:31:09Z);读回的 job 级快照(Test: online (core)、astra-cli 全组合、terminal PTY ubuntu/macos、macOS workspace coordination、Terminal: dev-tty-reader、Test: turn-core + services + plan 等)均为 success。
    • Static Checks #39641603120 SUCCESS(17:11:45–17:19:12Z),含聚合 check job 119370147189 success。此前锁定旧 Cargo.lock(rustls-webpki 0.103.15)导致失败的 cargo audit (RustSec advisory DB) 步骤,已在 fix(deps): update webpki crates for RustSec advisories #1104 修复后的 lockfile 上随本 run 实际通过——此前对 attempt 2 确定性失败的归因与本轮结果一致。
    • PR Title #39641661568、#39641602634 均 SUCCESS;Supersede stale PR runs #39641596429 SUCCESS。
    • Harness regression (live) #39641596746 结论 skipped(17:11:42Z 触发后即完成,非失败 run,也不冒充通过;其跳过条件未在当前只读视图核实,如实记录)。
  • 增量核验:自 17:12:31Z 记录以来,PR 无新 review(0 条)、无新评论、无 requested changes;requested reviewers 仍仅 @XuPeng-SH,assignee 仍 @XuPeng-SH;分支 head 仍为 0414699,未被他人改动;本任务全部名下 PR 自 18:06Z 以来的更新检索为 0 条,无新冲突事件。
  • 结论:17:12:31Z 记录悬置的"新 head 的完整 CI 仍须实际完成"就地关闭——固定 head 0414699 的规定 CI 已实际完成且无失败。交付门禁至此齐备:新基线 RED/GREEN(仅回归用例时 2 failed;恢复生产补丁后 python3 -m unittest test_ci_scope 25/25)、独立 review agent 对该 head 远程全树复核 Approve(d361a9df9bb10931b2942f1b056f3a51f789e4cc 与固定本地提交 82c8c5d0 全树一致)、上游实际 CI 如上全绿;diff 不变(2 文件 +141/-4)。
  • 不自动合并、不部署、不自动关闭。转入等待 @XuPeng-SH 审阅状态;后续无人值守回访仅在本 PR 出现新 review、新推送或新 CI 运行时再核验记录,不再追加重复证据。本轮全部只读核验与记录由署名主体经 GitHub 连接器执行。

@XuPeng-SH
XuPeng-SH merged commit e8ef289 into matrixorigin:main Oct 21, 2026
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.

2 participants