Skip to content

feat(autonomy): human-authorized corrective-PR exception for Heart RED - #113

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/corrective-pr-heart-red
Jul 14, 2026
Merged

feat(autonomy): human-authorized corrective-PR exception for Heart RED#113
Jammy2211 merged 2 commits into
mainfrom
feature/corrective-pr-heart-red

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Overview

Resolves the Heart-RED ship deadlock: Heart RED forbids commit/push/PR-open at every autonomy level, but Heart cannot clear a RED until the fixing source reaches main, wheels rebuild, and release-integration validation passes — so a source fix that repairs the exact defect named by the RED reason cannot be shipped. This adds a narrow, auditable, human-authorized corrective-PR exception.

Closes #112.

What changed

  • AUTONOMY.md — new section "Corrective-PR exception for Heart RED (human-authorized)": trigger, authorization (contemporaneous human, quoting the exact RED reason), permitted set (commit/push/one pending-release PR — nothing else), forbidden set (merge/close/release/rehearsal/unrelated scope), four record sinks, name-one-of-several handling, park-without-shipping failures, and the recovery sequence (human merge → fresh wheels + release-integration validation → new Heart verdict). Plus levels-table pointer, a hard-invariant bullet (keeping "Heart YELLOW/RED is never acknowledged autonomously" verbatim), a Consumers note, and a corrective outcome tag in the calibration log.
  • skills/ship_library, ship_workspace, WORKFLOW.md — link the exception at the RED-handling step; no policy duplication.
  • tests/test_corrective_red_exception.py — 12 deterministic contract tests pinning the guardrails and the no-duplication seam.

Design decisions (confirmed with the human): human-only (never under --auto) and name-one-of-several RED reasons.

API Changes

None — doctrine/documentation + tests only. No source API, imports, or signatures changed.

Heart status at ship

Shipped through organism-scoped Heart RED, human-authorized — every RED reason (release validation FAILED (stage integrate), workspace validation not passing (2026-07-09), 58 stale parked scripts, PyAutoMind open PR 14d old, install verification not run) is organism-scoped and nothing branch-related to this doc-only change. This PR creates the corrective-exception mechanism but does not itself qualify for it (it repairs none of the named RED reasons). Merge stays a human act.

Tests

python -m pytest tests/ -q58 passed (46 pre-existing + 12 new).

#112)

Heart RED forbids commit/push/PR-open at every autonomy level, yet Heart
cannot clear a RED until the fixing source reaches main, wheels rebuild, and
release-integration validation passes -- so a source fix that repairs the
exact defect named by the RED reason cannot be shipped. A deadlock.

Add a narrow, auditable, human-authorized exception to AUTONOMY.md:
- Trigger: Heart RED + a source fix that directly repairs a named RED reason.
- Authorization: explicit, contemporaneous human authorization quoting the
  exact RED reason and approving the specific corrective issue.
- Permitted, nothing else: commit, push, one pending-release feature PR whose
  issue/plan/diff map to the named reason.
- Forbidden: automatic merge, issue close, release, release rehearsal,
  unrelated scope. Merge stays a separate human act; every release stays
  blocked while Heart is RED.
- Human-only: never fires under --auto; the invariant "Heart YELLOW/RED is
  never acknowledged autonomously" stands verbatim.
- Records in four sinks (issue, PR body, active.md - corrective-red: block,
  autonomy_log.md corrective row); names exactly one reason when RED has
  several; parks without shipping on mixed-scope/stale-reason/missing-evidence/
  not-causal; recovery = human merge -> fresh wheels + release-integration
  validation -> new Heart verdict.

Ship skills (ship_library/ship_workspace/WORKFLOW) link the exception at the
RED-handling step -- no policy duplication. New deterministic contract test
pins the guardrails and the no-duplication seam.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…quote

The exception requires the human to quote the exact Heart RED reason string,
but a human can only quote what they are shown. Make the agent responsible for
providing the quote: when the corrective-PR circumstance arises it surfaces the
exact RED reason string(s) verbatim from `pyauto-heart readiness`, together with
the specific corrective request, so the human authorizes what the agent put in
front of them rather than reconstructing the wording from memory.

Updates the AUTONOMY.md Authorization clause and the RED-handling step of
ship_library / ship_workspace / WORKFLOW; adds a contract test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 1ae5ec8 into main Jul 14, 2026
@Jammy2211
Jammy2211 deleted the feature/corrective-pr-heart-red branch July 14, 2026 09:44
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.

feat(autonomy): human-authorized corrective-PR exception for Heart RED

1 participant