You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI bugs: no --version, spinner floods non-TTY logs when FORCE_COLOR is set, completion lines printed twice #119
Problem: three small, reproducible defects in the CLI's surface:
No version flag.secfoo --version prints No such option: --version, and there is no secfoo version command. Bug reports cannot say which build they ran, and the Action and Docker image have no cheap self-check. __version__ lives in src/secfoo/__about__.py.
Progress spinner floods captured output. With stdout redirected to a file and FORCE_COLOR=1 set (common in CI and many shells), a 4-minute secfoo run wrote 96 KB of spinner redraw frames (⠋ Running SAST … repeated hundreds of times with cursor-movement escapes). Rich's Progress should be disabled (or switched to one line per event) whenever stdout is not a TTY, regardless of colour forcing. Reproduce: FORCE_COLOR=1 secfoo run --skill secret-scanning --target examples > out.txt, then wc -c out.txt.
Completion lines duplicated. In the same capture, after the spinner stops, success — Secret Scanning … and success — SAST … each appear twice before the results table. Same root cause: the live display's final redraw plus the stopped tasks' text. In non-TTY mode, print one line per skill start and one per completion, nothing else.
Build: add --version (eager Typer option) and secfoo version --json (version, Python, platform, store path, config path); make progress TTY-aware; add tests using CliRunner with captured stdout that assert the byte count and the single occurrence of each completion line; document --version in docs/REFERENCE.md.
Where to look:src/secfoo/cli.py (the app callback, run, the Progress(...) construction near the handle_start/handle_complete callbacks, _is_interactive), src/secfoo/__about__.py, tests/test_cli.py.
Done when:secfoo --version and secfoo version work; a captured non-TTY run prints each skill's start and completion exactly once and no escape sequences; tests cover both.
I would like to work on this issue! I'll implement --version, secfoo version --json, make the progress spinner TTY-aware to prevent log flooding when FORCE_COLOR=1 or stdout is redirected, deduplicate skill completion lines, and add comprehensive CliRunner test coverage and documentation.
Closing: everything in this issue is on main via #126.
Checked against the "Done when" list:
secfoo --version / -V and secfoo version --json (version, Python, platform, store path, config path) work and are documented in docs/REFERENCE.md.
Progress animates only when stdout is a real TTY, regardless of FORCE_COLOR.
A redirected FORCE_COLOR=1 secfoo run (fresh process, stubbed agent) produced 895 bytes with no escape sequences, and each skill's start and completion line appeared exactly once. The original report was 96 KB of spinner frames.
tests/test_cli.py covers --version, version --json and the single-line non-TTY output.
#127 was closed unmerged, but #126 already covers the issue in full.
Activity
dianatofficial commentedon Nov 15, 2026
I would like to work on this issue! I'll implement
--version,secfoo version --json, make the progress spinner TTY-aware to prevent log flooding whenFORCE_COLOR=1or stdout is redirected, deduplicate skill completion lines, and add comprehensive CliRunner test coverage and documentation.vsn411 commentedon Nov 15, 2026
Reopening. This was auto-closed when #126 merged. #127 also said "Fixes #119" and is now closed without merging, so this issue should stay open.
karthickmk2001 commentedon Nov 19, 2026
Closing: everything in this issue is on
mainvia #126.Checked against the "Done when" list:
secfoo --version/-Vandsecfoo version --json(version, Python, platform, store path, config path) work and are documented indocs/REFERENCE.md.FORCE_COLOR.FORCE_COLOR=1 secfoo run(fresh process, stubbed agent) produced 895 bytes with no escape sequences, and each skill's start and completion line appeared exactly once. The original report was 96 KB of spinner frames.tests/test_cli.pycovers--version,version --jsonand the single-line non-TTY output.#127 was closed unmerged, but #126 already covers the issue in full.