rea-ci-tests-audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

REA CI and tests audit

REA CI 与测试审计

Establish which checks still catch real regressions and which costs can be removed without losing that protection. The outcome may be a verified fix, an evidence-backed recommendation, or an explicit decision to stop.
Follow the checkout's
AGENTS.md
, testing guide, and contribution rules. Use their current commands and pinned toolchain, rather than commands remembered from an earlier audit. Preserve the requested scope: investigation alone does not authorize edits; this skill does not grant permission to publish issues, push, or merge. Existing user authorization still applies. Keep audit notes and raw results outside the tracked tree, normally in a task-specific
/tmp
directory.
确定哪些检查仍能捕获真实回归,以及哪些成本可以在不牺牲这种保护能力的前提下移除。最终结果可以是经验证的修复、有证据支撑的建议,或明确的停止决定。
遵循当前检出版本中的
AGENTS.md
、测试指南 和 贡献规则。使用其中当前规定的命令和固定版本的工具链,不要沿用早期审计记忆中使用的命令。 保持用户要求的范围:仅开展调查并不构成编辑授权;本 skill 不授予发布 issue、执行 push 或 merge 的权限。用户的既有授权仍然有效。审计笔记和原始结果应保留在受版本控制的目录之外,通常放在任务专属的
/tmp
目录中。

Establish the executed baseline

建立实际执行的基线

Fetch when the user asks for latest main. Pin the baseline SHA and inspected workflow revision; use an isolated worktree when changing or comparing code. Do not modify another task's checkout. Record dirty changes and the exact command, toolchain, host, selected tests, instrumentation, and prerequisites. An old run is evidence for its executed revision, even if main advances.
Trace workflow triggers, changed-path selection, job dependencies, reusable actions, package scripts, test discovery, artifact producers, and report gates through to the commands that actually execute. Include scripts, generated data, runtime registration, and subprocess boundaries missing from import graphs. Check positive and negative selection paths: required files must be discovered once per intended test configuration; deliberate platform/configuration repeats are separate coverage. A missing explicit test or missing required report must not turn green. Optional lanes may skip; preserve their stated prerequisites.
Use existing timing and failure artifacts to select suspicious families. Run relevant checks to establish a baseline; reserve a full local suite for broad CI diagnosis or uncertainty that focused checks cannot resolve. Do not rebuild or rerun an unchanged complete suite after every documentation edit.
当用户要求获取最新 main 时,执行 fetch。锁定基线 SHA 和已检查的 workflow 修订版本;在更改或比较代码时使用隔离的 worktree。不要修改其他任务的检出目录。记录未提交更改,以及准确的命令、工具链、主机、所选测试、instrumentation 和前置条件。旧运行结果只能证明其执行时修订版本的情况,即使 main 已向前推进也是如此。
追踪 workflow 触发器、变更路径选择逻辑、job 依赖关系、可复用 action、package scripts、测试发现机制、artifact 生产者和 report 门禁,一直追踪到实际执行的命令。包括 import graph 中缺失的 scripts、generated data、runtime registration 和 subprocess 边界。 检查正向和负向选择路径:必需文件在每种目标测试配置中都必须且只能被发现一次;有意针对不同平台或配置进行的重复测试属于独立覆盖。缺少显式测试或必需报告时,不得显示为绿灯。可选 lane 可以跳过,但必须保留其声明的前置条件。
利用现有耗时和失败 artifacts 筛选可疑测试族。运行相关检查以建立基线;只有在需要广泛诊断 CI,或存在聚焦检查无法解决的不确定性时,才运行完整的本地套件。不要在每次文档编辑后都重建或重跑未发生变化的完整套件。

Prove the failure or protection

证明失败或保护能力

For each candidate, state the expected observable behavior and its owner, then construct the smallest reproduction against production behavior. Follow the producer and affected consumers before deciding where to fix it.
  • For drift, compare fixtures with current admission requirements, protocol replies, named contracts, tool versions, and actual public entrypoints. A plausible-looking mock can fail before the behavior its test claims to cover. Search the whole affected fixture family, including other version strings. Preserve intentionally malformed fixtures and test their intended rejection.
  • For a suspicious green test, perturb the relevant behavior in an isolated copy or inject a controlled failure. Verify that the existing assertion or gate detects it. A test may merely repeat its mock, import abandoned code, or hide a subprocess/checker failure. Restore mutations after the experiment.
  • For shared setup or pruning, map distinct assertions to their retained scenarios. Preserve malformed inputs, cancellation, cleanup failure, permissions, capacity, identity, and meaningful concurrency interactions. A faster run that skips a case or weakens its oracle is not an improvement.
  • For provider coverage, separate fake-producer, boundary, and actual-engine evidence. Inspect named skips and prerequisites; fixtures do not establish real Ghidra, LLDB, browser, or other provider behavior.
