Skip to content

rainix-sol / static is red on every PR from pre-commit formatter drift #38

Description

@thedavidmeister

What

The rainix-sol / static job fails on every PR, for reasons unrelated to the PR.
Its pre-commit run --all-files step reformats four committed files, so the hook
reports "files were modified by this hook" and the job exits 1.

This is repo-wide drift, not a property of any change: the affected files are the
same on main.

Evidence

Observed on PR #37, whose diff adds three files and touches no TOML, YAML or
JSON config. Running the same hooks locally on that branch:

$ pre-commit run --all-files
prettier-rainix..........................................................Failed
- files were modified by this hook
.vscode/settings.json
slither.config.json

taplo....................................................................Failed
- files were modified by this hook
found files total=2 files=["REUSE.toml", "foundry.toml"]

yamlfmt..................................................................Failed
- files were modified by this hook

$ git status --porcelain
 M .coderabbitai.yaml
 M .vscode/settings.json
 M REUSE.toml
 M slither.config.json

None of those four is in the PR's diff. slither . and forge fmt --check both
pass; the whole failure is the pre-commit step.

Why it appeared without a commit causing it

The workflows are consumed at @main
(rainlanguage/rainix/.github/workflows/rainix-sol.yaml@main) and the hook set
comes from the pinned rainix devshell, so the formatters can change under a repo
that has not changed. This repo's last green static run was 2026-09-10; the
drift is between the committed formatting and what the current hooks produce.

Effect

static is a required-looking check that is red regardless of content, so it
carries no signal: a PR that genuinely breaks static analysis looks exactly like
one that does not. Any real slither or forge fmt regression would now land
unnoticed behind an already-red job.

Fix

Run pre-commit run --all-files and commit the result. That is a formatting-only
commit touching .coderabbitai.yaml, .vscode/settings.json, REUSE.toml and
slither.config.json, deliberately kept out of PR #37 so that a test-coverage
change is not carrying unrelated reformatting.


Found by adversarial mutation testing (skill 0.35.0), incidentally, while
checking that PR #37's own CI was green.

Activity

  1. thedavidmeister commented on Sep 20, 2026

    @thedavidmeister
    ContributorAuthor

    Correction to the issue body, from me: it over-reports the drift.

    I listed four files — .coderabbitai.yaml, .vscode/settings.json, REUSE.toml, slither.config.json — with prettier-rainix failing on two of them. Only two actually drift against the hooks CI runs: taplo on REUSE.toml (4-space → 2-space array indent) and yamlfmt on .coderabbitai.yaml (blank line after the SPDX header). prettier-rainix passes.

    The four-file reproduction in the body came from the repo's default devshell (nix develop), not from #sol-shell at the rev CI resolves, which is what the static job actually uses. The extra two files are an artifact of that difference, not repo drift.

    Everything else in the issue holds: static was red on main and on every PR for reasons independent of the PR, slither and forge fmt --check pass, and the fix is to run the hooks and commit. PR #39 does exactly that and its static job is green — the first since 2026-09-10.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditFinding from an audit or mutation-test scan

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions