Skip to content

Rename ob-yaml.md to raindex-yaml.md#52

Merged
thedavidmeister merged 3 commits intomainfrom
rename-ob-yaml-to-raindex-yaml
Apr 3, 2026
Merged

Rename ob-yaml.md to raindex-yaml.md#52
thedavidmeister merged 3 commits intomainfrom
rename-ob-yaml-to-raindex-yaml

Conversation

@thedavidmeister
Copy link
Copy Markdown
Contributor

@thedavidmeister thedavidmeister commented Mar 31, 2026

Summary

  • Rename ob-yaml.md to raindex-yaml.md to match the raindex codebase rename
  • Update all orderbook/orderbooks references to raindex/raindexes in the YAML spec
  • Document version 6 (renamed keys: orderbooksraindexes, orderbookraindex)
  • Fix remaining orderbook/order book references in rainlang.md, dotrain.md, router.md, sub-parser-registry.md
  • Update CLAUDE.md references

Test plan

  • Verify all links to raindex-yaml.md work after merge
  • Verify raindex codebase URL references are updated (done in companion PR)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated documentation to use "raindex" terminology throughout (formerly "orderbook").
    • Updated raindex-yaml specification to version 6 with added version history.
    • Improved readability of documentation through formatting adjustments.
  • Chores

    • Added pre-commit configuration file.

thedavidmeister and others added 3 commits March 31, 2026 20:29
Rename orderbook → raindex throughout the YAML spec to match
the raindex codebase rename.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

Walkthrough

The PR updates documentation and specification files across the repository, systematically renaming "orderbook" terminology to "raindex" and reflowing text for readability. The raindex-yaml.md specification is updated from version 5 to 6 with a version history section added. A .pre-commit-config.yaml configuration file is added.

Changes

Cohort / File(s) Summary
Configuration Addition
.pre-commit-config.yaml
Added single configuration file entry without newline at end of file.
Specification Version Update
raindex-yaml.md
Updated specification from version 5 to 6; added version history section; systematically renamed "orderbooks"/"orderbook" to "raindexes"/"raindex" throughout; clarified deployment-block association with raindex contract; updated examples to reflect new terminology.
Documentation with Terminology Updates
CLAUDE.md, router.md
Reflowed text for readability and updated specification references; replaced ob-yaml.md references with raindex-yaml.md; changed "rain orderbook orders" to "raindex orders" in router.md; reformatted bullet points and wrapped long sentences.
Documentation with Text Reflowing
dotrain.md, i9r/sub-parser-registry.md, rainlang.md
Reflowed paragraphs and code examples across multiple lines for improved readability; adjusted inline formatting and added/removed blank lines around code blocks; one terminology change in rainlang.md ("order book" → "raindex"); added missing newline at end of file in rainlang.md and i9r/sub-parser-registry.md.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Rename ob-yaml.md to raindex-yaml.md' directly and accurately reflects the primary change in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 rename-ob-yaml-to-raindex-yaml

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.2.510)
.pre-commit-config.yaml

2026-03-31 16:59:39,991 [MainThread ] [ERROR] Template file not found: .pre-commit-config.yaml
2026-03-31 16:59:40,004 [MainThread ] [ERROR] Template file not found: .pre-commit-config.yaml
2026-03-31 16:59:40,058 [MainThread ] [ERROR] Failed to invoke function /usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner. with .pre-commit-config.yaml
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 88, in func_wrapper
result = original_func(item)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/object_runner.py", line 74, in
results = parallel_runner.run_function(lambda f: (f, self._parse_file(f)), files_to_load)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/openapi/runner.py", line 43, in _parse_file
return R

... [truncated 8880 characters] ...

