Skip to content

docs(openspec): plan #2531 guard Path.cwd in _resolve_git_dir - #2995

Merged
dan-petty merged 1 commit into
mainfrom
fix/2531-a-devops-command-run-from-a
Nov 1, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/2531-a-devops-command-run-from-a

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

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/

@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 10:22
@dan-petty
dan-petty self-requested a review as a code owner November 1, 2026 10:22
@dan-petty
dan-petty merged commit d580cdd into main Nov 1, 2026
18 checks passed
@dan-petty
dan-petty deleted the fix/2531-a-devops-command-run-from-a branch 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
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.

1 participant