Repository navigation
docs(openspec): plan #2531 guard Path.cwd in _resolve_git_dir - #2995
Merged
Merged
Conversation
dan-petty
marked this pull request as ready for review
November 1, 2026 10:22
dan-petty
added a commit
that referenced
this pull request
Nov 1, 2026
The evaluation of PR #2995 found defects in the plan for issue #2531. This change fixes the plan in place. It changes no code and no test. The old plan named a test file that does not exist. It also guarded only `_resolve_git_dir`. That guard cannot make the command finish: the next crash is in the settings code. The new plan has two task groups. It has spec deltas in the two right capabilities: `command-error-exit` and `command-telemetry`. The Feasibility section now records the probe output and the history of the exit seam. Plans #2531
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.
Plans #2531
A devops command run from a deleted working directory crashed with an unhandled FileNotFoundError traceback from the telemetry setup. The telemetry tracer calls _resolve_git_dir, which calls Path.cwd(). When the directory no longer exists, Path.cwd() raises FileNotFoundError and the command does not complete. This change wraps the Path.cwd() call in _resolve_git_dir with a try/except OSError guard. On failure, the function returns None, which is the same value it returns when no .git entry is found. The caller _detect_vcs_metadata already handles None by returning an empty dict, so the command proceeds without telemetry VCS attributes. The fix is one try/except block of about 4 lines in src/devops_cli/telemetry/tracer.py, plus a test that patches Path.cwd to raise FileNotFoundError and a
Change:
openspec/changes/2531-a-devops-command-run-from-a/