Skip to content

Peer range below 0.2.1 will drop the bundle once DSH 0.2.1 ships #3

Closed

Description

@jilian-dsh

Hi,

Thanks for the 0.2.x support in 0.3.1 — much appreciated.

One heads-up about the upper bound. In 0.3.1 the peers end with >=0.2.0-rc.1 <0.2.1, and the package has no own engines.dsh:

"@deepseek-ai/dsh-llm":   "... || >=0.2.0-rc.1 <0.2.1"
"@deepseek-ai/dsh-agent": "... || >=0.2.0-rc.1 <0.2.1"

In DSH's app-boot, unmetRequirements() decides like this: an own engines.dsh range decides alone and peers are ignored; otherwise every @deepseek-ai/dsh* peer must satisfy the runtime version, prereleases included. A bundle that fails and is not exempted for that exact name@version is pushed into skippedBundles by loadProfileDirectory() — the whole bundle silently does not load.

With the current bound, 0.2.1-rc.x still satisfies <0.2.1, so nothing is broken today. But as soon as 0.2.1 final ships, the guard would be dropped.

Suggestion: add

"engines": { "dsh": ">=0.1.2-rc.1 <0.3.0-0" }

since engines.dsh alone decides, or widen the two peers to <0.3.0-0.

Caveat: I read this from the published 0.3.1 manifest and the 0.2.1-rc.2 dsh-app-boot source; I have not run 0.3.1 against 0.2.1 final, since it is not out yet.

Thanks!


中文摘要:0.3.1 的两个 @deepseek-ai/dsh-* peer 上限停在 <0.2.1,而包本身没有 engines.dsh。DSH 宿主在没有 engines.dsh 时,会逐个检查 @deepseek-ai/dsh* peer;不满足、又未登记精确版本豁免的 bundle 会被放进 skippedBundles,整包静默不加载。0.2.1 的 rc 版仍满足 <0.2.1,所以现在没问题;但 0.2.1 正式版一发布,这个 guard 就会被跳过。建议补 "engines": { "dsh": ">=0.1.2-rc.1 <0.3.0-0" }(有 engines.dsh 时只由它决定),或把两个 peer 放宽到 <0.3.0-0。

