feat(reviewer): surface merge-decision metrics (wire export_metrics_json)#327
Merged
Merged
Conversation
…son) Investigation corrected the audit's premise: MergeDecisionInstrumenter / DecisionMetricsCollector were flagged "never instantiated" but are ALREADY wired — pr_review_watcher records every merge decision via the module-level record_decision_outcome (→ get_instrumenter() → MergeDecisionInstrumenter). The genuine gap was narrow: export_metrics_json / get_metrics_summary had no caller, so the collected metrics were never observable. _export_decision_metrics(status_dir) now writes get_instrumenter().export_metrics_json() to status_dir/merge_decision_metrics.json each poll cycle (alongside the heartbeat), best-effort so it can't break the review loop. Prune export_metrics_json from audit.d12_baseline — the D12 gate confirms 0. 1 new test; reviewer suite 113 green (tests/ root + #322 CI job); audit B2-env + doctor + D12 clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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>
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.
Third (and final) observer-plane completion — and it corrects another false-positive.
Premise correction
The audit flagged
MergeDecisionInstrumenter/DecisionMetricsCollector(#250) as "never instantiated." Not so — they're already wired:pr_review_watchercalls the module-levelrecord_decision_outcomeat 5 decision points →get_instrumenter()→MergeDecisionInstrumenterrecords every real merge decision. (LikeTeamExecutorRunnerearlier, the per-repo audit missed the indirection.)The actual gap
export_metrics_json/get_metrics_summaryhad no caller — the metrics were collected but never surfaced.Completion
_export_decision_metrics(status_dir)writesget_instrumenter().export_metrics_json()tostatus_dir/merge_decision_metrics.jsoneach poll cycle (alongside the heartbeat), best-effort so it can never break the review loop. The collected merge-decision metrics are now observable.Ratchet
Pruned
export_metrics_jsonfromaudit.d12_baseline— D12 gate confirms 0.Verified: 1 new test; reviewer suite 113 green (
tests/root + the dedicated #322 CI job); working-detector audit B2-env-only; doctor + D12 clean.🤖 Generated with Claude Code