Skip to content

[Task] M1: complete container runtime verification and the bootstrap lock #2

Closed

Description

@DavidVFitzGerald

Delivery phase

Workflow / roadmap / environment bootstrap — M1.

Goal

Complete actual runtime and reproducibility verification of the Python 3.14/Node workspace on the maintainer's rootless Docker daemon so frontend work can run entirely inside containers without Docker-group membership.

Context and authority

Read AGENTS.md, docs/team/product-manager.md, docs/engineering/roadmap.md M1, docs/engineering/development-environment.md, README.md, current PRD §5 and current implementation specification §§0, 3 and 8. Inspect .devcontainer/Dockerfile, devcontainer.json, check-env.sh, compose.yaml, dev, Makefile and pyproject.toml. Read the new Proposed rootless-workspace ADR and synchronized current PRD/spec changes when prepared in PR #35; do not treat a Proposed record as accepted authority. Exclude all historical archive/reference folders.

Commit 088f52f prepared initial configuration before this issue existed. The earlier default-daemon socket denial and missing rootless prerequisites are historical blockers, not current conditions: the maintainer reports completing rootless setup, and the current session can query the rootless server. The maintainer explicitly authorized resuming M1 before baseline issue #1 is merged. This authorizes preparing and verifying the environment on docs/agent-workflow/PR #35; it does not authorize merging main or starting frontend implementation.

Requirements and constraints

Use the rootless Docker daemon without adding david to the Docker group, changing socket permissions, exposing a daemon socket in the workspace, privileged mode or installing host packages. Keep Python 3.14, compatible digest-pinned toolchains, one uv workspace/lock and the application-free scope. All builds, dependency resolution and checks run in containers; host Git/GitHub and Docker lifecycle orchestration remain permitted.

For this development-only workspace, namespace UID0 may be used because rootless user namespaces map it to the unprivileged host account and a numeric vscode UID1000 cannot ordinarily write that account's bind mount. This is not authorization to run rootful containers as host root. Require verified rootless server identity before supported host CLI and VS Code launch paths; reject unavailable/rootful daemons before bind-mounted development commands run. Drop all Linux capabilities and enable no-new-privileges. Preserve the production runtime non-root policy. Record the security/ownership refinement in a Proposed ADR and update both current PRD and specification in the same PR before final review.

Evidence must combine daemon rootless status, container namespace/capability settings and host-side ownership of a container-created file. /proc/self/uid_map is useful namespace evidence but may describe an immediate parent namespace rather than directly show the ultimate host UID; do not treat that file alone as proof of host identity.

Acceptance criteria

  • AC1 — The development account can access a Docker server reporting rootless mode; record the selected context, actual server security status and host UID/GID without credentials, Docker-group changes or world-writable sockets.
  • AC2 — ./dev config, ./dev build, ./dev up and ./dev shell work. The workspace's namespace UID0 maps to the unprivileged host checkout owner, cap_drop ALL and no-new-privileges are effective, no Docker socket is mounted, and exact tool versions are recorded. Supported CLI and VS Code initialization reject a rootful/unavailable daemon; verify negative cases without running privileged code or changing the user's daemon configuration.
  • AC3 — Generate the root uv.lock inside the container, commit it, and prove uv lock --check, uv sync --frozen and make dev-check pass without a host runtime/package-manager workaround.
  • AC4 — A file created through the workspace bind mount is writable by the host user and has the expected host UID/GID; down/up/check succeeds. A clean checkout with an isolated Compose project repeats build/start/check and records file ownership without mutating unrelated working trees or host dependencies.
  • AC5 — Update the development verification record, README and roadmap honestly, with the Proposed ADR and synchronized current PRD/spec security/ownership language. Verify actual VS Code Remote SSH/Reopen in Container where editor interaction is available; otherwise keep that editor gate explicitly BLOCKED and do not declare full M1 PASS or close this issue. No approved main merge is implied by runtime evidence.

Out of scope and follow-ups

