Skip to content

feat(observer): wire CoverageTrendManager + CoverageAlertManager into the service#326

Merged
ProtocolWarden merged 1 commit into
mainfrom
feat/wire-coverage-trend-alerting
Jun 18, 2026
Merged

feat(observer): wire CoverageTrendManager + CoverageAlertManager into the service#326
ProtocolWarden merged 1 commit into
mainfrom
feat/wire-coverage-trend-alerting

Conversation

@ProtocolWarden

Copy link
Copy Markdown
Owner

Second observer-plane completion — the coverage trend + alert engines.

The #313 gap

CoverageTrendManager + CoverageAlertManager (#279) were built and fully tested but never driven in production. The #279 PR claimed "Integration into generate_snapshot()" — but no such method/integration exists. Claimed-complete-but-inert.

Completion (parallel-systems bridge)

The live CoverageSignalCollector produces a CoverageSignal; the engines consume a different type, CoverageSnapshot. RepoObserverService now:

  1. default-constructs a CoverageTrendManager rooted under the observer artifact dir;
  2. after coverage is collected, _record_coverage_trend bridges CoverageSignal → CoverageSnapshot, records it (building the history trend analysis needs), computes the trend + a regression check, runs CoverageAlertManager.generate_alerts, persists the trend + alerts, and logs any regression/alert.

Best-effort (try/except) so it can never break an observation; skips cleanly when coverage is unavailable or storage can't build.

Ratchet

Pruned the now-wired detect_regression / generate_alerts / save_snapshot / save_alert from audit.d12_baseline — the D12 gate confirms 0 findings. The genuinely-still-unwired public methods (calculate_trend_slope, calculate_volatility_score, get_historical_data, categorize_alert, get_routes_for_alert) stay baselined.

Verified: 2 new tests; observer unit suite 1389 passed; ruff + ty + working-detector audit (B2-env-only) + doctor + D12 clean.

🤖 Generated with Claude Code

… the service

CoverageTrendManager + CoverageAlertManager (#279) were built and fully tested
but never driven in production — the #279 PR claimed "Integration into
generate_snapshot()" which does not exist (the #313 pattern). COMPLETE them.

RepoObserverService now default-constructs a CoverageTrendManager rooted under
the observer artifact dir, and after coverage is collected _record_coverage_trend
bridges the live CoverageSignal -> CoverageSnapshot, records it (building the
history the trend analysis needs), computes the trend + a regression check, runs
CoverageAlertManager, persists the trend + alerts, and logs any regression/alert.
Best-effort (try/except) so coverage trend/alerting can never break an
observation, and it skips cleanly when coverage is unavailable.

Prune the now-wired detect_regression / generate_alerts / save_snapshot /
save_alert from audit.d12_baseline — the D12 gate confirms 0 findings. The
reporter's calculate_trend_slope / calculate_volatility_score / get_historical_data
and categorize_alert / get_routes_for_alert remain genuinely unwired public API
and stay baselined.

2 new tests; observer unit suite 1389 green; ruff + ty + audit(B2-env) + doctor + D12 clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ProtocolWarden ProtocolWarden merged commit 26d1fa1 into main Jun 18, 2026
18 of 20 checks passed
@ProtocolWarden ProtocolWarden deleted the feat/wire-coverage-trend-alerting branch June 18, 2026 11:10
ProtocolWarden added a commit that referenced this pull request Jun 18, 2026
…omes (#328)

The incomplete-integration remediation campaign is complete (14 green-gated PRs).
Update the plan of record to reflect the operator correction (COMPLETE genuine
features, don't delete them) and record every outcome:

- the 3 adversarial corrections (cross-repo consumers, indirect dispatch,
  convention hooks) that caught the per-repo audit's blind spots;
- WIREs: DAGExecutor #10, SwitchBoard #21 (p95), PlatformManifest #83
  (visibility_scope fail-closed), and the OC observer plane — #325
  (FlakyTestReporter), #326 (coverage trend/alerts), #327 (merge-decision metrics);
- justified deletes of superseded duplicates (Custodian #47, DAGExecutor #11,
  SourceRegistry #14, TeamExecutor #12, CoreRunner #20); ContextLifecycle = KEEP;
- the d12_baseline ratchet pruning (D12 gate confirms 0 after each wire);
- the B2 root cause: content-less secret artifact (infra, not a code bug).

flip parse_visibility_scope to WIRE-done; remove the TeamExecutor RxP
false-positive. Backlog updated.

Co-authored-by: ProtocolWarden <ProtocolWarden@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant