Commit graph

7 commits

Author SHA1 Message Date
Bryan Helmkamp
dc3867a3c4 Fix cargo fmt formatting across workspace
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 00:36:44 -05:00
Bryan Helmkamp
864cb5d853 Fix 3 feature spec bugs: shorthand version, option env names, install user vars
- Normalize string option values ("1.18") to {"version": "1.18"} so
  shorthand syntax correctly sets the VERSION env var
- Add option_id_to_env_name() to convert option IDs like "node-version"
  to NODE_VERSION per the dev container spec
- Emit _REMOTE_USER, _CONTAINER_USER, _REMOTE_USER_HOME, and
  _CONTAINER_USER_HOME in feature install snippets, threading remoteUser
  from devcontainer.json through resolve_features/generate_layer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-03 10:07:23 -05:00
Bryan Helmkamp
ba2b6faef3 Add e2e tests for 5 devcontainer spec gaps using local features
Create a local-features fixture with 3 local feature directories that
exercise all gap fixes through the full DevcontainerResolver pipeline:
- dependsOn auto-injection (base-utils not in features map, injected)
- feature containerEnv merge (3 features contribute env vars)
- feature lifecycle hooks (appended after devcontainer.json commands)
- local path feature references (all features use ./ paths)
- install ordering (dependsOn/installsAfter edges respected)

Also fix a concurrency bug: resolve_features now uses a unique temp
dir per invocation instead of a shared /tmp/devcontainer-features/
that caused parallel test corruption.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:51:26 -05:00
Bryan Helmkamp
62b4e9df74 Add subdirectory file discovery to arc-devcontainer
When neither .devcontainer/devcontainer.json nor .devcontainer.json
exists, scan .devcontainer/ for subdirectories containing a
devcontainer.json. Subdirectories are sorted alphabetically and the
first match is used. Standard locations still take priority.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:42:34 -05:00
Bryan Helmkamp
4ad60489b9 Fix 4 spec compliance gaps in arc-devcontainer
- Stop baking remoteEnv into Dockerfile (only containerEnv belongs as ENV)
- Merge forwardPorts with compose ports in compose mode (with dedup)
- Support build.target (parsed with variable substitution)
- Handle forwardPorts string formats like "8080:80" and "9090"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 00:06:23 -05:00
Bryan Helmkamp
ee11a46b86 Fix 4 critical gaps in arc-devcontainer: onCreateCommand, build.args, containerEnv, compose array
- Add onCreateCommand lifecycle hook (parsed, resolved, exposed as on_create_commands)
- Expose build.args on DevcontainerConfig for docker build --build-arg
- Wire containerEnv into generated Dockerfile as ENV directives (remoteEnv overrides on collision)
- Support dockerComposeFile as array of paths with merge semantics (last wins for image/build/user, ports accumulate, env overrides)
- Update DEVCONTAINER-COMPATIBILITY.md and INTEGRATION.md docs
- Add e2e tests with realistic Python and compose project fixtures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 23:43:45 -05:00
Bryan Helmkamp
5e337b4cb3 Add arc-devcontainer crate for parsing and resolving devcontainer.json
Standalone crate that reads devcontainer.json (with JSONC support), fetches
OCI Features via oras, and produces a resolved config containing a generated
Dockerfile, lifecycle hooks, environment variables, and forwarded ports.

Supports image, Dockerfile, and Docker Compose modes with devcontainer
variable substitution. No coupling to arc-workflows or DaytonaSandbox.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 22:38:12 -05:00