Skip to content

Plan zero-write Issue lifecycle restoration from an exact receipt #609

Description

@proerror77

Parent

#455

What to build

Add the read-only plan-restore operation after #607 and #608. Before any metadata mutation is authorized, it accepts the exact verified preflight bundle plus an approved canonical forward plan, derives the complete inverse, and emits a content-addressed reverse plan. After mutation, it accepts that exact reverse plan plus the content-addressed post-state receipt, verifies every identity, independently re-reads live GitHub state, refuses concurrent or provenance drift, and prints the already-bound reverse patch while performing zero writes.

Acceptance criteria

  • Before any metadata write is authorized, the pre-mutation mode validates the exact preflight bundle and approved forward plan, then records a content-addressed reverse plan containing the complete inverse for every supported mutable field; missing, incomplete, or mismatched inverse operations fail closed.
  • The receipt binds repository/controller/target, preflight digest, post-state digest, forward-plan digest, reverse-plan digest, default-branch identity, API/page inventory, counts, and per-Issue passed operation receipts.
  • The forward and reverse plans exactly match the supported preflight-to-receipt changes; unsupported Issue fields, PR metadata, label-catalog, comments/events, or closing-reference drift fail closed.
  • Live state must equal the exact receipt identity before the bound reverse patch is printed; any concurrent body/label/assignee/state/relationship or provenance drift exits nonzero.
  • The printed canonical reverse patch contains only Issue body, labels, assignees, native parent/sub-issue and blocked-by/blocking relationships, and state; comments/events remain verification-only provenance.
  • Focused tests prove pre-mutation inverse completeness, receipt tamper rejection, provenance drift refusal, exact reverse-plan identity, zero filesystem/GitHub writes, and absence of any apply or mutation operation.

Blocked by

#608 must merge first.

Out of scope

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestready-for-agentFully specified and safe for an autonomous agent

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions