Repository navigation
test(skills): cover the market preview race and aggregator wiring - #346
Merged
Merged
Conversation
Follow-up to the vastsa#290 review. Auditing current main first: most findings were already landed by the integration that followed the merge (English-first builtin catalog, id sanitization, the shared public-network module consumed by the skill catalog, the 128KiB gate in both preview and install, source badges incl. default sources, panel/tests contracts, and the previously glued paragraph in the E2E plan are all verified present). What remained untested or undocumented ships here: - The preview race gate gets its panel regression: opening a preview must take a LatestWinsGate token, a resolving fetch may only apply while its token is current, and closing the sheet must invalidate whatever is still in flight, with the document state reset on every open. - The main-process aggregator gets its wiring contract: the module must build the public-network client over Electron's net.fetch and hand client.request to the aggregator, with no direct http/https module use. - The IPC spec now defines what the market's egress policy actually is (syntactic URL guard, DNS classification, per-hop redirect revalidation, bounded responses; the renderer never reaches the network directly) in both locales, and a duplicated line in the settings IA spec is dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the #290 review, on top of current
main(0c08f81b).Audit first: what the integration already landed
Before writing anything I re-verified every finding against current main, and most of the review is already satisfied by what followed the merge:
test:e2e:layoutremnantskill-market-panel.test.mjssanitizeSkillCatalogIdin shared, used at scan time, host-legal slugs testedtooLarge; install refuses beforeskills.create;MAX_SKILL_DOCUMENT_BYTESmirrors host-corepackages/shared/public-network.tsexists andskill-catalog.tsimportsisSafePublicHttpsSourceUrlfrom itsourceNameincludes default sources; the inaccurate retry comment and the MCPis-*leftovers are goneWhat this PR adds (the genuinely missing pieces)
skill-market-panel.test.mjs): the gate lifecycle is now pinned —LatestWinsGatetoken on open,isCurrent(token)before applying a fetched document,invalidate()when the sheet closes, and document state reset on every open. This is the A→B / close-reopen regression the review asked for.skill-market-scan.test.mjs): the main-process catalog module must buildcreatePublicHttpsClientover Electronnet.fetchand passclient.requestintocreateSkillMarketAggregator, with no directnode:http(s)use. Together with the existingpublic-https-fetch.test.mjs(DNS classification, per-hop redirect revalidation, policy failures never retried) this is the main-process coverage the review asked for, in the same deterministic + source-contract shape that the MCP market suite uses.Verification
pnpm build:js, desktop typecheck, style-token lint,pnpm -r test(desktop 1611/1611), architecture budgets,check-locales(77 pairs).node --test apps/desktop/test/skill-market-panel.test.mjs apps/desktop/test/skill-market-scan.test.mjs→ 12/12.Still open from the non-blocking list, deliberately not in this PR:
SkillMarketPanel.tsxis 673 lines (guidance ~500) — splitting it deserves its own review; happy to take it next if you want it.pnpm test:e2e:skill-marketremains the deterministic headless suite; no live-network journey exists for this surface.