Harden registry validator and test suite#9
Conversation
Closes #7. Validator (scripts/validate_registry.py): - Empty or missing parts[] now errors instead of passing silently. - A part with no path is reported instead of crashing with KeyError; the shape check treats empty/null paths the same as the network loop's skip. - head_ok() also catches TimeoutError, so read-phase timeouts no longer escape and abort the run. - Structural checks extracted into a pure check_manifest_shape(). Tests: - New scripts/test_validate_registry.py (stdlib unittest, no deps) pins the validator fixes; wired into the registry CI job as an offline step. - Category-filter test asserts which cards are visible and picks its category deterministically instead of depending on devices[0]. - New test pins the release-notes URL allowlist fallback href. - tests/package.json npm test now runs playwright test. Copy: - Manual-flash fallback shows esptool write-flash --port <port> 0x0 <file>. Repo: - Add .gitattributes with vendor/** -text. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ 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 |
What does this change?
Closes #7. A batch of small correctness and hardening items from the #1 review: validator gaps, weak tests, and the manual-flash copy.
Validator (
scripts/validate_registry.py)parts[]now errors instead of passing silently.pathkey is reported as an error instead of crashing the whole run with aKeyError.head_ok()now also catchesTimeoutError, so a read-phase timeout is treated as "part unreachable" rather than escaping and aborting the check.check_manifest_shape()so they can be unit-tested offline.Tests
scripts/test_validate_registry.py(stdlibunittest, no new deps) pins all three validator fixes. Wired into theregistryCI job as an offline step ahead of the live check.devices[0]'s position.github.comhtml_urlfrom the API must fall back to the safehttps://github.com/<repo>/releaseslink.tests/package.jsonnpm testnow runsplaywright testinstead of the exit-1 boilerplate.Copy
esptool write-flash --port <port> 0x0 <file>(esptool v5 spelling, with the required--port).Repo
.gitattributeswithvendor/** -textso the pinned esp-web-tools copy is never line-ending-normalized.Checklist
cd tests && npx playwright test) (11 passed)cplist in.github/workflows/pages.yml(n/a: no new runtime files;.gitattributesand the validator test are not shipped)devices.jsonchanged:python scripts/validate_registry.pypasses (devices.json unchanged; ran the validator anyway, passes)🤖 Generated with Claude Code