Repository navigation
Remove unreachable app config pull client ID guard - #8730
Closed
byrichardpowell wants to merge 2 commits into
Closed
byrichardpowell wants to merge 2 commits into
byrichardpowell wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The linked-app contract supports the removed branches, and no blocking issues remain.
Review effort: Balanced
Findings: None
What changed in this PR
Simplifies app config pull by using the validated linked app directly, without changing CLI behavior.
Changes:
- Passes the linked app as one typed service argument.
- Removes unreachable validation and directory fallback branches.
- Adds focused command and service contract tests.
| File | Description |
|---|---|
| packages/app/src/cli/services/app/config/pull.ts | Uses the linked app and its resolved directory. |
| packages/app/src/cli/services/app/config/pull.test.ts | Tests linked-app configuration and write arguments. |
| packages/app/src/cli/commands/app/config/pull.ts | Passes the linked app to the service. |
| packages/app/src/cli/commands/app/config/pull.test.ts | Tests argument forwarding and success output. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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 are these changes introduced?
The sdk-tests campaign decision #29 asked us to verify defensive branches in
app config pulland remove only those that cannot be reached instead of covering them in SDK tests. This supports the contract work in shopify-sdk-tests PR #26.WHAT is this pull request doing?
Remove the redundant missing-
client_idguard afterlinkedAppContextby passing its linked app into the pull service as one typed value.linkedAppContextrejects an active config without a non-empty stringclient_idbefore returning, and itsAppLinkedInterfacecontains aCurrentAppConfigurationthat requiresclient_id.The directory fallback was found to be reachable and is intentionally preserved. When
--client-idselects a different remote app, the in-memory linked app uses the override whileloadLocalAppOptionssees the different client ID on disk and returns no app directory. If the command started in a project subdirectory,localAppOptions.appDirectory ?? directorymust retain that original invocation directory to avoid changing the write location.Focused command and service tests cover the differing-client-ID/subdirectory path and assert the preserved fallback behavior. There is no observable CLI behavior change, so no changeset is included.
How to manually test your changes?
Validation
pnpm --filter @shopify/app vitest run src/cli/services/app/config/pull.test.ts src/cli/commands/app/config/pull.test.tspnpm --filter @shopify/app lintpnpm --filter @shopify/app type-checkpnpm exec prettier --check packages/app/src/cli/services/app/config/pull.ts packages/app/src/cli/services/app/config/pull.test.ts packages/app/src/cli/commands/app/config/pull.ts packages/app/src/cli/commands/app/config/pull.test.tsgit diff --checkChecklist