Skip to content

feat(consolewindow): stop background spawns from flashing console windows on Windows - #308

Merged
cpcloud merged 1 commit into
mainfrom
consolewindow-lint
Nov 5, 2026
Merged

cpcloud merged 1 commit into
mainfrom
consolewindow-lint

Conversation

@rodboev

@rodboev rodboev commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Kenn daemons on Windows stop flashing console windows, because shared lint now bans exec.CommandContext for consolewindow.CommandContext, which hides the window.

kenn-io/roborev#1665, kenn-io/kata#922, kenn-io/msgvault#1845, and kenn-io/docbank#1313 clear those repos ahead of the ban. All have merged so this is good to go.

…dows on Windows

On Windows, kenn-io daemons run without a console. Each console program a daemon starts, such as git or gh, then opens its own visible window for a moment unless the spawn sets CREATE_NO_WINDOW. Repos that forget consolewindow.Hide at one call site flash a window every time that code runs.

consolewindow.CommandContext returns a command that is already hidden, and the shared lint config now bans exec.CommandContext in favor of it, so a new spawn is hidden unless its author opts out with a nolint reason. A per-function analyzer that checked for a Hide call would miss commands built in one function and started in another, and forge already uses this wrapper-plus-ban approach with its own procutil package.

The main-package exclusion now matches only the exec.Command cancellation rule. Daemons live in main packages, so the old pattern would have exempted the code this rule is for. Interactive spawns, such as git credential prompts and ssh with BatchMode=no, keep exec.CommandContext because they need the caller's console.

Every repo picks up the ban on its next kit bump and `kennlint config` run.
@roborev-ci

roborev-ci Bot commented Nov 5, 2026

Copy link
Copy Markdown

roborev: Combined Review (adedbe7)

Verdict: No findings at or above medium severity.


Reviewers: 3x codex, codex (security), codex (test-value) | Synthesis: codex | Total: 2m25s

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants