Skip to content

refactor(source-control): simplify lane-binding and reassess scripts - #15743

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15738-43337106512-1
Nov 13, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15738

Summary

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

Simplified three of the four listed files with no change in behavior. babysit_lane_binding.py gets two private helpers (_text for the None-to-str coercion repeated four times, _is_int for the int-not-bool test repeated three times), checks the footer inline in binding_of, merges the two artifact filters into one comprehension, moves number above the closure that reads it, and replaces the in_window expression and its type-ignore with an explicit None guard. reassess-comment.sh validates the reference once for both reference flags instead of in each case arm, and reassess-limits.sh names the repository owner once as OWNER. target-repo.sh is unchanged: every candidate edit either needed bash-4-only syntax or changed nothing of substance. A review caught that ${var,,} breaks reassess-limits.sh on bash 3.2, so its lowercasing stays on tr.

Not verified

  • Test suites (test_babysit_lane_binding*.py, reassess-comment.test.sh, reassess-limits.test.sh, target-repo.test.sh) were not run: this lane can run only its wrapper commands, so they are left to the PR's CI
  • ruff and shellcheck were not run directly here. The reviewer read the code against ruff.toml (E4/E7/E9/F) and the usual shellcheck rules and found no issue; CI's lint runs them
  • target-repo.sh left unchanged: no simplification was found that keeps behavior and stays within the script's existing style
  • Tidy passes 4 and 5 (markdown) skipped: the changelog fragment's body is wording the issue requires verbatim
  • ci-status green is checked by the PR's CI

Fix

  • plugins/source-control/skills/babysit-prs/scripts/babysit_lane_binding.py: added private helpers _text and _is_int and used them; binding_of matches FOOTER directly instead of calling lane_footer again; one artifact-filter comprehension instead of two; number defined before head(); explicit None…
  • plugins/source-control/skills/pull-request/scripts/reassess-comment.sh: check_ref runs once for --replaced-by and --evidence before the assignment case, so the case arms are one line each
  • plugins/source-control/skills/pull-request/scripts/reassess-limits.sh: OWNER="${REPO%/*}" set once after validation and used in the GraphQL owner argument and the same-head owner comparison
  • .changes/source-control/work-resolve-issue-issue-15738-43337106512-1-40d465d8.md: patch fragment, ### Changed / "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 72a1db5:

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

The run reports:

  • check-changelog-fragments: all 32 fragments valid
  • check-changed-skills: babysit-prs and pull-request PASS, 0 errors (warnings are existing SKILL.md size and description notes, not about this diff)
  • check-affected: 14 passed, 5 skipped (typos not installed; validate-plugins sub-checks and changed-skills that run code from the checked tree)
  • fresh-context review subagent compared old and new code: found no input-level difference in babysit_lane_binding.py or reassess-comment.sh and confirmed no caller uses a changed name; it flagged that ${var,,} in reassess-limits.sh breaks bash 3.2, which is fixed by going back to tr
  • grep: no file references a private name of babysit_lane_binding (lb._ / lane_binding._), and the reassess tests do not check source text
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43337106512

Left out: the items under Not verified.

Related

#15738

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

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

I read the whole diff: all 4 listed files and every hunk. This is the first review of this pull request. No earlier heads were reviewed, so this was not a blocking-only review.

Trusted path: plugins/source-control/skills/babysit-prs/scripts/babysit_lane_binding.py matches a trusted path. It checks whether a footed comment really came from a lane run. I read its full change and the code around it at head. Each change keeps the old behavior:

  • binding_of: the old code called lane_footer(body) is None. The new code runs FOOTER.fullmatch on the last non-blank line. lane_footer (lines 74-81 at head) does the same thing: it returns match[1], and that group is always non-empty, so the two tests agree for every input. When there are fewer than two non-blank lines, both versions return None.
  • _text and _is_int: these helpers do exactly what the inline expressions they replace did.
  • Artifact filter: two list comprehensions became one that joins the tests with and. The prefix test still runs first. A None artifact still drops out on the name test, so a.get("expired") never runs on None.
  • number: the line moved above the head() closure. The closure reads number only when it runs, so nothing changes.
  • Time-window check: the old code built in_window from None not in (at, start, end). The new code returns False early if any of the three times is None, then returns start <= at <= end and not was_edited(comment). The results match. The new version also returns a real bool instead of possibly False from the short-circuit, and drops the type: ignore.

