Repository navigation
fix(scanner): scan --watch accepts an --appmap-dir that doesn't exist yet - #2432
Open
dividedmind wants to merge 1 commit into
Open
dividedmind wants to merge 1 commit into
dividedmind wants to merge 1 commit into
Conversation
… yet Watch mode already waits for a missing AppMap directory to appear, but only when the directory comes from appmap.yml: an explicit --appmap-dir was still checked up front and failed with "does not exist, or is not readable". The VS Code extension always passes --appmap-dir, so the scanner crashed and was retried until aborted whenever the directory hadn't been created yet. Only check the directory for one-off scans. Refs: getappmap/vscode-appland#1134 Assisted-by: Claude:claude-opus-5-5
dividedmind
requested review from
kgilpin
and
a balanced review from Copilot
November 11, 2026 21:53
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change allowing watch mode to start before an explicitly specified AppMap directory exists.
No open issues 🎉
What changed in this PR
This PR lets scanner watch mode accept an explicit --appmap-dir before the directory exists, preventing startup failures when invoked by the VS Code extension.
Changes:
- Skip upfront AppMap directory validation in watch mode while preserving validation for one-off scans.
- Extend the missing-directory regression test to cover both
appmap.ymland--appmap-dir.
| File | Description |
|---|---|
packages/scanner/test/cli/commands.spec.ts |
Tests watch mode with a missing directory supplied through either configuration or CLI arguments. |
packages/scanner/src/cli/scan/command.ts |
Limits explicit directory validation to non-watch scans. |
Review effort: Balanced
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.
Watch mode already waits for a missing AppMap directory to appear, but only when the directory comes from appmap.yml: an explicit --appmap-dir was still checked up front and failed with "does not exist, or is not readable". The VS Code extension always passes --appmap-dir, so the scanner crashed and was retried until aborted whenever the directory hadn't been created yet.
Only check the directory for one-off scans.
Refs: getappmap/vscode-appland#1134
Assisted-by: Claude:claude-opus-5-5