|
| 1 | +--- |
| 2 | +name: rea-ci-tests-audit |
| 3 | +description: Audit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. |
| 4 | +--- |
| 5 | + |
| 6 | +# REA CI and tests audit |
| 7 | + |
| 8 | +Establish which checks still catch real regressions and which costs can be |
| 9 | +removed without losing that protection. The outcome may be a verified fix, |
| 10 | +an evidence-backed recommendation, or an explicit decision to stop. |
| 11 | + |
| 12 | +Follow the checkout's `AGENTS.md`, [testing guide](../../../docs/testing.md), |
| 13 | +and [contribution rules](../../../CONTRIBUTING.md). Use their current commands |
| 14 | +and pinned toolchain, rather than commands remembered from an earlier audit. |
| 15 | +Preserve the requested scope: investigation alone does not authorize edits; |
| 16 | +this skill does not grant permission to publish issues, push, or merge. Existing |
| 17 | +user authorization still applies. Keep audit notes and raw results outside the |
| 18 | +tracked tree, normally in a task-specific `/tmp` directory. |
| 19 | + |
| 20 | +## Establish the executed baseline |
| 21 | + |
| 22 | +Fetch when the user asks for latest main. Pin the baseline SHA and inspected |
| 23 | +workflow revision; use an isolated worktree when changing or comparing code. |
| 24 | +Do not modify another task's checkout. Record dirty changes and the exact |
| 25 | +command, toolchain, host, selected tests, instrumentation, and prerequisites. |
| 26 | +An old run is evidence for its executed revision, even if main advances. |
| 27 | + |
| 28 | +Trace workflow triggers, changed-path selection, job dependencies, reusable |
| 29 | +actions, package scripts, test discovery, artifact producers, and report gates |
| 30 | +through to the commands that actually execute. Include scripts, generated data, |
| 31 | +runtime registration, and subprocess boundaries missing from import graphs. |
| 32 | +Check positive and negative selection paths: required files must be discovered |
| 33 | +once per intended test configuration; deliberate platform/configuration repeats |
| 34 | +are separate coverage. A missing explicit test or missing required report must |
| 35 | +not turn green. Optional lanes may skip; preserve their stated prerequisites. |
| 36 | + |
| 37 | +Use existing timing and failure artifacts to select suspicious families. Run |
| 38 | +relevant checks to establish a baseline; reserve a full local suite for broad |
| 39 | +CI diagnosis or uncertainty that focused checks cannot resolve. Do not rebuild |
| 40 | +or rerun an unchanged complete suite after every documentation edit. |
| 41 | + |
| 42 | +## Prove the failure or protection |
| 43 | + |
| 44 | +For each candidate, state the expected observable behavior and its owner, |
| 45 | +then construct the smallest reproduction against production behavior. Follow |
| 46 | +the producer and affected consumers before deciding where to fix it. |
| 47 | + |
| 48 | +- For drift, compare fixtures with current admission requirements, protocol |
| 49 | + replies, named contracts, tool versions, and actual public entrypoints. A |
| 50 | + plausible-looking mock can fail before the behavior its test claims to cover. |
| 51 | + Search the whole affected fixture family, including other version strings. |
| 52 | + Preserve intentionally malformed fixtures and test their intended rejection. |
| 53 | +- For a suspicious green test, perturb the relevant behavior in an isolated |
| 54 | + copy or inject a controlled failure. Verify that the existing assertion or |
| 55 | + gate detects it. A test may merely repeat its mock, import abandoned code, |
| 56 | + or hide a subprocess/checker failure. Restore mutations after the experiment. |
| 57 | +- For shared setup or pruning, map distinct assertions to their retained |
| 58 | + scenarios. Preserve malformed inputs, cancellation, cleanup failure, |
| 59 | + permissions, capacity, identity, and meaningful concurrency interactions. |
| 60 | + A faster run that skips a case or weakens its oracle is not an improvement. |
| 61 | +- For provider coverage, separate fake-producer, boundary, and actual-engine |
| 62 | + evidence. Inspect named skips and prerequisites; fixtures do not establish |
| 63 | + real Ghidra, LLDB, browser, or other provider behavior. |
| 64 | + |
| 65 | +Classify findings as reproduced defects, supported costs, hypotheses, or |
| 66 | +unavailable evidence. Record the baseline command, observed output/exit status, |
| 67 | +expected result, affected scope, and competing explanation. A failure on main |
| 68 | +may be pre-existing; that does not by itself make it irrelevant to a CI audit. |
| 69 | +Attribute PR failures using the executed revision and a clean baseline, not |
| 70 | +just their resemblance to a previous failure. Retry only to test a specific |
| 71 | +transient explanation; retain the original failure and stop when repetition |
| 72 | +adds no evidence. A passing retry does not establish a root cause or a fix. |
| 73 | + |
| 74 | +## Assess efficiency without losing the gate |
| 75 | + |
| 76 | +Read [measurement and CI checks](references/measurement-and-ci.md) when |
| 77 | +investigating slowness, caching, runner waits, shared artifacts, or log noise. |
| 78 | +Compare equivalent completed work before claiming a speedup. Distinguish |
| 79 | +setup/build time, test execution, coverage instrumentation, dependency waits, |
| 80 | +and runner scheduling; state which costs remain unmeasured. |
| 81 | + |
| 82 | +Prefer removing proven duplicate preparation, reusing immutable setup, and |
| 83 | +reducing repeated subprocess work before shrinking correctness coverage. |
| 84 | +Preserve independent sessions where lifecycle or concurrency is the oracle. |
| 85 | +Keep live tests fresh; a cached previous pass cannot validate current host, |
| 86 | +installed provider contents, permissions, or external state. |
| 87 | + |
| 88 | +## Fix, verify, and hand off within scope |
| 89 | + |
| 90 | +If implementation is authorized, make the smallest structural change at the |
| 91 | +owning boundary and add a regression that fails on the baseline for the right |
| 92 | +reason. Retest affected consumers and meaningful negative paths; verify cache |
| 93 | +invalidation or discovery when those mechanisms change. Read the installed |
| 94 | +Turbo documentation before changing its configuration or commands. |
| 95 | + |
| 96 | +Run the repository's applicable checks and inspect complete current-head CI |
| 97 | +results before an authorized merge. Preserve required coverage and discovery |
| 98 | +gates. Do not suppress a failure, add blanket retries, raise timeouts, or delete |
| 99 | +distinct assertions solely to make CI green. Changes to these controls need |
| 100 | +their own demonstrated reason and retained failure detection. |
| 101 | + |
| 102 | +Report each confirmed issue with exact revision, reproduction, consequence, |
| 103 | +proposed correction, and validation limits. Report performance with workload |
| 104 | +and measurements, not just a percentage. Use English issue/PR records when |
| 105 | +requested; follow the user's assignment, commit identity, review, and merge |
| 106 | +preferences without assuming them for other users. Open ready-for-review PRs |
| 107 | +only when that lifecycle is authorized. Resolve necessary review findings and |
| 108 | +check final main against the tested tree after merging. |
| 109 | + |
| 110 | +Stop when the authorized work is verified, remaining benefits are unproven, |
| 111 | +or further changes would trade correctness for speculative speed. List genuine |
| 112 | +uncertainties without turning them into additional optimization rounds. |
0 commit comments