Skip to content

fix: Simplify the hooks, lib, scripts and 4 more review plugin code - #15214

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14722-42696061595-1
Nov 11, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14722

Summary

Opened by the work-resolve-issue lane from work-resolve-issue/issue-14722-42696061595-1, which an earlier run left with commits and no report. The model did not run again, and the earlier run's outcome could not be read, so this body carries none of its text.

Fix

The diff shows the changes.

Files the branch changes, from the compare listing; a denied path, which the merge lane refuses, is marked and listed first:

  • .changes/review/work-resolve-issue-issue-14722-42696061595-1-e8e3d89c.md
  • plugins/review/hooks/connected-page-gate.mjs
  • plugins/review/skills/explain-change/scripts/build-digest.mjs
  • plugins/review/skills/explain-change/scripts/digest-policy.mjs
  • plugins/review/skills/explain-change/scripts/publish-hosted.mjs
  • plugins/review/workflows/fanout-sweep.js

Verification

The earlier run reported no checks here.

The runner ran each check from the base copy against 8a979a5:

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

The runner's leak scan read everything the branch changes since its merge base with the default branch and found nothing credential-shaped.

Left out: every check; ci-status, pr-verify and the security review lane check the head before it merges.

Related

#14722

Merge-Risk: max=MEDIUM demote=false head=8a979a5046f9d1adb3cac40eacb318cbd42c0b91 rubric=8.4.0 rater=claude-opus-5-5 checker=claude-opus-5-5

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

Copy link
Copy Markdown
Contributor

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

Security review: PR #15214 (head 8a979a5)

No security issues found. I read every hunk of all 6 changed files. Each change is a refactor that keeps the same behavior. None of the files match a TRUSTED PATHS glob, and the diff does not touch a plugin manifest, so there are no manifest lines.

What I checked:

  • plugins/review/hooks/connected-page-gate.mjs (the guard that blocks publishing loopback-connected pages as Artifacts):
    • The kill check changed from (env || 'true') === 'false' to env === 'false'. Both versions keep the guard on when the variable is unset or empty, and turn it off only for the exact string false. The default is not widened.
    • loopbackConnect and paths were rewritten with some and filter. They match the same CSP sources and the same file_path, files[] and path strings as before.
    • The deny output is unchanged. Errors still fail open with exit 0, as in the base.
  • plugins/review/skills/explain-change/scripts/build-digest.mjs:103: repoRoot(realpathSync(dir)) became repoRoot(dir). The line just before it, build-digest.mjs:102, already rejects any dir where realpathSync(dir) !== resolve(dir), and repoRoot itself calls resolve(dir). So both versions walk up from the same absolute path, and the check that the bridge dir is outside the working tree is not weakened.
  • plugins/review/skills/explain-change/scripts/digest-policy.mjs: the isSha helper uses the same /^[0-9a-f]{40}$/ test in both places that used it. readJsonLayer now does the read and the parse inside one try, with the same warning and the same null on failure. parseJsonLayer has no other callers.
  • plugins/review/skills/explain-change/scripts/publish-hosted.mjs: { ...target, page, dataDir } passes the same fields as before. prFromFacts (repo-visibility.mjs:25) returns only { host, repo, pr }, and page and dataDir are set after the spread, so a facts file cannot inject extra keys or override them. Replacing join(path, "..") with dirname(path) gives the same parent directory.
  • plugins/review/workflows/fanout-sweep.js:
    • raw: returned returns the same { label, output } objects, which are built at fanout-sweep.js:194-196.
    • The extract-role check still accepts only a model alias and effort from the allowlists, and falls back to sonnet/medium otherwise.
  • The .changes/ fragment is text only.

The PR context file contains no embedded text telling the lane to pass the PR, skip a check, drop a finding or post elsewhere. The protected-class register was not needed: the diff removes no standing instruction or guard rule.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read every hunk of the 6 changed files and checked each simplification against the issue's main acceptance criterion, "Behavior is unchanged". I also read the code each changed line calls.

  • plugins/review/hooks/connected-page-gate.mjs
    • The loopbackConnect and paths rewrites keep the same order and filtering. file_path still comes first, followed by files entries, and anything that is not a string is dropped.
    • (X || 'true') === 'false' and X === 'false' give the same result for every string, empty and unset included.
    • Moving process.exit(0) out of the try block keeps the same output on stdout and the same exit code on every path: no hit, a hit, and a thrown error.
  • build-digest.mjs
    • repoRoot(dir) replaces repoRoot(realpathSync(dir)), and repoRoot itself calls resolve(dir).
    • The line just before it already returns early unless realpathSync(dir) === resolve(dir), so both versions get the same input.
  • digest-policy.mjs
    • The merged readJsonLayer gives the same warning text for read and parse errors, ${label} ${path}: ${error.message}; layer ignored.
    • parseJsonLayer was not exported and nothing else calls it (searched across plugins/).
    • isSha keeps the same regex and type check.
  • publish-hosted.mjs
    • dirname(path) gives the same directory as join(path, "..") for the sidecar paths.
    • publishHosted destructures only { page, host, repo, pr, dataDir }. The two keys set by hand, page and dataDir, come after ...target, so they still take precedence.
  • fanout-sweep.js
    • returned is already built as { label, output } (line 194–196), so raw: returned returns the same shape as the old .map.
    • isVariant keeps the old falsy short-circuit and the log message is unchanged. The fallback is still { model: 'sonnet', effort: 'medium' }.

Closing issue #14722 criteria

  • Files edited: the diff touches only listed files plus a changelog fragment.
  • Size: well under 400 lines and 15 files.
  • Changelog fragment: bump: patch, with ### Changed and "Internal simplification, no behavior change.", as required.
  • Tests: existing tests cover the touched files: connected-page-gate.test.sh, tests/explain-change.test.mjs and tests/fanout-sweep.test.{mjs,sh}.
  • ci-status: not run here, so its result is unconfirmed. The checks listed in the PR body are what the author's lane reported; I did not verify them.

No plugin manifest changed. No embedded instructions were found in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 8a979a5

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-15214-8a979a5046f9d1adb3cac40eacb318cbd42c0b91, expires on 2026-12-11.

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 11, 2026
Merged via the queue into main with commit 49abf5b Nov 11, 2026
65 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14722-42696061595-1 branch November 11, 2026 00:46
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 49abf5b3f4e583a065b3eaee7ee70a92fd8f27cd; 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 the hooks, lib, scripts and 4 more review plugin code

0 participants