Skip to content

test: add scenarios.json testing pattern, close claude-dev's installCli gap - #97

Merged
baxyz merged 4 commits into
mainfrom
test/claude-dev-installcli-scenario
Sep 9, 2026
Merged

test: add scenarios.json testing pattern, close claude-dev's installCli gap#97
baxyz merged 4 commits into
mainfrom
test/claude-dev-installcli-scenario

Conversation

@baxyz

@baxyz baxyz commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Prompted by the vite-plus VP_HOME regression: audited every feature with the same "curl-installer → user home → symlink to /usr/local/bin" shape (nub, github-dev, cline-dev, claude-dev). nub and github-dev already assert the symlink explicitly; cline-dev uses a different, unaffected install pattern (npm install -g). claude-dev was the one real gap: its installCli option already degrades gracefully and correctly on failure, but defaults to false and had zero CI coverage — that code path has never once run in this repo's CI.
  • Adds test/claude-dev/scenarios.json + with_cli.sh, the devcontainers-cli's own mechanism for testing non-default option combinations (this repo had never used it before).
  • Wires a new test-scenarios job into both pr-validation.yml and test.yml, following the same convention devcontainers/features itself uses (--skip-scenarios on the per-baseImage job, --skip-autogenerated on the scenario job).
  • Documents the pattern in AGENTS.md so the next default-off, silently-degrading option gets a scenario instead of staying untested.

Test plan

  • Verified directly: devcontainer features test --features claude-dev --skip-autogenerated . runs the real installer with installCli:true and installs correctly
  • CI green on this PR (including the new test-scenarios job)

baxyz and others added 2 commits September 9, 2026 18:54
Prompted by the vite-plus VP_HOME regression: install.sh's installCli path
already degrades gracefully (warns instead of aborting) if the CLI install
fails, which is correct — but installCli defaults to false and no CI
matrix entry ever set it to true, so that whole code path has never once
run in CI. The exact same silent-degrade shape that let vite-plus's own
regression through, just on an untested path this time instead of a buggy
one.

Verified directly: `devcontainer features test --features claude-dev
--skip-autogenerated .` runs the real claude.ai installer with
installCli:true and installs correctly — /usr/local/bin/claude present
and runnable. Not a bug, just previously unverified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… pattern

Wires claude-dev's new with_cli scenario into both pr-validation.yml and
test.yml as a separate job (matching devcontainers/features' own
convention: --skip-scenarios on the regular per-baseImage job,
--skip-autogenerated on the scenario job — a scenario defines its own
image, so running it once per baseImage matrix entry would be both wrong
and wasteful).

Documents the pattern in AGENTS.md under "Testing non-default options" so
the next default-off, silently-degrading option gets a scenario instead
of staying untested indefinitely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread .github/workflows/test.yml Fixed
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

✅ PR Validation Passed

All checks passed!


📋 Pipeline Status

Job Status
🧾 Conventional Commits passing
🔖 Version Bump passing
🧪 Feature Tests passing
🧪 Scenario Tests passing
🐚 ShellCheck passing

🤖 Generated by @helpers4 CI • 2026-09-09

baxyz and others added 2 commits September 9, 2026 19:00
…ditions

A new test/<name>/scenarios.json or scenario script doesn't change what
already-published consumers get — it only verifies a non-default option
combination, the same "doesn't touch what ships" reasoning already applied
to README-only changes. The check's own grep was broader than its
documented policy ("test/<name>/test.sh" specifically, per this file's
"Modifying an existing feature" section above), so it flagged claude-dev's
new with_cli scenario as needing a bump. Narrowed it to match: src/<name>/
(minus README) or test/<name>/test.sh specifically trigger the check, not
every file under test/<name>/.

Also drops the version bump and changelog entry this added to claude-dev
for the scenario-only PR — no longer needed now that the check matches its
own policy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CodeQL flagged this workflow for not limiting the default GITHUB_TOKEN
permissions. pr-validation.yml already scopes to contents:read +
pull-requests:write; test.yml only checks out code and runs the
devcontainer CLI locally, so contents:read alone covers it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@baxyz
baxyz merged commit 86cc929 into main Sep 9, 2026
79 of 80 checks passed
@baxyz
baxyz deleted the test/claude-dev-installcli-scenario branch September 9, 2026 19:38
baxyz added a commit that referenced this pull request Sep 9, 2026
Found during a final consistency audit after #97: this paragraph still
described the pre-fix, broader behavior (any file under test/<name>/
triggers a bump) instead of the corrected one (test/<name>/test.sh
specifically — a scenario file doesn't count).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
baxyz added a commit that referenced this pull request Sep 9, 2026
…changes

Corrects an over-broad rule from #97: test/<name>/test.sh itself was kept
as a bump trigger there (reasoning: "the one file CI runs against every
consumer's build"), only exempting scenario files. That's still wrong —
test.sh is exactly as invisible to a consumer as a scenario file. A
version bump publishes a new GHCR tag and triggers a website docs
rebuild; doing that for a change nobody running the feature can see is
pure noise, not a safety measure.

Narrows the check to src/<name>/ (minus README) only. Nothing under
test/<name>/ ever requires a bump anymore. Updated AGENTS.md's "Modifying
an existing feature" and "Testing non-default options" sections to state
this explicitly, and reverted the version bumps this branch had already
added to copilot-dev and essential-dev for test-only changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
baxyz added a commit that referenced this pull request Sep 9, 2026
…changes

Corrects an over-broad rule from #97: test/<name>/test.sh itself was kept
as a bump trigger there (reasoning: "the one file CI runs against every
consumer's build"), only exempting scenario files. That's still wrong —
test.sh is exactly as invisible to a consumer as a scenario file. A
version bump publishes a new GHCR tag and triggers a website docs
rebuild; doing that for a change nobody running the feature can see is
pure noise, not a safety measure.

Narrows the check to src/<name>/ (minus README) only. Nothing under
test/<name>/ ever requires a bump anymore. Updated AGENTS.md's "Modifying
an existing feature" and "Testing non-default options" sections to state
this explicitly, and reverted the version bumps this branch had already
added to copilot-dev and essential-dev for test-only changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants