Conversation
BuildRunnerConfig and configureMiddlewareAndOptions were loading app config via cfg.NewDefaultProvider().GetConfig(), which always reads the global singleton and bypasses any registered ProviderFactory. Enterprise providers register a factory to merge OTEL config from an external config-server; by skipping the factory, telemetry and usage-metrics settings from that source were silently ignored on every `thv run`. Switch both call sites to cfg.NewProvider().LoadOrCreateConfig(), which checks registeredFactory first, then falls back to the default path for non-enterprise deployments. Add a unit test that exercises the LoadOrCreateConfig() path through a PathProvider to document and guard the correct config-loading contract. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4755 +/- ##
=======================================
Coverage 68.93% 68.94%
=======================================
Files 517 517
Lines 54441 54441
=======================================
+ Hits 37528 37533 +5
+ Misses 14044 14041 -3
+ Partials 2869 2867 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…call - Thread appConfig from BuildRunnerConfig into buildRunnerConfig and configureMiddlewareAndOptions so config is loaded exactly once per run instead of twice; eliminates the double I/O and the split-brain risk if the backing store returns different snapshots between calls - Pass the factory-aware configProvider into setupRuntimeAndValidation so NewCLIEnvVarValidator also uses the provider from RegisterProviderFactory instead of constructing a NewDefaultProvider that bypasses it Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@claude can you verify if the comments have been addressed? |
|
Claude finished @reyortiz3's task in 45s —— View job Review comment verification
Both review comments have been fully addressed in the current commits. Comment 1 — Double config loading (line 699) Resolved. Comment 2 — Resolved. The fix is consistent across all three call sites now — config is loaded once via |
Summary
BuildRunnerConfigandconfigureMiddlewareAndOptionsinrun_flags.gowere loading application config viacfg.NewDefaultProvider().GetConfig().NewDefaultProvideralways reads the global singleton and never checks a registeredProviderFactory. Any custom provider registered viaRegisterProviderFactory— for example, one that merges OTEL config from an external source — would be silently bypassed on everythv run.cfg.NewProvider().LoadOrCreateConfig(), which checksregisteredFactoryfirst and falls back to the default path when no factory is registeredTestSetupTelemetryConfiguration_LoadOrCreateConfigPathto document and guard the correct config-loading contract:LoadOrCreateConfig()on aPathProviderreads OTEL settings correctly, confirming the code path the fix enablesType of change
Test plan
task test)task lint-fix)Does this introduce a user-facing change?
No — deployments with no registered factory fall through to
NewDefaultProvideras before. Deployments using a customProviderFactorynow correctly pick up OTEL and other settings from that provider.Generated with Claude Code