From 87c35bab6fb01151437ac40778d4a092d40e4e69 Mon Sep 17 00:00:00 2001 From: Costin Cozianu Date: Tue, 17 Nov 2026 01:31:53 +0000 Subject: [PATCH 1/2] Align release integration fixtures with rootless Docker probing --- .../integration/test_print_command_cli.py | 18 +++++++++++++----- .../integration/test_runtime_entrypoint_cli.py | 10 ++++++++++ .../2026-09-18-maintenance/CURRENT-STATUS.md | 16 +++++++++++++--- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/devcapsule-src/tests/integration/test_print_command_cli.py b/devcapsule-src/tests/integration/test_print_command_cli.py index d9594995..eb983097 100644 --- a/devcapsule-src/tests/integration/test_print_command_cli.py +++ b/devcapsule-src/tests/integration/test_print_command_cli.py @@ -3,8 +3,8 @@ Printing a launch's command brings nothing to the machine. Each test runs the built executable in an environment it builds: a home and a project under the test's directory, and a search path whose ``docker`` is a script the test -writes. The script records every call, answers that no image is local, and -refuses any other request, so a launcher that asked Docker to pull or build +writes. The script records every call, answers read-only daemon identity +and local-image queries, and refuses any other request, so a launcher that asked Docker to pull or build would be seen and would fail. The proxy variables send every download to a closed port of this machine: a launcher that tried one would fail at once and receive nothing. @@ -21,8 +21,12 @@ pytestmark = pytest.mark.integration STAND_IN_DOCKER = """#!/bin/sh -# Stands where docker is. Every call is recorded; only a question about a local image is answered. +# Stands where docker is. Only read-only daemon identity and local-image queries are answered. echo "$*" >> "$DOCKER_STAND_IN_CALLS" +if [ "$*" = 'info --format {{json .SecurityOptions}}' ]; then + echo '[]' + exit 0 +fi if [ "$1 $2" = "image inspect" ]; then echo "[]" echo "Error response from daemon: No such image: $3" >&2 @@ -66,7 +70,7 @@ def run(*arguments: str) -> subprocess.CompletedProcess[str]: def test_print_command_names_a_base_image_that_is_not_here_and_pulls_nothing(launcher, tmp_path: Path) -> None: """On a machine whose Docker has no image, ``run --print-command`` exits 2 and says that a launch pulls the - base image. It asks Docker only whether the image is local, prints no command, and downloads no file.""" + base image. It may read daemon security options and local image availability, prints no command, and downloads no file.""" created = launcher("init", "--require", "python", "--ide", "python-ide", "--creator", "mailto:owner@example.test", "--authorize", "base-image", "default") assert created.returncode == 0, created.stderr @@ -78,7 +82,11 @@ def test_print_command_names_a_base_image_that_is_not_here_and_pulls_nothing(lau assert "is not on this machine. A launch pulls it; nothing was pulled now." in printed.stderr assert "--print-command prints the command of an environment that is already here" in printed.stderr calls = (tmp_path / "docker-calls").read_text(encoding="utf-8").splitlines() - assert calls and all(call.startswith("image inspect ") for call in calls), calls + assert any(call.startswith("image inspect ") for call in calls), calls + assert all( + call.startswith("image inspect ") or call == "info --format {{json .SecurityOptions}}" + for call in calls + ), calls downloaded = [path for path in (tmp_path / "home").rglob("*") if path.is_file() and "artifacts" in path.parts] assert downloaded == [] diff --git a/devcapsule-src/tests/integration/test_runtime_entrypoint_cli.py b/devcapsule-src/tests/integration/test_runtime_entrypoint_cli.py index 7a090e14..1c7d6d65 100644 --- a/devcapsule-src/tests/integration/test_runtime_entrypoint_cli.py +++ b/devcapsule-src/tests/integration/test_runtime_entrypoint_cli.py @@ -246,6 +246,16 @@ def test_filesystem_applies_distinct_user_and_group_ids_to_new_directories(tmp_p gid = groups[0] else: pytest.skip("distinct uid/gid ownership needs root or a supplementary group different from the uid") + # A root UID in a restricted user namespace need not have CAP_CHOWN. + # Establish the host precondition independently of prepare_filesystem. + probe = tmp_path / "ownership-precondition" + probe.touch() + try: + os.chown(probe, uid, gid) + except PermissionError: + pytest.skip("this environment cannot assign the distinct uid/gid required by the test") + finally: + probe.unlink() existing = tmp_path.stat() program = """ import sys diff --git a/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md b/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md index 5fc0319f..f19435c1 100644 --- a/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md +++ b/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md @@ -12,12 +12,22 @@ Integration target: `main` Delivery method: ordinary maintenance PRs to `main`; owner merges. No records-only PR. The 0.3.0 release is published; website production promotion remains owner-operated. -Branch association: `release-0.3.1` from main 31e8fec7, the workstream's selection from the cut to the final tag; `ws-maintenance/website-gitlink-actions` from release-0.3.1 2a3d6f61, recursive fetch of the `website` raw gitlink in GitHub Actions, awaiting owner pull request and merge; `ws-maintenance/0.3.1-blocking-bugs` from release-0.3.1 82b9c07e, records of the two blocking bugs, the owner merges; `ws-maintenance/launch-phases` merged through #29 and closed; `ws-maintenance/host-inputs-at-source` merged through #26 and closed; `ws-maintenance/python-route-guard` merged through #25 and closed; `ws-maintenance/pile-of-ideas` merged through #23 and closed; `ws-maintenance/0.3.1-agent-freshness` merged through #21 and closed; `ws-maintenance/codex-npm-metadata` merged through #20 and closed; `ws-maintenance/webconsole-legacy-tests` merged through #18 and closed; `ws-maintenance/webconsole-delivery` merged through #16 and closed; `ws-maintenance/move-to-organization` merged through #1 and closed; `ws-maintenance/base-consent-test` from main 445469f1; `ws-maintenance/coverage-in-pr` merged through #336 and closed; `ws-maintenance/test-conventions` merged through #335 and closed; `ws-maintenance/0.3.1-preparation` from main 31d44fa4; `release-0.3.0` closed after final publication and retained with its tags; `ws-maintenance/0.3.0-acceptance` merged through #332 and closed; earlier slice branches are historical +Branch association: `ws-maintenance/0.3.1-rc3-preflight` from release `bf4fa1f0`, integration-test corrections required by rc3, PR to `release-0.3.1`; `release-0.3.1` from main 31e8fec7, the workstream's selection from the cut to the final tag; `ws-maintenance/website-gitlink-actions` from release-0.3.1 2a3d6f61, recursive fetch of the `website` raw gitlink in GitHub Actions, awaiting owner pull request and merge; `ws-maintenance/0.3.1-blocking-bugs` from release-0.3.1 82b9c07e, records of the two blocking bugs, the owner merges; `ws-maintenance/launch-phases` merged through #29 and closed; `ws-maintenance/host-inputs-at-source` merged through #26 and closed; `ws-maintenance/python-route-guard` merged through #25 and closed; `ws-maintenance/pile-of-ideas` merged through #23 and closed; `ws-maintenance/0.3.1-agent-freshness` merged through #21 and closed; `ws-maintenance/codex-npm-metadata` merged through #20 and closed; `ws-maintenance/webconsole-legacy-tests` merged through #18 and closed; `ws-maintenance/webconsole-delivery` merged through #16 and closed; `ws-maintenance/move-to-organization` merged through #1 and closed; `ws-maintenance/base-consent-test` from main 445469f1; `ws-maintenance/coverage-in-pr` merged through #336 and closed; `ws-maintenance/test-conventions` merged through #335 and closed; `ws-maintenance/0.3.1-preparation` from main 31d44fa4; `release-0.3.0` closed after final publication and retained with its tags; `ws-maintenance/0.3.0-acceptance` merged through #332 and closed; earlier slice branches are historical Requirements: `R-PRODUCT-006`, `R-COMPAT-001`, `R-PRODUCT-002`, `R-CONSOLE-001` ## RC3 preparation and accepted intake — 2026-11-17 +Preflight correction slice, based on release `bf4fa1f0`: the print-command +integration fixture now answers the exact read-only security-options query +and still refuses every modifying Docker command; its assertions require +image inspection and allow that identity read. The filesystem integration +test checks its required distinct-group chown capability on a separate probe +before calling the product, skipping only when the host lacks that permission. +No product behavior or legacy unit test is changed. This does not waive the +two rootless-local legacy unit failures. Deliver through a PR into the release; +the human merges before main propagation and the candidate tag. + The owner completed all 18 project-management intake decisions, then selected maintenance to cut rc3 and tally the work left for 0.3.1. Project-management is paused with its answers recorded and published. No questionnaire remains. @@ -4652,8 +4662,8 @@ launch was taken into intake and committed. No source was changed. ## Planned Next Step -Current, 2026-11-17: finish rc3 preflight and record the remaining release -work. Resolve the main-preservation integration route with the owner, prepare +Current, 2026-11-17: validate and deliver the two integration-test corrections +on `ws-maintenance/0.3.1-rc3-preflight` to the release for the human merge. Resolve the main-preservation integration route with the owner, prepare the main PR, and wait for the human merge. Verify the remote integration before tagging `v0.3.1-rc3`, then watch the candidate job and verify its downloaded assets. PR #43 remains required before final 0.3.1. The owner already requested From 2dc5e2da8e17af6aac321dbdfdf6dc1445419c2b Mon Sep 17 00:00:00 2001 From: Costin Cozianu Date: Tue, 17 Nov 2026 01:35:03 +0000 Subject: [PATCH 2/2] Record successful rc3 integration preflight correction --- CURRENT-STATUS.md | 2 +- engineering-docs/releases/v0.3.1/README.md | 6 ++++++ engineering-docs/releases/v0.3.1/test-runs.json | 10 ++++++++++ .../wip/2026-09-18-maintenance/CURRENT-STATUS.md | 14 ++++++++++---- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/CURRENT-STATUS.md b/CURRENT-STATUS.md index 776d1d7e..9e40acd9 100644 --- a/CURRENT-STATUS.md +++ b/CURRENT-STATUS.md @@ -12,7 +12,7 @@ coordination branch. Detailed state belongs in each linked status file. | `github-auth` | 2026-11-16 | GitHub SSH authentication through a launcher-owned host proxy | paused; Pair Review #44 merged; PR #47 targets release-0.3.1; two inherited gate failures remain | `ws-github-auth/ssh-proxy` | [workstream status](engineering-docs/wip/2026-11-16-github-auth/CURRENT-STATUS.md) | | `workflow-improvements` | 2026-08-09 | Improve the multiple-stream workflow from concrete dogfood findings during the recursive E2E cycle | active 2026-10-30; Pair Review Loop naming implemented and packaging verified for 0.3.0; mainline and release integration pending | `ws-workflow-improvements/v1` | [workstream status](engineering-docs/wip/2026-08-09-workflow-improvements/CURRENT-STATUS.md) | | `project-management` | 2026-08-09 | Maintain project-wide priorities, sequencing, dependencies, and lifecycle coordination | paused 2026-10-11 at owner direction; consent and forced configuration before RC work; remaining diagnostics/image scope and release cut decisions retained | `ws-project-management/coordination` | [workstream status](engineering-docs/wip/2026-08-09-project-management/CURRENT-STATUS.md) | -| `maintenance` | 2026-09-18 | Own the defects no open workstream covers, on `main` and on maintained release lines, and drive maintenance releases | active; preparing requested 0.3.1 rc3; SSH proxy merged, main propagation and preflight corrections pending; four unresolved release bugs, one blocking; presentations PR #43 awaits human merge | `release-0.3.1`, the workstream's selection from the cut to the final tag; `release-0.3.0` closed and retained; earlier slice branches merged and closed | [workstream status](engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md) | +| `maintenance` | 2026-09-18 | Own the defects no open workstream covers, on `main` and on maintained release lines, and drive maintenance releases | active; preparing requested 0.3.1 rc3; SSH proxy merged, main propagation and preflight corrections pending; four unresolved release bugs, one blocking; presentations PR #43 awaits human merge | `release-0.3.1`, release driver; `ws-maintenance/0.3.1-rc3-preflight`, validated integration-test correction for the release; `release-0.3.0` closed and retained | [workstream status](engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md) | | `component-upgrades` | 2026-09-21 | Deliver component distribution channels, developer-owned version sets and proven upgrade rollback; Codex first | paused 2026-10-02; consent design ruled (D-0011 to D-0013), 0.2.16 consent slice next; R-UPGRADE-002 follow-up retained | `ws-component-upgrades/v1` | [workstream status](engineering-docs/wip/2026-09-21-component-upgrades/CURRENT-STATUS.md) | | `sample-projects` | 2026-08-14 | Provide realistic sample projects as submodules that demonstrate ordinary adopter development inside DevCapsule | samples left the repository as submodules 2026-11-05; their future form is the owner's later decision | `ws-sample-projects/ai-learning` | [workstream status](engineering-docs/wip/2026-08-14-sample-projects/CURRENT-STATUS.md) | | `contained-display` | 2026-08-19 | Own the capsule supervisor core (container entry process, supervised children, explicit session end, headless mode) and the capsule's own display environment, closing the host-session credential exposure — supervisor first, display as its first consumer | active; **the contained display shipped in v0.2.12 on 2026-09-14** (recipe-9 base, contained desktop by default, X11 passthrough behind `host-x11`); the X11 credential bug is resolved; remaining threads are records and follow-ups (reconnect, WSL2 opener, sample locks) | `ws-contained-display/display-transport` | [workstream status](engineering-docs/wip/2026-08-19-contained-display/CURRENT-STATUS.md) | diff --git a/engineering-docs/releases/v0.3.1/README.md b/engineering-docs/releases/v0.3.1/README.md index c7e00c62..9e9d36f9 100644 --- a/engineering-docs/releases/v0.3.1/README.md +++ b/engineering-docs/releases/v0.3.1/README.md @@ -33,6 +33,12 @@ rc3; no further tag permission is needed once its prerequisites pass. ownership test assumes uid 0 can chown to gid 1, which this restricted user namespace cannot. The unit failures reject socket gid 0 in the legacy recursive-orchestrator tests. None was waived or marked passed. + Correction prepared on `ws-maintenance/0.3.1-rc3-preflight` at `87c35bab`: + full integration now passes, **155 passed, 13 skipped** (61.68 s). + The newly skipped ownership case lacks its independently probed host + permission. The local build still stops at the same two legacy gid-0 + unit failures; version, syntax, types (351 files) and conventions pass. + The human merge of the correction PR into the release remains. - **Propagate the release into main without undoing main-only work.** A clean automatic merge would downgrade `0.3.2.dev0` to `0.3.1`, copy the release-only docs manifest override and delete the November 13 blog, diff --git a/engineering-docs/releases/v0.3.1/test-runs.json b/engineering-docs/releases/v0.3.1/test-runs.json index 0e6a71e5..8dd6e714 100644 --- a/engineering-docs/releases/v0.3.1/test-runs.json +++ b/engineering-docs/releases/v0.3.1/test-runs.json @@ -61,6 +61,16 @@ "date": "2026-11-17", "result": "failed: 154 passed, 2 failed, 12 skipped in 68.28s", "evidence": "Scratch log /var/tmp/rc3-preflight/integration.log. test_print_command_names_a_base_image_that_is_not_here_and_pulls_nothing rejects the read-only docker info --format {{json .SecurityOptions}} query added by the rootless fix. test_filesystem_applies_distinct_user_and_group_ids_to_new_directories assumes uid 0 can chown to gid 1; this namespace returns EPERM. Both reproduce the received November 16 release-merge validation report. No Docker container launched; no candidate acceptance claimed." + }, + { + "kind": "integration", + "source-revision": "87c35bab6fb01151437ac40778d4a092d40e4e69", + "tests": "nox -s integration; 168 collected, 155 passed, 13 skipped", + "environment": "Linux x86-64 development capsule, Python 3.12.3, restricted user namespace; basetemp /var/tmp/rc3c; locally rebuilt PEX, not published candidate bytes", + "operator": "Codex for maintenance", + "date": "2026-11-17", + "result": "passed: 155 passed, 13 skipped in 61.68s", + "evidence": "Scratch log /var/tmp/rc3-preflight/correction-integration.log. Print-command fixture permits the exact read-only daemon security-options query while refusing Docker writes. The ownership case independently probes permission to chown to a distinct group and skips when the environment lacks it; other skips are unchanged. No product code changed. Full local build separately reaches 3320 passing unit tests and the same two inherited gid-0 failures, so it is not reported as a passing full gate." } ] } diff --git a/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md b/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md index f19435c1..7b75b6c3 100644 --- a/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md +++ b/engineering-docs/wip/2026-09-18-maintenance/CURRENT-STATUS.md @@ -24,7 +24,12 @@ and still refuses every modifying Docker command; its assertions require image inspection and allow that identity read. The filesystem integration test checks its required distinct-group chown capability on a separate probe before calling the product, skipping only when the host lacks that permission. -No product behavior or legacy unit test is changed. This does not waive the +Validation on `87c35bab`: full `nox -s integration` passes (155 passed, +13 skipped, 61.68 s); focused files 4 passed, 10 skipped. The required local +build passes version/syntax, mypy (351 files), conventions (0 breaches), then +stops with 3320 passing unit tests and the same two inherited gid-0 failures +(1 skipped, 191 deselected, 1 xfailed, 1 xpassed, 87.12 s). Later build steps +were not reached in this run. No product behavior or legacy unit test is changed. This does not waive the two rootless-local legacy unit failures. Deliver through a PR into the release; the human merges before main propagation and the candidate tag. @@ -4662,8 +4667,8 @@ launch was taken into intake and committed. No source was changed. ## Planned Next Step -Current, 2026-11-17: validate and deliver the two integration-test corrections -on `ws-maintenance/0.3.1-rc3-preflight` to the release for the human merge. Resolve the main-preservation integration route with the owner, prepare +Current, 2026-11-17: the integration corrections are validated; hand the PR +from `ws-maintenance/0.3.1-rc3-preflight` to the human for merge into the release. Resolve the main-preservation integration route with the owner, prepare the main PR, and wait for the human merge. Verify the remote integration before tagging `v0.3.1-rc3`, then watch the candidate job and verify its downloaded assets. PR #43 remains required before final 0.3.1. The owner already requested @@ -5516,7 +5521,8 @@ claimed. No final release or graphical/end-user acceptance is claimed yet. ## Open Threads Current, 2026-11-17 (supersedes stale release/PR claims below): rc3 is not cut; -main propagation needs the preservation commit and the human merge. The +the validated integration correction PR awaits the human merge into the +release, then main propagation needs the preservation commit and human merge. The exception question remains pending. PR #43 is open; the rootless and website gitlink fixes are merged. Four 0.3.1 bug records are unresolved, including one blocking host-side project-configuration refresh. The release overview owns