Skip to content

Retire the schema-check CLI subcommand - #320

Merged
thedavidmeister merged 2 commits into
mainfrom
2026-09-03-issue-149-retire-schema-check
Sep 3, 2026
Merged

thedavidmeister merged 2 commits into
mainfrom
2026-09-03-issue-149-retire-schema-check

Conversation

@thedavidmeister

@thedavidmeister thedavidmeister commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Deletes the schema-check CLI subcommand: crates/cli/src/cli/schema_check.rs, its Meta::SchemaCheck wiring in crates/cli/src/cli/mod.rs, the two integration tests naming it (schema_check_prints_verified_entity_count in tests/cli.rs, test_dispatch_schema_check in tests/cli_dispatch.rs), and the graphql-parser dependency, which had no other use in the crate (it stays in Cargo.lock only as a transitive dependency of graphql_client_codegen).

The API-schema snapshot verification from #298 (a CI job that runs graph-node and diffs crates/metaboard/src/schema/metaboard.graphql) replaces what schema-check did. An org-wide grep over all 77 repos for schema-check / SchemaCheck finds no caller outside this definition.

Every other part of #149 is already on main: #148, #245, #298 here and rainlanguage/rain.metadata.deploy#4. This PR is the last piece.

Closes #149

QA

All commands run inside nix develop -c on this branch.

  • cargo fmt --all — no changes; the commit's pre-commit rustfmt and taplo hooks passed.
  • cargo test --workspace 2>&1 | grep -E "^error|^test result|FAILED|panicked" — 11 test result lines, 310 passed, 0 failed, 0 ^error lines, 0 FAILED/panicked lines.
  • cargo clippy --workspace --all-targets -- -D warningsFinished, 0 errors, 0 warnings.
  • cargo build -p rain-metadata --features cliFinished.
  • ./target/debug/rain-metadata schema-check --consumer /nonexistent — exit 2, error: unrecognized subcommand 'schema-check'; --help lists six subcommands (schema, validate, magic, build, solc, generate).
  • Discriminating tests: base carries schema_check_prints_verified_entity_count (tests/cli.rs) and test_dispatch_schema_check (tests/cli_dispatch.rs), both invoking the binary with schema-check, plus 38 unit tests inside schema_check.rs. Against this branch's binary the two integration tests fail because clap rejects the subcommand with exit 2 (observed above), which is why they are deleted with the code they exercised; the 38 unit tests go with the file.
  • Mutations applied: in crates/cli/src/cli/mod.rs replaced Meta::Validate(validate) => validate::validate(validate) with Meta::Validate(_) => Ok(()); cargo test -p rain-metadata --test cli_dispatchtest_dispatch_validate FAILED (panicked at crates/cli/tests/cli_dispatch.rs:87:5), 7 passed, 1 failed. Restored with git checkout -- crates/cli/src/cli/mod.rs; git status --porcelain empty afterwards.
  • Oracle: issue Split subgraph on deployment facts, not wholesale: manifest as a template in the lib repo, networks.json in the deploy repo #149 and the Verify the graph-node API schema snapshot in CI #298 CI job as the replacement; the org-wide grep (77 repos) for schema-check / SchemaCheck with no caller; an in-repo grep after the deletion for schema[_-]check|SchemaCheck|graphql[_-]parser hitting nothing outside Cargo.lock's transitive entries.
  • Category check: Split subgraph on deployment facts, not wholesale: manifest as a template in the lib repo, networks.json in the deploy repo #149 asks that schema-check be retired once the snapshot verification replaces it. This PR deletes the subcommand, its wiring, its tests and its sole-use dependency, and adds nothing. Dependencies still used elsewhere (once_cell, reqwest, serde_json, tokio, httpmock, tempfile) are kept.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EyWWorieTJV9FmMm2JM6Ua

Summary by CodeRabbit

  • Removed Features
    • Removed the schema-check CLI subcommand.
    • Schema validation against local sources or live endpoints is no longer available through the CLI.
  • Tests
    • Removed automated coverage for the schema-check command and its dispatch behavior.

The API-schema snapshot verification (#298) runs graph-node in CI and
diffs crates/metaboard/src/schema/metaboard.graphql directly, so the
schema-check subcommand no longer has a job. No caller exists in any
org repo. graphql-parser had no use outside it and goes with it.

Closes #149

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EyWWorieTJV9FmMm2JM6Ua
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 22a3fbff-1d25-4720-9d19-b28533b27ad6

📥 Commits

Reviewing files that changed from the base of the PR and between 4ff7ee0 and 593ae60.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • crates/cli/Cargo.toml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The schema-check CLI command and its GraphQL comparison implementation were removed. CLI wiring, the optional graphql-parser dependency, and related integration tests were also deleted.

Changes

Schema-check CLI removal

Layer / File(s) Summary
Remove schema-check command and comparison logic
crates/cli/Cargo.toml, crates/cli/src/cli/mod.rs, crates/cli/src/cli/schema_check.rs
The schema-check subcommand, CLI wiring, live introspection, schema comparison helpers, and optional graphql-parser dependency were removed.
Remove CLI validation coverage
crates/cli/tests/cli.rs, crates/cli/tests/cli_dispatch.rs
End-to-end and dispatch tests for schema-check were deleted.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 593ae

The retired schema-check dependency wiring is removed cleanly, with no remaining identified merge-readiness risk.

Suggested reviewers: dcatki

🚥 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 clearly and concisely describes the primary change: removal of the schema-check CLI subcommand.
Linked Issues check ✅ Passed The PR retires the schema-check implementation, CLI wiring, dependency, and tests as required by issue #149 after replacement API-schema snapshot verification was introduced.
Out of Scope Changes check ✅ Passed All reviewed changes directly support retiring schema-check and removing its unused GraphQL parser dependency. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-09-03-issue-149-retire-schema-check

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.

…retire-schema-check

# Conflicts:
#	crates/cli/Cargo.toml
@thedavidmeister
thedavidmeister merged commit 22ac1e2 into main Sep 3, 2026
12 checks passed
@github-actions

github-actions Bot commented Sep 3, 2026

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

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.

Split subgraph on deployment facts, not wholesale: manifest as a template in the lib repo, networks.json in the deploy repo

1 participant