Skip to content

feat: filter Discover by current DSH host version - #486

Merged
fkysly merged 3 commits into
dsh-market:mainfrom
Ultroncn:feat/473-host-version-filter
Sep 3, 2026
Merged

fkysly merged 3 commits into
dsh-market:mainfrom
Ultroncn:feat/473-host-version-filter

Conversation

@Ultroncn

@Ultroncn Ultroncn commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Closes #473

Summary

  • surface each plugin's declared DSH requirement on Discover cards
  • derive requirements from engines.dsh plus lockstep @deepseek-ai/dsh* peers, excluding Cordis and schemastery
  • add an opt-in "compatible with current DSH" filter; it removes only confirmed mismatches and keeps undeclared, malformed, unavailable, and GitHub-only entries visible
  • read the current host through the existing dshHostInfo() path; an unlocatable host is reported as unknown and cannot enable a pretend filter
  • use prerelease-aware range matching for the all-prerelease DSH line, while retaining the existing conservative treatment of implicit caret/tilde upper bounds

Metadata path

This PR deliberately does not change the public catalog schema. It implements the fallback discussed in the issue:

  • ordinary browsing requests metadata only for the current 24-card page
  • explicitly enabling the host filter fills the remaining npm metadata in batches of 64
  • one process-wide semaphore caps npm fan-out at 8 even when page prefetch and full filtering overlap
  • successful public manifest facts are cached for 24 hours under the profile's existing .dsh-market state directory
  • registry failures are memory-only unknown results, with a short outage circuit breaker; they are never persisted as "undeclared" and never hide a plugin
  • only version, engines.dsh, and @deepseek-ai/* peer ranges are cached; compatibility conclusions are recomputed against the current host

That lets the peer-derived path run and expose its data quality before any inference is made part of the directory's contract.

Verification

  • npm test — 56 files, 1195 tests passed
  • npm run check — typecheck, build, client bundle rebuild, restart smoke passed
  • npm run test:compat — 11/11 passed
  • npm pack --dry-run --json — 148 files, preflight passed
  • git diff --check — passed
  • npm run test:web — authenticated browser-capture guard passed; the 29 browser cases could not launch locally because the existing dsh/pnpm 9 scaffold install failed before loading this bundle (the GitHub CI matrix remains authoritative for those cases)

Ultronen and others added 2 commits September 2, 2026 19:09
Only the generated bundle conflicted; sources merged cleanly. Rebuilt.

@fkysly fkysly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

收(CI 绿即合;合并冲突只有产物,已用合并后源码重建推回)。

对照 #473 里定的 v1 边界逐条核过,全部落对:

  • 只标注 + 可选筛选,不默认过滤——compatibleWithHost === true 才生效,且只摘 status === 'incompatible'(已声明且不满足);未声明、解析失败、元数据不可得、GitHub-only 一律可见。这是那 40% 推导盲区决定的正确保守面。
  • 数据源用了 peer 推导(排除 cordis/schemastery、includePrerelease),把覆盖从 engines.dsh 的 2% 提到 ~60%——两个坑都避开了。
  • 宿主读不到时不假装:unknown 状态下筛选不可启用,而不是空转。
  • 卡片展示的是声明区间,事实不是结论,与 #401 那边的原则一致。

网络面也克制:日常浏览只取当前页 24 条的元数据,全量补齐只在用户显式开筛选时发生,8 并发封顶 + 24h 缓存(单文件、0600、无路径拼接面)。目录 schema 一字未动——顺序对了:推导先跑通,数据质量看清,再谈固化进目录。

1195 passed(合并后)。

@fkysly
fkysly merged commit 94cf7a5 into dsh-market:main Sep 3, 2026
7 checks passed
@Ultroncn
Ultroncn deleted the feat/473-host-version-filter branch October 28, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 发现页按 DeepSeek Harness 版本筛选插件 / Filter Discover by host DSH version

2 participants