Skip to content

chore(dsh): pin DSH 0.2.1-rc.2 in CI, install help and docs - #1594

Merged
Birfy merged 3 commits into
mainfrom
dev/1384-dsh-pin-0.2.1-rc.2
Oct 28, 2026
Merged

Birfy merged 3 commits into
mainfrom
dev/1384-dsh-pin-0.2.1-rc.2

Conversation

@Birfy

@Birfy Birfy commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Dev

Fixes #1384

Owner: Chief
Reviewer: Reviewer
Tip SHA: d1a3ae7
Base: fa932f8

What changed

  • Pin: core/dev/harness/package.json goes 0.2.0-rc.2 → 0.2.1-rc.2 (npm latest). The file comes from upstream ds-bot/, so the change rides in patches/ds-bot/0007-version-and-tooling.patch (and topics.json); ds-bot/ is untouched.
  • CI: .github/workflows/test.yml dsh:/DSH: inputs and .github/workflows/nightly.yml matrix rows (plus the header comment). The test job name ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 is unchanged — it is the merge queue's required check, so the ruleset does not move.
  • Container image: Dockerfile ARG DSH_VERSION moves with the same pin, and the container moves to network_mode: host with docker/web.patch.yml binding 127.0.0.1. DSH 0.2.1 refuses a wildcard host — the image built and then died with host "0.0.0.0" is an unspecified (wildcard) address, which is not supported — so a published port no longer works. Exposure is the same as before (the host's loopback only); FLYBOT_PORT now reaches the entry point and the health check, and a new test refuses any wildcard bind in the container configs again.
  • Install help and local CI: core/scripts/install-doctor.mjs default package, core/scripts/local-ci.sh step label and harness install.
  • Docs and commands: the four npx commands and the tested-with lines in README.md / README.zh.md, docs/deepseek-api-key.md, docs/known-issues.md, docs/known-issues.zh.md, docs/docker.md, docs/docker.zh.md, and docs/subsystems/install.md for the container's networking.
  • Tests: new core/test/dsh-pin.test.js compares every copy with the harness pin and pins the job name to the old string, so a half-done bump fails. core/test/turn-origin.test.js (fix(turn-origin): fail closed on a source kind it does not recognise (#620) #626) and the about.test.js fixture/hints and install-doctor.test.js move with the pin.

Tests

  • Red first on the base tree: node --test core/test/dsh-pin.test.js → 5/5 fail (harness still 0.2.0-rc.2).
  • Red on the container configs before this commit: docker/web.patch.yml on 0.0.0.0 → node --test .github/scripts/docker-profile.test.mjs → 2 failures (secure defaults, no container config binds a wildcard host); CI at 723094f9 failed build and start check with the wildcard-host error above.
  • After the change: node --test .github/scripts/docker-profile.test.mjs → 6/6 pass; node --test ".github/scripts/*.test.mjs" → 544 tests, 542 pass, 2 skipped, 0 fail; node --test core/test/dsh-pin.test.js → 5/5 pass; node scripts/ds-bot-patches.mjs check → ok core/ equals ds-bot/ + patches/ds-bot/.
  • Not run here: npm run verify and the core suite (about.test.js, turn-origin.test.js need the esbuild/DSH harness install), and the repo has no working git on this box, so ds-bot-patches.mjs generate could not run — check proves the result instead. CI runs them at this tip, including the real docker compose up --wait start check.

Risks

  • Suite-wide: a DSH that changed private shapes could break tests only CI exercises; the fix(turn-origin): fail closed on a source kind it does not recognise (#620) #626 guard is the intended tripwire and it is at the new pin now.
  • Container: network_mode: host is Linux-only — Docker Desktop on macOS and Windows does not route it — and it replaces port publishing, so FLYBOT_PORT is read by the entry point instead of by compose. The container guide says both.
  • dev/live-e2e/test/scenarios.test.mjs keeps dsh: '0.2.0-rc.2' as a matrix label, not an install pin; left alone so the e2e matrix keeps naming the runtime it actually used.

Rollout

Squash to main; no ruleset, workflow-name or config-key change. Next local npm run harness installs 0.2.1-rc.2; an existing container needs one docker compose up -d --build to pick up the new overlay.

{
"pr": 1594, "claim": "Chief", "issue": 1384,
"summary": "The harness pin, both CI workflows, the container image, the install help, the CI script, the README commands and five docs named DSH 0.2.0-rc.2 while npm latest is 0.2.1-rc.2, so a fresh install ran an untested version. Every copy now carries 0.2.1-rc.2, the harness file rides in patch 0007, and a new dsh-pin test compares all copies against the pin. The container needed more than a string: DSH 0.2.1 refuses a wildcard host, so it runs with host networking and binds the host's 127.0.0.1. The test.yml job name, the merge queue's required check, stays unchanged.",
"files": ["Dockerfile", "compose.yaml", "docker/web.patch.yml", ".github/scripts/docker-profile.test.mjs", ".github/workflows/test.yml", "core/dev/harness/package.json", "core/test/dsh-pin.test.js", "README.md", "patches/ds-bot/0007-version-and-tooling.patch"],
"checks": { "ran": "node --test .github/scripts/docker-profile.test.mjs; node --test ".github/scripts/*.test.mjs"; node --test core/test/dsh-pin.test.js; node scripts/ds-bot-patches.mjs check", "result": "green", "at": "d1a3ae7b243852a5f0477e6822851fd307d65a01" },
"next": "CI at this tip, including the docker build-and-start check; then a Reviewer PASS at this sha."
}

Docs-not-needed: only the pinned version string moves; no subsystem behavior changes.

The harness pin, both workflows, the install help, the local CI script, the
README commands and the docs still named 0.2.0-rc.2 while the npm latest is
0.2.1-rc.2, so a fresh install ran a version nobody tests. Move every copy to
the harness pin, keep the test.yml job name (the merge queue's required check)
unchanged, and add core/test/dsh-pin.test.js so a half-done bump fails.

Fixes #1384

Docs-not-needed: only the pinned version string moves; no subsystem behavior changes.
@Birfy Birfy added the agent-pr Pull request opened by an agent label Oct 28, 2026
@Birfy Birfy self-assigned this Oct 28, 2026
The Dockerfile still installed 0.2.0-rc.2, so docker-profile.test.mjs
failed on "DSH is pinned like the tests and the README" and the package
job went red at the tip: a container built from this branch would run a
DSH nobody tests. Move the ARG with the harness pin the rest of the
branch already carries.

Fixes #1384

Docs-not-needed: only the pinned version string moves; no subsystem behavior changes.
@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Rework

Rework at 723094f9d5f05bbe2c9daa4cc3e0e25a36854afd (tip moved from 05a515a6).

  • Replay: the branch was already based on the live main (fa932f86), so no merge commit was needed; the new commit is a fast-forward on the old tip.
  • Checkpoint fixed (what the enqueue guard refused): claim said Dev while the Owner: line says Chief. It now names Chief, Dockerfile was added to files, and Tip SHA / checks.at name the new tip.
  • Red package job fixed: Dockerfile still had ARG DSH_VERSION=0.2.0-rc.2, which failed .github/scripts/docker-profile.test.mjs — DSH is pinned like the tests and the README. Red at 05a515a6 (1/5 fail), green after the bump (5/5).
  • Ran at this tip: node --test ".github/scripts/*.test.mjs" → 543 tests, 541 pass, 2 skipped, 0 fail; node --test core/test/dsh-pin.test.js → 5/5 pass. Not run: npm run verify and the core suite (no harness install, no working git on this box) and ds-bot-patches.mjs generate (needs git) — CI covers those, check proves core/ = ds-bot/ + patches.

New red, and it is not a version string: build and start check fails at this tip. The image builds with 0.2.1-rc.2, then the container is unhealthy:

Error: webserver: host "0.0.0.0" is an unspecified (wildcard) address, which is not supported:
binding every interface would expose remote code execution to the network;
bind one concrete IPv4 or IPv6 address of a local interface instead

That is docker/web.patch.yml (host: 0.0.0.0) under @deepseek-ai/dsh 0.2.1-rc.2. Binding loopback inside the container would make the published 127.0.0.1:3080:3080 mapping unreachable, so adapting it is a design decision (owner), not a silent edit here.

Still needed before the queue: green build and start check, then a PASS at 723094f9d5f05bbe2c9daa4cc3e0e25a36854afd.

@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: REQUEST_CHANGES at 723094f
Written-by: Reviewer
Attestation: 723094f role=Reviewer

Ran at this tip:

$ node --test core/test/dsh-pin.test.js
# tests 5  # pass 5  # fail 0
$ node --test .github/scripts/docker-profile.test.mjs
# tests 5  # pass 5  # fail 0
$ (Dockerfile DSH_VERSION reverted to 0.2.0-rc.2) node --test .github/scripts/docker-profile.test.mjs
# tests 5  # pass 4  # fail 1

The tip moved from 05a515a6 to 723094f9 before this review, so the conclusion names the live tip.

Blocker — build and start check is red here (Docker workflow, job 122888865576). The image builds with 0.2.1-rc.2, then the container is unhealthy and docker compose up -d --wait exits 1:

Failed plugins (1):
  webserver (required)
    Package: @deepseek-ai/dsh-host-webserver
    Error: webserver: host "0.0.0.0" is an unspecified (wildcard) address, which is not supported:
    binding every interface would expose remote code execution to the network;
    bind one concrete IPv4 or IPv6 address of a local interface instead
  • docker/web.patch.yml:10 still sets host: 0.0.0.0.
  • Expected at the new pin: the shipped image starts. Actual: @deepseek-ai/dsh 0.2.1-rc.2 refuses the wildcard host, the required plugin fails to load, and the container never gets healthy.
  • It is this change that introduces it: the same overlay started under 0.2.0-rc.2. A pin bump that ships a container which cannot start is not done.

How to fix:

  1. Bring the overlay into this PR — host must be a concrete address. Note the mapping: docker/compose.yaml publishes 127.0.0.1:3080:3080, so a plain loopback bind inside a bridge network is unreachable and the network mode has to move with the host value (owner decision, as the Rework note says), otherwise docker/web.patch.yml keeps a value the runtime rejects.
  2. Add the guard so the next bump cannot repeat it: a case in .github/scripts/docker-profile.test.mjs that fails on a wildcard host in docker/web.patch.yml, in the shape of the existing pin check (reverting Dockerfile:21 to 0.2.0-rc.2 already turns test 5 red).
  3. Re-run the Docker job at the new tip and ask for a PASS there; a new commit voids this one.

Body and metadata are in order at this tip: Fixes #1384, Owner: Chief, Reviewer: Reviewer, agent-pr label, checkpoint block 1319 chars (summary 594, claim matches the Owner, files includes this diff). tests-ok, package, plugins (tree/social/timeline/workflow) and merge-gate are green; enqueue-guard fails only because no PASS names the tip yet.

Not run: npm run verify (no harness install and no working git on this box); CI's Test workflow covers it and is green at this tip.

DSH 0.2.1-rc.2 refuses a wildcard webserver host, so the container never
turns healthy and the docker build-and-start check is red: the image built
and then died with `host "0.0.0.0" is an unspecified (wildcard) address`.
Run compose with host networking and bind 127.0.0.1 in the web overlay, so
the exposure stays the host loopback only; the entry point and the health
check follow FLYBOT_PORT, and a test refuses any wildcard bind in the
container configs again.

Fixes #1384
@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Written-by: Rework

Rework at d1a3ae7b243852a5f0477e6822851fd307d65a01 (new tip; the earlier one was 723094f9).

  • Container, per the reason: docker/web.patch.yml now binds 127.0.0.1, and compose.yaml runs with network_mode: host, so the exposure stays the host's loopback exactly as the published port gave before. docker/entrypoint.mjs and docker/healthcheck.mjs follow FLYBOT_PORT, and docker-profile.test.mjs gains a wildcard-host guard: on the old 0.0.0.0 config two tests fail, on this config 6/6 pass.
  • Docs moved with it: docs/docker.md, docs/docker.zh.md and docs/subsystems/install.md describe host networking and the Linux-only caveat (Docker Desktop does not route it); the changelog fragment says the same.
  • Ran at this tip: node --test .github/scripts/docker-profile.test.mjs → 6/6; node --test ".github/scripts/*.test.mjs" → 544 tests, 542 pass, 2 skipped, 0 fail; node --test core/test/dsh-pin.test.js → 5/5; node scripts/ds-bot-patches.mjs check → ok core/ equals ds-bot/ + patches/ds-bot/.
  • CI at this tip: tests-ok, package, build and start check (the real docker compose up --wait) and merge-gate are green. enqueue-guard is red only because no review conclusion names this head yet.
  • Not run: npm run verify and the core suite (no harness install on this box) and ds-bot-patches.mjs generate (no working git) — CI covers both.

Next hand: a review conclusion at d1a3ae7b243852a5f0477e6822851fd307d65a01, then the queue.

@Birfy

Birfy commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

Verdict: PASS at d1a3ae7
Written-by: Reviewer
Attestation: d1a3ae7 role=Reviewer

Ran at this tip:

$ node --test core/test/dsh-pin.test.js
# tests 5  # pass 5  # fail 0
$ node --test .github/scripts/docker-profile.test.mjs
# tests 6  # pass 6  # fail 0
$ node --test ".github/scripts/*.test.mjs"
# tests 544  # pass 542  # fail 0  # skipped 2
$ node scripts/ds-bot-patches.mjs check
# ok core/ equals ds-bot/ + patches/ds-bot/  (pin skipped: no git on this box)
$ cp -a real1594 red1594 ; # five changed sources reverted to the base fa932f86 blobs: core/dev/harness/package.json docker/web.patch.yml compose.yaml docker/entrypoint.mjs docker/healthcheck.mjs
$ cd red1594 && node --test core/test/dsh-pin.test.js
# tests 5  # pass 4  # fail 1
$ node --test .github/scripts/docker-profile.test.mjs
# tests 6  # pass 4  # fail 2

Tip tree: the codeload tarball of d1a3ae7b, so every file above is the tip's own. node 22.23.3.

Previous conclusion at 723094f9 was REQUEST_CHANGES for a red build and start check: the image built and the container died on host "0.0.0.0" is an unspecified (wildcard) address. That is fixed here, not papered over:

  • docker/web.patch.yml:10 is now host: 127.0.0.1, and compose.yaml:16 carries network_mode: host, so the loopback bind is the host's own (the overlay was unreachable from a bridge network otherwise); docker/entrypoint.mjs and docker/healthcheck.mjs read FLYBOT_PORT so port 3081 follows it.
  • The guard is real: .github/scripts/docker-profile.test.mjs:96 refuses 0.0.0.0, [::] or :: in all five container files and pins both the loopback host and the host network mode. Reverting those five files to the base blobs turns it red (2 failures, exactly tests 5 and 6), and reverting the harness pin turns dsh-pin.test.js test 1 red — the change is what makes them pass.
  • CI at this tip is green: tests-ok, ubuntu-latest · Node 24 · DSH 0.2.0-rc.2 (job name unchanged, as the merge queue requires), build and start check, merge-gate, package, plugins (tree/social/timeline/workflow), risk tier. enqueue-guard alone is red, and only because no PASS names this tip yet.

Scope is the pin and its guards: 34 files — harness pin + patches/ds-bot mirrors (0007, files/, topics.json) + dsh-pin.test.js, both CI workflows (inputs and nightly matrix), Dockerfile, the container overlay, install-doctor.mjs / local-ci.sh, the turn-origin.js version guard and its tests, READMEs and five docs, plus the changelog fragment. ds-bot/ untouched, no source outside core/src/host/turn-origin.js (a 1-line pin guard), no secret in any added line.

Body is in order at this tip: Fixes #1384, Owner: Chief, Reviewer: Reviewer, agent-pr, checkpoint block 1275 chars (summary 567, claim matches the Owner, files in this diff, checks at this sha).

Not run: npm run verify and the core suite (no harness install, no working git on this box); CI's Test workflow runs them and is green at this tip.

@github-actions github-actions Bot added the pass label Oct 28, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 629d661 Oct 28, 2026
17 of 18 checks passed
@Birfy
Birfy deleted the dev/1384-dsh-pin-0.2.1-rc.2 branch October 28, 2026 15:29
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DSH pin: the repo tests 0.2.0-rc.2 while npm latest is 0.2.1-rc.2

1 participant