Skip to content

source-control: bound the GitHub read cost of inline promotion evidence before pr-merge adopts it #7517

Closed as not planned

Description

@kyle-sexton

Refs: #4588, #7516

resolve-promotion-evidence.mjs --inline runs the publisher's collect() on every call. collect() pages every closed PR on the default branch (pulls?state=closed&sort=created&direction=asc, publish-promotion-evidence.mjs) and makes one GraphQL call per merge in the window, plus issue-event, check and post-merge-run reads, each a separate spawnSync("gh") with no timeout. origin/main had about 3,800 merges in the last 90 days, so an epoch near the 85-day limit costs thousands of calls per merge decision. A live smoke run took about 4.5 minutes. It fails closed (github-read-failed) on a rate limit, so this is availability, not safety.

Options to evaluate before wiring pr-merge.yml:

  • page by sort=updated&direction=desc and stop at since; note this order is not stable while paging, which the created-ascending choice avoids, so a PR updated mid-read could be skipped (fail-open risk);
  • skip the per-PR GraphQL read for merges that cannot matter, without losing unclassed autonomous merges;
  • a timeout on the publisher's spawnSync, and a test asserting gh call counts for N merges.

Found by the ready-for-review code and security reviews of #7516.

Activity

  1. added
    needs-triage
    on Oct 15, 2026
  2. github-actions commented on Oct 15, 2026

    @github-actions
    Contributor

    Thanks for the report. Automated triage handed this issue to a maintainer.

    Automated triage. A maintainer reviews it.

  3. added
    needs-human
    on Oct 15, 2026
  4. removed
    needs-triage
    on Oct 15, 2026
  5. added theissue type on Oct 15, 2026
  6. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded.

    Question: The issue would bound --inline before pr-merge adopted it. pr-merge no longer reads promotion evidence. Options: (a) close as not planned and fix the stale docs; (b) keep it and add the timeout now; (c) keep it parked.

    Owner's answer: (a), and also delete --inline mode. No workflow or script calls it. git grep -- --inline finds only the script, its test and the reference doc. Less code with the same behavior. Basis: babysit_merge.py:101-102 ("no promotion evidence is read"); promotion-evidence-resolution.md:60 (stale).

    The owner accepted this recommendation as item D16 of a 21-decision batch in an attended backlog-shaping session on 2026-10-18. The batch question: "Accept all 21 batch 7 decisions, with my change to D13 (#6008 goes to the lane, but you merge its PR because it edits AGENTS.md)? I post a 'Decision recorded.' comment on each issue." The owner answered: "Accept, with my D13 change (Recommended)".

    Posted by AI from the owner's answer in that session.

  7. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    Closed as not planned per the 2026-10-18 decision (D16): pr-merge reads no promotion evidence, so the unused --inline mode was deleted instead of bounded. Removed in #8242.

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

    needs-human

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions