Skip to content

Capture content-addressed Issue lifecycle preflight evidence #607

Closed

Description

@proerror77

Parent

#455

What to build

Add one repository-native, read-only capture operation that exports the complete GitHub Issue/PR graph and label catalog as canonical JSON plus SHA-256 sidecars and a scope-bound manifest. The resulting bundle can later be persisted through the already approved retained remote Git commit and unmerged evidence PR contract for #459.

This slice establishes the content-addressed source of truth only. Independent verification is #608 and zero-write restoration planning is #609.

Acceptance criteria

  • capture includes complete paginated Issue metadata, comments/events, labels, assignees, state, native parent/sub-issue and blocked-by/blocking relationships, closing references, plus PR head/base identities, commits, files, reviews, review comments, checks, statuses, and the repository label catalog.
  • Canonically equivalent API input produces byte-identical JSON and the same SHA-256; incomplete pagination, API errors, duplicate objects, truncated PR collections, or missing relationship fields fail closed.
  • The manifest binds schema version, repository, capture UTC, named controller, target and exclusions, default-branch SHA, API/media versions, endpoint/page inventory, object counts, and the preflight digest.
  • A final read-only stability pass rejects capture-time drift in the repository/branch identity, Issue/PR list, labels, comments/events, native relationships, or mutable open-PR evidence.
  • Focused tests prove canonical identity, pagination and stability failure, complete required metadata, and the absence of GitHub writes.

Blocked by

None - can start immediately.

Out of scope

Activity

  1. self-assigned this
    on Aug 2, 2026
  2. changed the title [-]Capture and verify content-addressed Issue lifecycle evidence[/-] [+]Capture content-addressed Issue lifecycle preflight evidence[/+] on Aug 2, 2026
  3. proerror77 commented on Aug 2, 2026

    @proerror77
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Category: bug
    Summary: Bind the capture manifest to the observed GraphQL media type

    Current behavior:
    The merged capture records each GraphQL response media type in its page inventory, but the top-level api.graphql_media_type field is a hardcoded family name. The live response is github.v4; format=json, so the top-level provenance claim is not the exact observed identity. The CLI rescue clause also redundantly names an exception already covered by StandardError.

    Desired behavior:
    The manifest must derive one non-empty GraphQL media type from the captured GraphQL pages, fail closed if the value is absent or changes between capture and stability readback, and write that exact observed value. Error handling should retain the same message and exit code with the redundant exception removed.

    Key interfaces:

    • api.graphql_media_type — exact observed response media type, not a hardcoded assertion
    • GraphQL page inventory — authoritative source and drift detector
    • Capture CLI error boundary — unchanged user-visible behavior

    Acceptance criteria:

    • A normal capture writes the exact observed GraphQL media type to the manifest.
    • Missing or inconsistent GraphQL media types fail closed and create no bundle.
    • The focused fixture models REST and GraphQL media types separately and proves GraphQL media drift rejection.
    • Existing canonical, pagination, stability, and zero-write checks remain green.

    Out of scope:

  4. added
    bugSomething isn't working
    and removed
    enhancementNew feature or request
    on Aug 2, 2026
  5. proerror77 commented on Aug 2, 2026

    @proerror77
    OwnerAuthor

    Completion evidence

    Acceptance checks: PR #615 merged to main from exact head 432397b3ff6696b79ae4b5cc012ab06ec8c74b8a at merge commit 20ca2a1c04094455a31d5c3c5076e031c56e7140; api.graphql_media_type now records the exact observed github.v4; format=json; focused fixtures prove missing and inconsistent GraphQL media types exit 2 before bundle creation while canonical, pagination, stability, and zero-write checks remain green; lifecycle audit, contract, workflow, reconciliation, status-reconciliation, Rust CI scope selector, Ruby/Bash syntax, shellcheck, scoped actionlint, and diff checks passed; Matt Standards and Spec reviews each reported 0 findings; required Monorepo CI gate, Prediction Markets CI gate, and Security Summary Report checks succeeded; the merged remote head branch was deleted and local tracking refs were pruned.
    Result: passed

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingready-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