The Drift Log · Audit, then actually repair
Measuring Repair Completion Rate After Repository Audits
11 November 2026 · 4 min read · 844 words · established

Tracking finding discovery without tracking merged repairs turns audits into accounting overhead. Track Repair Completion Rate instead.
The Metric That Audits Forget
Most repository audits conclude with an inventory of failure. A scanner runs, a spreadsheet appears, and a dashboard displays four hundred instances of duplicate logic, deprecated call sites, or boundary violations.
The audit is marked complete because the report was delivered. Ninety days later, the codebase is identical.
Treating discovery as the terminal milestone creates an expensive illusion. The audit cost engineering hours or tooling licenses, but the repository remains untouched. In practice, measuring audit success by finding volume simply catalogues technical debt without altering it.
To turn audits into operational assets, you need to track execution rather than discovery. The core metric is simple: Repair Completion Rate (RCR).
RCR = Merged Repaired Findings / Actionable Findings in Scope
If an audit identifies 60 actionable violations and your team merges fixes for 12 of them before the next release cycle, your RCR is 20%. The other 80% remains overhead.
Structuring Audit Telemetry
An audit finding is not a ticket to be groomed indefinitely; it is an unapplied patch. Tracking repair completion requires treating each finding as a state machine with explicit transitions:
- Discovered: The finding is identified with an exact AST path, file hash, and violation rule.
- Accepted: Engineering acknowledges the issue is in scope (excluding intentional exceptions or legacy quarantine).
- Drafted: A targeted branch or candidate patch exists.
- Verified: The replacement passes tests and semantic equivalence checks.
- Merged: The repair is committed to the trunk.
Tracking Discovered-to-Merged exposes where remediation stalls. In healthy teams, the drop-off occurs during triage (explicit rejection of non-issues). In stalled teams, the drop-off happens between Accepted and Drafted. The findings sit in backlogs while context decays.
This requires refining your audit metrics beyond gross vulnerability or issue counts. You should track:
- Median Time to Resolution (MTTR) per Finding Class: Mechanical fixes (like replacing deprecated imports or standardizing string parsing) should resolve in hours. Structural fixes take longer. If mechanical fixes have an MTTR of three weeks, your delivery pipeline is broken.
- Regression Rate: The percentage of merged repairs that introduce broken contracts or require rollback.
- Repair Yield: The ratio of candidate pull requests that actually reach trunk without human abandonment.
When you link findings directly to patch generation, as outlined in closing the loop from repository audit to merged repair, the audit ceases to be an accounting exercise and becomes the first step of an automated pipeline.
Why Repair Rates Decay
Tracking repair completion will quickly surface why repairs stall. The primary culprit is blast radius.
When an audit produces a monolithic list of 300 findings, teams attempt to fix them in broad, sweeping refactoring branches. These branches touch dozens of files, rot against trunk within 48 hours, and present reviewers with unreadable diffs. The pull request sits open, conflicts accumulate, and the author eventually closes it in frustration. RCR drops to zero.
High repair rates require splitting audit outputs into single-finding, atomic pull requests. A branch that updates one utility across three call sites can be reviewed, verified, and merged in five minutes. When you shift from audit findings to automated refactor pull requests, the bottleneck shifts from developer motivation to automated validation throughput.
The second limit is semantic drift. If a finding sits unaddressed for two sprints, the surrounding code moves. The automated repair that would have applied cleanly on day one now produces merge conflicts or broken assumptions. A repair window must have an expiration date: if a finding is not patched within a defined cycle, it should be re-audited against the latest commit SHA, not patched blind.
How SHPBL Handles Remediation
SHPBL treats repository assessment as an input to code extraction and repair, not a static report.
You can run a free repository evaluation to surface duplicate utility logic, structural drift, and extractable components. When an agent or developer issues a fix, every write passes through a Build Intent gate to resolve invariants and licensing before any file changes.
The resulting components are verified inside our certification harness, which executes the code against concrete inputs and returns a definitive verdict: CERTIFIED, PROVISIONAL, INCONCLUSIVE, or FAILED. Because our catalog and extracted components are model-independent and computed rather than generated, the repairs introduce no runtime AI dependencies or hallucination surface to your trunk.
What to Measure on Monday
Do not wait for a full tooling overhaul to fix your repair pipeline. Start on Monday with three concrete changes:
- Isolate ten mechanical findings from your last security, linter, or architectural audit. Ignore architectural rewrites for this exercise; select only deterministic replacements.
- Open ten individual, single-purpose branches, each addressing exactly one finding.
- Log the commit SHAs of the merged repairs against the finding IDs.
Calculate your Repair Completion Rate after five business days. If that number is under 80% for mechanical edits, the problem is not the quality of your audits—it is the pipeline between the finding and the merge. Fix the pipeline before you buy another scanner.
Keep reading
Next in the log
- Turning Static Repository Audits into Executable Code Repairs
Static analysis reports create backlog debt without remediation. Here is how to convert diagnostic AST findings into verified, executable refactor patches.
- Replacing Monorepo Duplicate Helpers with Compatibility Shims
Prevent monorepo refactoring regressions by replacing duplicate utility implementations with forwarding shims before updating downstream call sites.
- Prioritising Audit-Driven Refactors with Impact Scoring
Filter raw static analysis backlogs into targeted refactor targets by scoring call graph centrality, execution frequency, and invariant fragility.
The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.