Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/synth_panel/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -6167,9 +6167,12 @@ def _print_saved_result_hint(result_id: str) -> None:
"""
print(f"Result saved: {result_id}", file=sys.stderr)
print("Next:", file=sys.stderr)
print(f" synthpanel report {result_id} # full Markdown report", file=sys.stderr)
print(f" synthpanel report {result_id} # full Markdown report (incl. cost rollup)", file=sys.stderr)
print(f" synthpanel results show {result_id} # raw saved result", file=sys.stderr)
print(" synthpanel results list # all saved results", file=sys.stderr)
# #538: there is no per-result `cost <id>` command — the per-run cost
# rollup lives in `report` above. `cost summary` aggregates across runs.
print(" synthpanel cost summary # cost rollup across saved runs", file=sys.stderr)


def handle_runs_prune(args: argparse.Namespace, fmt: OutputFormat) -> int:
Expand Down
19 changes: 19 additions & 0 deletions tests/test_results_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,22 @@ def test_empty_runs_list_hints_results_store(self, capsys, tmp_path):
out = capsys.readouterr().out
assert code == 0
assert "synthpanel results list" in out


class TestSavedResultHintCommands:
"""The saved-result "Next:" block must only suggest real commands (#538)."""

def test_hint_suggests_real_commands_not_per_result_cost(self, capsys):
from synth_panel.cli.commands import _print_saved_result_hint

_print_saved_result_hint("result-abc123")
err = capsys.readouterr().err

# Real, existing commands are surfaced.
assert "synthpanel report result-abc123" in err
assert "synthpanel results show result-abc123" in err
assert "synthpanel results list" in err
# The per-run cost rollup is reachable via the real `cost summary`
# subcommand, not a nonexistent per-result `cost <id>` command.
assert "synthpanel cost summary" in err
assert "cost result-abc123" not in err
Loading