No check that decides whether a lane comment counts was loosened. The comment record, attempt count, created-time window and edit check all behave as before.

reassess-comment.sh: check_ref still validates the value of --replaced-by and --evidence before it is assigned, as before. It just runs once ahead of the case now. --verdict is still not checked, also as before.

reassess-limits.sh: OWNER="${REPO%/*}" is set right after REPO passes its check ^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$. So the owner text placed into the --jq filter string can still contain only those characters, and there is no jq injection. No other part of the script uses a variable named OWNER; the "OWNER" on line 121 is a jq string literal.

Changelog fragment: text only. Nothing runs from it.

PR context: the description is data. It contains no instructions aimed at this review.

No trust control is widened, no plugin manifest changed, and no standing instruction is removed or softened.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read all four changed files in full. I checked each edit against the base behavior to confirm that, as #15738 requires, nothing behaves differently.

babysit_lane_binding.py (trusted path; I read every changed line and the code it gates)

  • _text and _is_int helpers: these replace the repeated inline expressions with identical logic.
  • binding_of footer check: it now matches FOOTER directly. Before, it called lane_footer(body) is None, which does the same test on the same last non-blank line. The len(at) < 2 guard already rules out the case where lane_footer returned early with no non-blank lines. The result is the same for every input.
  • Combined artifact filter: for a None artifact, the name test fails first, so a.get is never reached. A non-mapping artifact raises the same AttributeError it did before. The set of live artifacts is unchanged.
  • number moved above head(): the closure reads it when called, not when defined, so the move has no effect.
  • in_window rewritten as an explicit None guard: this returns False in the same cases as before. It also drops the type: ignore and keeps returning a bool. The lane-binding check is no looser than it was.

reassess-comment.sh: check_ref still runs for --replaced-by and --evidence and not for --verdict. It still runs before the value is assigned, so exit codes and messages are unchanged.

reassess-limits.sh: OWNER="${REPO%/*}" is set after REPO is validated and before either place that uses it. Nothing else in the script uses OWNER, and lowercasing still uses tr, so bash 3.2 compatibility holds.

Closing issue #15738, acceptance criteria

  • Behavior unchanged: met, by my reading of the code. I ran no tests; existing tests in the repository (test_babysit_lane_binding*.py, reassess-*.test.sh) cover these paths, as the PR says.
  • Diff limited to the listed files and a fragment: met.
  • At most 400 changed lines and 15 files: met, at about 70 lines.
  • ci-status green: not verifiable from this lane; it is left to CI.
  • Fragment: met. It is bump: patch with ### Changed and "Internal simplification, no behavior change."
  • target-repo.sh is unchanged, and the PR body explains why. The issue lists it for review, not as a file that must change.

Not verified here: the test results, ruff and shellcheck runs, and the changelog and changed-skills checks in the PR body are the author's claims. I did not run them.

No plugin manifest changed, so there are no manifest lines.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 72a1db57b29f4f15ae32e6ddd1549b0bca3092d6. No person needs to act: a lane clears this reason, and 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 72a1db57b29f4f15ae32e6ddd1549b0bca3092d6, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 72a1db5

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-15743-72a1db57b29f4f15ae32e6ddd1549b0bca3092d6, expires on 2026-12-13.

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=72a1db57b29f4f15ae32e6ddd1549b0bca3092d6 rubric=8.4.13 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit a71df30 Nov 13, 2026
55 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15738-43337106512-1 branch November 13, 2026 01:07
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit a71df3094043c5b312bfae107f23866d78ab9b91; 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 source-control reassess, target-repo and lane-binding scripts

0 participants