ci: replace doc-enforced rules with automated CI guard scripts#40
ci: replace doc-enforced rules with automated CI guard scripts#40pablopunk wants to merge 2 commits into
Conversation
Add five new CI check scripts that automate rules previously documented in src/docs/, plus behavioral tests for two undocumented contracts: CI guard scripts (scripts/check-*.cjs): - check-extension-fixture-coverage — every ctx.ui.* method has a fixture; uses TS compiler API to cross-check API surface vs fixture calls vs doc allowlist - check-os-platform-boundaries — no process.platform in renderer/shared code; warns on main-process branches outside the os.ts capability layer - check-window-config — verifies AeroSpace-compatible window contract (type:panel, accessory policy, visibleOnAllWorkspaces) - check-appearance-contract — appearance field present on all three result-shaped extension types - check-logging — log file name, read bounds, Error stripping Existing script enhanced: - check-packaged-resources — added fixture exclusion guard Behavioral tests: - data-loader.test.ts — loader lifecycle, retry after failure, empty state, error message propagation - file-index-sorting.test.ts — sort-before-slice ordering, dateAddedMs fallback, includeDimensions defaults Refactored main.ts to extract testable data-loader registry and file-index sorting helpers into dedicated modules. All new checks and tests run under mise exec -- pnpm test.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 59 minutes and 11 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
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 |
…arch-ranking.test.ts
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Summary
Five new CI guard scripts + two behavioral test suites that automate rules previously documented in
src/docs/. When a rule is enforced by CI, the doc becomes a reference rather than the sole guardrail.New CI scripts (
scripts/check-*.cjs, all run undermise exec -- pnpm test)check-extension-fixture-coveragectx.ui.*method has a dev fixtureextension-api-ui-fixtures.mdcheck-os-platform-boundariesprocess.platformin renderer/shared; warns main-processos-architecture.mdcheck-window-configtype:panel,accessory,visibleOnAllWorkspaceswindow-management.mdcheck-appearance-contractappearancefield onExtensionCommand,ExtensionActionContribution,ExtensionItemextension-result-appearance-contract.mdcheck-logginglogging.mdEnhanced:
check-packaged-resourcesnow guards againstsrc/fixturesbeing packaged in production.New behavioral tests
data-loader.test.ts(4 tests)file-index-sorting.test.ts(3 tests)dateAddedMswith birthtime fallback,includeDimensionsdefaultsRefactored
src/electron/main.ts: ~70 lines extracted todata-loader.tsandfile-index-sorting.tsfor testability. No behavioral changes.Review history
Two review rounds with 5 reviewer agents. Retry lifecycle bug found and fixed in round 1, all fixes verified green in round 2.