Skip to content

fix: configurable drift detection field and flaky test fixes#63

Merged
dwsmith1983 merged 3 commits intomainfrom
fix/drift-field-config
Mar 9, 2026
Merged

fix: configurable drift detection field and flaky test fixes#63
dwsmith1983 merged 3 commits intomainfrom
fix/drift-field-config

Conversation

@dwsmith1983
Copy link
Copy Markdown
Owner

Summary

  • Configurable DriftField in PostRunConfig — drift detection was hardcoded to compare sensor_count but bronze consumers write count in hourly-status sensors, silently suppressing all post-run drift detection. The new field defaults to sensor_count for backward compatibility.
  • Two flaky tests fixedTestSLAMonitor_Reconcile_PastWarningFutureBreach and TestWatchdog_MissedSchedule_DetailFields used real wall-clock time instead of injected NowFunc, causing time-of-day dependent failures.

Drift detection was hardcoded to compare `sensor_count` but bronze
consumers write `count`. Add `DriftField` to PostRunConfig so operators
can target the correct sensor field. Defaults to `sensor_count` for
backward compatibility.
TestSLAMonitor_Reconcile_PastWarningFutureBreach and
TestWatchdog_MissedSchedule_DetailFields used real wall-clock time,
causing failures depending on time of day. Inject NowFunc so both
tests use a fixed timestamp independent of when they run.
@github-actions github-actions bot added tests Test changes lambda Lambda handlers docs Documentation types Public types (pkg/types) labels Mar 9, 2026
@dwsmith1983 dwsmith1983 self-assigned this Mar 9, 2026
@dwsmith1983 dwsmith1983 merged commit 34cfc38 into main Mar 9, 2026
6 checks passed
@dwsmith1983 dwsmith1983 deleted the fix/drift-field-config branch March 9, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation lambda Lambda handlers tests Test changes types Public types (pkg/types)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant