Skip to content

fix(deepseek): warn when dsh is outside its tested release - #38651

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
crew/issue-radar/fix-38323-deepseek-tested-range
Nov 17, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
crew/issue-radar/fix-38323-deepseek-tested-range

Conversation

@kyleseaman

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A deepseek chat running a dsh release outside the one Crew tested gets the same one-time "outside the tested range" notice that goose, codex, claude, pi and kiro-cli chats get.

Crew warns once per chat when a harness runs a release outside its tested range (_TESTED_VERSION_RANGES, requirement R-LAU-3). deepseek had no entry, because the table reads the handshake's agentInfo.version, and @deepseek-ai/dsh-acp 0.2.0-rc.2 hardcodes version: "0.0.1" (the live capture crew-oauth-bridge-args-live.jsonl shows the same). dsh --version prints nothing.

Why it matters

A user who installs a newer or older dsh than the lane pin runs on an adapter Crew never measured and nothing says so. Silent upgrades are what caused #25171 and #36125 on other harnesses.

Not a goal

  • No refusal or version floor for dsh: the notice is a warning, as for every other harness.
  • No notice on the shared-runtime path (the chat runtime sharing preview, off by default for deepseek). Marked as a shortcut: comment at TESTED_VERSION_READ_AT_SPAWN.
  • No change to agent_version itself: other readers still see what the handshake said.

What changed (motivation → approach → change)

Handshake version is meaningless for dsh → read the release off disk, the way claude-agent-acp's and pi's are read → feed that version, not agentInfo.version, into the existing range check.

  • acp/harness/deepseek.py: _dsh_installed_version reads version from the @deepseek-ai/dsh npm manifest beside the resolved binary (launch._node_adapter_manifest_version, the reader the Node adapters share). DeepseekLaunch.resolve_spawn records it off-loop on the session as harness_installed_version. A wrapper script or a DSH_BIN override naming another file reads "".
  • acp/client_turn_control.py: DEEPSEEK_DSH_TESTED_RANGE is 0.2.x (lane pin 0.2.0-rc.2; 0.x, so the minor line), with the launch row's install command. TESTED_VERSION_READ_AT_SPAWN names the backends whose handshake version is not read.
  • providers/acp.py: tested_version_notice reads harness_installed_version for those backends, so 0.0.1 never reaches the range check.
  • acp/client_deepseek.py: the attribute's "" default. dashboard/chat_turn/turn_spec_hooks.py: docstring names deepseek among the harnesses with a tested-range row. Docs: R-LAU-3 for deepseek goes ❌ → ✅ in harness-gap-analysis.md (counts and ranked list updated), plus one sentence in harness-parity.md.

Backwards compatibility

Compatible: one new notice row on a deepseek chat whose dsh manifest names a release outside 0.2.x; an unreadable manifest, and every other backend, behave as before.

Removes nothing: the diff adds a table entry, an attribute and a reader; no key, path or function is removed or renamed.

Tests

  • test/test_deepseek_tested_version_notice.py (new): outside 0.2.x warns with version, range and npm i -g @deepseek-ai/dsh@0.2.0-rc.2; 0.2.0-rc.2, 0.2.x and unreadable versions are silent; the range is the lane pin in test/real_adapters/package.json; the provider notice reads the spawn-read version (one row), and a handshake 0.0.1 alone never warns; the manifest reader finds @deepseek-ai/dsh/lib/bin.js's package and reads "" for a wrapper or a missing file; DeepseekLaunch.resolve_spawn records the version on the session (existing _DeepseekLaunchRig).
  • test/test_goose_tested_version_notice.py: deepseek joins the backends excluded from "no notice at 0.0.1", since it now has a range.

Proof: not provable -- other: prove.py reports INCONCLUSIVE because reverting every production hunk removes the constants the new test imports, so collection errors. Reverted by hand on this head instead: main's providers/acp.py makes 4 tests fail (the handshake 0.0.1 warns); dropping the spawn read in deepseek.py makes test_a_per_session_spawn_records_the_installed_version fail.

Run locally (Linux, Python 3.12): the new file plus the tested-range, deepseek, harness-parity, launch-golden, fixture-pin and line-cap suites, 1126 passed; every test_*ratchet*.py plus the tree-scan tests with GITHUB_BASE_REF=main FLAKE_RATCHET_BASE=<merge-base>, 4295 passed, 22 skipped; black, isort, flake8 on changed files and mypy on the four changed source modules clean; scripts/docs_lint.py clean. New tests use no clock and no sleeps.

Manual verification

N/A — unit coverage sufficient: no dsh is installed on this host. The manifest layout (bin: {dsh: 'lib/bin.js'}, name @deepseek-ai/dsh) was checked with npm view @deepseek-ai/dsh@0.2.0-rc.2 name version bin.

Related Issues

Fixes #38323

Sibling sweep

Swept: git grep -n "untested_version_issue|_TESTED_VERSION_RANGES" -- src/
Sibling: src/kiro_crew/providers/acp.py -- changed here
Sibling: src/kiro_crew/acp/harness/kas.py -- not affected -- KAS reads its kiro-cli version itself at spawn
Sibling: src/kiro_crew/agent_sdk/drivers/acp.py -- not affected -- codex-only doctor helper reading codex's own manifest

Pattern harvest

Not generalizable: deepseek is the only harness whose handshake reports a constant version; the others report their release.

dsh-acp reports agentInfo.version 0.0.1 on every release, so the tested-range
notice could not read deepseek from the handshake. The per-session spawn now reads
dsh's own npm manifest (@deepseek-ai/dsh), and the notice reads that version
against 0.2.x, the Real Adapter Contract lane pin (0.2.0-rc.2). An unreadable
manifest gets no notice.

Fixes #38323
@kyleseaman
kyleseaman requested review from a team and KiroCrewCaptain as code owners November 17, 2026 16:49
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 92ff6bbdcb45777f8f97e85fa43368b15045f391 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 92ff6bbdcb45777f8f97e85fa43368b15045f391 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the change only adds a warning, it reuses the existing manifest reader and range check, and a revert undoes it cleanly.

Notes

  • TESTED_VERSION_READ_AT_SPAWN decides at the provider which version to read. A simpler shape would have the deepseek client expose its spawn-read version as the version the range check uses. Then providers/acp.py would need no backend-membership branch, and the shared-runtime gap marked shortcut: would be handled in one place.

[DESIGN-REVIEWED] 92ff6bb

Description read

[DESCRIPTION-READ] 0170037c0e30ef48d8e71a73b40d1e0ed9f807fecf444b1c9e8a64c5b819ded6

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 92ff6bbdcb45777f8f97e85fa43368b15045f391 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: the fix feeds deepseek into the existing tested-range check, using the manifest reader the Node adapters already share. Its one generalized form has a single member.

Notes

  • Item 4 — one consumer, generalized: TESTED_VERSION_READ_AT_SPAWN: frozenset[str] = frozenset({ACP_BACKEND_DEEPSEEK}) is a set with 1 member. Its only reader is providers/acp.py:548 (grepped TESTED_VERSION_READ_AT_SPAWN in src/: 1 non-defining site). Subtraction: replace the set with a direct backend == ACP_BACKEND_DEEPSEEK test at that one site, and delete the constant.

What this change ships

Inventory (5 items) — 4 justified

Intent: a deepseek user running a dsh release Crew never tested gets the same one-time warning other harnesses already give (FIX, #38323).

  1. A deepseek chat on a dsh outside 0.2.x shows a one-time "outside the tested range" notice that names the install command — justified
  2. At spawn, the deepseek session reads dsh's release from its npm manifest, off the event loop — justified
  3. For deepseek, the notice no longer uses the handshake's constant 0.0.1 version — justified
  4. New public constant TESTED_VERSION_READ_AT_SPAWN lists the backends whose handshake version is skipped — one consumer, generalized
  5. New attribute harness_installed_version on the deepseek client and session — justified

[FIRST-PRINCIPLES-REVIEWED] 92ff6bb

Description read

[DESCRIPTION-READ] bbc5e67f5122402809e7d5b71c7e0b178c18981df87c1e3807a44b01010b2f6b

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 92ff6bbdcb45777f8f97e85fa43368b15045f391 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 92ff6bb

Verdict parsed from the review's SHA-scoped output markers for commit 92ff6bbdcb45777f8f97e85fa43368b15045f391.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 92ff6bbdcb45777f8f97e85fa43368b15045f391 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 92ff6bbdcb45777f8f97e85fa43368b15045f391 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 92ff6bb

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 92ff6bbdcb45777f8f97e85fa43368b15045f391 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@KiroCrewCaptain

KiroCrewCaptain commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates an 8% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

Adds a deepseek row to the tested-version table. dsh's handshake always reports 0.0.1, so the version is read from dsh's npm manifest at spawn (off the event loop, using the shared Node manifest reader) and fed into the existing range check. Verified: the reader follows symlinks and Windows .cmd shims; the 0.2.0-rc.2 pin parses inside 0.2.x; the install command is the deepseek launch row's; the new attribute has a default on both session types resolve_spawn writes to (per-session client and the shared runtime's probe session), so the write cannot fail; other backends and the KAS fallback are unchanged. Doc counts are consistent. New tests cover the range, the spawn-read version being used instead of the handshake, the manifest reader and the spawn recording. CI is green.

Tier: 1, every tier gate passed.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 92ff6bbdcb · 229 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 17, 2026 18:29

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved automatically by the code change approver, not by a person. The decider estimates an 8% chance that this change introduces a defect, within the 12% limit for approving on its own, and the change has at most 400 changed lines.

Adds a deepseek row to the tested-version table. dsh's handshake always reports 0.0.1, so the version is read from dsh's npm manifest at spawn (off the event loop, using the shared Node manifest reader) and fed into the existing range check. Verified: the reader follows symlinks and Windows .cmd shims; the 0.2.0-rc.2 pin parses inside 0.2.x; the install command is the deepseek launch row's; the new attribute has a default on both session types resolve_spawn writes to (per-session client and the shared runtime's probe session), so the write cannot fail; other backends and the KAS fallback are unchanged. Doc counts are consistent. New tests cover the range, the spawn-read version being used instead of the handshake, the manifest reader and the spawn recording. CI is green.

Tier: 1, every tier gate passed.
Criteria: no merge conflict, no owner block, no change request, the default branch, no security-sensitive path, no design document to agree on, the readiness status, the review lanes, the P0 history, the linked issues' tier, the review lessons, no concern label, the file count, a safe change category, not its own change, the decider, the security checklist, the change matches its title, no competing change.
Design documents ride along with the code (docs/architecture/harness-gap-analysis.md, docs/system-specs/modules/harness-parity.md): they were not reviewed as a design, and a person who changes what they decide should ask for that review.

Decider v3c (217fe607). To overrule it, request changes or dismiss this review.

@KiroCrewCaptain
KiroCrewCaptain merged commit e96acc8 into main Nov 17, 2026
99 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 17, 2026
@KiroCrewCaptain
KiroCrewCaptain deleted the crew/issue-radar/fix-38323-deepseek-tested-range branch November 17, 2026 18:30
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running labels Nov 17, 2026
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.

deepseek: no untested-release notice, because dsh-acp always reports agentInfo version 0.0.1

2 participants