Skip to content

Use rainix copy-artifacts meta hook; drop git-clean - #2603

Merged
thedavidmeister merged 4 commits into
mainfrom
2026-05-30-build-meta-hook
May 30, 2026
Merged

thedavidmeister merged 4 commits into
mainfrom
2026-05-30-build-meta-hook

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented May 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add script/build-meta.sh — mirrors the body of the raindex-prelude flake task, but nix-shells rain.cli for rain meta build since the rainix reusable wraps it in #sol-shell.
  • Drop .github/workflows/git-clean.yaml. With the meta hook running upstream in rainix-copy-artifacts, git-clean's only unique coverage (meta currency) is gone; pointer currency is in copy-artifacts and forge fmt cleanliness is in rainix-sol / static.
  • Point .github/workflows/copy-artifacts.yaml at the rainix PR branch @2026-05-30-copy-artifacts-meta so this PR validates the new hook end-to-end. Will be reverted to @main after copy-artifacts: regenerate meta via consumer-provided build-meta.sh hook rainix#208 merges.

Resolves #2600. Depends on rainlanguage/rainix#208.

Test plan

  • copy-artifacts / copy-artifacts runs the new script/build-meta.sh and the diff stays clean (committed meta/*.rain.meta match a fresh regen).
  • All other checks remain green (dropping git-clean shouldn't affect anything else; forge fmt --check lives in rainix-sol / static).
  • Flip copy-artifacts.yaml back to @main once rainix#208 merges and re-run.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated CI workflow documentation to reference the metadata build script and pointer/ABI naming conventions
  • Chores

    • Removed the git-clean workflow from the CI pipeline to streamline the automated build process
    • Added a new metadata generation script to enhance metadata building and handling capabilities in the development workflow

Review Change Stack

Move the authoring-meta currency check upstream into the rainix
copy-artifacts reusable via the new script/build-meta.sh hook
(rainlanguage/rainix#208), and drop the bespoke git-clean workflow whose
only unique coverage was meta regeneration. The script mirrors the body
of the raindex-prelude flake task but nix-shells rain.cli for `rain meta
build`, since the reusable's #sol-shell wrapper is sol-only.

Resolves #2600. copy-artifacts.yaml is pinned to the rainix PR branch
for end-to-end validation; revert to @main when #208 merges.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@thedavidmeister thedavidmeister self-assigned this May 30, 2026
@coderabbitai

coderabbitai Bot commented May 30, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@thedavidmeister, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 53 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 05f03525-8807-4369-b098-97a85bed75f4

📥 Commits

Reviewing files that changed from the base of the PR and between 422094a and 73ca64c.

📒 Files selected for processing (1)
  • test/concrete/raindex/RaindexV6.withdraw.entask.t.sol
📝 Walkthrough

Walkthrough

This PR replaces the git-clean workflow with a dedicated metadata build script, updates workflow documentation to reference the new script, and removes the obsolete git-clean job. The change consolidates metadata generation into a single executable script.

Changes

Metadata Build Workflow Refactor

Layer / File(s) Summary
Metadata build script implementation
script/build-meta.sh
New Bash script creates meta/ directory, runs forge script to generate authoring-meta artifacts, then executes rain CLI via nix shell to build final metadata, using strict set -euxo pipefail and configuration flags for module, encoding, compression, and output paths.
Workflow documentation and cleanup
.github/workflows/copy-artifacts.yaml
Updated comments document the new build-meta.sh meta hook and reference upstream BuildPointers.sol pointer/ABI convention. .github/workflows/git-clean.yaml is removed entirely, consolidating the previous git-clean workflow's metadata/formatting responsibility into the dedicated build script.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Poem

🐰 A rabbit hops through workflow trees,
Old git-clean job removed with ease,
New build-meta script takes the stage,
Metadata flows on copy's page,
Simpler paths, the future's bright! 📜✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the two main changes: adding the rainix copy-artifacts meta hook and removing the git-clean workflow.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-30-build-meta-hook

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 and usage tips.

thedavidmeister and others added 3 commits May 30, 2026 05:11
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
testRaindexWithdrawEvalWriteStateDifferentOwnersNamespaced was the only
fuzz test in this file missing the nonzero-vaultId assumption, so it
occasionally hit ZeroVaultId on a zero-bytes32 counterexample. Match
the sibling tests in the file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
script/build-meta.sh (1)

9-15: ⚡ Quick win

Consider pinning the rain.cli version for reproducible builds.

The nix shell github:rainlanguage/rain.cli command fetches the latest version from the default branch without pinning to a specific commit, tag, or ref. This could lead to non-deterministic builds if the CLI tool changes.

To improve build reproducibility and prevent unexpected breakage, consider pinning to a specific ref:

nix shell github:rainlanguage/rain.cli/<commit-or-tag> -c rain meta build \

While the copy-artifacts workflow will catch output mismatches, pinning would prevent spurious CI failures and ensure consistent metadata generation across environments.

🤖 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 `@script/build-meta.sh` around lines 9 - 15, The nix invocation in the
script/build-meta.sh uses an unpinned channel ("nix shell
github:rainlanguage/rain.cli -c rain meta build") which can make builds
non-deterministic; update that command to pin the rain.cli to a specific commit
or tag (e.g., "nix shell github:rainlanguage/rain.cli/<commit-or-tag> -c rain
meta build") so the rain meta build invocation always uses a fixed CLI version;
change the single occurrence of the unpinned string in the script to the pinned
form and document the chosen commit/tag in the script header or a comment.
🤖 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 `@script/build-meta.sh`:
- Around line 9-15: The nix invocation in the script/build-meta.sh uses an
unpinned channel ("nix shell github:rainlanguage/rain.cli -c rain meta build")
which can make builds non-deterministic; update that command to pin the rain.cli
to a specific commit or tag (e.g., "nix shell
github:rainlanguage/rain.cli/<commit-or-tag> -c rain meta build") so the rain
meta build invocation always uses a fixed CLI version; change the single
occurrence of the unpinned string in the script to the pinned form and document
the chosen commit/tag in the script header or a comment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1f638563-7f31-48ff-8a17-f9bd6bf889b5

📥 Commits

Reviewing files that changed from the base of the PR and between 262bd6c and 422094a.

📒 Files selected for processing (3)
  • .github/workflows/copy-artifacts.yaml
  • .github/workflows/git-clean.yaml
  • script/build-meta.sh
💤 Files with no reviewable changes (1)
  • .github/workflows/git-clean.yaml

@thedavidmeister
thedavidmeister merged commit 4a32ce4 into main May 30, 2026
17 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@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 May 30, 2026

Copy link
Copy Markdown
Contributor

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.

Consolidate git-clean and copy-artifacts CI jobs (+ restore meta currency check)

1 participant