Skip to content

ci: enforce no ignored tests across the org - #253

Merged
thedavidmeister merged 2 commits into
mainfrom
ci/no-ignored-tests
Jul 4, 2026
Merged

thedavidmeister merged 2 commits into
mainfrom
ci/no-ignored-tests

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Adds a no-ignored-tests composite action and runs it from both rainix-sol-static.yaml and rainix-rs-static.yaml (referenced @main, so consumers inherit it on their next run).

What it bans — no exceptions

  • Rust: #[ignore] (zero current usage org-wide).
  • JS/TS/Svelte: it/test/describe.skip/.only and xit/xdescribe — .only included since a focused test silently ignores everything else (zero current usage).
  • Solidity: function xtest… disabled-by-rename (zero current usage), and any vm.skip( whatsoever — conditional or not. A test either runs and passes, or it is deleted; skips hide undone work.

Parameterized _test* external helpers (Foundry does not auto-run them; rainlang uses the convention in 9 files) are untouched. Vendor exclusions (dependencies/, lib/) match only at the repo root so first-party test/lib/ trees are checked; node_modules/target/.git stay excluded by name.

Known reds this deliberately creates

Landing this makes the static job red in three repos until their skips are reworked into hard behavior:

  • raindex — 5 sites in test/lib/deploy/: two vm.skip(true) (registry-unreachable guards) and three vm.skip(vm.envOr("CI", false)) (tests that never run in CI).
  • rain.math.float — registry-unreachable guard in LibDecimalFloatDeployTaggedConstants.t.sol.
  • rain.metadata — vm.skip(vm.envOr("CI", false)) in LibMetaBoardDeploy.t.sol.

The rework in each case: remove the skip so registry/RPC unavailability is a hard failure, and CI-skipped fork tests actually run in CI (the fork RPC secrets exist).

Verification

Run against real checkouts: raindex FAILS with all 5 sites listed per file:line, rainlang PASSES (helpers untouched), synthetic repo with all four violation classes FAILS. rain.erc4626.words/rain.flare-style repos with no skips PASS.

🤖 Generated with Claude Code

A composite action fails CI on statically ignored tests: Rust #[ignore],
JS/TS .skip/.only and x-prefixed suites, Solidity xtest-renamed functions
and unconditional vm.skip(true). Conditional skips (an if within the
preceding lines or a non-literal argument) stay allowed, which covers the
existing env-gated fork-test skips across the org.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this Jul 4, 2026
@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new composite GitHub Action, no-ignored-tests, that scans for disallowed ignored/skipped/focused tests (Rust #[ignore], JS/TS .skip/.only, Solidity xtest and unconditional vm.skip(true)) and fails the workflow if found. Wires this action into the Rust and Solidity static CI workflows.

Changes

No-ignored-tests action and CI wiring

Layer / File(s) Summary
Detection logic
.github/actions/no-ignored-tests/action.yml
New composite action scans for Rust #[ignore], JS/TS .skip/.only/focused test patterns, Solidity xtest renames, and unconditional vm.skip(true) (via awk guard check), reporting violations and exiting non-zero when found.
CI workflow wiring
.github/workflows/rainix-rs-static.yaml, .github/workflows/rainix-sol-static.yaml
Both static-check workflows add a step invoking the no-ignored-tests action before existing build/static steps, with comments documenting banned vs. allowed skip patterns.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
    participant CI as CI Workflow
    participant Action as no-ignored-tests Action
    participant Repo as Repository Files

    CI->>Action: Invoke no-ignored-tests step
    Action->>Repo: Search for Rust #[ignore], JS .skip/.only, Solidity xtest
    Action->>Repo: Search for vm.skip(true) occurrences
    Action->>Action: Run awk guard check on vm.skip matches
    alt Violations found
        Action-->>CI: Print matches, exit 1
    else No violations
        Action-->>CI: Print "No ignored tests found."
    end
Loading

Related Issues: None referenced in provided data.
Related PRs: None referenced in provided data.
Suggested labels: ci, github-actions
Suggested reviewers: None specified.

Poem
A rabbit hopped through CI's gate,
Sniffing skips both small and great,
No .only, no xtest disguise,
No silent vm.skip surprise,
Green checks bloom — the tests await!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: enforcing a no-ignored-tests CI policy across the organization.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/no-ignored-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/actions/no-ignored-tests/action.yml (1)

36-49: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Guard heuristic can be defeated by unrelated if ( nearby.

The conditional-skip check only looks for the literal text if ( on the same line or within the preceding 5 lines — it doesn't verify that the if actually wraps the vm.skip(true) call. An unrelated if ( from a prior, already-closed block could cause a genuinely unconditional vm.skip(true) to pass unflagged.

Given this is documented as a known, validated tradeoff (not full AST parsing), this is a soft heuristic gap rather than a blocking bug — worth keeping in mind, since it slightly weakens the org-wide ban it purports to enforce.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/no-ignored-tests/action.yml around lines 36 - 49, The
conditional-skip heuristic in the awk check is too loose because it treats any
nearby `if (` as proof that `vm.skip(true)` is conditional. Update the logic in
the no-ignored-tests action so the `vm.skip(true)` match is only exempted when
the same line or the surrounding context actually indicates the call is inside
an `if` block, rather than relying on unrelated prior `if (` text; keep the
check anchored around the awk rule that scans for `vm.skip(true)`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/actions/no-ignored-tests/action.yml:
- Around line 36-49: The conditional-skip heuristic in the awk check is too
loose because it treats any nearby `if (` as proof that `vm.skip(true)` is
conditional. Update the logic in the no-ignored-tests action so the
`vm.skip(true)` match is only exempted when the same line or the surrounding
context actually indicates the call is inside an `if` block, rather than relying
on unrelated prior `if (` text; keep the check anchored around the awk rule that
scans for `vm.skip(true)`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ba826b92-782b-446e-a2da-4c440807c5a3

📥 Commits

Reviewing files that changed from the base of the PR and between 40d814d and 7222b74.

📒 Files selected for processing (3)
  • .github/actions/no-ignored-tests/action.yml
  • .github/workflows/rainix-rs-static.yaml
  • .github/workflows/rainix-sol-static.yaml

Conditional skips are banned along with unconditional ones - skips hide
undone work. Vendor exclusions (dependencies/, lib/) now match only at
the repo root so first-party test/lib/ trees are checked; node_modules,
target and .git stay excluded by name at any depth.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@thedavidmeister
thedavidmeister merged commit 69a44f9 into main Jul 4, 2026
11 of 13 checks passed
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

SIZE=M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant