Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .changeset/issue-1946-docker-isolation-session-visibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'@link-assistant/hive-mind': patch
---

Surface the docker-isolation session id + isolation backend immediately when the
Telegram bot launches a task, instead of only after the (potentially hour-long)
image pull / container startup finishes (#1946). `formatStartingWorkSessionMessage`
now renders the `Session:` and `🔒 Isolation:` lines on the `🔄 Starting...`
message, and `buildExecuteAndUpdateMessage` tracks the session up front (before
awaiting the launch) so the run is addressable by `/watch`, `/log` and `/status`
during the whole startup window. A new `untrackSession` helper removes the
optimistically-tracked session if the launch fails, so a phantom session is never
monitored or resumed. Fix applies to every caller of the shared execution path
(`/solve`, `/hive`, `/task`).

The image-preparation log gap and host-image re-download were reported upstream,
fixed there, and are now pinned in this repo's images: `Dockerfile` /
`Dockerfile.dind` bump `start-command` `0.29.1` → `0.29.2` (link-foundation/start#138
— the `docker pull`/dind-boot phase is now recorded in the `$` session log), and
`Dockerfile.dind` bumps its base from `konard/box-dind:2.3.2` → `2.3.5`
(link-foundation/box#106 — the dind entrypoint now verifies host-image passthrough
actually seeded the nested daemon instead of silently re-downloading ~30 GB). A
deep case study is in `docs/case-studies/issue-1946/`.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# Build: docker build -t konard/hive-mind .

FROM konard/box:2.3.2
FROM konard/box:2.3.5
ARG HIVE_MIND_VERSION=latest
# Release builds pass the exact published package version here. Bake it as the
# default child isolation image tag so a parent started via :latest still runs
Expand Down Expand Up @@ -116,18 +116,21 @@ RUN bun install -g @openai/codex && \
# Note: start-command provides `$` CLI for isolation modes (--isolation screen/tmux/docker)
# The Box base image includes screen. For tmux/docker isolation, ensure they are
# available in the base image or install them separately.
# start-command is pinned to 0.29.1: that release fixes detached docker
# start-command is pinned to 0.29.2: 0.29.1 fixed detached docker
# `--status`/`--list` reporting a terminal status (`executed`) with the `-1`
# sentinel while the container is still running. See link-foundation/start#136
# and link-assistant/hive-mind#1939.
# sentinel while the container is still running (link-foundation/start#136,
# link-assistant/hive-mind#1939); 0.29.2 (start#138 / start PR #139) records the
# docker image-preparation phase (the `docker pull`/dind boot) in the session log,
# so `$ --upload-log` no longer returns a near-empty log while a multi-GB image is
# still pulling — the missing-image-prep-logs half of issue #1946.
RUN echo "Installing @link-assistant/hive-mind@${HIVE_MIND_VERSION}" && \
bun install -g "@link-assistant/hive-mind@${HIVE_MIND_VERSION}" && \
if [ "${HIVE_MIND_VERSION}" != "latest" ]; then \
test "$(hive --version)" = "${HIVE_MIND_VERSION}"; \
fi && \
bun install -g @link-assistant/claude-profiles && \
bun install -g @link-assistant/agent && \
bun install -g start-command@0.29.1 && \
bun install -g start-command@0.29.2 && \
bun install -g gh-setup-git-identity && \
bun install -g gh-pull-all && \
bun install -g gh-load-issue && \
Expand Down
22 changes: 16 additions & 6 deletions Dockerfile.dind
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@
#
# Box image version: pinned to a specific release for stable, reproducible builds.
# To upgrade: update the dind version tag below.
# Box 2.3.2 includes the host-image passthrough allowlist used by the issue #1879
# Box 2.3.2 introduced the host-image passthrough allowlist used by the issue #1879
# runbook, plus the box#102 fix: the dind entrypoint now WARNS when passthrough is
# opted into (DIND_HOST_PASSTHROUGH_IMAGES set) but no host docker socket is mounted,
# instead of silently leaving the nested daemon empty (issue #1914).
# Box 2.3.4 (box#106 / box PR #107) goes further for issue #1946: the dind
# entrypoint now VERIFIES (via `docker image inspect` against the nested daemon)
# that each concrete passthrough allowlist entry was actually seeded, and reports
# `image preload/passthrough finished WITH WARNINGS` instead of a misleading
# `complete` when it was not — so a misconfigured deploy can no longer silently
# trigger a ~30 GB re-download of the host image on the first nested `docker run`.
# We pin 2.3.5 (latest patch on top of that fix).
# Latest Box releases: https://github.com/link-foundation/box/releases

FROM konard/box-dind:2.3.2
FROM konard/box-dind:2.3.5
ARG HIVE_MIND_VERSION=latest

# --- Environment variables ---
Expand Down Expand Up @@ -118,18 +125,21 @@ RUN bun install -g @openai/codex && \
bun install -g @github/copilot && \
bun install -g opencode-ai

# start-command is pinned to 0.29.1: that release fixes detached docker
# start-command is pinned to 0.29.2: 0.29.1 fixed detached docker
# `--status`/`--list` reporting a terminal status (`executed`) with the `-1`
# sentinel while the container is still running. See link-foundation/start#136
# and link-assistant/hive-mind#1939.
# sentinel while the container is still running (link-foundation/start#136,
# link-assistant/hive-mind#1939); 0.29.2 (start#138 / start PR #139) records the
# docker image-preparation phase (the `docker pull`/dind boot) in the session log,
# so `$ --upload-log` no longer returns a near-empty 546-byte log while a multi-GB
# image is still pulling — the missing-image-prep-logs half of issue #1946.
RUN echo "Installing @link-assistant/hive-mind@${HIVE_MIND_VERSION}" && \
bun install -g "@link-assistant/hive-mind@${HIVE_MIND_VERSION}" && \
if [ "${HIVE_MIND_VERSION}" != "latest" ]; then \
test "$(hive --version)" = "${HIVE_MIND_VERSION}"; \
fi && \
bun install -g @link-assistant/claude-profiles && \
bun install -g @link-assistant/agent && \
bun install -g start-command@0.29.1 && \
bun install -g start-command@0.29.2 && \
bun install -g gh-setup-git-identity && \
bun install -g gh-pull-all && \
bun install -g gh-load-issue && \
Expand Down
Loading