fix(install): forward --target to additive apm install (non-isolated)#36
Merged
Conversation
Mirror of #33's fix for the second install path. Isolated mode writes `target:` into the generated apm.yml; the non-isolated additive path (`apm install <dep>` per inline dep, no apm.yml present) had no such signal and so APM v0.12.3+ strict harness detection rejected with exit code 2 ("No harness detected") on every workspace without an on-disk marker like `.github/copilot-instructions.md`. `installDeps` now accepts the validated target and appends `--target <value>` to every `apm install <dep>` call. The bare `apm install` (apm.yml-driven) path is intentionally left alone - the project's apm.yml is the source of truth for that case, and overriding it from the action input would be surprising. Caught by test-action.yml's `Install with inline dependencies (additive)` job on the v1.7.0 tag run. Regression test asserts the per-dep call sequence is `apm install <pkg> --target <value>`. 111/111 unit tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the non-isolated “additive install” code path to forward the action’s validated target input to each apm install <dep> invocation, addressing APM v0.12.3+ strict harness detection failures when installing inline dependencies into a workspace that lacks harness markers.
Changes:
- Forward
validatedTargetintoinstallDeps(...)and append--target <value>to each per-dependencyapm installcall. - Add a regression unit test asserting the exact
apm installargument sequence for the non-isolated additive path. - Regenerate
dist/index.jsto reflect the source changes.
Show a summary per file
| File | Description |
|---|---|
src/runner.ts |
Passes validated target into additive installs and appends --target to per-dep apm install calls. |
src/__tests__/runner.test.ts |
Adds regression coverage for forwarding --target in non-isolated additive installs. |
dist/index.js |
Built output updated to include the new forwarding behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/3 changed files
- Comments generated: 1
Comment on lines
323
to
327
| // Install extra inline deps additively | ||
| if (depsInput) { | ||
| const deps = parseDependencies(depsInput); | ||
| await installDeps(resolvedDir, deps); | ||
| await installDeps(resolvedDir, deps, validatedTarget); | ||
| } |
danielmeppiel
added a commit
that referenced
this pull request
May 7, 2026
Patch release wrapping #36: completes the v0.12.3 strict-detection fix for the non-isolated additive install path that v1.7.0 missed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
Install with inline dependencies (additive)job intest-action.ymlfailed on thev1.7.0tag run with:Failing job
Same v0.12.3 strict-detection root cause as #33, but in a second install code path that #33 didn't cover:
isolated: true)apm installapm installapm install <dep>per dep--targetforwardedThe fixture in
test-action.ymlalready passestarget: copilot, but the action was discarding it for this path.What
installDeps(dir, deps, target?)now appends--target <value>to every per-depapm installcall whentargetis set. The bare apm.yml-drivenapm installpath is intentionally left alone — the project's apm.yml is the source of truth there, and overriding it from the action input would be surprising.The hoisted
validatedTargetfrom #34 flows straight through, so the strict input validation already covers this path too.Tests
New regression test
forwards --target to additive apm install (non-isolated mode)captures everyapm installinvocation and asserts the call sequence:111/111 unit tests pass locally.
Release plan
After merge, cut
v1.7.1and let the workflow re-tagv1. TheInstall with inline dependencies (additive)job runs on push-to-main / tag, so it will validate end-to-end on the new tag.