Retire the schema-check CLI subcommand - #320
Conversation
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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe ChangesSchema-check CLI removal
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The retired schema-check dependency wiring is removed cleanly, with no remaining identified merge-readiness risk. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation 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)
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 |
…retire-schema-check # Conflicts: # crates/cli/Cargo.toml
|
@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:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
Deletes the
schema-checkCLI subcommand:crates/cli/src/cli/schema_check.rs, itsMeta::SchemaCheckwiring incrates/cli/src/cli/mod.rs, the two integration tests naming it (schema_check_prints_verified_entity_countintests/cli.rs,test_dispatch_schema_checkintests/cli_dispatch.rs), and thegraphql-parserdependency, which had no other use in the crate (it stays inCargo.lockonly as a transitive dependency ofgraphql_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 whatschema-checkdid. An org-wide grep over all 77 repos forschema-check/SchemaCheckfinds 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 -con this branch.cargo fmt --all— no changes; the commit's pre-commitrustfmtandtaplohooks passed.cargo test --workspace 2>&1 | grep -E "^error|^test result|FAILED|panicked"— 11test resultlines, 310 passed, 0 failed, 0^errorlines, 0FAILED/panickedlines.cargo clippy --workspace --all-targets -- -D warnings—Finished, 0 errors, 0 warnings.cargo build -p rain-metadata --features cli—Finished../target/debug/rain-metadata schema-check --consumer /nonexistent— exit 2,error: unrecognized subcommand 'schema-check';--helplists six subcommands (schema, validate, magic, build, solc, generate).schema_check_prints_verified_entity_count(tests/cli.rs) andtest_dispatch_schema_check(tests/cli_dispatch.rs), both invoking the binary withschema-check, plus 38 unit tests insideschema_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.crates/cli/src/cli/mod.rsreplacedMeta::Validate(validate) => validate::validate(validate)withMeta::Validate(_) => Ok(());cargo test -p rain-metadata --test cli_dispatch—test_dispatch_validateFAILED (panicked atcrates/cli/tests/cli_dispatch.rs:87:5), 7 passed, 1 failed. Restored withgit checkout -- crates/cli/src/cli/mod.rs;git status --porcelainempty afterwards.schema-check/SchemaCheckwith no caller; an in-repo grep after the deletion forschema[_-]check|SchemaCheck|graphql[_-]parserhitting nothing outsideCargo.lock's transitive entries.schema-checkbe 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
schema-checkCLI subcommand.schema-checkcommand and its dispatch behavior.