Classify findings as reproduced defects, supported costs, hypotheses, or unavailable evidence. Record the baseline command, observed output/exit status, expected result, affected scope, and competing explanation. A failure on main may be pre-existing; that does not by itself make it irrelevant to a CI audit. Attribute PR failures using the executed revision and a clean baseline, not just their resemblance to a previous failure. Retry only to test a specific transient explanation; retain the original failure and stop when repetition adds no evidence. A passing retry does not establish a root cause or a fix.
对于每个候选项,说明预期的可观察行为及其责任方,然后针对生产行为构建最小复现。决定修复位置之前,先沿着数据生产方及受影响的消费方追踪。
  • 对于漂移,将 fixture 与当前准入要求、协议回复、明确的 contract、工具版本和实际公共入口点进行比较。一个看似合理的 mock 可能在测试声称覆盖的行为发生之前就失败。搜索整个受影响的 fixture 家族,包括其他版本字符串。保留有意构造为畸形状态的 fixture,并测试其预期的拒绝行为。
  • 对于可疑的绿色测试,在隔离副本中扰动相关行为,或注入受控失败。验证现有断言或门禁能够检测到它。测试可能只是重复 mock 的结果、导入已废弃代码,或掩盖 subprocess/checker 的失败。实验结束后恢复所有改动。
  • 对于共享 setup 或裁剪,将不同断言映射到保留的场景。保留畸形输入、取消操作、清理失败、权限、容量、身份以及有意义的并发交互。更快但跳过用例或削弱其 oracle 的运行不算改进。
  • 对于 provider 覆盖,区分 fake-producer、boundary 和 actual-engine 证据。检查明确列出的 skip 和前置条件;fixture 不能证明真实 Ghidra、LLDB、browser 或其他 provider 的行为。
将发现归类为已复现缺陷、有证据支持的成本、假设或无法获取的证据。记录基线命令、实际观察到的输出或退出状态、预期结果、受影响范围和其他候选解释。main 上的失败可能是既存问题;这本身并不会使其与 CI 审计无关。归因 PR 失败时,应依据实际执行的修订版本和干净基线,而不能仅根据其与先前失败的相似性。只有为检验某个特定瞬态解释时才进行重试;保留原始失败;当重复执行不再增加证据时停止。通过的重试不能证明根因或修复。

Assess efficiency without losing the gate

在不削弱门禁的前提下评估效率

Read measurement and CI checks when investigating slowness, caching, runner waits, shared artifacts, or log noise. Compare equivalent completed work before claiming a speedup. Distinguish setup/build time, test execution, coverage instrumentation, dependency waits, and runner scheduling; state which costs remain unmeasured.
Prefer removing proven duplicate preparation, reusing immutable setup, and reducing repeated subprocess work before shrinking correctness coverage. Preserve independent sessions where lifecycle or concurrency is the oracle. Keep live tests fresh; a cached previous pass cannot validate current host, installed provider contents, permissions, or external state.
调查变慢、缓存、runner 等待、共享 artifacts 或日志噪声时,阅读测量与 CI 检查。在宣称提速之前,应比较工作量等同且已完成的运行。区分 setup/build 耗时、测试执行、coverage instrumentation、依赖等待和 runner 调度;说明哪些成本仍未测量。
在缩减正确性覆盖之前,优先移除已证实重复的准备工作、复用不可变 setup,并减少重复的 subprocess 工作。在 lifecycle 或并发行为本身是 oracle 的地方,保留相互独立的 session。保持 live test 的时效性;缓存的先前通过结果无法验证当前主机、已安装 provider 的内容、权限或外部状态。

Fix, verify, and hand off within scope

在授权范围内修复、验证并交付

If implementation is authorized, make the smallest structural change at the owning boundary and add a regression that fails on the baseline for the right reason. Retest affected consumers and meaningful negative paths; verify cache invalidation or discovery when those mechanisms change. Read the installed Turbo documentation before changing its configuration or commands.
Run the repository's applicable checks and inspect complete current-head CI results before an authorized merge. Preserve required coverage and discovery gates. Do not suppress a failure, add blanket retries, raise timeouts, or delete distinct assertions solely to make CI green. Changes to these controls need their own demonstrated reason and retained failure detection.
Report each confirmed issue with exact revision, reproduction, consequence, proposed correction, and validation limits. Report performance with workload and measurements, not just a percentage. Use English issue/PR records when requested; follow the user's assignment, commit identity, review, and merge preferences without assuming them for other users. Open ready-for-review PRs only when that lifecycle is authorized. Resolve necessary review findings and check final main against the tested tree after merging.
Stop when the authorized work is verified, remaining benefits are unproven, or further changes would trade correctness for speculative speed. List genuine uncertainties without turning them into additional optimization rounds.
如果已获得实施授权,在责任边界处进行最小结构性更改,并添加一个能在基线上因正确原因而失败的 regression 测试。重新测试受影响的消费者和有意义的负向路径;当缓存失效机制或测试发现机制发生变化时,验证相应行为。更改 Turbo 配置或命令前,阅读已安装的 Turbo 文档。
在获得授权 merge 之前,运行仓库适用的检查,并检查当前 HEAD 的完整 CI 结果。保留必需的覆盖率和测试发现门禁。不得仅为了让 CI 变绿而抑制失败、添加全面重试、提高 timeout,或删除有区分度的断言。对这些控制项的更改必须有其自身已证明的理由,并保留失败检测能力。
报告每个已确认问题时,提供确切的修订版本、复现方式、后果、建议修正和验证边界。报告性能时,应给出工作负载和测量数据,而不只是百分比。按要求使用英文 issue/PR 记录;遵循用户关于任务分配、commit identity、review 和 merge 的偏好,但不要将这些偏好套用于其他用户。仅在 PR 生命周期获得授权时,才创建 ready-for-review PR。解决必要的 review 意见,并在 merge 后核对最终 main 与受测试代码树是否一致。
当已授权工作得到验证、剩余收益尚未得到证明,或进一步更改会以正确性换取推测性的速度提升时,应停止。列出真正存在的不确定性,不要将其转化为额外的优化轮次。