Repository navigation
fix(cli): stop with one error line in a removed working directory - #3133
Conversation
|
The steps of the job:
|
|
Advisory pre-merge review (automated; a person decides). Recommendation: hold. The new error is not caught, so the command shows a traceback and the new seam test fails. Findings
Dropped or merged
Good points
Checks that I ran
|
The check of the working directory ran before the exit seam, so the error showed a traceback. It now runs inside the seam. The tests remove the working directory for real and use the public interfaces.
The tasks now match the code and the tests.
|
I fixed the defects of the review. The head is now What I changed:
Fail-to-pass (
Checks: ruff, |
|
Advisory pre-merge review (automated; a person decides). Recommendation: merge after one minor fix. The change meets the three acceptance criteria of #2531, but a command that runs as a group callback still prints a traceback in a removed working directory. Fix it, or write the limit down.
What is good:
Checks that I ran or read:
|
A command group such as scan reads the working directory when its module loads, before any callback runs. The entry point now checks the directory before it loads the module, and reports the error in one line.
The spec words the output as one error line, then the Elapsed line. The tasks, the proposal and the design name the check for a command group.
|
I fixed the gap that the second review found. The head is What I changed:
Fail-to-pass ( Checks: ruff, |
|
Advisory pre-merge review (automated; a person decides). Recommendation: merge after minor fixes. The change fixes the issue for normal commands. One path still fails, and the new ARCHITECTURE.md sentence claims too much. Reviewed head: 0b30efa.
What is good:
Checks that I ran:
|
A dry run of a command group loads its module to read the options, so the check ran too late. It now runs before the load. The telemetry tests read the exported span, not a private field.
The spec and the tasks name the dry-run path and the help query. The cost line counts five tests.
|
I fixed the findings of the third review. The head is What I changed:
Fail-to-pass ( Checks: ruff, |
🤖 I have created a release *beep* *boop* --- ## [0.40.0](v0.39.1...v0.40.0) (2026-11-02) ### Features * **k8s:** serve deepseek-v4.1-flash-1017 via OpenRouter ([#3145](#3145)) ([d5dc921](d5dc921)), closes [#3144](#3144) ### Bug Fixes * **cli:** stop with one error line in a removed working directory ([#3133](#3133)) ([c4a4dbb](c4a4dbb)) ### Code Refactoring * **cli:** remove the _prepare_cmd alias and ban noqa F401 in src ([#3110](#3110)) ([e40dbac](e40dbac)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
A devops command run from a working directory that no longer exists now stops with one error line and exit status 1, with no traceback. A span now starts without
vcs.*attributes in that case.Why: a worktree clean-up can remove the directory of a running shell. The first crash is in
_resolve_git_dir, but a guard there is not enough. Many other places read the working directory, and a command group such asdevops scanreads it when its module loads. So the check sits at the entry of each command (OTelTyper.command) and at the entry that loads a command group (_delegate). Both userequire_working_directory()and report through_report_devops_error(). A help query still works.Change:
openspec/changes/archive/2026-11-01-2531-a-devops-command-run-from-a/Closes #2531