Skip to content

refactor(harness-ops): simplify overlap.py first half - #15228

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14513

Summary

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

Simplified the functions that start in the first half (lines 1-1222 of 2445) of plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py without changing behavior. render_block now groups rows by lane once and counts verdicts and integrations with a small Counter-based _tally helper. check_baked_parity reads the four baked flags from BAKED_FLAGS and drops isinstance guards that its own preceding loop already makes always true. _integration_problems reads baked once instead of twice, and validate_row binds observation.detail once. Choice basis: every edit keeps the same evaluation order (BAKED_FLAGS lists the same four keys in the order of the old or chain), the same sort order and the same printed text. Functions starting after line 1222 (_body_has_native_step and onward) were left alone per the range-1 acceptance criterion.

Not verified

  • test_overlap.py and overlap.test.sh were not executed: this lane cannot run an interpreter or test runner, so they are left to the PR's CI
  • Lint (ruff) and a Python build/compile of overlap.py could not run in this lane; left to the PR's CI
  • tidy pass 5 (ai-slop:audit fix) ran its rubric read only: the deterministic detector detect.sh is not among the wrappers this lane may run
  • Out-of-scope finding, not changed because it would alter printed text: validate_dismissal's error message says the fingerprint is '16 lowercase hex chars', but FINGERPRINT_LEN is 32 and FINGERPRINT_RE requires 32. It is worth its own issue

Fix

  • plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py: added Counter/Iterable imports and a _tally helper; render_block groups rows per lane once, builds the summary header as a list literal, and counts baked rows with any() over BAKED_FLAGS; check_baked_parity unpacks the baked flags…
  • .changes/harness-ops/work-resolve-issue-issue-14513-42939064643-1-d2037f79.md: new patch fragment (from new-changelog-fragment harness-ops patch) with ### Changed and "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 89989ce:

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

The run reports:

  • check-changelog-fragments: all 9 fragments under .changes/ valid (run before and after tidy)
  • check-changed-skills: audit-native-overlap PASS, 0 errors, 4 pre-existing warnings about SKILL.md size and description length, none from this change
  • check-affected: 13 passed, 6 skipped over 2 changed files
  • fresh-context review subagent over the diff: every change judged SAFE (no output, exit code or exception change on any input the CLI or tests reach). It confirmed BAKED_FLAGS order matches the old or chain, and that both CLI render callers validate the store first
  • tidy (code-tidying:tidy-diff) over 14 hunk rows: no further edit in passes 1-4; pass 5 rubric read found no AI-writing tells in the fragment
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42939064643

Left out: the items under Not verified.

Related

#14513

Merge-Risk: max=MEDIUM demote=false head=89989ce2c32156fc45e03344c3bc4c6acc4c6821 rubric=8.4.1 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 89989ce2c32156fc45e03344c3bc4c6acc4c6821: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read every hunk of both changed files:

  • plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py is a refactor and nothing more:

    • It adds a Counter-based _tally helper.
    • It groups rows by lane once in render_block.
    • It reads the baked flags through BAKED_FLAGS.
    • It binds baked and observation.detail once each.
    • It drops the isinstance guards in check_baked_parity's claimed_suggest comprehension. The loop just before it already indexes those keys.

    The script is a local audit and rendering tool. The change adds no subprocess call, file path, network or token handling, and no new input source.

  • .changes/harness-ops/...d2037f79.md is a changelog fragment and holds prose only.

Neither file matches a trusted-path glob. The diff touches no trust control, merge hold, kill switch, token request, plugin manifest or standing instruction. The PR context holds no embedded instructions aimed at the lane.

This is skip gate 2: the change has no security-relevant surface.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 89989ce2c32156fc45e03344c3bc4c6acc4c6821: 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: overlap.py and the new harness-ops changelog fragment. I also read the parts of overlap.py the changed lines depend on. Neither file matches a trusted-path glob. This is the lane's first review of this pull request, so it was not limited to blocking findings.

Behavior-preservation check (from reading the code; I ran no tests):

  • validate_row: detail is now read into a variable once. The checks and their order are the same, and the regex still runs only when detail is a non-empty string.
  • _integration_problems: baked is now set once, before the early defer return. Reading it has no side effects, and the guarded form {} matches the old local isinstance check in the model-invocation-disabled branch.
  • render_block: by_lane covers only the classes in LANES, the same rows the old loops filtered. any(r["baked"][k] for k in BAKED_FLAGS) checks the same four keys as the old or chain, in the same order (BAKED_FLAGS). _tally gives the same sorted k v text, with none when there are no rows. The second loop still sorts by the same key.
  • check_baked_parity: the generator reads the four flags in the old order, so a missing key would raise the same KeyError. The dropped isinstance guards in claimed_suggest could never fail, because the loop above reads row["component"]["plugin"], row["native"].get(...) and every row["baked"][key] before its first continue. row["native"]["name"] was read without a guard before too. The CLI caller runs validate_store first, and that requires every baked flag to be a boolean (L778-L782, L2025-L2048).

Closing issue #14513, acceptance criteria:

  • Behavior unchanged: met, as far as reading the code shows. The repository's tests cover this (test_overlap.py / overlap.test.sh). The author says they were not run in the lane, so whether they pass is left to CI and I have not checked it.
  • Only the listed file plus a changelog fragment is edited: met.
  • Within 400 lines and 15 files: met.
  • The fragment has bump: patch, ### Changed and "Internal simplification, no behavior change.": met.
  • Only functions that start in range 1 are changed: met. The last edited function, check_baked_parity, starts at base line 1190, inside 1–1222 of the 2445-line file. Everything else edited is above it, plus the new imports and _tally.
  • ci-status green: not something this review can confirm.

The PR's Verification section is the author's own claim, and I did not check it.

Not part of this change: the PR body notes a mismatch in validate_dismissal between "16 lowercase hex chars" and FINGERPRINT_LEN 32. The author has proposed a separate issue for it.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 89989ce

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-15228-89989ce2c32156fc45e03344c3bc4c6acc4c6821, 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 20cca3c Nov 11, 2026
75 of 76 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14513-42939064643-1 branch November 11, 2026 01:59
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 3, survived 4, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 43%; mutation score 43%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py 3 4 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py:748 LCR productive input-gap
plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py:1023 other productive no-assertion
plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py:1033 ROR productive no-assertion
plugins/harness-ops/skills/audit-native-overlap/scripts/overlap.py:1043 LCR productive no-assertion

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 20cca3c8259d844a30080fbfca7ab4edaef4c44e; 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 overlap.py harness-ops plugin code (part 1 of 2)

0 participants