Skip to content

Annotate --help flags with applicable node roles and warn on mismatches#3895

Open
Lazydayz137 wants to merge 2 commits intolivepeer:masterfrom
Lazydayz137:feat/2183-flag-role-annotations
Open

Annotate --help flags with applicable node roles and warn on mismatches#3895
Lazydayz137 wants to merge 2 commits intolivepeer:masterfrom
Lazydayz137:feat/2183-flag-role-annotations

Conversation

@Lazydayz137
Copy link
Copy Markdown

What does this pull request do?

Adds role annotations to all CLI flags and warns at startup when flags are set that do not apply to the selected node role.

Specific updates

  • Annotate all 115+ flag descriptions with role tags: [O]=Orchestrator, [B]=Gateway/Broadcaster, [T]=Transcoder, [W]=AI Worker, [ALL]=All
  • Add flagRoleMap mapping each flag to applicable roles
  • Add WarnMismatchedFlags() that logs warnings for irrelevant flags at startup

How did you test each of these updates?

  • go test ./cmd/livepeer/starter/... passes
  • go vet clean
  • gofmt clean

Does this pull request close any open issues?

Fixes #2183

Checklist

  • I have read the contribution guide
  • make and tests run successfully
  • Code is formatted with gofmt

Lazydayz137 and others added 2 commits April 2, 2026 03:36
Add role annotations to all flag descriptions in --help output using
the format [O]=Orchestrator, [B]=Gateway/Broadcaster, [T]=Transcoder,
[W]=AI Worker, [ALL]=All roles. This makes it clear at a glance which
flags are relevant for each node type.

Also add runtime warning logic (WarnMismatchedFlags) that detects when
a user sets a flag that doesn't apply to their selected role, logging
a warning like: "Flag -maxTicketEV is intended for B roles but this
node is running as orchestrator; it may have no effect"

Fixes livepeer#2183

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the go Pull requests that update Go code label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Unclear which flags are used by which roles

1 participant