Skip to content

Acceptance: a pull request the Factory opens is bound to its issue by the Run that opened it #342

Open

Description

@don-petry

Part of the epic "Epic: slice 1, first approval. A Release on next reviews a pull request to this repo, and the machine user's approval stands".

Why. Issue 295 binds a pull request the Factory opens to the issue it serves by its branch, factory-work/issue-<N>-<k> (kernel/terms.py's WORK_BRANCH), when its author is the App of the Role that opens pull requests. The binding by Run record, the run-name's item, was left out: no Run record names the pull request it opened. The opening Run's run-name names the issue, and open_pull_request is not modelled as an Effect, so nothing joins a Run to the pull request it made.

Done when

  • open_pull_request records the Run that opened a pull request, in a form the facts port can read back without the pull request's body.

  • The acceptance port binds a pull request by that Run record as well as by its branch. Where both are present they must agree, or the pull request is not read whole.

  • Decision 0047's Boundaries row for the Run-record binding names the test that holds it.

  • A trial reads the bound issue's lookup, GET /repos/{repo}/issues/{n} in adapters/acceptance.py's labelled(), under the Controller App's grant. GitHub documents it under Issues: read alone, which the App does not hold, though any token reads a public repo's (decision 0068). Grant it, or read the labels another way, before a Role opens pull requests on a private repo.

  • The writer: apply's open Effect records open_pull_request in the opening Run's applied/1, keyed by the pull request's number as read back. It lands in slice 2 with the push Effect, as decision 0070's refusal waits on push. The record, its reader and the binding are built under decision 0097 (the Factory Builder's ruling of 2026-10-30), so this issue stays open for the writer.

Design. §3.10 (run-name/1), §3.6 (open_pull_request's recovery key), "The hand-over"; decisions 0036, 0047 and 0068.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions