GH-79: feat(core): add optional Logger to PollerDeps — poller logs through injected logger#80
Merged
Conversation
…ttribution nil Logger falls back to slog.Default() (zero behavior change); a non-nil Logger receives every poller-originated log line, including the sequential mode's merge-wait path. sdk/core golden re-blessed additive-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Automated PR created by Pilot for task GH-79.
Closes #79
Changes
GitHub Issue #79: feat(core): add optional Logger to PollerDeps — poller logs through injected logger
Problem
sdkcore.PollerDepshas noLoggerfield, so the poller loop insdk/integrations/github(and any code it calls) logs throughslog.Default(). Consumers embedding the poller cannot attribute its log lines.Live incident (qf-studio/pilot, 2026-07-06): the SDK github poller failed every poll for ~25 minutes with
msg="Failed to fetch issues"401 errors carrying nocomponent=tag — the operator could not tell which of nine pollers was failing. The consumer-side fix (qf-studio/pilot PR #3919) tags everything the consumer logs itself, but the poller's internal lines stay untagged until the SDK accepts a logger.Change
Logger *slog.Loggertosdkcore.PollerDeps. Semantics:nil→ fall back toslog.Default()(zero behavior change for existing consumers).sdk/integrations/githubpoller stores the resolved logger at construction and uses it for ALL its log lines (poll loop, dispatch, retry scheduler, board sync paths). Grep forslog./p.loggerinsdk/integrations/github/poller.go— every line goes through the injected logger.sdk/coreis API-locked viaTestPublicAPILocked. Adding the field is additive — re-bless withgo test ./sdk/core/... -updateand commit the regenerated golden. Do not remove or rename existing fields.Acceptance
PollerDeps{}(nil Logger) → identical behavior/output to today.slog.Default()when a Logger is set.TestPublicAPILockedgreen.sloghandler, run one poll cycle against a stub, assert lines arrive on the injected handler.Refs