fix(extensions,viewer): one repair predicate, so the header count matches the actionable rows - #3026
Conversation
…K repair revalidateAgainstSdk() only routed a 'skipped' test run into needsRepair when compatibility.status was 'outdated'. An extension with a too-loose engine range (status 'permissive') that has no declared tests, or whose bundle bytes aren't resolvable, also comes back 'skipped' -- but was silently dropped from the repair queue even though nothing confirmed it still works across the SDK bump.
`revalidateAgainstSdk` and the viewer's `RepairQueuePanel` each carried
their own copy of "does this row need repair". Widening only the first
to cover permissive, self-unverifiable extensions broke the invariant
the panel's own comment promised: the header ("N need fixing") counted
rows whose Repair button the panel still refused to render, because its
copy also required `compatibility.status === 'outdated'`.
Export `needsSdkRepair` from the extensions host and have both sides
call it, so the queue count and the actionable rows cannot come apart
again. Add a rendering test for the panel pinning header count ==
number of rows offering a Repair button; there was no test file for it
before.
|
Warning Review limit reached
Next review available in: 55 minutes Limit details: You’ve used all 2 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
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 |
Viewer benchmark⚠ 1 metric(s) exceeded the regression threshold (advisory only, not blocking). 01_Snowdon_Towers_Sample_Structural(1).ifcBaseline recorded 2026-07-01T20:31:05.538Z on github-actions ubuntu-latest, viewer-benchmark-ci (headless Chrome, SwiftShader ANGLE), production build.
AC20-FZK-Haus.ifcBaseline recorded 2026-07-01T20:30:59.972Z on github-actions ubuntu-latest, viewer-benchmark-ci (headless Chrome, SwiftShader ANGLE), production build.
Refresh the baseline from a CI run: dispatch the Benchmark workflow with |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Widens the SDK-revalidation repair filter to include permissive/skipped extensions, and removes the duplicated predicate that made the widening inconsistent.
RED for the branch's own change:
expected length 1, received 0atsdk-revalidate.test.ts:155.The duplication was the real defect
needsRepairexisted in two places. The branch updated one:packages/extensions/src/host/sdk-revalidate.ts:125→outcome === 'fail' || outcome === 'skipped'apps/viewer/.../RepairQueuePanel.tsx:201→ stilloutcome === 'fail' || (outcome === 'skipped' && compatibility.status === 'outdated')The surviving copy's own doc comment promised: "Mirrors the
needsRepairfilter inrevalidateAgainstSdkexactly … so the header count and the actionable rows never disagree." After the widening, the header counted an extension whose row rendered no Repair button — the exact invariant the comment guarantees, broken, with nothing covering it (there was noRepairQueuePaneltest file at all).RED with the pre-fix local predicate in place:
Header counted 3; only 2 rows rendered a button. The permissive skipped row was the missing one.
Fixed at the root, not by adding a third correct copy:
needsSdkRepair(item)is exported fromsdk-revalidate.ts(next to the summary type it defines the bucket for), re-exported viahost/index.ts.revalidateAgainstSdkdoesitems.filter(needsSdkRepair); the panel imports it and its local copy is deleted.The invariant is now tested
New
RepairQueuePanel.test.tsx— happy-dom + ReactcreateRoot/act, a realExtensionHostServicesubclass with onlyrevalidateForSdkstubbed. Fixture covers pass/compatible, fail/outdated, skipped/outdated, and skipped/permissive.It asserts header count == Repair-button count, plus an anchor
headerCount === 3— so a mutation of the shared rule cannot move both sides in step and pass. Second case: empty queue → 0 and 0.Mutants, each with the package rebuilt (the viewer imports
dist): viewer reverted to its own copy → killed;needsSdkRepair→failonly → killed on the anchor; →return true→ killed on both tests.packages/extensions777 pass / 59 files. Full viewer suite 5411 tests, 5405 pass, 0 fail.tsc --noEmitclean for both packages.check:api-surfacefailed on the new public export and was regenerated withapi-surface:update— snapshot updated, nothing relaxed. Changeset raisedpatch→minor, since this adds a public export.🤖 Generated with Claude Code