Activity

  1. argszero commented on Oct 17, 2026

    @argszero
    Owner

    You are right, and I checked it at both ends rather than taking it on trust — the published 0.3.1 manifest does end both @deepseek-ai/dsh-* peers at <0.2.1 with no engines.dsh, and on 687f282e86 the gate is exactly as you describe: engines.dsh decides alone and peers are ignored (packages/boot/app-boot/src/plugin-compatibility.ts:55-63), otherwise every @deepseek-ai/dsh / @deepseek-ai/dsh-* peer must match (:64-72), through semver.satisfies(..., { includePrerelease: true }) (:52-54) — which is precisely why 0.2.1-rc.2 passes <0.2.1 today and 0.2.1 final will not. The failure path is loadProfileDirectory pushing into skippedBundles (src/profile.ts:749-766), so the bundle never loads.

    Take your option (b), not (a). A single engines.dsh range bypasses the peer matrix wholesale, and this package's matrix has deliberate holes: >=0.1.2-rc.1 <0.1.3, >=0.1.3-alpha.2 <0.1.4, then >=0.1.5-alpha.1 …. 0.1.4.x is excluded because agent/assistant-stream did not exist there (that is issue #1 in this repo). >=0.1.2-rc.1 <0.3.0-0 would quietly re-admit those versions, which is a worse failure than the one we are fixing: the guard would load and simply never fire. Widening only the tail of each dsh peer from <0.2.1 to <0.3.0-0 preserves every hole and fixes the fuse.

    One correction to "silently". loadProfileDirectory never prints (src/profile.ts:733 says so in as many words), but launchers call reportSkippedBundles once per start — apps/desktop-host/src/index.ts:24 and apps/cli/src/profile-boot.ts:197 — and that writes one stderr line per skipped bundle. From a terminal profile you would see it; on Desktop stderr only reaches a bounded in-memory ring, so in practice it is invisible in the GUI. Your conclusion stands for the audience that matters, it just is not literally silence.

    What you can do on 0.2.1 final before 0.3.2 exists: the profile has its own compatibility.json (PROFILE_COMPATIBILITY_FILENAME in src/profile-compatibility.ts), a flat object of exact name@version keys to lists of exact DSH versions:

    { "cordis-plugin-thinking-loop-guard@0.3.1": ["0.2.1"] }

    plugin-manager surfaces and grants the same exemption, and it is exact-version-only by construction — which is the right shape, because what the grant says is "load this build on that runtime, on my head".

    Plan on this side: 0.3.2 with the widened tail, plus a sweep of the rest of the fleet for the same fuse — this is not one package's problem, and I would rather find the others now than one release at a time. Publication is blocked at the moment by a registry outage on my side; I will say so in this thread when it lands.

    Thank you for reading the manifest instead of the symptom — the includePrerelease half especially, since it is why everything looks fine today.

  2. argszero commented on Oct 18, 2026

    @argszero
    Owner

    A correction to my own last message, and to a premise we both accepted. I ran the range through the real semver instead of reading it — and the fuse has already fired: the currently shipped dsh line cannot install the currently published plugin.

    What is actually true today

    Published @argszero/cordis-plugin-thinking-loop-guard@0.3.1, evaluated with semver@7:

    dsh version >=0.2.0-rc.1 <0.2.1 admits it?
    0.2.0-rc.2 yes
    0.2.1-alpha.1 no
    0.2.1-rc.1 no
    0.2.1-rc.2 no
    0.2.1 (final) no

    So this is not a fuse waiting for 0.2.1 final: 0.2.1-rc.1 and 0.2.1-rc.2 — the line dsh ships right now — are refused already. Your note said "0.2.1-rc.x still satisfies <0.2.1, so nothing is broken today", and I repeated it without checking; it is wrong for the same reason your suggestion (b) is wrong, which is the reason worth writing down.

    The rule we both missed

    A prerelease is admitted only when a comparator in the same group has the same major.minor.patch tuple and itself carries a prerelease tag. <0.2.1 has no prerelease, so no 0.2.1-* version can pass it — the group containing >=0.2.0-rc.1 <0.2.1 covers the 0.2.0 tuple only.

    That is why my advice last time ("widen only the tail to <0.3.0-0") also fails:

    range tail 0.2.1-rc.2 0.2.1
    >=0.2.0-rc.1 <0.2.1 (shipped) no no
    >=0.2.0-rc.1 <0.3.0-0 (my suggestion) no yes
    >=0.2.0-rc.1 <0.2.1 || >=0.2.1-rc.1 <0.3.0-0 yes yes

    A wider upper bound does not re-open a tuple; only a comparator at that tuple with a prerelease lower bound does.

    The comparator that works

    >=0.2.0-rc.1 <0.2.1 || >=0.2.1-rc.1 <0.3.0-0
    

    >=0.2.1-rc.1 sits at the 0.2.1 tuple and carries a prerelease, so it admits 0.2.1-rc.1, 0.2.1-rc.2 and the stable 0.2.1; <0.3.0-0 stops at the next minor without letting 0.3.0-0 through; 0.2.2-alpha.N is still out (no comparator at that tuple), which is deliberate — an unknown future prerelease is not something to claim.

    Crucially it keeps 0.2.1-alpha.1 out, which is the line this package excludes on measurement (it no longer ships @deepseek-ai/dsh-llm/invariant). Your suggestion (a) — a single engines.dsh range — cannot express that exclusion at all, which is why I pushed back on it; but the widening I offered instead was wrong for a different reason, and both mistakes are the same mistake: assuming the upper bound decides admission.

    Why this is not a one-line edit

    test/peer-range.spec.mjs computes the admitted set with semver and asserts it equals SUPPORTED in test/peer-lines.mjs, and PUBLISHED there is a frozen inventory that stops at 0.2.1-alpha.1. Adding the comparator without adding 0.2.1-rc.1/0.2.1-rc.2 to both lists fails that test — by design, because the package's own rule is "add a comparator for your line only after running the suite against it", with every dsh peer of that line pinned (scripts/probe-lines.mjs).

    I checked the extended lists against the repo's own equality logic: admitted becomes exactly SUPPORTED + [0.2.1-rc.1, 0.2.1-rc.2], refused stays PUBLISHED minus that, 0.2.1-alpha.1 unchanged. So the change is coherent — it is the measurement that is missing, and the npm registry is unreachable from this machine right now (registry 000 on every probe for three cycles running, GitHub fine). The comparator, the two list entries and the probe run land in one commit when it is back, and I will say so in this thread. I am not shipping a range claiming lines this suite has not been run against — that is exactly how this bug got here in the first place.

    What you can do on 0.2.1-rc.1/rc.2 meanwhile

    There are two separate gates, and they need two different answers:

    1. Install time — npm resolves peerDependencies and fails with ERESOLVE. npm install --legacy-peer-deps (or the pnpm equivalent) gets past it.
    2. Load time — dsh's app-boot evaluates engines.dsh, else every @deepseek-ai/dsh-* peer, and pushes an unsatisfied bundle into skippedBundles, where it never loads. That one is answered per profile by an exact-version exemption in <profileDir>/compatibility.json:
    { "@argszero/cordis-plugin-thinking-loop-guard@0.3.1": ["0.2.1-rc.2"] }

    Both are exact-version grants, which is the right shape for a stopgap: they say "run this build on that runtime, on my head", and they expire the moment either side moves.

    Thank you for reporting the bound in the first place — the manifest reading was right, and it is the reason this is being fixed before 0.2.1 final ships rather than after.

  3. jilian-dsh commented on Oct 18, 2026

    @jilian-dsh
    Author

    Thanks for the detailed reply — the mechanism description matches what we observe.

    One correction on the rc claim: DSH's app-boot evaluates requirements with semver { includePrerelease: true }, so 0.2.1-rc.1 / 0.2.1-rc.2 DO satisfy <0.2.1. We ran the real evaluatePluginCompatibility from the 0.2.1-rc.2 tree against your published 0.3.1 manifest: 0.2.1-rc.1 → COMPATIBLE, 0.2.1-rc.2 → COMPATIBLE, only 0.2.1 final → SKIPPED. So nothing is dropped today; the break only lands when 0.2.1 final ships.

    We agree with your range form >=0.2.0-rc.1 <0.2.1 || >=0.2.1-rc.1 <0.3.0-0, and we will NOT add engines.dsh alone — good catch on re-allowing 0.1.4.x and 0.2.1-alpha.1.

    Until 0.3.2 is out we'll use the exact-version exemption you suggested in our profile (cordis-plugin-thinking-loop-guard@0.3.1 → 0.2.1-rc.2). If you can publish 0.3.2 while npmjs is flaky, we're happy to run it against 0.2.1-rc.2 and report back here.


    中文摘要(供同帖):感谢确认机制描述。更正一点:DSH 的 app-boot 用 includePrerelease: true,0.2.1-rc.1/rc.2 实测 COMPATIBLE,只有正式版 0.2.1 会 SKIPPED。我们采纳你给的范围写法,不单独加 engines.dsh;0.3.2 出来前用精确豁免过渡;registry 故障期可代测。

  4. argszero commented on Oct 18, 2026

    @argszero
    Owner

    Thanks — this is exactly the right kind of heads-up, and it is the silent failure mode rather than a noisy one.

    Confirmed at source, on 0.2.1-rc.2 (packages/boot/app-boot/src/plugin-compatibility.ts): unmetRequirements() returns early on an own engines.dsh (:57-61) and only otherwise walks peerDependencies, keeping just @deepseek-ai/dsh / @deepseek-ai/dsh-* (:69) and comparing each range against the runtime version with includePrerelease: true (:52, :70-71); a non-empty unmet map becomes a PluginCompatibility (:94) and the bundle is dropped into skippedBundles. So your reading holds in every part: 0.2.1-rc.x satisfies <0.2.1, 0.2.1 final does not, and the guard would stop loading without saying anything.

    What we will ship as 0.3.2:

    "@deepseek-ai/dsh-agent": "… || >=0.2.0-rc.1 <0.3.0-0",
    "@deepseek-ai/dsh-llm":   "… || >=0.2.0-rc.1 <0.3.0-0"

    i.e. widen the last union segment to the whole 0.2 minor line instead of adding engines.dsh, because engines.dsh decides alone: a single blanket range there would silently widen our support claim over lines the union deliberately omits (we never ran 0.1.4, for instance, and anything past 0.2.x). The union is a record of what was actually executed, one segment per published line, so we keep it and broaden only the segment we can run — 0.2.1-rc.2 will be added to the lines the suite and the cross-line probe are run against before the range goes out.

    Two honest caveats on that plan:

    • 0.2.1 final does not exist yet, so <0.3.0-0 is a per-minor-line claim, not a per-release one. The README will say which tags were actually executed, and the range is the claim, not the evidence.
    • npm is currently unreachable from the machine that publishes this package (registry unreachable / no token), so the fix lands in the repository first; it is installable from git in the meantime. Should publishing stay blocked past 0.2.1 final, we will say so on this issue rather than leave the manifest looking fixed.

    Thanks for reading it off the published manifest and the 0.2.1-rc.2 boot source and saying plainly which half you had not run — that is the part that makes the report usable.

  5. argszero commented on Oct 18, 2026

    @argszero
    Owner

    Thanks — and you were right, I was wrong in my "the fuse has already fired" correction. I re-measured it with semver@7 on both readings instead of on one:

    version >=0.2.0-rc.1 <0.2.1 default same range, {includePrerelease:true}
    0.2.1-alpha.1 no yes
    0.2.1-rc.1 no yes
    0.2.1-rc.2 no yes
    0.2.1 (final) no no

    So 0.2.1-rc.x is admitted by the shipped 0.3.1 range under the reading app-boot actually uses (plugin-compatibility.ts:52), nothing is dropped today, and the break lands with 0.2.1 final exactly as you said. My earlier claim came from test/peer-range.spec.mjs, which deliberately computes admission without the flag — correct for "what can npm install", wrong for "what loads".

    0.3.2 is committed (f7668d2, with follow-ups through 441269f) and the range is:

    "@deepseek-ai/dsh-agent": "… || >=0.2.0-rc.1 <0.2.1 || >=0.2.1-alpha.1 <0.3.0-0",
    "@deepseek-ai/dsh-llm":   "… || >=0.2.0-rc.1 <0.2.1 || >=0.2.1-alpha.1 <0.3.0-0"

    Why the new segment instead of widening the old one to >=0.2.0-rc.1 <0.3.0-0, which is the form I sketched in my previous comment: under npm's default reading that wide form admits only 15 of the 22 lines — 0.2.1-alpha.1 finds no comparator of its own major.minor.patch tuple carrying a prerelease tag — and all 22 only with includePrerelease:true. It would have been correct for the bundle gate and an ERESOLVE for the installer. The shipped segments admit the same 22 on both readings (measured, not argued). Your point about two consumers of one range turned out to bite on my own proposal; both readings are now written down in the README.

    One thing that had to change for the range to be honest. The reason 0.2.1-alpha.1 was excluded in the first place is real: f028f25667 (2026-09-30, "remove runtime invariant plugins") deleted @deepseek-ai/dsh-invariants and every <pkg>/invariant subpath, so the suite's stream-grammar arm — which runs this plugin's synthesized finish through the real validator — had nothing to call on 0.2.1 lines. Excluding the line answered that by not testing it, which protects the suite and not the user. Instead the arm now uses the shipped module where the line still publishes it and falls back to a frozen transcription (test/grammar.mjs) where upstream deleted it, naming the regime in the test title; test/grammar.spec.mjs holds the transcription to the module on every line that still has one and reports itself skipped, with that reason, where there is none.

    Measurement (npm run test:probe-lines, every dsh peer pinned to the line, each line in its own tree):

    lines result
    15 lines, 0.1.2-rc.1 … 0.2.0-rc.2 135 tests pass
    7 lines, 0.2.1-alpha.1 … 0.2.1-rc.2 134 pass, 1 skipped (the grammar cross-check)

    npx tsc clean. One more assertion went in with the fix: test/peer-range.spec.mjs now computes the admitted set both ways and requires them to agree. The old assertion only computed it npm's way, which is how a range can be green here and still drop bundles there — the wide form fails the new one (15 vs 22).

    No engines.dsh — agreed with you, it decides alone in unmetRequirements and would re-admit lines this union never measured.

    npm publication is still blocked on my side, so please keep the exact-version exemption for now: the registry needs an automation token I do not have from this machine. If you want to test before the registry has it, the commit installs cleanly beside 0.2.1-rc.2 (verified: npm install github:argszero/cordis-plugin-thinking-loop-guard#f7668d2 next to @deepseek-ai/dsh-agent@0.2.1-rc.2 resolves to 0.3.2 with no ERESOLVE). I will report back here as soon as 0.3.2 is on npm — a run against 0.2.1-rc.2 from your side would be worth having either way.

    Note that pushing the commit closed this issue through its Closes #3 trailer; that was the fix landing, not the release shipping. Say the word if you would rather it stay open until the npm package is out.

  6. jilian-dsh commented on Nov 6, 2026

    @jilian-dsh
    Author

    Two updates from this side (DSH 0.2.2-rc.1, plugin still 0.3.1):

    1. 0.3.1 is no longer in the assemblies here. Upgrading the host to 0.2.2-rc.1 dropped it: dsh.profile.bundles no longer lists @argszero/cordis-plugin-thinking-loop-guard, though it is still in dependencies. That matches your range — 0.3.1's peer stops at <0.2.1, and 0.2.2-rc.1 is outside it.

    2. npm still shows latest = 0.3.1, so 0.3.2 is not published yet. Keeping the exact-version exemption as asked.

    On reopening: yes please reopen. The commit closed it via "Closes #3", but from a user's side "closed" reads as "fixed and shipped", and 0.3.2 is not on npm yet. Reopen until the package is published.

    One question so I can test it: what is the intended path for 0.3.2 — should I wait for the npm publish, or install straight from the committed tree (npm install github:argszero/cordis-plugin-thinking-loop-guard#f7668d2 as you suggested last time)? If the latter works against 0.2.2-rc.1, I can run it and report back before the registry has it.

  7. jilian-dsh commented on Nov 11, 2026

    @jilian-dsh
    Author

    Quick follow-up to close this out from our side.

    We installed 0.3.3 straight from the repo (pinned to commit 0836b23c, since npm still shows 0.3.1) on DSH 0.2.2-rc.1 and it works:

    • the added >=0.2.1-alpha.1 <0.3.0-0 segment does cover 0.2.2-rc.1, so the bundle is no longer dropped
    • mount audit on the desktop profile: MOUNT CONSISTENT, dependency closure OK, no duplicate loader entries
    • restart produced no crash log

    One thing worth flagging: npm latest is still 0.3.1 (published 2026-10-14), and 0.3.1's peer range still stops at <0.2.1. So anyone on 0.2.2 installing from the registry still can't get a working version — only a git install reaches 0.3.3. If 0.3.3 is ready, a publish would close that gap.

    Not tested on our side: the actual loop-detection behaviour. We only verified install / mount / restart, not that it intercepts a real reasoning loop.

  8. jilian-dsh commented on Nov 11, 2026

    @jilian-dsh
    Author

    One more data point, filling in the gap I flagged last time.

    We said we had only verified install / mount / restart, not that it intercepts a real loop. It does — observed on DSH 0.2.2-rc.1.

    Context: a workspace-write session (standard mode) where the agent was iterating on a Windows sandbox-ACL diagnostic and kept restating the same plan without acting.

    The session log contains a user/message event whose source is:

    { kind: "plugin:thinking-loop-guard", plugin: "thinking-loop-guard", form: "notice", summary: "thinking-loop-guard" }
    

    carrying: "You are repeating the same reasoning without acting (a self-repeating reasoning loop). Stop deliberating and either call a tool or produce a concise answer now."

    The assistant stopped deliberating and produced its report in the next step.

    So the guard intercepts a real reasoning loop on 0.2.2-rc.1, not just mounts cleanly. Retracting the "not tested" caveat for the interrupt path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions