Repository navigation
ci(session-sync): race 循环跳过单线程差分测试,race 步骤挪到并行 job - #74
Merged
AlphaCatMeow merged 1 commit intoNov 1, 2026
Merged
Conversation
- TestRedactTextMatchesPreviousImplementation 是 RedactText 新旧实现的单 goroutine 差分,-race 下单次约 7 秒且随测试语料增长,30 次循环占 Linux job 170–300 秒并撞到 5 分钟超时;改为 30 次循环 -skip 它,另跑 1 次 -race - 5 个 race 步骤从 Session sync (linux-amd64) 挪到并行的 Session sync race (linux-amd64),命令与次数不变 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
改后实测(run 41268810794,8912daf)整轮 224 秒(03:20:49 → 03:24:33),全部通过。
|
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.
Session sync 的 Linux job 是这个仓库 PR 检查的最长一项(449–671 秒),其中
Race privacy streaming restoration (30x)一步就占 168–302 秒,95c920a 和 #73(8a4116c)上撞到 5 分钟超时失败。根因是TestRedactTextMatchesPreviousImplementation:它对 privacy、approval、backend 审批测试里的全部字符串字面量做 RedactText 新旧实现的差分,单个 goroutine,-race下单次约 7 秒,包内其余 36 个测试合计不到 0.5 秒;语料随测试增加而变大,所以这一步越跑越慢。改动
-skip '^TestRedactTextMatchesPreviousImplementation$',再单独-race -count=1跑它一次。它在三平台的非 race 步骤与 Full Linux suite 里照常运行。-race -count=30步骤从Session sync (linux-amd64)挪到并行的Session sync race (linux-amd64),命令、过滤器、次数、超时都不变;每步仍是if: !cancelled(),一步失败后其余照跑。新 job 保留 prepare-cua(go:embed需要),这些包不依赖 xvfb、浏览器或基线目录。Session sync (linux-amd64)变红,而是显示在新的 race 检查上;该差分测试在 race 下从 30 次变为 1 次(它没有并发,重复不会暴露交错)。实测耗时
改前(最近 3 次成功运行 41261259800 / 41259762491 / 41219195606):
改后:见本 PR 的 CI,结果会补在评论里。
本机
-race(Windows + mingw gcc):隐私包 30 次循环 230 秒 → 10.3 秒;差分测试单次 6.8 秒。验证
git diff --check:通过go test ./internal/privacy -list37 个测试;skip 后-v跑 36 个 PASS,被跳过的只有目标测试go test ./... -count=1:45 个包通过,6 个失败均为已知 Windows 环境性失败(TestBackendQueueFIFOInterruptAndShutdown、TestCompactThresholdExplicitOverride、TestFilesystemRootConfinementAndText、TestPersistenceCASIdempotencyAndRollback、TestRestoreSessionPreservesHistoryAndCacheIdentity、TestWaitingOnSubagentsDuringForegroundSubagent),与本改动无关(只改工作流)rules;新 job 前置齐全;!cancelled()语义一致;未发现阻止合并的问题🤖 Generated with Claude Code