Skip to content

docs(openspec): plan #5448 Print the elapsed line only on a terminal - #5544

Merged
dan-petty merged 1 commit into
mainfrom
fix/5448-print-the-elapsed-line-only-when
Nov 13, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/5448-print-the-elapsed-line-only-when

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #5448

Each devops command writes Elapsed: <duration> to stderr at exit, also when stderr is a pipe. An agent tool captures both streams, so the line enters the agent context, and a 2>&1 JSON pipe fails with Extra data. The change guards the exit hook in src/devops_cli/main.py with sys.stderr.isatty(). A terminal still shows the duration; a pipe and an agent tool get no line. FORCE_COLOR and TTY_COMPATIBLE do not turn a pipe into a terminal. The command span and both duration metrics stay unchanged, so no duration is lost. The tests run the CLI as a child: stderr a pipe, FORCE_COLOR=1 with a pipe, and a pseudo-terminal. One case reads the sub-command duration through the OTLP fake. The contributing guide drops the elapsed workaround.

Change: openspec/changes/5448-print-the-elapsed-line-only-when/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 13, 2026
@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 13, 2026 20:19
@dan-petty
dan-petty merged commit 83f3656 into main Nov 13, 2026
22 checks passed
@dan-petty
dan-petty deleted the fix/5448-print-the-elapsed-line-only-when branch November 13, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant