From df19f4d9202dae9a093f3c261935ac01b87776bc Mon Sep 17 00:00:00 2001 From: Sergio Alexander Florez Galeano Date: Tue, 17 Nov 2026 06:36:03 -0500 Subject: [PATCH 1/3] fix(images): pin node-24 to Node 24.22.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 24.21.0 was older than the 24.22.x security line, so a `dck init` downgraded repositories that had pinned 24.22.1 or 24.22.3. BASE_NODE moves to node:24.22.3-trixie-slim (index digest af02d57b…, read from Docker Hub; its config sets NODE_VERSION=24.22.3). NODE_VERSION and the agents layer's tarball checksums move to 24.22.3 as well, from nodejs.org SHASUMS256.txt, re-hashed from the downloaded tarballs. A test keeps the base image and the agents layer on the same release, and the release at or above 24.22.3. Co-Authored-By: Claude Opus 5.5 --- docker/local/app/dck/versions.env | 13 ++++++++----- docs/images.md | 4 ++-- images/node-24/Dockerfile | 2 +- images/versions.env | 13 ++++++++----- tests/scopes/images.sh | 11 +++++++++++ 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/docker/local/app/dck/versions.env b/docker/local/app/dck/versions.env index 52cd58d..99e5825 100644 --- a/docker/local/app/dck/versions.env +++ b/docker/local/app/dck/versions.env @@ -11,7 +11,10 @@ # # Checksum provenance (recorded 2026-10-09): # gh, herdr — GitHub release asset digests published by the vendor -# node — nodejs.org SHASUMS256.txt for the release +# node — nodejs.org SHASUMS256.txt for the release (24.22.3, a security +# release; tarballs re-hashed against it, and the node:24.22.3-trixie-slim +# index digest read from Docker Hub with NODE_VERSION=24.22.3 in its +# config; recorded 2026-11-17) # nvim — computed at pin time from the release tarballs (Neovim # publishes no checksum file for v0.12.5) # deepworkplan-vim — the v1.1.0 release SHA256SUMS / install.sh.sha256 and its @@ -21,7 +24,7 @@ # Base images BASE_PYTHON=python:3.13.16-slim-trixie@sha256:bf44cdfcb76cd3b41e879bc058fc37ec5872002ccfde7fcb765e218cde0cd79c -BASE_NODE=node:24.21.0-trixie-slim@sha256:173f125896c3b47ddf056734c7ea789d04595a6a08769a8f78e0df642781fb66 +BASE_NODE=node:24.22.3-trixie-slim@sha256:af02d57b57719b9657a45199a79264a9437940cd55b3c7b3fc99615654f124a0 BASE_DEBIAN=debian:trixie-20261005-slim@sha256:a29215f6a35e51e22adffa17f89e9d2ef06214e64a2bad10d765c46aea49f11f UV_IMAGE=ghcr.io/astral-sh/uv:0.12.24@sha256:3af4716e991d6956a41e573eab705d0ee08500cd829ed30293eb8472f372c65a @@ -52,9 +55,9 @@ DWP_VIM_COMMIT=20dcf806078d013e285cb97b044d8f329fe61d3b DWP_VIM_INSTALLER_SHA256=a3303af1c9f4e64eb69aac4c9fb269c791cab41568fc74a40d8aa365c058228c # Node.js for the agents layer on flavours without Node (python-3.13, debian) -NODE_VERSION=24.21.0 -NODE_SHA256_AMD64=fd8e59d5a511510f6a298afb548f18c7d2b1be404d8b4a27d94fbe49f56cb2d6 -NODE_SHA256_ARM64=6ad1325edbdb5649c379b75a237147a666c95d4f9ae8d340fef2d1575d289ad2 +NODE_VERSION=24.22.3 +NODE_SHA256_AMD64=4f2b175a6d53a5c617a80dba2676238a0688cef28c6da4eba35c7d844e66fcfb +NODE_SHA256_ARM64=6e51a2ada00f0011cc266f65d98922b403d7ad88f809ca2aa615a5fe1ce6e86c # coding-agents-kit tag installed by the agents layer (opt-in, never in the base) AGENTKIT_TAG=v1.5.0 diff --git a/docs/images.md b/docs/images.md index 336ec75..cbe0afc 100644 --- a/docs/images.md +++ b/docs/images.md @@ -13,7 +13,7 @@ identical otherwise. | Flavour | FROM (pinned tag + digest) | Project runtime | Extra | | --- | --- | --- | --- | | `python-3.13` | `python:3.13.16-slim-trixie` | Python 3.13 + `uv` 0.12.24 | Debian's `nodejs`/`npm` for the editor's plugins only (the agents layer adds the pinned Node) | -| `node-24` | `node:24.21.0-trixie-slim` | Node 24 + corepack (pnpm) | `python3` + `python3-venv` from apt (the tooling needs the stdlib; venv is for the editor's plugins) | +| `node-24` | `node:24.22.3-trixie-slim` | Node 24 + corepack (pnpm) | `python3` + `python3-venv` from apt (the tooling needs the stdlib; venv is for the editor's plugins) | | `debian` | `debian:trixie-20261005-slim` | none | `python3`, `python3-venv`, Debian's `nodejs`/`npm` from apt (the agents layer adds the pinned Node) | ## Every flavour contains @@ -107,7 +107,7 @@ One file pins every input: base images (and the `uv` image) by tag **and** diges each tool by version **and** SHA-256 per architecture (amd64, arm64), deepworkplan-vim by tag, commit **and** installer SHA-256, and the opt-in layers' inputs — coding-agents-kit **v1.1.0** (`AGENTKIT_TAG`, tarball `AGENTKIT_SHA256`), -Node **24.21.0** for the agents layer, the Dailybot CLI **3.27.0** wheel and uv +Node **24.22.3** for the agents layer, the Dailybot CLI **3.27.0** wheel and uv **0.12.24** for the dailybot layer. `images/common/install.sh` and `images/common/editor.sh` download through a `fetch()` that refuses a checksum mismatch; nothing is piped into a shell. diff --git a/images/node-24/Dockerfile b/images/node-24/Dockerfile index e822bf2..0e17649 100644 --- a/images/node-24/Dockerfile +++ b/images/node-24/Dockerfile @@ -6,7 +6,7 @@ # docker build -f images/node-24/Dockerfile -t dck-base:node-24 . # Pins live in images/versions.env (the FROM defaults below must match it). -ARG BASE_NODE=node:24.21.0-trixie-slim@sha256:173f125896c3b47ddf056734c7ea789d04595a6a08769a8f78e0df642781fb66 +ARG BASE_NODE=node:24.22.3-trixie-slim@sha256:af02d57b57719b9657a45199a79264a9437940cd55b3c7b3fc99615654f124a0 FROM ${BASE_NODE} ARG DCK_VERSION=0.0.0-dev LABEL org.opencontainers.image.source="https://github.com/DailybotHQ/devcontainer-kit" \ diff --git a/images/versions.env b/images/versions.env index 52cd58d..99e5825 100644 --- a/images/versions.env +++ b/images/versions.env @@ -11,7 +11,10 @@ # # Checksum provenance (recorded 2026-10-09): # gh, herdr — GitHub release asset digests published by the vendor -# node — nodejs.org SHASUMS256.txt for the release +# node — nodejs.org SHASUMS256.txt for the release (24.22.3, a security +# release; tarballs re-hashed against it, and the node:24.22.3-trixie-slim +# index digest read from Docker Hub with NODE_VERSION=24.22.3 in its +# config; recorded 2026-11-17) # nvim — computed at pin time from the release tarballs (Neovim # publishes no checksum file for v0.12.5) # deepworkplan-vim — the v1.1.0 release SHA256SUMS / install.sh.sha256 and its @@ -21,7 +24,7 @@ # Base images BASE_PYTHON=python:3.13.16-slim-trixie@sha256:bf44cdfcb76cd3b41e879bc058fc37ec5872002ccfde7fcb765e218cde0cd79c -BASE_NODE=node:24.21.0-trixie-slim@sha256:173f125896c3b47ddf056734c7ea789d04595a6a08769a8f78e0df642781fb66 +BASE_NODE=node:24.22.3-trixie-slim@sha256:af02d57b57719b9657a45199a79264a9437940cd55b3c7b3fc99615654f124a0 BASE_DEBIAN=debian:trixie-20261005-slim@sha256:a29215f6a35e51e22adffa17f89e9d2ef06214e64a2bad10d765c46aea49f11f UV_IMAGE=ghcr.io/astral-sh/uv:0.12.24@sha256:3af4716e991d6956a41e573eab705d0ee08500cd829ed30293eb8472f372c65a @@ -52,9 +55,9 @@ DWP_VIM_COMMIT=20dcf806078d013e285cb97b044d8f329fe61d3b DWP_VIM_INSTALLER_SHA256=a3303af1c9f4e64eb69aac4c9fb269c791cab41568fc74a40d8aa365c058228c # Node.js for the agents layer on flavours without Node (python-3.13, debian) -NODE_VERSION=24.21.0 -NODE_SHA256_AMD64=fd8e59d5a511510f6a298afb548f18c7d2b1be404d8b4a27d94fbe49f56cb2d6 -NODE_SHA256_ARM64=6ad1325edbdb5649c379b75a237147a666c95d4f9ae8d340fef2d1575d289ad2 +NODE_VERSION=24.22.3 +NODE_SHA256_AMD64=4f2b175a6d53a5c617a80dba2676238a0688cef28c6da4eba35c7d844e66fcfb +NODE_SHA256_ARM64=6e51a2ada00f0011cc266f65d98922b403d7ad88f809ca2aa615a5fe1ce6e86c # coding-agents-kit tag installed by the agents layer (opt-in, never in the base) AGENTKIT_TAG=v1.5.0 diff --git a/tests/scopes/images.sh b/tests/scopes/images.sh index d5413e3..33db023 100644 --- a/tests/scopes/images.sh +++ b/tests/scopes/images.sh @@ -32,6 +32,17 @@ test_base_images_pinned_by_digest() { assert_no_match "$(grep -h '^FROM' "$IMG"/*/Dockerfile)" '^FROM [^$]' "every FROM goes through a pinned ARG" } +test_node_24_pin_is_current() { + local base tag + base="$(pin BASE_NODE)" + tag="${base#node:}"; tag="${tag%%-*}" + assert_eq "$tag" "$(pin NODE_VERSION)" "the node-24 base image and the agents layer's Node are the same release" + assert_match "$tag" '^24\.' "the node-24 flavour stays on Node 24" + # 24.22.3 is the 2026-11-10 security release; a re-render must never pin older. + run_cmd python3 -I -c 'import sys; v=tuple(map(int, sys.argv[1].split("."))); sys.exit(0 if v >= (24, 22, 3) else 1)' "$tag" + assert_rc 0 "Node is at least 24.22.3 (no downgrade of repositories on the patched line)" +} + test_tools_pinned_with_checksums() { local t for t in GH HERDR NVIM NODE; do From 7d6681ca7fa6d9b5b3969435e75bfe340b05353d Mon Sep 17 00:00:00 2001 From: Sergio Alexander Florez Galeano Date: Tue, 17 Nov 2026 06:36:47 -0500 Subject: [PATCH 2/3] feat(entrypoint): keep herdr-peers' state on the state volume ~/.local/state/herdr-peers (the delegation log, lead records, replies, autopilot state) lived in the container's layer, so every rebuild lost asks and a plan's lead records. dck_start now keeps it on the state volume through the new dck_persist_private_dir. The volume copy is 0700 and the files keep their modes. A non-empty directory already in the container moves onto an empty volume; when the volume already has data, the container's copy is moved beside it as .container-, never deleted or shadowed. The dev-setup-hook workaround (dck_persist state ... dir) uses the same volume copy, so it becomes a harmless no-op and can be dropped. Tests: entrypoint (recreate keeps a lead record and the log with modes, migration, both sides kept, the workaround's link) and docker (a real rebuild keeps a lead record and the log, 0700/0600). Co-Authored-By: Claude Opus 5.5 --- docker/local/app/dck/entrypoint.sh | 44 +++++++++++++++++++++++ docs/entrypoint.md | 15 +++++++- docs/herdr.md | 7 ++++ lib/entrypoint.sh | 44 +++++++++++++++++++++++ tests/scopes/docker.sh | 8 +++++ tests/scopes/entrypoint.sh | 56 ++++++++++++++++++++++++++++++ 6 files changed, 173 insertions(+), 1 deletion(-) diff --git a/docker/local/app/dck/entrypoint.sh b/docker/local/app/dck/entrypoint.sh index 4e4739d..7f41fb2 100644 --- a/docker/local/app/dck/entrypoint.sh +++ b/docker/local/app/dck/entrypoint.sh @@ -12,6 +12,8 @@ # # dck_persist [dir|file] named-volume symlink: seed on first # run, preserve on rebuild +# dck_persist_private_dir dck_persist for a private dir: 0700 on the +# volume, the container's copy never lost # dck_env_profile the container's environment for ssh # sessions (0600, O_EXCL, never logged) # dck_sshd host keys generated at runtime into a @@ -163,6 +165,45 @@ dck_persist() { _dck_chown -h "$DCK_USER:$(_dck_group)" "$target" } +# -------------------------------------------------------------------------- +# dck_persist_private_dir +# -------------------------------------------------------------------------- +# dck_persist for a private directory (herdr-peers' state). It differs in two ways: +# * the volume copy is 0700; the files inside keep their own modes (cp -a seeds, +# nothing is chmod-ed below the directory); +# * nothing the container holds is lost: a real, non-empty directory at the target +# moves into the volume when the volume copy is empty (dck_persist's seed). If +# the volume copy already has data, the target moves beside it as +# .container- (0700), not deleted and not shadowed. + +dck_persist_private_dir() { + _dck_env + local name="${1:-}" target="${2:-}" store stamp + case "$name" in + ''|*[!a-z0-9_-]*) dck_log "persist: invalid volume name '$name'"; return 1 ;; + esac + case "$target" in + "$DCK_HOME"/?*) ;; + *) dck_log "persist: refusing '$target' (must be under $DCK_HOME)"; return 1 ;; + esac + store="$DCK_PERSIST_ROOT/$name/$(_dck_persist_key "${target#"$DCK_HOME"/}")" + _dck_as_user mkdir -p "$(dirname "$target")" 2>/dev/null || mkdir -p "$(dirname "$target")" + if [ -d "$target" ] && [ ! -L "$target" ] && [ -n "$(ls -A "$target" 2>/dev/null)" ] \ + && [ -d "$store" ] && [ ! -L "$store" ] && [ -n "$(ls -A "$store" 2>/dev/null)" ]; then + stamp="$(date -u +%Y%m%dT%H%M%SZ)" + if mv "$target" "$store.container-$stamp"; then + chmod 0700 "$store.container-$stamp" 2>/dev/null || true + _dck_chown -R "$DCK_USER:$(_dck_group)" "$store.container-$stamp" + dck_log "persist: the container's copy moved to $name/${store##*/}.container-$stamp (the volume copy is kept)" + else + dck_log "persist: could not move the container's copy of ${store##*/} aside; left in place" + return 1 + fi + fi + dck_persist "$name" "$target" dir || return 1 + [ -L "$store" ] || chmod 0700 "$store" 2>/dev/null || true +} + # -------------------------------------------------------------------------- # dck_env_profile # -------------------------------------------------------------------------- @@ -1451,6 +1492,9 @@ dck_start() { # other state (agent detection) next to the link. _dck_as_user mkdir -p "$DCK_HOME/.local/state/herdr" 2>/dev/null || true dck_persist state "$DCK_HOME/.local/state/herdr/client" dir || true + # herdr-peers' own state (the delegation log, lead records, replies, autopilot + # state): private, so the volume copy is kept 0700. + dck_persist_private_dir state "$DCK_HOME/.local/state/herdr-peers" || true dck_persist state "$DCK_HOME/.bash_history" file || true dck_container_only || true dck_layer_persist || true diff --git a/docs/entrypoint.md b/docs/entrypoint.md index 66ca113..708e71c 100644 --- a/docs/entrypoint.md +++ b/docs/entrypoint.md @@ -52,6 +52,18 @@ the target's path relative to the home, without the leading dot, `/` → `_` - Refused: targets outside the home, the home itself, non-normalised paths (`..`), targets inside the volume root, invalid volume names. + +### `dck_persist_private_dir ` + +`dck_persist` for a private directory; `dck_start` uses it for herdr-peers' state +(`~/.local/state/herdr-peers` → `/local_state_herdr-peers`: the delegation log, +lead records, replies and autopilot state). The volume copy is 0700, and the files +inside keep their own modes. Nothing the container holds is lost. A real, non-empty +directory at the target is moved onto the volume when the volume copy is empty. When +the volume copy already has data, the volume copy wins and the container's directory +is moved beside it as `.container-` (0700, logged), so it is neither +deleted nor shadowed. A target already linked to the volume copy, as the +`dev-setup-hook.sh` workaround below links it, is left alone. ### `dck_env_profile` sshd starts every session with a clean environment, so nothing compose passed @@ -246,7 +258,8 @@ A malformed id is refused; a value already set in the environment wins. The standard sequence: 1. persist `~/.ssh`, `~/.config/gh`, `~/.config/dailybot`, `~/.config/herdr`, Herdr's saved - machines (`~/.local/state/herdr/client`) and `~/.bash_history` on + machines (`~/.local/state/herdr/client`), herdr-peers' state + (`~/.local/state/herdr-peers`, through `dck_persist_private_dir`) and `~/.bash_history` on the service's state volume (mounted at `~/.dck/volumes/state` whatever its compose name, `[compose] state_volume`), then `dck_container_only` (the container-only volume mount points, `[compose] container_only`), then `dck_layer_persist` (the agents layer's homes diff --git a/docs/herdr.md b/docs/herdr.md index 45fabbf..caf90d0 100644 --- a/docs/herdr.md +++ b/docs/herdr.md @@ -196,6 +196,13 @@ dck ask dck-other:w1:p2 "Which test covers the parser?" # herdr-peers ask, wit previous file kept once as `endpoints.json.dck-bak`). Every id then means the same machine on the host and in every container. Herdr's saved machines live on the `state` volume, so they survive `rebuild`. +- **herdr-peers' state survives rebuilds (since 1.4.2).** The entrypoint keeps + `~/.local/state/herdr-peers` (the delegation log, lead records, replies, + autopilot state) on the `state` volume, 0700, so asks and a plan's lead records + outlive `dck rebuild` ([entrypoint.md](entrypoint.md#dck_persist_private_dir-name-target)). + Repositories that added `dck_persist state "$HOME/.local/state/herdr-peers" dir` to + `docker/local/dev-setup-hook.sh` can drop that line after `dck init` with 1.4.2: both + use the same volume copy, so nothing moves and nothing is lost. - **The host's own entry.** The host peer is the host's catalog entry whose alias resolves (`ssh -G`) to the listener (`127.0.0.1:<[host] port>`). When there is none, `dck host listener enable` and `dck herdr mesh` register one diff --git a/lib/entrypoint.sh b/lib/entrypoint.sh index 4e4739d..7f41fb2 100644 --- a/lib/entrypoint.sh +++ b/lib/entrypoint.sh @@ -12,6 +12,8 @@ # # dck_persist [dir|file] named-volume symlink: seed on first # run, preserve on rebuild +# dck_persist_private_dir dck_persist for a private dir: 0700 on the +# volume, the container's copy never lost # dck_env_profile the container's environment for ssh # sessions (0600, O_EXCL, never logged) # dck_sshd host keys generated at runtime into a @@ -163,6 +165,45 @@ dck_persist() { _dck_chown -h "$DCK_USER:$(_dck_group)" "$target" } +# -------------------------------------------------------------------------- +# dck_persist_private_dir +# -------------------------------------------------------------------------- +# dck_persist for a private directory (herdr-peers' state). It differs in two ways: +# * the volume copy is 0700; the files inside keep their own modes (cp -a seeds, +# nothing is chmod-ed below the directory); +# * nothing the container holds is lost: a real, non-empty directory at the target +# moves into the volume when the volume copy is empty (dck_persist's seed). If +# the volume copy already has data, the target moves beside it as +# .container- (0700), not deleted and not shadowed. + +dck_persist_private_dir() { + _dck_env + local name="${1:-}" target="${2:-}" store stamp + case "$name" in + ''|*[!a-z0-9_-]*) dck_log "persist: invalid volume name '$name'"; return 1 ;; + esac + case "$target" in + "$DCK_HOME"/?*) ;; + *) dck_log "persist: refusing '$target' (must be under $DCK_HOME)"; return 1 ;; + esac + store="$DCK_PERSIST_ROOT/$name/$(_dck_persist_key "${target#"$DCK_HOME"/}")" + _dck_as_user mkdir -p "$(dirname "$target")" 2>/dev/null || mkdir -p "$(dirname "$target")" + if [ -d "$target" ] && [ ! -L "$target" ] && [ -n "$(ls -A "$target" 2>/dev/null)" ] \ + && [ -d "$store" ] && [ ! -L "$store" ] && [ -n "$(ls -A "$store" 2>/dev/null)" ]; then + stamp="$(date -u +%Y%m%dT%H%M%SZ)" + if mv "$target" "$store.container-$stamp"; then + chmod 0700 "$store.container-$stamp" 2>/dev/null || true + _dck_chown -R "$DCK_USER:$(_dck_group)" "$store.container-$stamp" + dck_log "persist: the container's copy moved to $name/${store##*/}.container-$stamp (the volume copy is kept)" + else + dck_log "persist: could not move the container's copy of ${store##*/} aside; left in place" + return 1 + fi + fi + dck_persist "$name" "$target" dir || return 1 + [ -L "$store" ] || chmod 0700 "$store" 2>/dev/null || true +} + # -------------------------------------------------------------------------- # dck_env_profile # -------------------------------------------------------------------------- @@ -1451,6 +1492,9 @@ dck_start() { # other state (agent detection) next to the link. _dck_as_user mkdir -p "$DCK_HOME/.local/state/herdr" 2>/dev/null || true dck_persist state "$DCK_HOME/.local/state/herdr/client" dir || true + # herdr-peers' own state (the delegation log, lead records, replies, autopilot + # state): private, so the volume copy is kept 0700. + dck_persist_private_dir state "$DCK_HOME/.local/state/herdr-peers" || true dck_persist state "$DCK_HOME/.bash_history" file || true dck_container_only || true dck_layer_persist || true diff --git a/tests/scopes/docker.sh b/tests/scopes/docker.sh index 29b1fcc..e94c908 100644 --- a/tests/scopes/docker.sh +++ b/tests/scopes/docker.sh @@ -250,6 +250,8 @@ test_node_fixture_end_to_end() { # 8. Persistence across rebuild: the state and agent volumes survive. dev shell -c 'mkdir -p ~/.config/gh ~/.codex && echo kept > ~/.config/gh/it-marker && echo kept > ~/.codex/it-marker && echo kept > ~/.config/agentkit/it-marker' + # herdr-peers' own state: a lead record and the delegation log, private modes. + dev shell -c 'umask 077; d=~/.local/state/herdr-peers/it-srv; mkdir -p "$d/leads" && echo "{\"plan\":\"IT\",\"epoch\":2}" > "$d/leads/IT.json" && echo "{\"id\":\"it-ask\"}" > "$d/log.ndjson"' with_lock dev rebuild assert_rc 0 "dev.sh rebuild recreates the container" wait_port "$port" || fail "sshd answers again after a rebuild" @@ -258,6 +260,12 @@ test_node_fixture_end_to_end() { kept kept Fixture Dev" "gh, a CLI home, agentkit and the git identity survive a rebuild" + dev shell -c 'd=~/.local/state/herdr-peers/it-srv; cat "$d/leads/IT.json" "$d/log.ndjson"; stat -c %a ~/.dck/volumes/state/local_state_herdr-peers "$d/log.ndjson" "$d/leads/IT.json"' + assert_eq "$RUN_OUT" '{"plan":"IT","epoch":2} +{"id":"it-ask"} +700 +600 +600' "herdr-peers' lead record and log survive a rebuild, private modes kept" dev shell -c 'cat "$AGENTKIT_PROFILES_DIR/antigravity/it1/token"' assert_eq "$RUN_OUT" "it-login" "with host_profiles off, ak finds the same profile on the volume after a rebuild" d ssh true diff --git a/tests/scopes/entrypoint.sh b/tests/scopes/entrypoint.sh index e0a1981..03233ce 100644 --- a/tests/scopes/entrypoint.sh +++ b/tests/scopes/entrypoint.sh @@ -598,3 +598,59 @@ test_profile_node_first() { run_cmd env HOME="$DCK_HOME" PATH="/usr/bin:/bin" sh -c '. "$1"; printf "%s" "$PATH"' _ "$DCK_REPO/images/common/profile.sh" assert_not_contains "$RUN_OUT" "/opt/dck/node" "off by default" } + +test_herdr_peers_state_survives_recreate() { + run_cmd bash -c '. "$1"; dck_start' _ "$LIB" + assert_rc 0 "dck_start completes" + assert_eq "$(readlink "$DCK_HOME/.local/state/herdr-peers")" "$V/state/local_state_herdr-peers" "herdr-peers' state lives on the state volume" + assert_eq "$(stat -c %a "$V/state/local_state_herdr-peers" 2>/dev/null || stat -f %Lp "$V/state/local_state_herdr-peers")" "700" "the volume copy is 0700" + ( umask 077; mkdir -p "$DCK_HOME/.local/state/herdr-peers/srv/leads" + echo '{"plan":"P1","epoch":3}' > "$DCK_HOME/.local/state/herdr-peers/srv/leads/P1.json" + echo '{"id":"a1"}' > "$DCK_HOME/.local/state/herdr-peers/srv/log.ndjson" ) + # A recreate: the image's home is fresh, the volume is not. + rm -rf "$DCK_HOME/.local" "$DCK_HOME/.config" "$DCK_HOME/.ssh" + run_cmd bash -c '. "$1"; dck_start' _ "$LIB" + assert_rc 0 "dck_start completes after a recreate" + assert_contains "$(cat "$DCK_HOME/.local/state/herdr-peers/srv/leads/P1.json")" '"epoch":3' "a lead record survives" + assert_contains "$(cat "$DCK_HOME/.local/state/herdr-peers/srv/log.ndjson")" '"a1"' "the delegation log survives" + assert_eq "$(stat -c %a "$V/state/local_state_herdr-peers/srv/log.ndjson" 2>/dev/null || stat -f %Lp "$V/state/local_state_herdr-peers/srv/log.ndjson")" "600" "the files keep their modes" + assert_eq "$(stat -c %a "$V/state/local_state_herdr-peers/srv/leads" 2>/dev/null || stat -f %Lp "$V/state/local_state_herdr-peers/srv/leads")" "700" "and so do the directories" +} + +test_herdr_peers_state_migrates_into_the_volume() { + # A container that kept herdr-peers' state in its own layer, and an empty volume. + ( umask 077; mkdir -p "$DCK_HOME/.local/state/herdr-peers/srv" + echo '{"id":"old"}' > "$DCK_HOME/.local/state/herdr-peers/srv/log.ndjson" ) + ep dck_persist_private_dir state "$DCK_HOME/.local/state/herdr-peers" + assert_rc 0 "persist succeeds" + assert_symlink "$DCK_HOME/.local/state/herdr-peers" "the directory becomes a link" + assert_contains "$(cat "$V/state/local_state_herdr-peers/srv/log.ndjson")" '"old"' "the container's records move into the volume" + assert_eq "$(stat -c %a "$V/state/local_state_herdr-peers/srv/log.ndjson" 2>/dev/null || stat -f %Lp "$V/state/local_state_herdr-peers/srv/log.ndjson")" "600" "with their modes" + assert_eq "$(stat -c %a "$V/state/local_state_herdr-peers" 2>/dev/null || stat -f %Lp "$V/state/local_state_herdr-peers")" "700" "the volume copy is 0700" +} + +test_herdr_peers_state_both_sides_kept() { + ( umask 077; mkdir -p "$V/state/local_state_herdr-peers/srv" "$DCK_HOME/.local/state/herdr-peers/srv" + echo '{"id":"vol"}' > "$V/state/local_state_herdr-peers/srv/log.ndjson" + echo '{"id":"ctr"}' > "$DCK_HOME/.local/state/herdr-peers/srv/log.ndjson" ) + ep dck_persist_private_dir state "$DCK_HOME/.local/state/herdr-peers" + assert_rc 0 "persist succeeds" + assert_contains "$(cat "$DCK_HOME/.local/state/herdr-peers/srv/log.ndjson")" '"vol"' "the volume copy wins" + local aside + aside="$(ls -d "$V/state/local_state_herdr-peers.container-"* 2>/dev/null | head -1)" + assert_contains "$(cat "$aside/srv/log.ndjson" 2>/dev/null)" '"ctr"' "the container's copy is moved beside it, not deleted" + assert_eq "$(stat -c %a "$aside" 2>/dev/null || stat -f %Lp "$aside")" "700" "the moved copy is 0700" + assert_contains "$RUN_ERR" "the container's copy moved to state/local_state_herdr-peers.container-" "the move is logged" +} + +test_herdr_peers_state_hook_workaround_is_a_no_op() { + # Repositories that persisted it from dev-setup-hook.sh used the same store. + ep dck_persist state "$DCK_HOME/.local/state/herdr-peers" dir + echo '{"id":"hook"}' > "$V/state/local_state_herdr-peers/log.ndjson" + ep dck_persist_private_dir state "$DCK_HOME/.local/state/herdr-peers" + assert_rc 0 "persist succeeds over the workaround's link" + assert_eq "$(readlink "$DCK_HOME/.local/state/herdr-peers")" "$V/state/local_state_herdr-peers" "the link is the same" + assert_contains "$(cat "$DCK_HOME/.local/state/herdr-peers/log.ndjson")" '"hook"' "the records the workaround kept are there" + ep dck_persist state "$DCK_HOME/.local/state/herdr-peers" dir + assert_rc 0 "and the hook's own call still succeeds afterwards" +} From c357556b0973a6db840bc57a74e3263a5c6ed83f Mon Sep 17 00:00:00 2001 From: Sergio Alexander Florez Galeano Date: Tue, 17 Nov 2026 06:37:30 -0500 Subject: [PATCH 3/3] =?UTF-8?q?chore(release):=20v1.4.2=20=E2=80=94=20Node?= =?UTF-8?q?=2024.22.3,=20herdr-peers=20state=20persisted?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch release; interface stays 2. Stamps VERSION, re-renders the repository's own container (bin/dck init --repo . --yes), and updates README, docs/launcher.md, SECURITY, both skills, AGENTS.md, the CHANGELOG [1.4.2] section and the registry's devcontainer entry (v1.4.2). Co-Authored-By: Claude Opus 5.5 --- .dwp/config.json | 2 +- AGENTS.md | 2 +- CHANGELOG.md | 27 ++++++++++++++++++++++++++- README.md | 6 +++--- SECURITY.md | 3 ++- VERSION | 2 +- dev.sh | 2 +- docker/local/app/Dockerfile | 4 ++-- docker/local/app/dck/VERSION | 2 +- docs/launcher.md | 2 +- skills/dck-dockerfile/SKILL.md | 4 ++-- skills/dck/SKILL.md | 4 ++-- 12 files changed, 43 insertions(+), 17 deletions(-) diff --git a/.dwp/config.json b/.dwp/config.json index d66be84..dca6bcc 100644 --- a/.dwp/config.json +++ b/.dwp/config.json @@ -6,7 +6,7 @@ }, "devcontainer": { "enabled": true, - "version": "v1.4.1" + "version": "v1.4.2" } }, "benchmark": { diff --git a/AGENTS.md b/AGENTS.md index f4b8e7a..10f57b8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -66,6 +66,6 @@ bin/dck up && bin/dck shell # the repository's own dev container (dogf ## Deep Work Plans -Structured work runs through the installed `deepworkplan` skill (`.agents/skills/deepworkplan/`, vendored from `DailybotHQ/deepworkplan-skill` tag `v8.0.2`, pinned with its `ref` in `skills-lock.json`). Short commands are thin delegators in `.agents/commands/` (`/dwp-create`, `/dwp-execute`, `/dwp-refine`, `/dwp-resume`, `/dwp-status`, `/dwp-verify`, `/dwp-upgrade`, `/skill-create`, `/agent-create`; `#` or plain text on hosts without slash commands); `.claude` and `.cursor` are symlinks to `.agents`. Plans live in the gitignored `.dwp/`; only the addon registry `.dwp/config.json` is tracked. The registry enables two addons: the AI Diff Reviewer (`.agents/skills/ai-diff-reviewer/`, tag `v3.3.16`, overrides in `.review/extension.md`), which runs the local review in every Final Review, and the dev container (`v1.4.1`: the repository's own dck container, rendered by `bin/dck init --repo .`); the methodology itself needs no addon. The tracked `.dwp/config.json` also enables `benchmark` and `learnings` (plan records and `learnings.json` stay in the ignored plan folder). +Structured work runs through the installed `deepworkplan` skill (`.agents/skills/deepworkplan/`, vendored from `DailybotHQ/deepworkplan-skill` tag `v8.0.2`, pinned with its `ref` in `skills-lock.json`). Short commands are thin delegators in `.agents/commands/` (`/dwp-create`, `/dwp-execute`, `/dwp-refine`, `/dwp-resume`, `/dwp-status`, `/dwp-verify`, `/dwp-upgrade`, `/skill-create`, `/agent-create`; `#` or plain text on hosts without slash commands); `.claude` and `.cursor` are symlinks to `.agents`. Plans live in the gitignored `.dwp/`; only the addon registry `.dwp/config.json` is tracked. The registry enables two addons: the AI Diff Reviewer (`.agents/skills/ai-diff-reviewer/`, tag `v3.3.16`, overrides in `.review/extension.md`), which runs the local review in every Final Review, and the dev container (`v1.4.2`: the repository's own dck container, rendered by `bin/dck init --repo .`); the methodology itself needs no addon. The tracked `.dwp/config.json` also enables `benchmark` and `learnings` (plan records and `learnings.json` stay in the ignored plan folder). DWP standard: 8.0.0 (onboarded 2026-10-08; upgraded 2026-10-09, 2026-10-11, 2026-10-12, 2026-10-13, 2026-10-14, 2026-10-25, 2026-11-15 and 2026-11-16; skill 8.0.2, vendored 2026-11-16) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83fc0f1..1f67d24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,30 @@ interface bumps the major version and the interface number (in 0.x it bumped the ## [Unreleased] +## [1.4.2] — 2026-11-17 + +Interface stays **2**. Patch: Node moves to the 24.22.3 security release, and +herdr-peers' state survives rebuilds. herdr-peers v2.2.0, coding-agents-kit v1.5.0 and +DeepWorkPlan Vim v1.1.0 are unchanged. + +### Fixed + +- **Node 24.22.3** (`BASE_NODE`, `NODE_VERSION`): 1.4.1 pinned 24.21.0, older than the + 24.22.x security line, so `dck init` downgraded repositories that had pinned 24.22.1 or + 24.22.3. The node-24 base is `node:24.22.3-trixie-slim` (index digest `af02d57b…`, + read from Docker Hub; its config sets `NODE_VERSION=24.22.3`), and the agents layer's + Node tarballs are checked against nodejs.org's `SHASUMS256.txt` for 24.22.3. A test + keeps both on the same release, at or above 24.22.3. +- **herdr-peers' state survives rebuilds:** `dck_start` keeps `~/.local/state/herdr-peers` + (the delegation log, lead records, replies, autopilot state) on the state volume + through the new `dck_persist_private_dir`. The volume copy is 0700 and the files + keep their modes. A non-empty directory already in the container moves onto an empty + volume; when the volume already has data, the container's copy is moved beside it as + `.container-`, never deleted or shadowed. Repositories that persisted + it from `docker/local/dev-setup-hook.sh` (`dck_persist state + "$HOME/.local/state/herdr-peers" dir`) can drop that line: it uses the same volume + copy ([herdr.md](docs/herdr.md)). + ## [1.4.1] — 2026-11-17 Interface stays **2**. Patch: the image bakes herdr-peers v2.2.0 and the repository @@ -1106,7 +1130,8 @@ First public release. **Interface 1** (`dck doctor --json` → `"interface": 1`) - `install.sh` (idempotent, `--no-rc`, `--uninstall`), test suite with unit scopes and a real-Docker integration scope, CI on Ubuntu and macOS. -[Unreleased]: https://github.com/DailybotHQ/devcontainer-kit/compare/v1.4.1...HEAD +[Unreleased]: https://github.com/DailybotHQ/devcontainer-kit/compare/v1.4.2...HEAD +[1.4.2]: https://github.com/DailybotHQ/devcontainer-kit/releases/tag/v1.4.2 [1.4.1]: https://github.com/DailybotHQ/devcontainer-kit/releases/tag/v1.4.1 [1.4.0]: https://github.com/DailybotHQ/devcontainer-kit/releases/tag/v1.4.0 [1.3.0]: https://github.com/DailybotHQ/devcontainer-kit/releases/tag/v1.3.0 diff --git a/README.md b/README.md index ecee2a6..f16c0df 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,11 @@ Requires bash 3.2+ and python3 ≥ 3.11 on a Linux or macOS host; Docker (Deskto colima or Engine) with Compose v2 for the container verbs. ```bash -git clone --branch v1.4.1 https://github.com/DailybotHQ/devcontainer-kit -( cd devcontainer-kit && curl -fsSLO https://github.com/DailybotHQ/devcontainer-kit/releases/download/v1.4.1/SHA256SUMS \ +git clone --branch v1.4.2 https://github.com/DailybotHQ/devcontainer-kit +( cd devcontainer-kit && curl -fsSLO https://github.com/DailybotHQ/devcontainer-kit/releases/download/v1.4.2/SHA256SUMS \ && shasum -a 256 -c SHA256SUMS ) # optional: verify the checkout against the release ./devcontainer-kit/install.sh # --no-rc for scripted installs, --uninstall to remove -dck --version # devcontainer-kit 1.4.1 +dck --version # devcontainer-kit 1.4.2 ``` `install.sh` copies the kit to `~/.local/share/dck` and adds one guarded PATH block to diff --git a/SECURITY.md b/SECURITY.md index 88e0e45..e65051e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,8 @@ | Version | Supported | | --- | --- | -| `v1.4.1` (latest) | yes | +| `v1.4.2` (latest) | yes | +| `v1.4.1` | yes | | `v1.4.0` | yes | | `v1.3.0` | yes | | `v1.2.0` | yes | diff --git a/VERSION b/VERSION index 347f583..9df886c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.1 +1.4.2 diff --git a/dev.sh b/dev.sh index 60e653f..9c7f314 100755 --- a/dev.sh +++ b/dev.sh @@ -12,7 +12,7 @@ # bash dev.sh help every command # >>> dck:devsh >>> set -euo pipefail -DCK_RENDERED_WITH="v1.4.1" +DCK_RENDERED_WITH="v1.4.2" # sha256 of that release's SHA256SUMS, when the rendering dck knew it (else empty). DCK_SUMS_SHA256="" # The compose project dck uses, so plain compose never acts on another checkout. diff --git a/docker/local/app/Dockerfile b/docker/local/app/Dockerfile index 2232fcf..e2b9ef8 100644 --- a/docker/local/app/Dockerfile +++ b/docker/local/app/Dockerfile @@ -4,7 +4,7 @@ # base block copies live next to this file in dck/ (vendored by `dck init`, # devcontainer-kit v0.3.2); no shared base image is involved. # >>> dck:base >>> -# dck:managed v1.4.1 base +# dck:managed v1.4.2 base # Both ARGs come before any FROM, so they are global (an ARG after a FROM is # scoped to that stage). ARG BASE_IMAGE=python:3.13.16-slim-trixie@sha256:bf44cdfcb76cd3b41e879bc058fc37ec5872002ccfde7fcb765e218cde0cd79c @@ -48,7 +48,7 @@ ENV LANG=en_US.UTF-8 \ VISUAL=nvim \ GIT_EDITOR=nvim \ DCK_IMAGE_FLAVOUR=python-3.13 \ - DCK_IMAGE_VERSION=1.4.1 + DCK_IMAGE_VERSION=1.4.2 WORKDIR /app ENTRYPOINT ["/usr/local/bin/dck-entrypoint"] CMD ["sleep", "infinity"] diff --git a/docker/local/app/dck/VERSION b/docker/local/app/dck/VERSION index a0488ec..587b3a1 100644 --- a/docker/local/app/dck/VERSION +++ b/docker/local/app/dck/VERSION @@ -1 +1 @@ -devcontainer-kit v1.4.1 +devcontainer-kit v1.4.2 diff --git a/docs/launcher.md b/docs/launcher.md index 911ec63..fb19701 100644 --- a/docs/launcher.md +++ b/docs/launcher.md @@ -197,7 +197,7 @@ entrypoint). `dck ssh` connects to `127.0.0.1:` with: ## Install ```bash -git clone --branch v1.4.1 https://github.com/DailybotHQ/devcontainer-kit +git clone --branch v1.4.2 https://github.com/DailybotHQ/devcontainer-kit ./devcontainer-kit/install.sh # or --no-rc for scripted installs ``` diff --git a/skills/dck-dockerfile/SKILL.md b/skills/dck-dockerfile/SKILL.md index 2675629..d198c5b 100644 --- a/skills/dck-dockerfile/SKILL.md +++ b/skills/dck-dockerfile/SKILL.md @@ -3,7 +3,7 @@ name: dck-dockerfile description: Create or regenerate a repository's own development container with devcontainer-kit — .devcontainer/devcontainer.json, docker/local//Dockerfile (official runtime image pinned by digest, DeepWorkPlan Vim, Herdr, coding agents through agentkit), docker/local/docker-compose.yaml and dev.sh — then prove it with a real build. Use only when the user asks for a dev container, a devcontainer, a docker/local//Dockerfile or a `dev.sh up` container for a repository, or to regenerate or upgrade one made by devcontainer-kit. Do not use for production images, deployment, Kubernetes, CI runners, or merely because a repository contains a Dockerfile. license: MIT metadata: - version: 1.4.1 + version: 1.4.2 interface: 2 homepage: https://github.com/DailybotHQ/devcontainer-kit --- @@ -28,7 +28,7 @@ It speaks devcontainer-kit **interface 2**. Read `interface` in pinned install line. Do not install it without being asked: ```bash -git clone --branch v1.4.1 https://github.com/DailybotHQ/devcontainer-kit +git clone --branch v1.4.2 https://github.com/DailybotHQ/devcontainer-kit ./devcontainer-kit/install.sh ``` diff --git a/skills/dck/SKILL.md b/skills/dck/SKILL.md index 39d3483..3c955df 100644 --- a/skills/dck/SKILL.md +++ b/skills/dck/SKILL.md @@ -3,7 +3,7 @@ name: dck description: Operate a repository's development container with devcontainer-kit (dck) — render the Dev Container template (dck init), start/enter/rebuild it from a terminal (dck setup|up|shell|exec|rebuild|down), SSH in with agent forwarding, register it as a Herdr machine (dck herdr add|status|repair), and diagnose it (dck doctor --json). Use only when the user mentions dck or devcontainer-kit, a dev container / devcontainer / .devcontainer/ or docker/local/ setup they want created or operated, or a container they want as a Herdr machine. Do not use for building or deploying production images, for Kubernetes, or merely because a repository contains a Dockerfile. license: MIT metadata: - version: 1.4.1 + version: 1.4.2 interface: 2 homepage: https://github.com/DailybotHQ/devcontainer-kit --- @@ -27,7 +27,7 @@ tell the user and show the pinned install line — do not install it without being asked: ```bash -git clone --branch v1.4.1 https://github.com/DailybotHQ/devcontainer-kit +git clone --branch v1.4.2 https://github.com/DailybotHQ/devcontainer-kit ./devcontainer-kit/install.sh ```