Replies: 4 comments
|
Implementation-status update for this RFC (everything below is runnable and CI-green):
All links and evidence are in the body. Happy to adjust naming/shape based on maintainer feedback ? the cheapest moment to change is now. |
|
cc @imccyu @tianyicui ? this RFC is explicitly seeking maintainer feedback, so flagging it directly. Summary of what exists today (all runnable, all CI-green):
{ "ok": true, "checks": [
{ "name": "manifest", "status": "PASS", "detail": "dshmarket@1.3.0 bundle manifest ok" },
{ "name": "patch", "status": "PASS", "detail": "1 plugin row(s): dsh-market" },
{ "name": "entry", "status": "WARN", "detail": "entry lib/index.js not built yet ?" },
{ "name": "files", "status": "PASS" },
{ "name": "pre-execute-side-effects", "status": "PASS" } ] }
Five cherry-pick-ready patches are staged on the fork (see upstream-patches.md): #1697, #1842, #1856, #1861, #1869. The cheapest moment to adjust naming/shape is now ? any maintainer feedback is welcome. |
|
Comprehensive RFC — all three pieces are the right call, and the reference implementations are genuinely CI-green on the current train. Three contributions from our side: 1. Pin the envelope as the 2. Add session-integrity depth to the 3. Reuse the fixture corpus. Our regression suite (54 tests: 20 built-in + 5 catalog checks, synthetic good/bad fixtures — including the #1724 patch-lint and #1697 host-shadowing cases) is a ready-made verification bed for whichever checks land. Offer it as the test corpus for Also: registry v2's |
|
One deeper layer worth adding to the RFC — not a competing proposal, but the ground underneath #2 and #3 that isn't specced anywhere yet: the lifecycle of the checks themselves. The RFC standardizes the tools (registry contract, publish gate, doctor command). What it doesn't cover is how a check is born, proven correct, distributed, and kept honest over time. That's a real gap, because checks rot: every check encodes assumptions about harness internals (event-type tables, seq semantics, patch grammar, file layout), and every dsh release can silently invalidate them. Two data points from our side: our E6 check exists precisely because of this (it re-verifies at runtime that the contracts S6/S7/S10 rely on still exist in the installed Four properties would close this: 1. Checks are data, not code. Each check = a read-only probe definition + its target contract anchor + a good/bad fixture pair + the release train it was certified on. Distributed through a check registry (not a plugin registry) with TTL cache + offline fallback — our Layer-A catalog already does this live (5 catalog checks, shipped without any release). 2. Introspection instead of hardcoding. Read the installed harness's contracts (event-type table, module symbols, patch grammar) to derive or validate expectations, rather than baking them in. Upgrade → either the anchor passes (check still valid) or the tripwire fails loudly (no silent rot). Our S8 (parses the installed 3. Certification gate. A check enters the ecosystem only if its fixture pair proves "good doesn't false-positive, bad gets caught" on the declared train. That's an upgrade of the doctor-contract-check idea: from certifying output shape to certifying check correctness. Our 54-test corpus (incl. the #1724 patch-lint and #1697 shadowing fixtures) is a ready-made harness for this. 4. Evolution loop. Community report → candidate check → fixture certification → catalog distribution → auto-update. The diagnostic layer itself "evolves on the fly" — the paper's theme, applied to the diagnostics. If the RFC keeps the check inventory as a plain list, each of these stays unsolved and every future check re-invents them. If it adopts "checks as data + fixture certification + anchor introspection" as the foundation, #2 and #3 become instances of one mechanism. Happy to contribute the Layer-A catalog, the fixture corpus, and the E6/S8 introspection machinery as the reference implementation for this layer. |
Uh oh!
There was an error while loading. Please reload this page.
RFC: Community plugin registry contract + first-class plugin checks
Summary
Three small, upstream-able pieces that make the plugin ecosystem safer to
use and easier to build on:
plugin catalogs, so a single entry drives web storefronts, CLI sync tools,
and in-harness agent tools identically.
dsh plugin check <dir|tarball>— a pre-publish gate with stable exitcodes (0 pass / 1 fixable / 2 not a plugin).
dsh doctor [--profile P]— runtime diagnostics for a broken profile,with machine-readable JSON output.
All three have running, CI-green reference implementations and are verified
against the current release train (0.1.0-rc.6).
Problem
entry is described (dsh-market, dsh-subscribe, DSH-Plugins-Marketplace,
PR-based registries). Interop is impossible without a shared contract.
ranges) reach users because authors have no standard pre-publish gate.
collect diagnostics.
Proposal
1. Community Plugin Registry Contract v2
registry.jsonv2 (schema in dsh-docs):idunique and stable (owner-suffix disambiguation for duplicate names)install.specis the authoritative pnpm spec (github:owner/repo[#path:/sub]or npm name) — never guessed fromhomepageverified: trueis a narrow claim (curator exercised CI + release + install + runtime smoke), never a security auditversionsourcepreserves provenance for mirrored entriescount === plugins.lengthas a cheap structural invariantValidation exists today:
scripts/check-registry.mjsindsh-subscribe.
2.
dsh plugin checkExit codes:
0pass,1fixable issues,2not a plugin. Checks that existin reference implementations today:
cordis.patch.ymlexists and inserts the declared idmainapply()/ctx.tools.register3.
dsh doctor0healthy /1warnings /2broken--jsonoutput with check groups (env / profile / session)allowBuildshintsReference: dsh-plugin-doctor.
Reference implementations & evidence
dsh plugin checkequivalentdsh doctorequivalent--profile --env --portVerification runs (all executed, not claimed):
Maintenance commitment
If upstream adopts any piece, zoahdev commits to: keeping the reference
implementations aligned with each release train, running compatibility
reports after every official release, and handing over clean patches the
moment the PR channel opens.
Adoption path
maintainers prefer discussion-first contributions.
zoahdev/dsh-docs.
Related: #1629 (plugin scaffolding RFC), #1719 (doctor spec), #1814
(adoption proposal), #1828 (dsh-subscribe showcase).
中文摘要
向官方提三件可采纳的小事:插件注册表契约 v2(一个 JSON schema 同时
驱动网页商店、CLI 同步和 agent 工具)、
dsh plugin check(发布前检查,退出码 0/1/2)、
dsh doctor(运行时诊断,JSON 输出)。三个都有可运行、CI 全绿的参考实现,并在 0.1.0-rc.6 上真机验证过。若官方采纳,zoahdev
承诺跟随每个 release train 维护、发版后出兼容性报告、PR 通道一开即交
干净补丁。欢迎官方与社区反馈。
All reactions