Skip to content

chore: apply pre-commit formatting to main - #139

Merged
thedavidmeister merged 1 commit into
mainfrom
2026-09-16-pre-commit-formatting
Sep 16, 2026
Merged

thedavidmeister merged 1 commit into
mainfrom
2026-09-16-pre-commit-formatting

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

pre-commit run --all-files fails on unmodified main. This commits exactly what the hooks write, nothing else.

QA

  • Discriminating tests: the hook run itself, pre-commit run --all-files in github:rainlanguage/rainix/8657b83b68f41957ab85da91132c3f652c1f32c0#sol-shell. Fails on base: exit 1, denofmt and yamlfmt both report "files were modified by this hook", three files dirty. Passes here: exit 0, clean tree.
  • Mutations applied: n/a, no executable line changed. The equivalent for a formatter diff is idempotence, and it was run: pre-commit run --all-files twice more after the commit, both clean with the tree unmodified.
  • Oracle: deno fmt and yamlfmt decide the content, not me, invoked exactly as the CI step invokes them. Second reader over the same bytes: agent-context-cap clean at 3926 bytes against cap 4096.
  • Category check: the ask is a green pre-commit run --all-files on main from exactly what the hooks write; covered. forge lint -D warnings is the other red gate and is deliberately not touched here.

Why main has never been through this

rainix added pre-commit run --all-files to the shared rainix-sol-static workflow at 2026-09-15T20:59Z. main's last run was 2026-09-15T17:16Z (#137), so main has never been through the gate. On PR branches it is still invisible, because the forge lint -D warnings step ahead of it fails first and the pre-commit step never runs.

What the hooks write

  • denofmt rewraps README.md and CLAUDE.md to 80 columns, and adds the trailing newline README.md was missing.
  • yamlfmt drops the blank line before jobs: in .github/workflows/pr-assessment.yaml.

No hand editing. The commit is the hooks' own output.

Merge order

rainix-sol / static runs forge lint before pre-commit, and main is red at both steps. Neither fix can be green on its own: this branch never reaches the pre-commit step because lint fails first, and #140 clears lint and then fails at pre-commit. Whichever lands first therefore merges with static red at the step the other PR fixes.

This one goes first. Its static failure is exactly the 37 forge lint findings main already has, reproduced identically on an unmodified main clone, and its test and legal jobs are green. #140 then rebases onto it and runs fully green before merging.

Notes

The CLAUDE.md rewrap adds 20 bytes, 3906 to 3926, against the org agent-context cap of 4096. The check still passes, but the headroom is now 170 bytes.

forge test: 128 passed across 17 suites either side, unchanged. This PR touches no Solidity.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN

Exactly what `pre-commit run --all-files` writes on unmodified main: no
hand edits.

`denofmt` rewraps `README.md` and `CLAUDE.md` to 80 columns and adds the
missing trailing newline to `README.md`. `yamlfmt` drops the blank line
before `jobs:` in `.github/workflows/pr-assessment.yaml`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 3d0bb150-67ef-4819-b627-b5ea859d8a5c

📥 Commits

Reviewing files that changed from the base of the PR and between a89b874 and 81aac9c.

📒 Files selected for processing (3)
  • .github/workflows/pr-assessment.yaml
  • CLAUDE.md
  • README.md

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.

@thedavidmeister
thedavidmeister merged commit 9d5d96d into main Sep 16, 2026
3 of 4 checks passed
@github-actions

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

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