Auditing CI and Test Gaps and Slowness with rea-ci-tests-audit
機械翻訳 / Machine-translated

機械翻訳 / Machine-translated
Original article: Auditing CI and Test Gaps and Slowness with rea-ci-tests-audit (cccskills)
Skill page: rea-ci-tests-audit
Key takeaways from this article
Developers of REA can use an agent equipped with rea-ci-tests-audit to inspect their CI and test suites for missed failures and unnecessary costs, complete with evidence.
Findings are classified into four categories: reproduced defects, substantiated costs, hypotheses, and no evidence.
This article walks through the reporting format, the four areas of investigation, how to install it, example prompts, and prerequisites you should know before getting started.
With this skill installed, the agent traces actual execution paths across your entire CI to check whether any checks are passing when they should be failing.
Typical requests look like this:
Please check whether any checks in REA's CI succeed even when required tests or reports are missing.
Do not make any fixes — just compile the investigation results.
The agent starts by pinning a baseline commit and the version of the workflow it verified.
It then examines workflow trigger conditions, job selection based on changed files, and job dependencies.
Package scripts, test discovery, and report gating are all traced down to the actual commands that run.
Verification is bidirectional.
It checks whether required files are detected exactly once per intended configuration, and whether missing files prevent a green result.
Both directions are examined.
The report returned is a list of findings divided into four categories.
Each finding includes the baseline command, the observed output and exit code, the expected result, the scope of impact, and other possible explanations.
| Category | Description |
|---|---|
| Reproduced defect | A problem confirmed with minimal reproduction steps |
| Substantiated cost | Wasted execution time backed by measurement |
| Hypothesis | Something suspected but not yet reproduced or measured |
| No evidence | Something that could not be verified due to environment or missing prerequisites |
Investigation notes and raw results are stored outside the Git-tracked tree — normally in a per-task /tmp directory — so the repository stays clean.
This skill has two goals: determining which checks are still catching real regressions, and determining which costs can be cut without losing coverage.
Conclusions take the form of verified fixes, substantiated proposals, or a decision to stop pursuing a line of investigation.
The agent verifies whether tests that are currently passing green are actually doing their job by deliberately breaking things.
It mutates the target behavior in an isolated copy, or injects a controlled failure, then checks whether existing assertions and gates can detect it.
This approach surfaces tests that merely echo mock values, tests that import dead code, and tests that suppress failures in child processes or checkers.
Any changes made during the experiment are reverted when finished.
Fixtures (fixed data prepared for testing) are cross-referenced against current acceptance criteria, protocol responses, tool versions, and actual published entry points.
Even plausible-looking mocks can fail before they ever exercise the behavior the test is supposed to verify.
When a mismatch is found, the exploration covers the entire family of fixtures with the same lineage, including variant version strings.
Intentionally broken fixtures are left in place and tested to confirm they are correctly rejected.
The behavior of real engines — Ghidra, LLDB, browsers, and so on — is treated as something that cannot be verified by fixtures alone.
Before claiming something is faster, the agent compares runs that completed the same amount of work.
Setup and build, test execution, coverage measurement, dependency waiting, and runner allocation waiting are each measured separately.
Costs that could not be measured are explicitly noted.
Improvement priorities follow a fixed order: eliminate proven duplicate setup work, reuse unchanged setup, reduce repeated subprocess overhead — and only after that, consider removing tests that verify correctness.
When consolidating setup or reducing tests, each assertion is mapped to the scenarios that will remain.
Invalid inputs, cancellation, cleanup failures, permissions, capacity limits, and meaningful concurrency combinations are retained.
Any run that becomes faster by skipping cases or weakening assertions is not considered an improvement.
There are two ways to install: running a command, or asking an agent.
When using the command, you can choose the target agent — such as Claude Code or Codex — at the time of execution.
npx skills add https://github.com/morluto/rea --skill rea-ci-tests-audit
To ask an agent, send the following message as-is:
Please install the following Agent Skill.
https://github.com/morluto/rea/tree/main/.agents/skills/rea-ci-tests-audit
First, review the contents of SKILL.md and the accompanying files to confirm there is no suspicious behavior (sending data externally, reading credentials, etc.), then place it at ~/.claude/skills/rea-ci-tests-audit/ for Claude Code, or ~/.agents/skills/rea-ci-tests-audit/ for Codex.
The installation location depends on whether you want to use it across all projects or just one.
| Agent | Use across all projects | Use for a specific project only |
|---|---|---|
| Claude Code | ~/.claude/skills/ | .claude/skills/ in the project |
| Codex | ~/.agents/skills/ | .agents/skills/ in the project |
The skill includes three files: SKILL.md, agents/openai.yaml, and references/measurement-and-ci.md.
The last file is a measurement guide that is consulted when investigating slowness, caching, runner wait times, and log noise.
When writing a request, it helps to specify the scope of investigation and whether fixes are permitted.
Fetch the latest main and measure the slow test suites.
Provide improvement proposals that preserve detection coverage, with measurements included.
The agent pins a baseline commit and returns timings broken down into setup, build, execution, and wait.
Improvement proposals are expressed in terms of the actual work performed and measured values, not just percentages.
I'd like to consolidate tests under a shared setup.
Please check whether any coverage would be lost by doing so.
The response is a mapping of each individual assertion to the scenario it will belong to after consolidation.
Any cases that would be lost are listed as findings.
Please determine whether this PR's CI failure is a pre-existing defect or caused by this change.
The agent attributes the cause using the executed commit and a clean baseline.
Resemblance to past failures alone is not treated as a conclusion.
Re-runs are only performed to verify transient causes; a re-run that passes is not treated as root cause identification or a fix.
This skill is written specifically for the REA repository.
During its work, it follows the checkout's AGENTS.md, testing guide, and contribution rules, using the current commands and pinned toolchain defined there.
Its references also point to REA's documentation, so it does not apply directly to other repositories.
There are also rules around permissions.
An investigation-only request will not result in edits, and this skill does not grant permission to publish Issues, push, or merge.
Even when fixes are requested, it will not achieve a green result by suppressing failures, adding blanket retries, extending timeouts, or deleting assertions.
Additional points to be aware of:
SKILL.md and the accompanying files before installing to confirm there is no suspicious behavior.The same REA repository contains skills that can be used before or after this one.
rea-analysis-optimization is a skill for reviewing REA's analysis processing and cache design.
It is suited for improving processing time or memory usage of the core logic — not tests — while preserving correctness of results.
rea-tool-design is a skill for organizing input/output conventions, CLI and MCP contracts, and verification methods when designing or modifying REA's investigation tools.
If a problem found during an audit relates to tool design, this is the skill to use.
Not as-is.
It is written with the assumption that REA's AGENTS.md and testing guide will be followed.
If you want to apply the approach to your own repository, read SKILL.md and replace the referenced documents with your own.
An investigation-only request will not result in edits.
Fixes, pushes, and merges are only performed to the extent that the user permits in their request.
That is not its primary use case.
This skill is intended for investigating and improving test suites and entire workflows.
Handling ordinary functional tests or individual failures is out of scope.
No.
Suppressing failures, adding blanket retries, and extending timeouts are only performed when there is a demonstrated reason for each, and only when failure detection is preserved.
rea-ci-tests-audit is a skill that investigates REA's CI and test suites with evidence — covering checks that allow defects to slip through, misaligned fixtures, and sources of slowness.
Findings are returned classified as reproduced defects, substantiated costs, hypotheses, or no evidence.
Even when speed is the goal, the premise is that detection coverage must not be reduced.
Start by requesting an investigation without fixes, and verify what the reports look like.
This article is a reprint of the cccskills feature article "Auditing CI and Test Gaps and Slowness with rea-ci-tests-audit."
Details about the skill and installation instructions can be found on the rea-ci-tests-audit page on cccskills.