Skip to content

refactor(harness-ops): simplify audit_skill_visibility.py part 2 without behavior change - #14866

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14520

Summary

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

Simplified functions that start in the second half of audit_skill_visibility.py (lines 1925-3849 at the start of this part; the file is 3849 lines) without changing behavior. compute_listing's three-way floor/full branch is now two conditional expressions over name_only/rendered lengths. compute_listing_band finds a withheld reason in one pass instead of any() plus next(). _observation_value nests its two count == 0 returns. _render_coverage's four inline ten-name previews use a new private _name_preview helper. main's fixture clock reads _parse_ts(args.now or bundle["now"]). Part 1's functions (all starting before line 1925) and every other file are untouched apart from the required changelog fragment.

Not verified

  • Python test suites for this script (test_audit_skill_visibility.py, audit_skill_visibility.test.sh) were not executed: this lane runs no interpreter or test runner. Left to the PR's CI.
  • ci-status green is a PR CI check; left to the PR's CI.
  • Tidy pass 5 (ai-slop fix) could not run the deterministic detector script in this lane; the changelog fragment got a manual rubric read with no findings. The fragment text is fixed verbatim by the issue.

Fix

  • plugins/harness-ops/skills/audit-skill-visibility/scripts/audit_skill_visibility.py: simplified compute_listing, compute_listing_band, _observation_value, _render_coverage (new private helper _name_preview) and main's fixture clock; outputs, flags and exported names unchanged
  • .changes/harness-ops/work-resolve-issue-issue-14520-42704419517-1-c33d7479.md: patch fragment created with scripts/new-changelog-fragment.sh, body '### Changed' and 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 109b458:

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

The run reports:

  • check-changelog-fragments: all 19 fragments valid (run before and after tidy)
  • check-changed-skills: audit-skill-visibility PASS, 0 errors, 3 warnings, all on the SKILL.md's existing size and none from this change (run before and after tidy)
  • check-affected: 13 passed, 6 skipped over 2 changed files (run before and after tidy)
  • fresh-context review subagent: every hunk EQUIVALENT (exact string equality checked for each _render_coverage message, the floor/full arithmetic checked per eligibility class); no test imports or asserts on a changed name or string
  • git-read diff: only the listed script and one harness-ops changelog fragment changed; ~60 changed lines
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42704419517

Left out: the items under Not verified.

Related

#14520

Merge-Risk: max=LOW demote=false head=109b4581b91d22debc44d4f57a512e7f221731ae rubric=8.2.0 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 109b4581b91d22debc44d4f57a512e7f221731ae: 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 in the full diff:

  • .changes/harness-ops/work-resolve-issue-issue-14520-42704419517-1-c33d7479.md is a new patch changelog fragment with prose only.
  • plugins/harness-ops/skills/audit-skill-visibility/scripts/audit_skill_visibility.py is a refactor of a local audit or report script. It does not change behavior:
    • compute_listing: the floor and full character counts come out the same for each eligibility class. Bundled entries get n+4+d / n+4+d. Name-only entries get n+2 / n+2. Other entries get n+2 / n+4+d.
    • compute_listing_band: the reason is now found in one next(..., None) pass. The result is the same.
    • _observation_value: the two count == 0 returns are now nested. The logic is the same.
    • _render_coverage: the inline name previews now use the new _name_preview helper, which builds the same strings.
    • main: the fixture clock now uses args.now or bundle["now"]. Both versions treat a falsy args.now the same way.

No changed line touches authentication, tokens, secrets, shell or subprocess calls, file paths built from input, network calls, workflows, plugin manifests, trust controls or merge holds. Neither file matches a TRUSTED PATHS: glob. No standing instruction is deleted or softened. The PR context contains no embedded directives aimed at this lane.

There are no prior findings from this lane (0 earlier heads reviewed; not blocking only).

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read both changed files in full: the script and the changelog fragment. I checked each hunk of audit_skill_visibility.py against the base by hand. I did not run the tests. Where the PR claims test or CI results, those are the author's claims and I have not checked them.

Equivalence checks

  • compute_listing floor/full (L1995-2000). Here name_only = n+2 and rendered = n+4+desc:
    • exempt-bundled: floor gets rendered, full gets rendered.
    • exempt-name-only: floor gets name_only, full gets name_only.
    • every other class: floor gets name_only, full gets rendered.
      These match all three base branches.
  • compute_listing_band reason. next((…), None) followed by if reason: sets the same first truthy reason that any() plus next() set before. It skips the same falsy values.
  • _observation_value. The observable_days < floor check now sits inside count == 0. The order and return values are the same.
  • _render_coverage. In all four messages (stale, absent, longer, shed), the old implicit concatenation followed by + gives the same text as the new f-strings that call _name_preview. That covers the ten-name limit and the trailing …. _name_preview is a new private name and does not clash with anything.
  • main clock. _parse_ts(args.now or bundle["now"]) falls back to bundle["now"] in the same cases as before, when args.now is None or "". It also only looks up bundle["now"] when it needs it, as before.

Closing issue #14520, acceptance criteria

  • Behavior unchanged: met, by the checks above. The PR says no test asserts on these strings or names. If that holds, the same outputs depend on the existing suite plus the reasoning above.
  • Edits only the listed file and changelog fragments: met.
  • Within 400 lines and 15 files: met, at about 60 lines across 2 files.
  • Only functions starting in range 2 are changed: met. The earliest changed function, compute_listing, starts at line 1933, which is after line 1925. _name_preview is new and placed inside the range.
  • Fragment: met. It is bump: patch with ### Changed and the required line.
  • ci-status green: CI decides this, and this lane cannot see it.

No plugin manifest changed, and no .claude/rules or paved-path criteria applied. There were no prior findings from this lane, and the review covered all findings, not only blocking ones.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 109b458

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-14866-109b4581b91d22debc44d4f57a512e7f221731ae, 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 e681786 Nov 9, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14520-42704419517-1 branch November 9, 2026 22:16
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 audit_skill_visibility.py harness-ops plugin code (part 2 of 2)

0 participants