Skip to content

feat(gate): guardrail escalation — guarded paths get a stronger, multi-run AI review instead of a manual hold #9808

Description

@JSONbored

Problem

hardGuardrailGlobs converts every otherwise merge-ready PR touching a guarded path into a manual-review hold. Measured on the production ORB (14 days): 252 guardrail holds across 79 distinct PRs — ~6/day of maintainer attention. metagraphed's apps/ui/** alone accounts for 68 PRs; the configs have already been through two narrowing passes and still fire constantly. This defeats the automation's purpose, and per-PR human discretion is also a fairness concern for contributors.

agent-actions.ts's own doc comment states the intent this feature restores: "Manual review is the RARE exception (the operator's minimize-manual goal)."

Design: escalate scrutiny instead of summoning a human

settings:
  hardGuardrailGlobs: [...]        # unchanged
  guardrailMode: escalate          # default: hold (today's behavior — self-hoster safe)
  guardrailEscalation:
    model: claude-opus-5           # stronger reviewer, guarded paths only
    selfConsistencyRuns: 3         # reuses #8834's run planner
    requireUnanimous: true         # all runs find zero blockers
    minConfidence: 0.9
    fallback: hold                 # ANY criterion short → exactly today's hold

A guardrail hit on a review-good PR triggers an escalated review — stronger model, N independent self-consistency runs, unanimity + confidence floor. All pass → auto-merge proceeds, with the panel and decision record stating explicitly which guarded paths were covered and the escalation verdict ("escalated review: 3/3 clean @ opus — .github/workflows/ci.yml"). Anything less → today's hold, unchanged. Manual review becomes what it was designed to be: the rare exception for genuine AI uncertainty on a guarded path.

Why this is cheap to build here

Every hard part already shipped:

Phases

  1. Schema + plumbing: manifest fields, parse + defaults (hold = byte-identical today), FOCUS_MANIFEST_TOP_LEVEL_FIELDS registration, docs drift-checks, settings threading into agent-actions.ts.
  2. Escalated runner: orchestration override (model + runs), unanimity/confidence evaluation, disposition consumes the escalation result, panel + decision-record surfacing.
  3. Path-class analyzers (optional): deterministic workflow-diff audit (new run: steps, unpinned action SHAs, secret references) — the one class a semantic review can miss.
  4. Rollout: metagraphed apps/ui/** first (largest hold source), watch the weekly gate-precision report, then loopover + awesome-claude.

Cost

~6 escalations/day × N stronger-model runs — modest, and it directly replaces maintainer review time. Escalations only fire on the guardrail-hit ∩ review-good intersection, which is exactly today's hold volume.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions