Skip to content

refactor(lanes): share the retrying REST call as retryApi in lib retry-fetch.mjs - #15493

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-15446-43138036776-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-15446-43138036776-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #15446

Summary

Opened by the work-resolve-issue lane. The run's own summary:

post-statuses.mjs and report-outcome.mjs each had their own copy of the same retrying REST wrapper, api(). It now exists once, as the exported retryApi in .github/scripts/lib/retry-fetch.mjs. retryApi is report-outcome's version: the thrown error carries .status and a 204 returns null. post-statuses behaves the same with it. Its only catches read error.message, and none of its endpoints (GET ref, GET repo, GET compare, POST statuses, which answers 201) returns 204. No floor row, workflow or test changed. retry-fetch.mjs gains no imports, so the workflows that copy it at runtime still work.

Not verified

  • Node suites (.github/scripts/lib/, .github/scripts/work-resolve-issue/, .github/actions/resolve-config/callers.test.mjs) were not run: this lane can run only its named wrappers, not node. Left to the PR's CI.
  • python3 -I scripts/sync-hold-floor.py --check, test_merge_holds_sync.py and test_babysit_risk.py were not run: this lane cannot run an interpreter. No floor file or floored path list changed. Left to the PR's CI.
  • ci-status green on the PR: a PR CI check, left to the PR's CI.
  • tidy skipped: the change is under .github/, a listed shared path.
  • verify (build and tests) skipped: this lane cannot run node, so the suites are left to the PR's CI.

Fix

  • .github/scripts/lib/retry-fetch.mjs: adds the exported retryApi({fetch, apiUrl, token, sleep}) over retryFetch, with the same headers, URL join, safeToResend passthrough, error message plus .status, and null on a 204.
  • .github/scripts/work-resolve-issue/post-statuses.mjs: removes the local api() and imports and calls retryApi instead of retryFetch. The retry note is merged into the comment above main.
  • .github/scripts/work-resolve-issue/report-outcome.mjs: removes the local api() and imports retryApi in place of retryFetch (networkError stays). Both calls now use retryApi, and the comment that named api() now names retryApi().

Verification

The runner ran each check from the base copy against 7bbf54a:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 15 fragments valid (run before and after the review fix)
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 8 passed, 8 skipped over 3 changed files (run before and after the review fix)
  • fresh-context review subagent on the whole diff: no correctness bugs. It confirmed retryApi matches the removed report-outcome wrapper line for line, nothing in post-statuses reads .status or gets a 204, no references to api/retryFetch are left in either script, no test imports api or mocks…
  • Grep: no api( or retryFetch reference is left in post-statuses.mjs or report-outcome.mjs
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43138036776

Left out: the items under Not verified.

Related

#15446

Merge-Risk: max=MEDIUM demote=false head=25891ab6a418f570ce680687014d18efdeab8669 rubric=8.4.8 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 25891ab6a418f570ce680687014d18efdeab8669: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15493, incremental (7bbf54a → 25891ab)

I found no security issues in this push.

Scope. This was an incremental review covering one file, .github/actions/log-api-budget/rate-guard.test.mjs. I read its whole change. Because this lane already reviewed an earlier head, this review reported only CRITICAL and IMPORTANT findings, and it found neither.

What changed. The push removes .github/scripts/work-resolve-issue/report-outcome.mjs from the test's UNGUARDED list. That list names the lane scripts allowed to call fetch( outside the rate guard.

  • Why the entry had to go. Earlier in this PR, report-outcome.mjs lost its local api() wrapper and now imports retryApi from .github/scripts/lib/retry-fetch.mjs, so it no longer calls fetch( itself. The test's second assertion (rate-guard.test.mjs#L665) fails when a listed file no longer needs its exception, so the entry had to be removed.
  • Effect on security. The exception list gets shorter, so the check covers more, not less. No runtime code changed in this push. The rate guard (rate-guard.mjs), its limits file, the trusted-actor list, token requests, the kill switch, merge holds, workflow permissions:, plugin manifests and standing instructions are all untouched.

Prior findings. The earlier review's summary comment reported 0 findings, so there is nothing to restate.

Embedded text. I read no new PR context for this push and found no directives aimed at this lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 25891ab6a418f570ce680687014d18efdeab8669: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): no findings. I read the one hunk of the one file in scope, .github/actions/log-api-budget/rate-guard.test.mjs. This lane already reviewed head 7bbf54af, so this pass reports blocking findings only.

What changed. The push deletes the .github/scripts/work-resolve-issue/report-outcome.mjs entry from the UNGUARDED exception map.

Why the deletion is correct and required. The test at rate-guard.test.mjs#L653-L666 checks both directions:

  • every file with a raw fetch( call (regex (^|[^\w.])fetch\() must be listed;
  • every listed file must still have one (L665, "a listed file no longer needs its exception").

At head, report-outcome.mjs passes its fetch only as a parameter default (fetch = globalThis.fetch) and as a property (retryApi({ fetch, ... })). Neither matches the regex. The only raw fetch( calls left under work-resolve-issue/ are in report-outcome.test.mjs, which the scan skips. Leaving the entry would therefore fail L665. retry-fetch.mjs has no raw fetch( either, so it needs no entry of its own. I checked this by reading the code; I did not run the test suite.

Other checks:

  • No plugin manifest, .claude/rules/ path match, or paved-path row applies to this change.
  • The closing-issue criteria were judged at the earlier head and are untouched by this hunk.
  • The prior-findings file has no embedded instructions.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 25891ab6a418f570ce680687014d18efdeab8669. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

pr-merge's gate holds it on its risk score (evidence-unbound:claude-review: not bound: no-run;
  evidence-unbound:claude-security-review: not bound: no-run)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 25891ab6a418f570ce680687014d18efdeab8669, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 25891ab

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15493-25891ab6a418f570ce680687014d18efdeab8669, expires on 2026-12-12.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit bc894aa Nov 12, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15446-43138036776-1 branch November 12, 2026 05:01
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit bc894aa7d78f2ea69d48c64f600329fb808ae11a; later checks count it verified from this comment.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant