Rename ob-yaml.md to raindex-yaml.md#52
Conversation
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>
WalkthroughThe PR updates documentation and specification files across the repository, systematically renaming "orderbook" terminology to "raindex" and reflowing text for readability. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.yaml2026-03-31 16:59:39,991 [MainThread ] [ERROR] Template file not found: .pre-commit-config.yaml ... [truncated 8880 characters] ... r: [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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
.pre-commit-config.yamlCLAUDE.mddotrain.mdi9r/sub-parser-registry.mdraindex-yaml.mdrainlang.mdrouter.md
| @@ -0,0 +1 @@ | |||
| /nix/store/8yg5imq6129bmlig7y659qv0q72irz2b-pre-commit-config.json No newline at end of file | |||
There was a problem hiding this comment.
🧩 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.nixRepository: 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 fRepository: 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.yamlRepository: 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 commitSources:
[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:
- Delete
.pre-commit-config.yamlfrom the repository - Add
/.pre-commit-config.yamlto.gitignore - 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.
Summary
ob-yaml.mdtoraindex-yaml.mdto match the raindex codebase renameorderbook/orderbooksreferences toraindex/raindexesin the YAML specorderbooks→raindexes,orderbook→raindex)orderbook/order bookreferences in rainlang.md, dotrain.md, router.md, sub-parser-registry.mdTest plan
raindex-yaml.mdwork after merge🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores