Skip to content

Trials P-2, P-5, P-23 and P-25: an App in the merge queue, and threads resolved by another App #185

Closed

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. Batch 2 of §6.1, "before the first approval". These four need a merge queue on the canary and the machine user's approval, so they share one token window and one ruleset change. #26's ruling 7 promised this story for the queue read.

Done when

  • The canary's main ruleset gains a merge queue and a required check that runs on merge_group; the change is recorded in the fixture and reversed at the end if the Maintainer wants the canary as Canary set-up: the ruleset, code owners and identities the trials need #24 left it.
  • P-2: the pr-review App enqueues an approved pull request, a read through the Controller's installation shows it queued before the queue merges it, and the App takes it out; read:facts.queue in config/apps.json names the least permission that read needed (Three Apps registered and installed, and their real grants compared with the data #26's fourth criterion), and tools/check_apps.py holds it.
  • P-5 and P-25: the reviewer's App resolves a thread a third-party reviewer opened and one a person opened; the resolved thread names the resolver; the reviewer neither re-posts nor approves. P-23: the number of threads one App resolves in an hour before a secondary limit, or enough for about 22 a pull request at the Factory's merge rate.
  • Each fixture grounds its rule in sim/grounding.py (an_app_enters_the_queue, an_app_leaves_the_queue, an_app_resolves_any_thread). an_app_resolves_a_lens_thread is dropped: no such rule exists. a_pass_comes_before_the_merge moves to Trial: the merge queue merges only after a pass has read the pull request (a_pass_comes_before_the_merge) #659. Both by the Factory Builder's ruling of 2026-11-09.

Needs. The Maintainer: a second machine-user token for the canary (as #24's write 2) and its revocation at the end; the pr-review App's key stays where it is, so the App's writes run at his terminal as P-39 did. Runs after #27.

Design. §6, P-2, P-5, P-23, P-25; §6.1 batch 2; §4.1 the queue.

Activity

  1. don-petry commented on Oct 21, 2026

    @don-petry
    ContributorAuthor

    The grounding triage, "Grounding triage: each rule of the fake GitHub that no trial asks names a trial or says why none can" (#190), extends P-2's row in section 6, since P-2 has not run: besides the App's enqueue and dequeue and the poller's read, it now asks whether a push takes a queued pull request out, whether the queue can eject one without merging it with its approval staying, whether a draft is ever merged by a person or the queue, and whether the queue runs the required checks on the merge group. Five more rules of sim/grounding.py now name P-2 and wait on its fixture: a_push_leaves_the_queue, the_queue_merges, the_queue_can_eject, a_draft_is_not_merged and the_merge_group_is_not_checked. The last is listed as known to differ in sim/AGENTS.md: this repo's own queue ran the verify workflow on #243's merge group and ejected it on a failure, so expect P-2 to contradict it. When this story runs, its Done-when should cover those four questions and five rules too. One more rule now waits on P-5, which this story also runs: a_lens_review_opens_a_thread.

  2. don-petry commented on Oct 31, 2026

    @don-petry
    ContributorAuthor

    Ticked by the audit of epic #182, each read against main at 39a4837:

    The other boxes are left open: the audit could not show them holding on main.

    🤖 Audit of epic #182 by Claude Code

  3. don-petry commented on Nov 2, 2026

    @don-petry
    ContributorAuthor

    Ticked by a new audit of the epic, each read against main at 0a22436 or live on 2026-11-02:

    • P-2: the pr-review App enqueues an approved pull request, a read throu. Holds as a later ruling changed it: Overtaken by issue 381, the Maintainer's decision of 2026-10-28 on P-2: 'An App uses the merge queue only with contents: write, which no reviewer's App may hold', so a new narrow App combsmith-sf-queue enqueues and dequeues; decision 0089. The changed version holds: trials/P-2.queue-app.json (verdict pass, ran 2026-10-29T01:24:17Z): the queue App, tokens narrowed to contents: write + metadata: read, enqueued canary PR 70 (merged by the queue, MergedEvent actor the queue App) and enqueued then dequeued PR 72 (reason manual, unmerged). …
    • P-5 and P-25: the reviewer's App resolves a thread a third-party revie. Holds as a later ruling changed it: Overtaken by decisions 0082/0086/0092 and issue 381: P-5 found 'an App resolves another's thread only with contents: write' (trials/P-5.json verdict fail, the pr-review App refused all three), so no Role resolves; decision 0092 (b): 'A Lens's thread, or an external reviewer's that its category's owner accepted, is resolved by a person with write access or by the Kernel's act, which the queue App carries out'. Changed version holds in fixtures that validate (tests.test_tools.Trials OK): trials/P-5.queue.json (pass): the queue App resolved a person's …

    🤖 Audit of epic #182 by Claude Code

  4. don-petry commented on Nov 2, 2026

    @don-petry
    ContributorAuthor

    The audit above ticked P-2 and P-5, P-25, P-23. This is what is left, rule by rule, read against main. P-23's 30 resolutions in a row clear 22 a pull request, but the burst lasted 40 seconds, so the hourly limit itself was not measured.

    Left open: the grounding box, so this issue stays open.

    Rule State
    an_app_enters_the_queue, an_app_leaves_the_queue Grounded, trials/P-2.least.json
    an_app_resolves_any_thread, a_lens_review_opens_a_thread Grounded, trials/P-5.json
    the_queue_can_eject Grounded, trials/P-2.queue.json
    an_app_resolves_a_lens_thread No such rule on main; a_lens_review_opens_a_thread and an_app_resolves_any_thread cover its ground
    a_pass_comes_before_the_merge No fixture named. The trials show the read, not that the queue waits for a pass
    the_queue_merges No fixture named. trials/P-2.queue.json shows the merge, but the rule's "unless a push takes it out" is contradicted
    a_push_leaves_the_queue, a_draft_is_not_merged, the_merge_group_is_not_checked Contradicted by trials/P-2.queue.json: a push is refused (409), a draft is refused, and the merge group is checked. Each needs the fake changed, a story of its own, and none exists yet

    🤖 Addressed by Claude Code

  5. don-petry commented on Nov 9, 2026

    @don-petry
    ContributorAuthor

    The grounding box, closed by the Factory Builder's ruling of 2026-11-09, pre-approved by the Maintainer on 2026-11-08. Read against main at a81e6e5.

    Rule Now
    an_app_enters_the_queue, an_app_leaves_the_queue Grounded, trials/P-2.least.json
    an_app_resolves_any_thread Grounded, trials/P-5.json
    an_app_resolves_a_lens_thread Dropped from the box. No rule of that name is in sim/grounding.py; a_lens_review_opens_a_thread and an_app_resolves_any_thread cover its ground
    a_pass_comes_before_the_merge Moved to #659, "Trial: the merge queue merges only after a pass has read the pull request". It stays Unverified until then

    Every other box was ticked by the audits of 2026-10-31 and 2026-11-02. So this issue closes.

    The rules the comment of 2026-11-02 found contradicted by trials/P-2.queue.json (a_push_leaves_the_queue, a_draft_is_not_merged, the_merge_group_is_not_checked, and the_queue_merges' "unless a push takes it out") were never in this box. Each still needs the fake changed, a story of its own.

    🤖 Written by Claude Code

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

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