Frontend packages, application code, Playwright app tooling and tests belong to #5 and its F1 follow-ups. Backend services, Airflow/Spark runtime and production images are Phase 2. Baseline approval/merge belongs to #1; default-branch issue-form activation is #3; repository native review protection remains #4. No new host package, group, daemon, socket-permission or billing/visibility change in this task. Do not close this issue or unblock frontend implementation merely because the CLI checks pass.

Verification plan

On the host, inspect docker context show and docker info security status; run ./dev config, ./dev build, ./dev up and ./dev shell. In the container, record id, /proc/self/uid_map, /proc/self/status capability/no-new-privileges fields, exact tool versions, uv lock, uv lock --check, uv sync --frozen and make dev-check. Verify a container-created probe file with host stat and a host write. Inspect effective Compose/container configuration for caps, socket mounts and runtime user.

Exercise supported launcher rejection of rootful/unavailable server responses with a controlled test harness or equivalent isolated evidence; do not switch the maintainer's default context or alter host services. Test VS Code initialization's use of the same fail-closed guard, then record actual editor reopen evidence separately. Back on host run ./dev down, ./dev up and ./dev check. Repeat the current committed environment in a clean isolated checkout/Compose project and record exact outcomes. No application tests are claimed.

Dependencies and readiness

PM: READY for scoped M1 environment implementation and verification on the existing review branch, under the maintainer's explicit instruction to proceed. Prior Docker access blocker is resolved. Baseline #1 review/merge remains outstanding but is no longer a prerequisite to preparing this authorized M1 change; frontend implementation still requires the recorded preparation gates.

Final completion remains gated by delivered SHA, independent QA, the actual editor evidence in AC5, current-document/ADR consistency and approved review/merge workflow. A Proposed ADR/status edit, CLI-only PASS or issue-body update does not satisfy those gates. Hand off branch/SHA and exact results to QA; leave this issue open.

Current handoff: QA PASS for AC1–AC5. Runtime evidence applies to a9399aa; documentation-only commit 1163764 records the maintainer-reported editor check. Ready for review; leave this issue open until approved merge of PR #35. Frontend readiness and default-branch form activation remain separate gates.

Activity

  1. added
    task
    bootstrap
    blocked
    on Nov 13, 2026
  2. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Bootstrap tracking: this issue was created after the prepared work it records. Current status: BLOCKED; see dependencies and readiness.

    Dependencies: #1. No application QA, environment PASS or approved merge is claimed. Follow AGENTS.md and the linked role instructions; keep this issue open until the recorded gates are satisfied.

  3. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Read-only host prerequisite update: the maintainer prefers no david membership in the Docker group. Rootless setup tools, rootlesskit, user systemd, and david's 65,536 subordinate UID/GID ranges are present; newuidmap/newgidmap (uidmap package) are absent. No host package/configuration change was performed. Rootless setup is a documented option requiring explicit authorization for the host install/setup. If chosen, adapt and verify bind-mount/user-namespace ownership for the current vscode container user before marking M1 ready; selecting a context alone is insufficient. See docs/engineering/development-environment.md and https://docs.docker.com/engine/security/rootless/.

  4. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM: READY — scoped M1 environment work

    The maintainer installed/configured rootless Docker and explicitly instructed the team to resume M1. The current session can access the rootless server. I groomed this issue to distinguish rootless namespace UID0 from host-root privilege and to require host ownership evidence, dropped capabilities, no-new-privileges, no daemon-socket mount and fail-closed supported launch paths.

    Decision/authority: rootless ownership/security behavior must be documented in Proposed ADR 0003 plus synchronized current PRD/spec updates in PR #35. Proposed is not accepted until approved and merged. This authorization permits environment implementation/verification before #1 merge; it does not authorize main merge, host changes or frontend implementation. Root will coordinate the single Engineer writer and independent QA at a delivered SHA.

    The original blocking Docker findings remain in prior comments as history. AC5 retains actual VS Code Remote SSH/Reopen evidence: if unavailable, mark that criterion BLOCKED and leave M1 open rather than reporting a full PASS. /proc/self/uid_map alone is not conclusive host-ownership evidence; pair daemon/namespace observations with a host-side stat/write of a container-created file.

  5. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Engineering: READY FOR QA — M1 runtime candidate

    Branch docs/agent-workflow; candidate a9399aa, PR #35. PM authorized this scoped preparation before #1 merge under the maintainer's explicit instruction; no main approval/merge is claimed.

    Implemented a rootless-only workspace using namespace UID/GID0 mapped to unprivileged host david. Supported CLI and VS Code initialize paths fail closed on unavailable/rootful daemons. All capabilities are dropped; no-new-privileges is set; no socket/credentials mount. Added retained 8-case preflight regressions, safe Bash umask022, and the single uv.lock generated inside the container. Proposed ADR0003, current PRD/specification, README, root instructions and guide agree.

    Engineering evidence:

    • AC1 PASS: context rootless, Docker29.9.3 SecurityOptions contains name=rootless, host account1000:1000.
    • AC2 PASS for runtime/launch guard: ./dev config, ./dev build, ./dev up, actual PTY ./dev shell, ./dev check; container maps UID/GID0 to parent1000 count1. Runtime inspect shows cap_dropALL, NNP and only checkout mount. All 8 retained mock rootful/unreachable/rootless and host-root checks pass in-container; no actual rootful daemon is used for negative tests.
    • AC3 PASS engineering: uv lock generated the committed uv.lock inside the workspace; uv lock --check, uv sync --frozen, make dev-check pass. Versions Node24.22.3/npm11.19.1, Python3.14.2/uv0.9.30, Git2.39.5/Make4.3/rg13.0.0.
    • AC4 PASS for current checkout/recreation/ownership; independent clean-checkout QA is now running against the committed SHA. Host uv.lock owner1000:1000/mode0644, .venv0755; interactive/noninteractive Bash umask0022. No host daemon/package/permission changes by agents.
    • AC5 documents updated; actual graphical VS Code Remote SSH/Reopen remains BLOCKED pending maintainer evidence. CLI/template tests do not prove actual editor attach.

    Commands ran through Docker host lifecycle ./dev config/build/up/shell/check/down/up/check, with uv lock, uv lock --check, uv sync --frozen, make dev-check and Bash syntax/regression checks INSIDE the workspace. Logs captured locally under /tmp/lca-m1. git diff --cached --check passed. No application tests exist; no app implementation was introduced.

    Next: independent QA runs the isolated clean-checkout gate; maintainer tests actual VS Code reopen + make dev-check. Keep issue open and frontend tasks blocked until actual gates, review and approved merge are satisfied.

  6. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    QA: BLOCKED

    Reviewed commit: a9399aa (docs/agent-workflow).
    Mode: environment/bootstrap only, no application implementation or app tests.
    Clean checkout: /tmp/lca-m1-qa-checkout.3vVGMF.
    Isolation: COMPOSE_PROJECT_NAME=lca-diff-m1-qa, FRONTEND_PORT=5174.

    Criterion verdicts

    • AC1 PASS: host david UID/GID1000; Docker context rootless; actual daemon reports name=rootless, seccomp and cgroupns. No host group/config/package change was made by QA.
    • AC2 PASS: clean-checkout ./dev config/build/up/check and actual interactive ./dev shell work. Namespace UID/GID0 maps to parent1000 with one ID, correlated with host-owned probe. Docker inspection confirms user0:0, cap_dropALL, no-new-privileges:true, Privilegedfalse, and only the checkout bind mount. Runtime CapEff=0000000000000000 and NoNewPrivs=1. Interactive Bash umask0022. Eight unique retained preflight cases pass: CLI and configured VSCode initializeCommand each reject rootful, unreachable and host-root invocation, and accept/forward rootless as applicable. Rejected cases assert diagnostics and no-compose sentinel, with host id mocked so they exercise the intended branches.
    • AC3 PASS: uv.lock is present in the reviewed commit; engineer's container-generation evidence was supplied. In the independently built clean checkout, uv lock --check and uv sync --frozen pass through ./dev check and make dev-check. Frozen sync creates the ignored .venv without changing tracked source or lock.
    • AC4 PASS: container-created probe is namespace0:0 mode644 and host1000:1000 mode644; host append succeeds. .venv is host1000:1000 mode755. Isolated ./dev down/up/check passes. The clean rebuild used cached pinned image layers, not a claimed cache-free/network repeat. Git diff/status of the clean checkout remain clean (ignored environment artifacts only).
    • AC5 BLOCKED: ProposedADR0003/current PRD§5/spec§3.1/README/guide/agent rules consistently document the rootless boundary, restricted capabilities and unchanged production policy. Final runtime results are available below for the coordinator to record in the guide/roadmap. Actual VSCode RemoteSSH/Reopen-in-Container and its container-terminal make dev-check have not been independently observed or confirmed here; the editor gate must remain blocked. No approved main merge or full M1 PASS is claimed.

    Commands and results

    Host Git/Docker lifecycle only:

    • git clone --local --no-hardlinks /home/david/projects/LCA-diff /tmp/lca-m1-qa-checkout.3vVGMF
    • git checkout --detach a9399aa
    • docker context show; docker info --format '{{json .SecurityOptions}}'; id
    • ./dev config; ./dev build; ./dev up; ./dev check (isolated env above)
    • ./dev shell (actual interactive PTY)

    Inside the container shell:

    • id; umask; cat /proc/self/uid_map; cat /proc/self/gid_map
    • rg '^(CapEff|NoNewPrivs):' /proc/self/status
    • create .lca-dev-writecheck.qa and stat it; make dev-check
    • bash -n dev .devcontainer/check-docker.sh .devcontainer/check-env.sh .devcontainer/test-preflight.sh

    Host verification and isolated cleanup:

    • stat probe/.venv/uv.lock; append to probe as david and confirm both lines
    • docker inspect lca-diff-m1-qa-workspace-1
    • ./dev down; ./dev up; ./dev check; ./dev down
    • git diff --exit-code; git status --short (clean)

    All executed commands passed. Three smoke runs each passed the same eight preflight scenarios. No application suite exists and none is claimed.

    Tool versions: Node24.22.3, npm11.19.1, Python3.14.2, uv0.9.30, Git2.39.5, GNU Make4.3, ripgrep13.0.0.

    Logs: build.log, up.log, check.log, host-identity.log, docker-context.log, docker-security.log, host-ownership.log, probe-content.log, container-inspect.log, down.log, restart.log, check-restart.log, cleanup.log, final-containers.log under /tmp/lca-m1-qa. Interactive shell evidence is in the tool transcript.

    QA changed no source, test or criteria files, no GitHub state and no host dependencies. The isolated QA container/network were removed; the main lca-diff-dev-workspace-1 remained running. The clean checkout/logs remain for evidence.

    Next: coordinator records final runtime evidence, obtains actual editor confirmation, and retains issue #2 open until editor/QA/review/merge gates are satisfied. Documentation-only evidence updates can be reviewed separately without inventing a new runtime validation claim.

  7. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    QA: PASS — M1 environment verification

    Reviewed runtime commit: a9399aab06a21b9c1acd9d99dcaf64c9514741a3 on docs/agent-workflow. Runtime/configuration files and uv.lock are unchanged through fb9cf3867575d3cb593534cc2affd98fbab4c940 and the final documentation-only evidence update reviewed in the working tree. No additional runtime tests were necessary for that evidence-only update.

    Mode: container-development bootstrap, not application behavior, real backend integration or production validation.

    • AC1 — PASS. Independently confirmed host david UID/GID 1000:1000, selected Docker context rootless, and server security options including name=rootless. QA made no host installation, group, daemon or socket-permission change.
    • AC2 — PASS. In an isolated clean checkout, ./dev config, ./dev build, ./dev up, ./dev check and actual interactive ./dev shell succeeded. Namespace UID/GID 0 maps to parent 1000; host probe ownership corroborates the mapping. Inspection shows CapDrop=[ALL], no-new-privileges:true, Privileged=false, only the checkout bind mount, and no Docker socket. Runtime CapEff=0, NoNewPrivs=1, and shell umask 0022. All eight retained preflight scenarios passed: CLI and configured VS Code initialization reject rootful/unreachable daemons and host-root invocation, and accept rootless forwarding as applicable. Negative cases mock the host identity and assert no Compose execution.
    • AC3 — PASS. The container-generated root uv.lock is committed. Independent clean-checkout uv lock --check, uv sync --frozen and make dev-check passed inside the workspace. Frozen sync created the ignored .venv without changing tracked source or the lock. No host Python/Node workaround was used.
    • AC4 — PASS. A container-created probe was namespace 0:0/mode 0644 and host 1000:1000/mode 0644; the host user could append successfully. .venv was host-owned/mode 0755. An isolated clean clone at /tmp/lca-m1-qa-checkout.3vVGMF, Compose project lca-diff-m1-qa, port 5174, repeated build/start/check and down/up/check successfully. The build reused pinned cached layers; no cache-free rebuild is claimed. Tracked source remained unchanged. QA removed only its isolated container/network and left the main workspace running.
    • AC5 — PASS. Proposed ADR 0003, current PRD §5, specification §3.1, root instructions, README and verification/roadmap records consistently describe the rootless boundary and unchanged production policy. The maintainer supplied successful make dev-check output in response to the requested VS Code Remote SSH/Reopen-in-Container check, covering all eight preflight cases, identity/configuration, frozen lock/sync and writes. This is maintainer-reported editor evidence, not independently observed GUI interaction. The final documentation update attributes that evidence explicitly and keeps approved merge/F1 readiness separate.

    Commands and results

    Host lifecycle and inspection:

    • git clone --local --no-hardlinks /home/david/projects/LCA-diff /tmp/lca-m1-qa-checkout.3vVGMF and checkout of the reviewed SHA.
    • docker context show, docker info --format '{{json .SecurityOptions}}', id.
    • With COMPOSE_PROJECT_NAME=lca-diff-m1-qa FRONTEND_PORT=5174: ./dev config, ./dev build, ./dev up, ./dev check, ./dev shell, then ./dev down, ./dev up, ./dev check, ./dev down.
    • Host stat/append of the container-created probe, docker inspect, and clean git diff --exit-code/git status --short.

    Inside the container:

    • id, umask, UID/GID maps, capability/no-new-privileges inspection.
    • make dev-check, including uv lock --check, uv sync --frozen and eight preflight regression scenarios.
    • bash -n dev .devcontainer/check-docker.sh .devcontainer/check-env.sh .devcontainer/test-preflight.sh.

    All commands passed. Three independent smoke runs each passed the same eight unique regression scenarios. The maintainer-reported editor smoke also passed. No application suite exists and none is claimed.

    Observed versions: Node 24.22.3, npm 11.19.1, Python 3.14.2, uv 0.9.30, Git 2.39.5, GNU Make 4.3, ripgrep 13.0.0.

    Detailed independent logs and the earlier blocked report are retained under /tmp/lca-m1-qa/. The earlier editor blocker is superseded by the attributed maintainer evidence in this report. QA changed no source, tests, criteria or GitHub state.

    Next action: coordinator commits/pushes the reviewed documentation-only evidence update and posts this verdict against the delivered SHA. Keep issue #2 open for the required review/approved merge; QA PASS does not accept a Proposed ADR, merge PR #35, activate forms on main, or independently authorize frontend implementation.

  8. removed
    blocked
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bootstraptask

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions