Skip to content

cmd/codeaf: quitting a keyless first run leaves a raw Go log line on the terminal #1053

Description

@AbirAbbas

What happened

2026-09-15, staging-20260915-4b6ec83cfbfa (dev@4b6ec83cf), fresh CODEAF_HOME, no key anywhere, plain codeaf in an empty git init workspace, Escape past setting up · 1 of 2, then /quit. Exit code 0, and after the surface tore down the terminal showed:

2026/09/15 11:29:04 media: no generation endpoint on this install: provider API key is required

A raw timestamped log line, machinery vocabulary, on a screen the surface had just cleaned. Nothing a person did asked for media.

Replication

Deterministic (no model). CODEAF_HOME=$(mktemp -d) bin/codeaf in an empty repo, Escape, /quit; read the terminal after exit. No key, no model call.

Where

The media/image generation door's start-up probe (search no generation endpoint on this install under internal/), logged through the standard logger rather than the surface's own notes.

The fix

A capability that cannot work is absent, not broken: with no key there is no generation endpoint and nothing should be said about it at all. If the probe must record it, it records to the log file, never to the terminal the surface hands back.

Acceptance

  • e2e: the tmux suite's fresh-install subtest captures the pane after /quit and asserts no line matching ^[0-9]{4}/[0-9]{2}/[0-9]{2} is on it.
  • Unit: the probe with no key returns without writing to the default logger.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:chatThe v3 surface a person sits in front of (internal/tui3)bugSomething the code does that it should notgood first issueSmall and isolated, the acceptance already written, no ruling owed; a safe first pull requestsev:papercutA wording, a hint, a small wrongness that costs a moment

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions