Skip to content

The Drift Log · Audit, then actually repair

Automating Repair Branch Creation from Inconclusive Harness Results

29 September 2026 · 3 min read · 539 words · established

A vaulted library of glowing green crystal blocks in ordered bays

Automate the creation of a repair branch directly from an INCONCLUSIVE harness result using SHPBL tools.

The dead end of an inconclusive harness

An audit that ends with an INCONCLUSIVE verdict is a wasted cycle. The harness could not exercise the artifact because a required input was absent. The report lists “missing contract X”, but the developer must read, interpret, and manually create a fix. Most teams stop there. The audit never produces a repair, and the repository carries the same technical debt.

The failure is not the harness itself – it is the lack of a bridge from the report to a concrete change. When the bridge is missing, the audit becomes a cost centre rather than an asset.

Extracting the missing contract

The first step is to turn the harness’s diagnostic into a machine‑readable artifact. A small utility, shpbl-extract-contract, reads the JSON payload produced by the live run and writes a minimal TypeScript definition that captures the missing inputs.

shpbl-extract-contract --harness-result ./harness.json \
                       --out ./contracts/missing.ts

The generated file contains exactly what the harness could not provide:

// contracts/missing.ts
export interface MissingInput {
  /** The environment variable that the artifact expects */
  REQUIRED_TOKEN: string;
}

No guesswork, no hand‑rolled scaffolding. The contract is derived directly from the harness output, guaranteeing that it matches the failure mode.

Opening a repair branch automatically

With the contract in hand, the same tool can create a repair branch and open a pull request. It uses the typed client (@shpbl/sdk) to talk to the same gate that the MCP server, HTTP API and offline edition share. The process is fully scriptable, so it can be wired into any CI pipeline.

shpbl-create-repair \
  --repo github.com/example/project \
  --base main \
  --branch repair/missing-token \
  --title "Add REQUIRED_TOKEN to environment" \
  --body "Automated repair generated from an INCONCLUSIVE harness result." \
  --add-file ./contracts/missing.ts

The command performs three actions:

  1. Creates a new branch from the current main.
  2. Commits the generated contract file and a stub implementation that

satisfies the interface.

  1. Opens a PR against main with a deterministic title and description.

Because the same authentication and metering layer is used for all access methods, the operation respects entitlement and auditability. The PR appears in the repository like any other change, ready for review and CI validation.

When the CI runner executes the harness again, the previously missing input is now present. The harness verdict flips from INCONCLUSIVE to CERTIFIED or PROVISIONAL, and the PR can be merged automatically if the CI passes.

Turning a dead‑end audit into a merged repair

The loop – audit, extract, repair, re‑run – closes the gap identified in the pillar post /blog/closing-the-loop-from-repository-audit-to-merged-repair. Automation removes the manual hand‑off that stalls most audits. The repair branch is created at the moment the harness reports a missing contract, so the team never has to switch context from “reading a report” to “writing a fix”.

The approach works with any CI system that can invoke the two commands as part of a post‑audit job. Once the PR is merged, the artifact is part of the catalogue and will be exercised by subsequent runs of the harness. The repository gains a reusable capability instead of a lingering defect.

What to do on Monday

  1. Add the shpbl-extract-contract and shpbl-create-repair binaries to your

CI toolbox.

  1. Extend your audit pipeline to run the extraction step when the harness

returns INCONCLUSIVE.

  1. Commit the change and watch the first automated repair PR appear.

The next audit that hits a missing contract will produce a ready‑to‑merge PR instead of a static report. Your audit budget becomes an investment in maintainable code.

Keep reading

Next in the log

The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.