Skip to content

feat(xtask): add check-capability-producers producer inventory (#5531) - #9946

Merged
EffortlessSteven merged 2 commits into
mainfrom
claude/check-capabilities
Oct 23, 2026
Merged

EffortlessSteven merged 2 commits into
mainfrom
claude/check-capabilities

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Governing issue or accepted claim: #5531 (capability registry / admission gates); refs, does not close it.
Acceptance delta (one sentence): Adds cargo xtask check-capability-producers, an out-of-crate inventory that fails when a LanguageId variant, lang-* feature, or adapter directory lacks a registry disposition, closing the LanguageId::ALL hole.

Claim

The xtask-level producer inventory / admission gate left open on #5531: a new language, adapter or lang-* feature cannot land without a registry disposition.

Design and rationale

  • Name. cargo xtask check-capabilities already exists (validates metrics/capabilities.toml vs docs/CAPABILITY_MATRIX.md, never reads the registry), so this is a separate check-capability-producers; no ripr build is forced into precommit.
  • Registry access. ripr capabilities --json (or --registry-json <path> for a saved registry; the report says it can be stale).
  • Enforces: LanguageId variants in domain/language.rs vs registry languages; duplicate languages rejected; every language has a cell and every cell names a registered language; lang-* Cargo features vs registry required_feature vs analysis/language/ directories; proof_refs must be a non-empty string array resolving to docs/specs/RIPR-SPEC-NNNN-*.md; kind/schema_version/digest present; fail closed on empty inventory or unparseable enum.
  • Does not duplicate: cell states/tiers/pins and docs drift (in-crate tests, check-support-tiers), framework-level producers.
  • Wiring. Command catalog, dispatch, docs/CI.md, changelog fragment. Standalone, ci_enforced=false, not in any required lane; it reports failures only when run. Hosted wiring is a follow-up.

Proof (local, head 45a9db5, review repairs on b4f99d3)

  • cargo xtask check-capability-producers passes on the real tree.
  • Negative experiments (nonzero exit): perl dropped from registry languages; perl cells removed; empty analysis/language/go dir added.
  • 17 xtask unit tests: one negative per rule, proof_refs shape, duplicate language, parse_args, rendered-registry vs real inventory, enum-parser negatives.
  • cargo xtask precommit rc 0; fmt and clippy -p xtask --all-targets -D warnings clean.
  • Not run: check-pr, a source-level LanguageId::ALL removal rebuild.

Gaps

Not wired into any required lane. Non-default feature builds are not inventoried. Framework-level producers, finer capability families, docs derived from the table, and the registry/metrics/capabilities.toml relation remain open on #5531.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EsjwSbvSPQdZfNsK689oNn

Compare the language capability registry (`ripr capabilities --json`) with
repository inventory the in-crate tests cannot enumerate: LanguageId variants
declared in source, cells per language, lang-* features vs required_feature vs
adapter directories, and proof_refs resolving to spec files.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsjwSbvSPQdZfNsK689oNn
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 31 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 126 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 9513864f-bf85-4a43-9d54-aad7ff19a5d8
📥 Commits

Reviewing files that changed from the base of the PR and between 9b8246f and 45a9db5.

📒 Files selected for processing: 7
  • changelog.d/check-capability-producers.md
  • docs/CI.md
  • xtask/src/command.rs
  • xtask/src/dispatch.rs
  • xtask/src/policy/capability_producers.rs
  • xtask/src/policy/capability_producers/tests.rs
  • xtask/src/policy/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the cargo xtask check-capability-producers command, which validates the binary-resident language capability registry against the repository's producer inventory (including LanguageId variants, Cargo features, adapter directories, and spec references). The changes include documentation, command registration, and the implementation of the policy check along with comprehensive unit tests. No review comments were provided, so there is no additional feedback to address.

…5531)

Require proof_refs to be a non-empty array of strings, flag duplicate
language entries, reword why_it_matters so it does not claim enforcement
the unwired gate lacks, and add parse_args, rendered-registry and enum
parser negatives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EsjwSbvSPQdZfNsK689oNn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants