Skip to content

refactor(pr-merge): simplify carry-run-cache.mjs - #14162

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14118-42496126376-1
Nov 8, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14118-42496126376-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14118

Summary

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

carry() now uses one take(section, keep, {shape, days}) helper. It reads carried-<section> and then <section>, so the three paired loops and the separate lane-run loop collapse into four calls, with the same read and overwrite order, retention windows and output key order. Two private helpers, warn() and writeAtomic(), replace the four copies of the ::warning:: line and the two .tmp write-and-rename pairs. The now-unused RETENTION_DAYS default on dated() is removed. Exports, environment variables, written files and printed text are unchanged. One difference: main's catch now takes error?.message ?? error, as read's always did. It only matters for a thrown non-Error, and nothing main calls (fs, JSON.parse, carry over parsed JSON) throws one.

Not verified

  • node --test .github/scripts/pr-merge/carry-run-cache.test.mjs and the Python carry tests were not run, because this lane cannot run an interpreter; left to the PR's CI
  • tidy skipped: the change is under .github/, a listed shared path
  • Review finding left as it is (outside this behavior-preserving scope): originRecord parses the run id with Number(), so non-standard keys such as repo|0x10 or repo|1e1 still pass, unlike headRef's strict regex. Tightening it would change behavior
  • This file is on merge-holds.mjs's gate list, so the PR may need the pipeline's gate-path handling before it merges
  • ci-status green is left to the PR's CI

Fix

  • .github/scripts/pr-merge/carry-run-cache.mjs: one take helper in carry() covering all four carried sections; private warn() and writeAtomic() helpers; dead default parameter removed from dated()

Verification

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

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

The run reports:

  • check-changelog-fragments: all 1 fragment under .changes/ valid (no fragment needed: .github/scripts is not a plugin)
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 8 passed, 8 skipped over 1 changed file
  • fresh-context review subagent compared the diff with HEAD's file: read and overwrite order, dated-before-keep order, retention per section, shape application, carry() output key order, .tmp write and rename, warning text and exports all unchanged; the one difference it found is main's warning text…
  • grep: dated() has only one caller, take, and it always passes days, so dropping the default does not change behavior
  • grep: carry-run-cache.test.mjs checks the warnings by prefix only; every prefix is unchanged
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42496126376

Left out: the items under Not verified.

Related

#14118

Merge-Risk: max=MEDIUM demote=false head=76f2c0869ba3b9898621a5e69fe5edea97d7fb4b 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-review reviewed 76f2c0869ba3b9898621a5e69fe5edea97d7fb4b: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): no findings.

This review covers only what changed since 1651103760640d1443dbe75a2c6a0c8fd14ec72d: one hunk in .github/scripts/pr-merge/carry-run-cache.mjs. I read that whole hunk and the take helper around it. This lane already reviewed an earlier head, so it reports blocking findings only.

What changed. The run-record call to take used to pass slimRecord directly. It now passes a one-line wrapper, { shape: (value) => slimRecord(value) }, with a comment that the pinned lizard tool (js-complexity-share) cannot parse the bare { shape: slimRecord } form (carry-run-cache.mjs#L186-L187).

Behavior is unchanged. take calls shape in one place only, shape(entry.value), with a single argument (L182). slimRecord takes one parameter and does not use this (L128-L132). The wrapper therefore returns the same result for every input. I checked this by reading the code; I did not run any tests.

Closing issue #14118: this push still meets the "behavior unchanged" and "only the listed file edited" criteria. Whether ci-status is green is left to CI; I did not verify it.

Other notes:

  • No prompt-injection text was found in the PR context or the prior-findings file.
  • No plugin manifests changed.
  • The change spends nothing, so there is no cost hold.
  • The file matches a trusted-path glob, so I read its whole change. That match alone is not a reason to hold.

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #14162, incremental since 1651103

I found no security issues. Because this lane already reviewed an earlier head, this pass reported only blocking findings (CRITICAL or IMPORTANT).

What I read. One file changed in this push: .github/scripts/pr-merge/carry-run-cache.mjs, which is a trusted path. I read its one hunk and the take helper the hunk calls.

The change. On line 187, { shape: slimRecord } becomes { shape: (value) => slimRecord(value) }, and a comment is added on line 186 saying the pinned lizard tool cannot parse the bare form. This does not change behavior:

  • take calls shape(entry.value) with one argument (L182).
  • slimRecord takes one parameter (L128).

So the wrapper passes exactly what the bare reference did. The run-record filter (originRecord), the retention window and the carried keys are unchanged.

Trust controls. Nothing that decides who or what the automation trusts is widened: no merge hold, trusted-actor check, token scope, kill switch or path for untrusted text.

Embedded text. The PR context contains no directives aimed at this lane.

Instruction register. No standing instruction was deleted or softened, so I did not need the instruction exception register.

critical-findings: 0

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 1651103760640d1443dbe75a2c6a0c8fd14ec72d. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 76f2c08

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-14162-76f2c0869ba3b9898621a5e69fe5edea97d7fb4b, 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 7c72e92 Nov 8, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14118-42496126376-1 branch November 8, 2026 17:31
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: carry-run-cache.mjs

0 participants