Skip to content

Commit 9c09426

Browse files
committed
fix(cli): print progress messages to a dedicated non-recording console
progress_cb was wired directly to console.print, the same recording console save_report() exports from. The "Probing <target>:<port> for PQC key exchange…" progress line was appended to the record buffer, so --output files started with that line before the actual report.
1 parent 4fa0eba commit 9c09426

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ Version numbers follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html
99

1010
## [Unreleased]
1111

12+
### Fixed
13+
- `cli.py`: the `check` command's `progress_cb` now prints to a dedicated,
14+
non-recording `Console` instead of the shared recording console from
15+
`reporter.py`. Previously the "Probing <target>:<port> for PQC key
16+
exchange…" progress line was appended to the record buffer that
17+
`save_report()` exports from, so `--output` files started with that line
18+
before the actual report.
19+
1220
---
1321

1422
## [0.6.2] — 2026-06-24

quantumvalidator/cli.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@
1616
from typing import TYPE_CHECKING
1717

1818
import typer
19+
from rich.console import Console
1920

2021
if TYPE_CHECKING:
2122
from quantumvalidator.models import QuantumReport
2223

2324
from quantumvalidator.reporter import console
2425

26+
# Non-recording console for progress messages. Using the recording
27+
# ``console`` from ``reporter`` here would bake every progress line into
28+
# the record buffer that ``save_report()`` exports from.
29+
_progress_console = Console(highlight=False)
30+
2531
app = typer.Typer(
2632
name="quantumvalidator",
2733
help=(
@@ -66,7 +72,7 @@ def check(
6672
target,
6773
port=port,
6874
timeout=timeout,
69-
progress_cb=None if json_output else console.print,
75+
progress_cb=None if json_output else _progress_console.print,
7076
)
7177
except RuntimeError as exc:
7278
console.print(f"[red]Error:[/red] {exc}")

0 commit comments

Comments
 (0)