Skip to content

refactor(work-unblock): simplify job-log.mjs - #14192

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14151-42508617981-1
Nov 8, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14151-42508617981-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14151

Summary

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

Simplified .github/scripts/work-unblock/job-log.mjs without changing behavior. The jobs/<id>/logs path is now built once, for both the request URL and the error label, and the two early refusals (a non-ok status, and a Content-Length over maxBytes), which each cancelled the body before throwing, are now one block that cancels once and throws GitHubError for a non-ok status or the over-cap error otherwise. The file went from 41 to 38 lines. No helper elsewhere in the repo fit the cancel-and-throw shape: check-trusted-trigger.mjs exports no such function.

Not verified

  • node --test .github/scripts/work-unblock/job-log.test.mjs and label-unblocked.test.mjs were not run by name: this lane cannot run an interpreter, and check-affected's output does not say whether its passing checks included them. Left to the PR's CI.
  • tidy skipped: the change sits under .github/, a shared path listed in the tidy cutoffs
  • ci-status green on the PR is left to the PR's CI

Fix

  • .github/scripts/work-unblock/job-log.mjs: the request path is built once and the two early refusals merged into one cancel-then-throw block; same URL, error types, messages and order of checks

Verification

The runner ran each check from the base copy against d8b1502:

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

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all 2 fragments valid (run before and after the final edit)
  • .lane/checks/bin/check-changed-skills: no changed skills, nothing to gate
  • .lane/checks/bin/check-affected: 8 passed, 8 skipped, no failures over the 1 changed file (run before and after the final edit)
  • fresh-context review subagent (read-only) over the diff, job-log.test.mjs, label-unblocked.mjs and label-unblocked.test.mjs: found no behavior difference. A non-ok response short-circuits before headers are read, so it still throws GitHubError(status, 'GET <path>'). URL and message strings…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42508617981

Left out: the items under Not verified.

Related

#14151

Merge-Risk: max=LOW demote=false head=d8b1502bd16314b7b0b1fd4f5fe9ec1185edec70 rubric=8.1.2 rater=claude-opus-5-5 checker=claude-opus-5-5

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

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #14192 (refactor(work-unblock): simplify job-log.mjs)

No security issues found.

I read every hunk of the one changed file, .github/scripts/work-unblock/job-log.mjs. It matches none of the TRUSTED PATHS: globs and is not one of the trust controls this lane watches. The change is behavior-preserving:

  • Request path: the /repos/${repo}/actions/jobs/${jobId}/logs path is now built once and used for both the request URL and the what error label. The URL is the same as before, the same Authorization header goes to the same apiUrl, and how repo and jobId are inserted is unchanged.
  • Early refusals: the non-ok check and the Content-Length check are merged into one block. A non-ok response still cancels the body and throws GitHubError(response.status, what), because !response.ok short-circuits before the Content-Length header is read. An ok response with a Content-Length over maxBytes still cancels the body and throws the over-cap error. The cancel-on-refusal handling is kept on both paths, and the streaming read that follows still enforces maxBytes.

The change touches no token scope, secret exposure, trust boundary, merge hold, or instruction surface.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #14192, refactor(work-unblock): simplify job-log.mjs

I read the one changed file in full (.github/scripts/work-unblock/job-log.mjs) and found nothing to report.

Behavior check. The refactor keeps the old behavior:

  • URL and error label. The path is built once. The request URL and the GitHubError / over-cap message text are byte-for-byte the same as before.
  • Non-ok status. !response.ok short-circuits, so content-length is never read. That matches the old order. The body is cancelled once and the code throws GitHubError(status, what). This also covers a non-ok response whose Content-Length is over the cap: the ternary chooses GitHubError on !ok, as the old early return did.
  • Ok status with Content-Length over maxBytes. The body is cancelled and over() is thrown, as before.
  • Streaming cap and success path. Unchanged.

Closing issue #14151 acceptance criteria:

  • Behavior unchanged. Met, as described above. No exported names changed. job-log.test.mjs already covers each branch: the non-ok GitHubError case at line 42, the declared Content-Length over cap at line 23, the streamed over-cap case at line 33, and the success path. A test would fail if any of these broke.
  • Edits only the listed files. Met: one file.
  • Within 400 lines and 15 files. Met.
  • ci-status green. I can't check this from here; it is left to the PR's CI. The PR body says the test runs were not done by name, and I did not run them either, so they are unverified.

I found no embedded instructions in the PR context. There are no prior findings and no settled threads.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for d8b1502

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-14192-d8b1502bd16314b7b0b1fd4f5fe9ec1185edec70, expires on 2026-12-08.

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 8, 2026
Merged via the queue into main with commit bd1285d Nov 8, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14151-42508617981-1 branch November 8, 2026 19:07
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit bd1285da5412b54149a0a0536814d2d59e84fae3; 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.

Simplify .github: job-log.mjs

0 participants