Skip to content

Tidy grid setup's stderr: yellow warning prefix, no statusLine note, spaced notice - #267

Open
sanieldalib wants to merge 3 commits into
salib/grid-verbose-summaryfrom
salib/grid-warning-color
Open

sanieldalib wants to merge 3 commits into
salib/grid-verbose-summaryfrom
salib/grid-warning-color

Conversation

@sanieldalib

@sanieldalib sanieldalib commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #264.

Three small output tweaks from demoing grid setup:

  • Yellow warning: prefix. New ctx.Warn / ctx.Warnf helpers write warning: in the terminal's own yellow (ANSI 3, bold) followed by the message in the normal colour, the same as cargo and Homebrew. Colour is dropped when stderr isn't a terminal, so piped output and tests see plain warning: … text.
    • Every existing warning: line goes through them: grid, model, model environment, predict, ssh, auth and volume transfer. Volume transfer used to print Warning: with a capital W; it now matches the rest.
    • The auth store's warnWriter callbacks receive the bare message and the CLI adds the prefix.
    • Harness plans carry warnings in a new Plan.Warnings field instead of Notes strings with a warning: prefix baked in. Setup prints warnings before notes.
    • LogLine / Logf are unchanged plain writers; nothing is coloured implicitly.
  • No statusLine note. Claude Code setup no longer prints "Existing statusLine in … left unchanged; for auto routes, the serving model will be shown after each response through a Stop hook instead." The behaviour is unchanged (a user's statusLine is kept and the served model comes from a Stop hook). It was the last plan note, so Plan.Notes and its print loop are removed.
  • Spacing around the setup notice. A blank line before and after "Modifies harness settings…" separates it from the notes above and the prompt below.

Before:

warning: you are running /tmp/…/baseten, but baseten on your PATH is /opt/homebrew/bin/baseten; harnesses will run the former
Existing statusLine in ~/.claude/settings.json left unchanged; …
Modifies harness settings to set Grid as the gateway with your configured models.
To remove Grid, run baseten grid teardown.
┃ Set up Grid?

After (warning: in bold yellow, the rest unchanged):

warning: you are running /tmp/…/baseten, but baseten on your PATH is /opt/homebrew/bin/baseten; harnesses will run the former

Modifies harness settings to set Grid as the gateway with your configured models.
To remove Grid, run baseten grid teardown.

┃ Set up Grid?

Existing tests still match the plain warning: text. Two harness tests now read Plan.Warnings, and the statusLine tests assert the note is gone while still checking the user's statusLine is kept. Test_Grid_Setup_RealHarness and Test_Grid_ClaudeServedModel_RealClaudeCode fail locally the same way they do on main.

🤖 Generated with Claude Code

stderr lines that start with "warning:" now render the prefix in the
terminal's yellow (plain when stderr isn't a terminal), and the setup
notice gets a blank line before and after so it reads apart from the
notes above it and the prompt below.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanieldalib
sanieldalib force-pushed the salib/grid-warning-color branch from 1b098f7 to c99190b Compare November 13, 2026 22:20
LogLine and Logf no longer color any line that happens to start with
"warning:". Warn and Warnf write the prefix (yellow on a terminal) and
the message, every existing warning goes through them, the auth store's
warnWriter receives the bare message, and harness plans carry warnings
in their own Warnings field instead of prefixed Notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanieldalib sanieldalib changed the title Color the warning: prefix yellow and space out grid setup's notice Print warnings with a yellow prefix through Warn, and space out grid setup's notice Nov 13, 2026
Setup no longer prints "Existing statusLine … left unchanged" when it
keeps a user's statusLine and shows the served model through a Stop hook
instead. The behaviour is unchanged; it was the last plan note, so
Plan.Notes goes too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sanieldalib sanieldalib changed the title Print warnings with a yellow prefix through Warn, and space out grid setup's notice Tidy grid setup's stderr: yellow warning prefix, no statusLine note, spaced notice Nov 13, 2026
@sanieldalib
sanieldalib requested a review from cretz November 13, 2026 22:56
@sanieldalib
sanieldalib marked this pull request as ready for review November 13, 2026 22:56
@sanieldalib
sanieldalib added this pull request to stack #270 November 13, 2026 22:56
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T22:57:01.984866Z 33ddef1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant