Ci Test Audit ci-test-audit

Audit the existing test tree and CI configuration for improvements, using a catalog of patterns previously applied in this repo.

Use it when asked to audit tests or CI, shrink CI time or cost, find redundant or misplaced tests, clean up a test group, or review whether a CI change follows established practice.

Works in Claude, ChatGPT, Codex and more
Our test
8/10✓ Verified
tested Dec 6, 2026
GitHub stars
39k
sgl-project/sglang
Added by
0
members
Updated
Dec 6
commit bf3bddd
Content
2 files
no scripts · 23 KB
License
Apache 2.0
free to use

What our test found

The skill provides a detailed, evidence-oriented audit method and useful repo-specific patterns, though it depends on repository access and some referenced project guidance.

Request we tested it on“Audit the `test/registered/` group for redundant tests and opportunities to reduce CI cost. Propose changes only; do not edit files.”

Limits spotted

  • Several referenced guides and policy files are outside the supplied skill content.
  • Cost estimates, CI history, and failed-run logs may not be available in every environment.
  • The catalog is strongly tailored to one repository and may not transfer directly to other projects.
View on GitHub ↗
name: ci-test-audit
description: Audit the existing test tree and CI configuration for improvements, using a catalog of patterns previously applied in this repo. Use when asked to audit tests or CI, shrink CI time or cost, find redundant or misplaced tests, clean up a test group, or review whether a CI change follows established practice.

CI / Test Audit

Audits what is already in test/, .github/ and scripts/ci/. For writing a new test see ; for how the pipeline dispatches and gates work see .

Steps

  1. Read [action-items.md](action-items.md). It is the substance of this skill: patterns applied to this repo, each with a way to spot it, what is not the pattern, and example PRs.
  2. Take the scope from the user: a test group, a stage, a workflow file, or a complaint like "this suite is slow", and how thoroughly. Decide which patterns apply to it.
  3. Collect findings. Each names the file, the pattern it matches, and what to do. "This suite could be trimmed" is not a finding; "TestFooLargePage is a strict subset of TestFooRetractLargePage, drop it" is. For hundreds of files, follow .
  4. Report as in : propose, do not apply.
  5. Update the catalog when a pattern shows up in newer work or a new one recurs: keep the pattern text general; the example PRs are replaceable evidence.

Auditing at scale

An audit over hundreds of files (a whole tier, every CPU test) splits the reading from the judgment:

  • Inventory first. Collect each file's registrations, cost (live estimate x GPUs, from the sglang-ci-stats model), and the exact items to check (CI-skipped classes, overlapping configs) with a script, before any agent reads a file.
  • Fan out file reads to the cheapest model with a fixed brief and a TSV answer, in chunks of about 15 files. The brief lists the exact items to verify; "review every case in the file" makes the pass slow and adds nothing.
  • Prosecutor stance. Each file in the brief is deleted or demoted by default; keeping it needs a reason: the change that would turn it red, and the grep that shows no other test catches that change.
  • The main agent re-judges every verdict, most expensive first, before reporting. Treat cheap-model "covered by X" or "superseded by Y" verdicts as leads: in one audit none of 20 proposed file deletions held on verification.
  • Re-tier before deleting. For cost, moving a test down a tier saves far more than deleting it (B2). Delete only what never runs in CI or is verified redundant.
  • Failure evidence comes from failed runs' job logs. sglang-ci-stats records only successful jobs, so whether a tier catches regressions the tier above misses is read from the failed scheduled runs on main.
  • Prove a re-tier or trim lost nothing it did not mean to. Without a GPU, collect the test ids of every touched file before and after (unittest.TestLoader on the module; importing must not launch a server) and diff them: every removed id belongs to a planned change, every moved id appears in its new file. Then dump each kept class's launch config and test-method source and diff those too.
  • Measure a CPU speedup from CI, not from one run. Each CPU shard log carries one {"file": ..., "passed": ..., "elapsed": ...} line per file; compare a PR run against the median of several runs of other PRs from the same hour. Runner-to-runner noise on the whole suite is tens of seconds.

Reporting

  • Group findings by confidence, not by pattern id. Lead with the ones whose evidence is in the file you read; keep speculative ones separate, with what you would need to check. Skip what you are not reasonably sure about: a long list of maybes costs more to triage than it saves.
  • Deleting a test, moving a registration to another stage, and changing a threshold are decisions for the user. Land them as separate changes, since a trim and a threshold change fail for different reasons.