r: [Errno 2] No such file or directory: '.pre-commit-config.yaml'
2026-03-31 16:59:40,125 [MainThread ] [ERROR] Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/checkov/main.py", line 647, in run
self.scan_reports = runner_registry.run(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/checkov/common/runners/runner_registry.py", line 177, in run
for result in parallel_runner_results:
File "/usr/local/lib/python3.11/dist-packages/checkov/common/parallelizer/parallel_runner.py", line 118, in _run_function_multiprocess_fork
raise v.internal_exception.with_traceback(v.internal_exception.traceback)
FileNotFoundError: [Errno 2] No such file or directory: '.pre-commit-config.yaml'

🔧 YAMLlint (1.38.0)
.pre-commit-config.yaml

[Errno 2] No such file or directory: '.pre-commit-config.yaml'


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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.pre-commit-config.yaml:
- Line 1: Remove the generated Nix artifact .pre-commit-config.yaml from version
control (delete the file from the repo) and add an entry for
/.pre-commit-config.yaml to .gitignore so the symlinked Nix store file is not
committed; also verify the Nix dev setup (e.g., the git-hooks.nix workflow
invoked via nix develop) regenerates the pre-commit config for developers at
dev-time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d5c7bbc6-ee3c-4118-bbc9-f5d53ce60fab

📥 Commits

Reviewing files that changed from the base of the PR and between a55e0fd and b7d184f.

📒 Files selected for processing (7)
  • .pre-commit-config.yaml
  • CLAUDE.md
  • dotrain.md
  • i9r/sub-parser-registry.md
  • raindex-yaml.md
  • rainlang.md
  • router.md

Comment thread .pre-commit-config.yaml
@@ -0,0 +1 @@
/nix/store/8yg5imq6129bmlig7y659qv0q72irz2b-pre-commit-config.json No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if this file is gitignored or if there's a Nix-based pre-commit setup

# Check .gitignore for pre-commit-config
if [ -f .gitignore ]; then
  echo "=== Checking .gitignore for pre-commit-config patterns ==="
  rg -n 'pre-commit' .gitignore || echo "No pre-commit patterns found in .gitignore"
fi

# Look for Nix files that might generate pre-commit config
echo -e "\n=== Looking for Nix files that might manage pre-commit ==="
fd -e nix -x echo {}

# Check for any documentation about pre-commit setup
echo -e "\n=== Searching for pre-commit documentation ==="
rg -l -i 'pre-commit' --glob '*.md' --glob '*.txt' --glob 'README*'

Repository: rainlanguage/specs

Length of output: 283


🏁 Script executed:

cat -n flake.nix

Repository: rainlanguage/specs

Length of output: 563


🏁 Script executed:

# Check if there are any other pre-commit related files or configurations
fd -i 'pre-commit' --type f

Repository: rainlanguage/specs

Length of output: 44


🏁 Script executed:

# Check the git status of this file to understand if it's intentionally tracked
git status .pre-commit-config.yaml 2>/dev/null || echo "Git status check failed"
git log --oneline .pre-commit-config.yaml 2>/dev/null | head -5 || echo "No git history"

Repository: rainlanguage/specs

Length of output: 188


🏁 Script executed:

# Check if .pre-commit-config.yaml is a symlink and get file details
ls -la .pre-commit-config.yaml
file .pre-commit-config.yaml
stat .pre-commit-config.yaml

Repository: rainlanguage/specs

Length of output: 307


🏁 Script executed:

# Check if there's a .gitignore entry or if the file should be excluded
cat .gitignore | grep -A 5 -B 5 'nix\|build\|\.json' || echo "No relevant .gitignore patterns"

Repository: rainlanguage/specs

Length of output: 93


🌐 Web query:

rainix rainprotocol pre-commit configuration nix

💡 Result:

To wire Rainix tasks into a Nix-managed pre-commit setup, use cachix/git-hooks.nix and register Rainix executables as custom hooks.

1) Add inputs (your project’s flake.nix)

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    systems.url = "github:nix-systems/default";

    git-hooks.url = "github:cachix/git-hooks.nix";

    # Rainix tasks (provides rainix-sol-static, rainix-rs-static, etc.)
    rainix.url = "github:rainlanguage/rainix";
  };

  outputs = { self, nixpkgs, systems, git-hooks, rainix, ... }:
  let
    forEachSystem = nixpkgs.lib.genAttrs (import systems);
  in {
    checks = forEachSystem (system: {
      pre-commit-check = git-hooks.lib.${system}.run {
        src = ./.;
        hooks = {
          # Solidity checks (slither + forge fmt --check)
          rain-sol-static = {
            enable = true;
            name = "rainix-sol-static";
            entry = "${rainix.packages.${system}.rainix-sol-static}/bin/rainix-sol-static";
            language = "unsupported";
            pass_filenames = false;
          };

          # Rust checks (cargo fmt --check + clippy)
          rain-rs-static = {
            enable = true;
            name = "rainix-rs-static";
            entry = "${rainix.packages.${system}.rainix-rs-static}/bin/rainix-rs-static";
            language = "unsupported";
            pass_filenames = false;
          };
        };
      };
    });

    devShells = forEachSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
        inherit (self.checks.${system}.pre-commit-check) shellHook enabledPackages;
      in {
        default = pkgs.mkShell {
          inherit shellHook;
          buildInputs = enabledPackages;
        };
      }
    );
  };
}

This works because Rainix exports those tasks as flake packages (e.g. rainix-sol-static, rainix-rs-static, etc.). [1] And git-hooks.nix’s flake integration generates .pre-commit-config.yaml, provides a shellHook that installs hooks automatically in nix develop, and supports custom hooks via entry/language. [2]

2) Ignore the generated config

Add to your repo’s .gitignore:

/.pre-commit-config.yaml

(Recommended by git-hooks.nix.) [2]

3) Use it

nix develop
git commit

Sources:
[1] rainlanguage/rainix flake outputs (task package names) https://raw.githubusercontent.com/rainlanguage/rainix/main/flake.nix
[2] cachix/git-hooks.nix README (flake integration, shellHook, custom hooks) https://raw.githubusercontent.com/cachix/git-hooks.nix/master/README.md


Remove .pre-commit-config.yaml from version control — it's a generated Nix artifact.

The file is a symlink to a machine-specific Nix store path that will break for other developers. Generated pre-commit configs from Nix tooling (such as git-hooks.nix) should be excluded from git.

Actions required:

  1. Delete .pre-commit-config.yaml from the repository
  2. Add /.pre-commit-config.yaml to .gitignore
  3. Ensure the Nix development workflow properly generates this file at dev-time (via nix develop)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.pre-commit-config.yaml at line 1, Remove the generated Nix artifact
.pre-commit-config.yaml from version control (delete the file from the repo) and
add an entry for /.pre-commit-config.yaml to .gitignore so the symlinked Nix
store file is not committed; also verify the Nix dev setup (e.g., the
git-hooks.nix workflow invoked via nix develop) regenerates the pre-commit
config for developers at dev-time.

@thedavidmeister thedavidmeister merged commit 42342fd into main Apr 3, 2026
1 check passed
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