Add IO data-quality triage report + warning W128#529
Conversation
Follow-up to #212. Adds detection/prevention tooling for hardware I/O data: - pnpm io-quality: scores every hardware entry and prints a prioritized worklist (correctness smells, missing I/O in connectivity categories, column/row coverage gaps). Supports --json and --limit. - Warning W128 (advisory): flags maxConnections>1 on single-jack connections where multiple physical jacks were likely collapsed into one entry, with aggregate names ("All Slots") excluded. - scripts/lib/io-heuristics.ts shares the combine heuristic between the report and the validator so CI and triage stay in lockstep. - Document W128 in docs/VALIDATION_ERRORS.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 593949b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughChangesThe PR adds shared IO quality heuristics, validator warning W128, and a new IO quality tooling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CLI as io-quality CLI
participant Report as generateReport
participant Files as Hardware YAML files
participant Metadata as Category grouping metadata
CLI->>Report: generateReport(limit)
Report->>Files: enumerate and analyze entries
Report->>Metadata: load category exemptions
Report-->>CLI: return prioritized worklists
CLI-->>CLI: print JSON or formatted report
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/VALIDATION_ERRORS.md`:
- Around line 501-510: Align the W128 documentation heading with the registered
anchor in ERROR_INFO: either rename the heading to produce the existing
w128-io-combine-candidate slug or update the anchor in error-codes.ts to match
the current heading slug. Ensure the heading and anchor resolve to the same
identifier.
In `@scripts/lib/error-codes.ts`:
- Around line 274-277: Update the anchor for
ValidationErrorCode.W128_IO_COMBINE_CANDIDATE to
"w128-io-entry-may-combine-multiple-physical-jacks" so it matches the
corresponding heading slug in the validation errors documentation.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f018d2d9-8286-4f0e-88d7-78f15945ed31
📒 Files selected for processing (7)
.changeset/io-quality-report.mddocs/VALIDATION_ERRORS.mdpackage.jsonscripts/io-quality.tsscripts/lib/error-codes.tsscripts/lib/io-heuristics.tsscripts/validate.ts
The registered anchor 'w128-io-combine-candidate' did not match the GitHub slug of the "### W128: IO Entry May Combine Multiple Physical Jacks" heading, so getDocsUrl(W128) linked to a non-existent fragment. Align the anchor with the heading slug, matching the convention used by the other W1xx entries. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Context
Follow-up to #212 (IO positioning). Pillar 1 of the I/O data-quality plan — triage & prevention — so enrichment can be prioritized and new imports stop regressing.
What's in here
pnpm io-qualityreport — scores every hardware entry and prints a prioritized worklist:maxConnections>1on single-jack connections), collapsed stereo/numbered-pair names ("Outputs 1/2", "Analog In L/R"), uniform-position imports (all jacks on one edge — the H90's original bug).ioat all.columnPosition/rowPosition, densest first.--jsonand--limit.Warning W128 (advisory, non-blocking) — flags
maxConnections>1on single-jack connections inpnpm validate, excluding intentional aggregates ("All Slots").scripts/lib/io-heuristics.ts— shared combine heuristic so report and validator stay in lockstep.Current picture (from the report)
Verification
pnpm validate✅ (W128 fires 16× advisory, exit 0),typecheck✅,lint✅,test✅ (107/107)🤖 Generated with Claude Code
Summary by CodeRabbit
pnpm io-qualityto generate an IO Quality & Coverage Report highlighting correctness smells, connectivity IO gaps, and missing column/row enrichment.--jsonoutput and--limitto scope report size (default 20).VALIDATION_ERRORS.md, including when it triggers and remediation steps.maxConnections > 1on single-jack connection types).