Skip to content

refactor(scripts): simplify check-silent-revert.sh and check-silent-skips.sh - #14639

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14360-42615121782-1
Nov 9, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14360

Summary

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

Simplified both scripts without changing their behavior (2 files, 71 added and 103 removed lines). In check-silent-revert.sh: merged the two hunk-range helpers into one awk pass, folded the two CHANGELOG enumerations in scan_commit into one git diff, moved the duplicated replay FAIL block into a report_mismatch helper, and removed dead or redundant branches (an unreachable empty-entry case, a redundant -h/--help case, and a blank/comment skip that can never match a full sha). In check-silent-skips.sh: the two awk scanners now share one annotation-tracking function string instead of each carrying a copy, and the file loops and report_hits are tighter. Every flag line the self-test strips by sed and every source line gate-entry.test.sh allowlists is unchanged.

Not verified

  • scripts/check-silent-revert.test.sh and scripts/check-silent-skips.test.sh were not executed here (this lane cannot run arbitrary scripts); left to the PR's CI.
  • tidy skipped: the change touches only scripts/, which is on the tidy cutoffs' shared-path list.
  • ci-status green is a PR CI check; left to the PR's CI.

Fix

  • scripts/check-silent-revert.sh: merged old_side_deleted_ranges into append_deleted_ranges; one CHANGELOG enumeration instead of two (keeps the first call's error label); report_mismatch helper for the two replay FAIL blocks; simpler run_attributing_git, ack_reason, declares_removal,…
  • scripts/check-silent-skips.sh: shared AWK_ANNOTATION_LIB (is_annotated, is_comment, track_annotation) used by both scanners; merged test-file loop guard; simpler report_hits and hook loop.

Verification

The runner ran each check from the base copy against 70aaf52:

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

The run reports:

Left out: the items under Not verified.

Related

#14360

Merge-Risk: max=MEDIUM demote=false head=70aaf5246cee5eb2cd95ee5fd0e63c170c35d4dc rubric=8.1.4 rater=claude-opus-5-5 checker=claude-opus-5-5

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

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #14639 (head 70aaf52)

No security issues found. I read every hunk of both changed files. Neither matches a trusted-path glob. The change is a refactor of two repository CI canaries, and I found no behavior change that would weaken either one.

critical-findings: 0

What I checked

  • scripts/check-silent-revert.sh
    • scan_commit, the two CHANGELOG enumerations merged into one: the code that builds the excluded paths now skips any path that isn't under plugins/*. That gives the same exclusions as the old plugins-only list. The -s "$enum_list" release-shape test still sees all three fragment roots, the same set the old second call covered. Every exclusion still depends on the commit changing a CHANGELOG, and fragment exclusions still require bump: none at the parent (L863-L895). The suppression surface is not wider.
    • ack_reason, the blank/comment skip removed: an empty or #-prefixed recorded value can't equal a resolved commit sha, so the acknowledgement file grants nothing new (L479-L484).
    • parse_attribution_field: the case that died on an empty entry is gone, but it was unreachable. The *, | ,* | *,,* guard above it still dies first. The checks on the = separator and the 40-character sha are kept.
    • append_deleted_ranges, run_attributing_git, report_mismatch and the -h|--help case: the same ranges, the same fail-closed die on a non-zero git exit, and the same FAIL text. -h and --help are still caught by -*.
    • verify_known_incidents: the new [[ ... ]] && continue line skips the same rows the old case did (blank, # comment and marker).
  • scripts/check-silent-skips.sh: both awk scanners now share one annotation-tracking string, AWK_ANNOTATION_LIB. Its logic is the same as the two copies it replaces. The guard in the test-file loop and report_hits are equivalent rewrites, and violations are still counted into errors.

No trust controls, merge holds, tokens, workflows, plugin manifests or standing instructions are touched. The review was not blocking-only, since the prior-findings file lists no earlier head, and there were no settled threads or prior findings to apply. The PR context contains no embedded directives aimed at the lane.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings. I read every hunk of both changed files (scripts/check-silent-revert.sh and scripts/check-silent-skips.sh). Both are refactors, and I found no change in behavior.

scripts/check-silent-revert.sh

  • append_deleted_ranges: the inlined awk does the same job as the old two-step version. It filters start > 0 && count > 0 and prints start,end. Nothing else in the repository referenced old_side_deleted_ranges; I checked with grep.
  • scan_commit: the one enumeration now takes the union of the three CHANGELOG pathspecs. Adding [[ "$p" == plugins/* ]] || continue keeps the exclusion list as it was, because the docs/... paths never start with plugins/. enum_list still holds the three-glob list when the -s check reads it, as the removed second call left it.
    • One message changes: the second call's fragment-root CHANGELOG changes label is gone. It could only appear when the first git diff succeeded and the second failed on the same tree, and no test matches that text.
  • ack_reason: dropping the blank/comment skip is safe. Its only caller passes a full sha from git rev-parse --verify (L794), so an empty or #… line can never equal it.
  • parse_attribution_field: the removed '' case could not be reached. The *, | ,* | *,,* guard above it already rules out empty entries.
  • report_mismatch: it prints the same text as both FAIL blocks it replaces, character for character.
  • run_attributing_git: same exit status and same die message on both paths.
  • -h | --help: the -*) usage branch already handled these flags.
  • Tests: the strip_pin sed edits in scripts/check-silent-revert.test.sh still hit the same code lines. The remaining --name-only line with -M / -l0 is still there, and the BASE_REF_ALLOW lines are untouched.

scripts/check-silent-skips.sh

  • AWK_ANNOTATION_LIB: the shared string is single-quoted shell text joined in front of each program, so neither scanner's awk changes. annotated_above and pending_annot stay awk globals, and scan_test_skip_pass still escapes '\'' correctly.
  • report_hits and the loops: report_hits now makes v local, which nothing else reads. The merged test-file guard and the case "${hook##*/}" change are equivalent to the old code.

Closing issue #14360

  • "Behavior is unchanged…": met as far as I can tell by reading the code; I could not run anything. The repository's tests can catch a regression here: scripts/check-silent-revert.test.sh replays the known incidents, and scripts/check-silent-skips.test.sh covers the skip scanner.
  • "The diff edits only the listed files…": met. Only the two listed scripts change.
  • "Within 400 changed lines and 15 files": met, at about 174 changed lines across 2 files.
  • "ci-status is green": not checked; this lane cannot see CI. The PR says it ran checks and a subagent review, and lists the test suites under "Not verified". None of that is confirmed by me.

I found no embedded instructions in the PR context, and no plugin manifests change.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 70aaf52

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-14639-70aaf5246cee5eb2cd95ee5fd0e63c170c35d4dc, expires on 2026-12-09.

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 9, 2026
Merged via the queue into main with commit 3f380e9 Nov 9, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14360-42615121782-1 branch November 9, 2026 14:04
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 3f380e9944baf27f8a71505a5476629263f423a7; 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 check-silent-revert.sh and check-silent-skips.sh repository scripts

0 participants