Epic: Onboarding — Docker availability, first-run, and runtime-loss messaging

オープン
#72 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
docker, elixir

調査の方向性

まず Loopyard.DockerDaemon、Loopyard.Health、Loopyard.Docker、SystemDockerLive を読んで既存の検出とリカバリを理解し、その後 docs/CONFIG.md と CLAUDE.md を確認してください。これは epic なので、何かを変更する前に計画済みの sub-issue を選択してください。選択した boot、runtime-loss、runtime-detection、DOCKER_HOST、またはドキュメントの動作が実装され、そのリカバリ状態とユーザー向けの次のステップがカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

epic reliability ux

Loopyard is a Docker control plane, so Docker is not a dependency — it's the
substrate. When it's missing, stopped, or unreachable, nothing works. Today we
handle that as an internal health signal; we don't handle it as an onboarding
problem, and we give at least one piece of actively wrong advice.

This epic covers the whole "can Loopyard reach a container runtime, and does the
human know what to do about it" surface. Sub-issues go under here.

What already exists

Worth knowing before adding anything — a fair amount is built:

  • Loopyard.DockerDaemon — the runtime KEEPER. Probes docker version every
    10s (5s guard), flips a :persistent_term flag after 2 consecutive failures,
    emits one calm operator line + web push, and attempts a bounded autoheal.
  • Loopyard.Health — reports Docker daemon unreachable — no snapshot has ever succeeded / event-stream-disconnected at /system.
  • Loopyard.Docker — distinguishes a transient "daemon blip" from a real error
    and retries accordingly; knows the socket-missing case.
  • /system/docker (SystemDockerLive) — surfaces event-stream death.

So detection is largely solved. The gaps are about who is told, when, and
whether the instruction is correct.

The gaps

1. Boot with no reachable Docker says nothing useful

A new user (or an existing one whose Docker isn't running) boots the server and
gets four cheerful [info] lines. Docker being unreachable isn't surfaced at
boot at all — you find out later when a workspace fails to do anything. There's
no "Docker isn't reachable — start Docker Desktop / colima and reload" moment.

2. Losing Docker mid-run is catastrophic and under-communicated

Every workspace, agent, terminal, and dev server is a container. When the daemon
dies while the server is up, that's total loss of function, but the messaging is
a single operator-chat line + push. The web UI has no prominent, persistent
"the container runtime is gone" state — the app largely looks normal while being
completely non-functional.

3. The autoheal and its advice are hardcoded to Colima — actively wrong on Docker Desktop

DockerDaemon.heal_fun/0 shells out to colima stop -f then colima start,
and the exhausted-heal message reads:

This didn't self-heal — Docker's runtime wouldn't restart (2 attempts).
Run colima start on the Mac

On a Docker Desktop machine (docker info → Docker Desktop, colima status →
colima is not running) that heal is a no-op and the instruction sends the user
to a runtime they don't use. Confirmed live on a dev machine. We need runtime
DETECTION (Docker Desktop / colima / OrbStack / Rancher / remote), with heal and
copy that match what's actually installed.

4. DOCKER_HOST is never read and is undocumented

grep finds no System.get_env("DOCKER_HOST") anywhere, and it's absent from
docs/CONFIG.md. It happens to work because we shell out to docker, which
honors it natively — but nothing detects a non-default socket, reports which
endpoint we're talking to, or tells a user with a non-standard setup that
DOCKER_HOST is the knob. When the default socket isn't there, that hint is
exactly what's needed.

Planned sub-issues

  • Boot-time check: if Docker is unreachable at server start, say so loudly
    (console + a first-run UI state) with the concrete next step
  • Runtime-loss UI: prominent, persistent "container runtime unavailable"
    state across the app while the daemon is down, clearing on recovery
  • Detect the container runtime and make heal + copy match it (Docker
    Desktop / colima / OrbStack / remote); stop hardcoding colima
  • Honor and document DOCKER_HOST; surface which endpoint we're using and
    suggest it when the default socket is absent
  • Doc pass: CONFIG.md row for DOCKER_HOST, setup docs for "Docker isn't
    running"

Principle

Per CLAUDE.md, errors speak only when the human can act and the system can't
self-fix. "Docker is gone" is the canonical case where a human MUST act — so it
earns a decisive message with one clear action. The failure mode to avoid is the
current one: a confident instruction that's wrong for the user's runtime.

主要言語
Elixir
スター
85
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

loopyard/loopyard のほかの issue

loopyard/loopyard の issue をすべて見る

似ている issue

Elixir の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。