Skip to content

feat(ai/runner): log live runner register and deregister events#3943

Open
rickstaa wants to merge 1 commit into
ja/live-runnerfrom
rs/live-runner-lifecycle-logs
Open

feat(ai/runner): log live runner register and deregister events#3943
rickstaa wants to merge 1 commit into
ja/live-runnerfrom
rs/live-runner-lifecycle-logs

Conversation

@rickstaa

@rickstaa rickstaa commented Jun 9, 2026

Copy link
Copy Markdown
Member

What

Operator-visible logging for the live runner lifecycle. Previously the registry logged nothing on the happy path (only slog warnings/errors on failure), so "is my runner connected, and at what price?" had to be inferred from /discovery.

Dynamic runners

  • live runner registered — new-runner branch of Heartbeat
  • live runner deregistered — with a reason threaded from the call sites:
    • heartbeat timeout — expiry loop (crash, OOM, network loss, hard kill)
    • unregister — explicit SDK shutdown (graceful stop)

Static runners

  • static live runner registered — first registration only (skips config reloads of an already-registered runner)
  • static live runner health changed — only on ready <-> unavailable transitions (static runners can't heartbeat, so this is their up/down signal)

Pricing

  • live runner price setslog.Debug, fires on first set and on actual change (guarded so unchanged-price heartbeats stay quiet)

Levels

Lifecycle events are slog.Info; price is slog.Debug (config detail, also queryable via /discovery).

Note: go-livepeer doesn't yet wire slog's level to the -v flag, so slog.Debug is currently dormant. A follow-up PR to master will bridge slog's level to -v (repo-wide, also covers trickle/worker/media debug lines).

Notes

  • The deregister log sits immediately after runner.removed = true, so it fires only when a removal commits, and every removal path funnels through that one chokepoint.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dc5e414f-e47c-423a-87bc-0914c4d4fc63

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rs/live-runner-lifecycle-logs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added go Pull requests that update Go code AI Issues and PR related to the AI-video branch. labels Jun 9, 2026
@rickstaa rickstaa requested a review from j0sh June 9, 2026 12:53
@rickstaa rickstaa marked this pull request as draft June 9, 2026 13:23
@rickstaa

rickstaa commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

@j0sh pushed this to draft since I might want to do some additional logging for the static path and display the initial price or price update.

Add slog lifecycle logging for dynamic and static runners: registered,
deregistered (reason: "heartbeat timeout" / "unregister"), static health
changes (ready <-> unavailable), and price set (slog.Debug, on change only).
The rest are slog.Info.
@rickstaa rickstaa force-pushed the rs/live-runner-lifecycle-logs branch from cad452e to c0801e4 Compare June 10, 2026 14:07
@rickstaa rickstaa marked this pull request as ready for review June 10, 2026 14:36
@rickstaa rickstaa marked this pull request as draft June 10, 2026 14:45
@rickstaa rickstaa marked this pull request as ready for review June 12, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Issues and PR related to the AI-video branch. go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant