fix: validate adapter certification records - #1125
Conversation
📝 WalkthroughWalkthrough
ChangesCertification Records 도입
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@scripts/package-docs-check.mts`:
- Around line 2113-2144: Free-text fields in the certification table can break
the markdown pipe layout because they are inserted unescaped in
formatCertificationRecords and formatCertificationEvidenceItem. Add a small
helper to escape pipe characters in cell content, then route all user-authored
text through it before rendering the table, especially record.contract,
record.knownGaps, and the CertificationEvidenceItem fields combined in details
so the generated markdown stays valid.
- Around line 814-818: The knownGaps check in the package-docs validation is
weaker than the violation message claims because it only enforces non-empty
content, not that each missingEvidence key is actually named. Update the
validation around the missingEvidence branch in the docs check logic to either
verify each missing key is explicitly referenced in knownGaps, or relax the
violation text to match the current length-only behavior; keep the fix aligned
with the surrounding missing certification gap validation.
In `@scripts/tests/package-docs-check.spec.ts`:
- Around line 667-711: createCertificationRecord currently only allows
overriding contract, evidence, and packageVersion, which makes it hard to reuse
for broader validation scenarios; update the helper so overrides can cover the
full certification record shape, including fields like package, adapterCategory,
runtimes, and state. Keep the existing defaults in createCertificationRecord,
but broaden the overrides type and merge logic so tests can easily construct
mismatch cases without changing the helper again.
🪄 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: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: add0a699-d805-4273-b072-bbbabc828891
📒 Files selected for processing (6)
README.mddocs/package-catalog.jsondocs/package-docs-report.mdpackages/docs/src/content/docs/en/reference/extension-matrix.mdscripts/package-docs-check.mtsscripts/tests/package-docs-check.spec.ts
📊 Benchmark Results❌ Some benchmarks failed Gate failures
Updated: 2026-06-30T15:13:17.578Z · Commit: c14f348 |
ff3be40 to
70b9b02
Compare
Fixes #1089.
Summary
certification.recordstodocs/package-catalog.jsonwith candidate records for R2 storage, Polar billing, and Meilisearch search adapters, including explicit live-smoke gaps instead of prose-only certification claims.package-docs-checkto validate certification schema version, package catalog linkage, extension-matrix linkage, package version, adapter category, runtime scope, evidence keys, missing-evidence reasons, known-gap naming, certified-state constraints, duplicate records, and command/artifact-backed present evidence.Verification
COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm docs:catalog:checkCOREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm exec tsc --noEmit --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2022 --types node,vitest/globals --allowImportingTsExtensions scripts/package-docs-check.mts scripts/tests/package-docs-check.spec.tsCOREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm exec vitest run scripts/tests/package-docs-check.spec.ts --config vitest.config.ts(19 tests)COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm exec oxlint scripts/package-docs-check.mts scripts/tests/package-docs-check.spec.tsCOREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm exec oxfmt --check scripts/package-docs-check.mts scripts/tests/package-docs-check.spec.ts README.md docs/package-docs-report.md packages/docs/src/content/docs/en/reference/extension-matrix.md docs/package-catalog.jsongit diff --checkCOREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm checkCOREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack pnpm changeset-required:check -- --base origin/trunk --head HEADReview Notes
knownGapsentries that explicitly name each missing evidence key.pnpm installreinstall prompt in the non-interactive shell. The same relevant gates are listed above and passed before push.UltraQA
liveSmokefail the catalog check.|render as escaped table-cell content.docs:catalog:check, formatter checks, and fullpnpm checkall passed after generated docs were updated.