Skip to content

feat(run): explain roar register after the next-steps hint#110

Merged
TrevorBasinger merged 1 commit into
mainfrom
cg/register-hint-explainer
May 19, 2026
Merged

feat(run): explain roar register after the next-steps hint#110
TrevorBasinger merged 1 commit into
mainfrom
cg/register-hint-explainer

Conversation

@christophergeyer
Copy link
Copy Markdown
Member

Summary

The post-`roar run` hint block already nudges:

```
hint: next: roar show --job abc12345 · roar dag · roar register @3
```

…but `roar register @3` is opaque to first-time users (and to coding agents reading the output programmatically). Adds a one-line explainer right after:

```
hint: next: roar show --job abc12345 · roar dag · roar register @3
'roar register @3' uploads lineage to glaas.ai so you can reproduce it later.
```

Details

  • Uses the same `register_arg` as the action line, so `@N` form and UID-fallback form stay synchronized.
  • Inherits the existing stream + gate: quiet mode, pipe mode, and `hints.enabled = false` all still suppress both lines as a unit.
  • Same `warn_amber` styling — the two lines render as a coherent block.

Independence

Not stacked on #109 (the hints-to-stderr change). The new line goes through the same `_print` + `style` calls as the existing hint, so it inherits whatever gating + stream choice is in effect — works with the old TTY-suppressed semantics today, and will compose cleanly with #109 if both merge.

Test plan

  • `test_next_steps_hint_explains_what_register_does` — explainer presence + `@N` form parity with the action line.
  • `test_next_steps_hint_explainer_uses_uid_form_when_no_step_number` — fallback path parity.
  • Existing `_silent_in_pipe_mode`, `_silent_in_quiet_mode`, `_silent_when_hints_disabled` still pass — the explainer inherits the gate.
  • 938 unit tests passing, 1 pre-existing skipped.
  • `ruff check .` + `ruff format --check .` + `mypy roar` all clean.

🤖 Generated with Claude Code

@TrevorBasinger TrevorBasinger force-pushed the cg/register-hint-explainer branch from 289f189 to 15f66bc Compare May 19, 2026 15:45
After `roar run` completes, the hint block already prints:

    hint: next: roar show --job abc12345  ·  roar dag  ·  roar register @3

But for a user (or coding agent) reading the run output for the first
time, "roar register @3" is opaque — they don't yet know it publishes
to GLaaS, or why they'd want to. Add a one-line explainer right after:

    hint: next: roar show --job abc12345  ·  roar dag  ·  roar register @3
    'roar register @3' uploads lineage to glaas.ai so you can reproduce it later.

The explainer uses the same `register_arg` as the action line (so the
two stay in sync between the `@N` form and the UID fallback), inherits
the existing stream + gate (quiet / pipe-mode / `hints.enabled = false`
all still suppress it), and reuses the warn_amber styling so the two
lines read as one block.

Tests:
- `test_next_steps_hint_explains_what_register_does` — asserts the
  explainer follows the action line and references the same `@N` form.
- `test_next_steps_hint_explainer_uses_uid_form_when_no_step_number`
  — UID-form fallback parity: action line and explainer agree.

938 unit tests passing, 1 pre-existing skipped.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@TrevorBasinger TrevorBasinger force-pushed the cg/register-hint-explainer branch from 15f66bc to 1bd7d54 Compare May 19, 2026 15:46
@TrevorBasinger TrevorBasinger merged commit d8b6905 into main May 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants