Skip to content

Share the retrying REST call of post-statuses and report-outcome #15446

Description

@kyle-sexton

Agent Brief

Type: Task
Summary: Share the retrying REST call of post-statuses.mjs and report-outcome.mjs as retryApi in .github/scripts/lib/retry-fetch.mjs (part of restructuring pass #14159).

Current behavior:
.github/scripts/work-resolve-issue/post-statuses.mjs:106-125 api() and report-outcome.mjs:2029-2049 api() are the same wrapper over retryFetch: same headers, same safeToResend, same URL join. report-outcome also sets error.status and returns null on 204. post-statuses only POSTs statuses, which answer 201, so it behaves the same under report-outcome's version.

Desired behavior:
.github/scripts/lib/retry-fetch.mjs exports retryApi, using report-outcome's variant, and both scripts call it in place of their own api(). Blocked by the item that moves retry-fetch.mjs into .github/scripts/lib/ and floors it there, so this item edits that file only after it exists; no floor row changes here.

Files:

  • .github/scripts/lib/retry-fetch.mjs
  • .github/scripts/work-resolve-issue/post-statuses.mjs
  • .github/scripts/work-resolve-issue/report-outcome.mjs

Key interfaces:

  • Requests sent, retries, messages and exit codes of both scripts are the same as now.
  • post-statuses.test.mjs and report-outcome.test.mjs exercise both through main and keep passing.

Acceptance criteria:

  • The retrying REST wrapper exists once, as retryApi in lib/retry-fetch.mjs, and both scripts use it.
  • Behavior is unchanged: the same requests, retries, messages and exit codes for the same inputs.
  • The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
  • The pull request stays within 400 changed lines and 15 hand-edited files.
  • python3 -I scripts/sync-hold-floor.py --check passes.
  • test_merge_holds_sync.py, test_babysit_risk.py, .github/actions/resolve-config/callers.test.mjs and the node suites of .github/scripts/lib/ and .github/scripts/work-resolve-issue/ pass.
  • ci-status is green.

Out of scope:

  • createGitHubApi and other transport code, other duplication, eval cases, fixtures, and skill and agent text.

Activity

  1. added
    status: ready
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. melodic-automation-lanes commented on Nov 11, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"f622caf2b347a12a7fcc1b7954ea52c061d82ca783031b1372c2fa40b418001a","body_sha256":"ad3b9b2b597e9b458f7a0cc3ba60740b4898bcf96a6636f21c5f1eeb93f1351d"}

  4. removed
    status: ready
    on Nov 11, 2026
  5. melodic-automation-lanes commented on Nov 12, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed or was cancelled before it reported, or it stopped or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. If this run ends the same way, it re-fires the issue again, waiting longer each time.

  6. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor
    No description provided.
  7. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor
    No description provided.
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

    Fields

    Work status

    needs-triage

    Priority

    low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions