Skip to content

refactor(harness-ops): simplify skill-pair-cooccurrence.sh jq reduction - #14836

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14523

Summary

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

Simplified the jq reduction in skill-pair-cooccurrence.sh without changing behavior. The script took the earliest and latest timestamps with sort|first and sort|last. It now uses min and max, which match those for every array (null on an empty one), and a first_ts helper replaces two repeated sort pipelines. The two-stage group filter and per-group objects are now one list of order strings, counted by a count helper, so the denominator, numerator and ordering split come from that one list. The flag parsing, messages, exit codes and report rendering are untouched.

Not verified

  • skill-pair-cooccurrence.test.sh was not executed here: this lane's Bash runs only the named wrappers, so the suite is left to the PR's CI
  • tidy-diff passes 4 and 5 (docs-hygiene and ai-slop) skipped on the changelog fragment: its only line is the exact text the issue requires, so no rewrite could stand. Passes 1-3 ran over the script hunks and made no edits.

Fix

  • plugins/harness-ops/skills/audit-skill-visibility/scripts/skill-pair-cooccurrence.sh: in the jq program, min/max replace sort|first/last; new first_ts and count helpers; one $orders list replaces the $with_caller/$rows/$denominator/$numerator intermediates. Output fields and values unchanged.
  • .changes/harness-ops/work-resolve-issue-issue-14523-42681102435-1-e611f39c.md: new patch fragment, ### Changed with "Internal simplification, no behavior change."

Verification

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

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

The run reports:

  • check-changelog-fragments: all 16 fragments valid (run before and after tidy)
  • check-changed-skills: audit-skill-visibility PASS, 0 errors, 3 warnings, all about SKILL.md size and description length, which this change does not touch
  • check-affected: 13 passed, 6 skipped (tooling not installed or CI-only), 0 failed over the 2 changed files
  • fresh-context review subagent: confirmed by reading that the jq syntax is valid for jq 1.6 and 1.7, that min/max match sort|first/last (empty and tie cases included), that the new null check selects the same groups as the old any(...) filter given the upstream ts filter, and that no name clashes…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42681102435

Left out: the items under Not verified.

Related

#14523

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

Security review: PR #14836

I found no security issues.

I read every hunk in both changed files. Neither file matches a trusted-path glob.

  • plugins/harness-ops/skills/audit-skill-visibility/scripts/skill-pair-cooccurrence.sh: the change rewrites the report math in the jq program and nothing else:
    • min/max replace sort | first/sort | last.
    • New first_ts and count helpers.
    • One $orders list replaces the $with_caller/$rows intermediates.
    • Values still reach jq only through the existing --arg/--argjson bindings.
    • The flag parsing, shell quoting, file paths and command calls are all unchanged.
    • No new input reaches a shell, a path or a network call, and no credential is handled.
  • .changes/harness-ops/...e611f39c.md: a new changelog fragment that is prose only.

Neither file changes a trust control, a merge hold, a plugin manifest or a standing instruction. Under skip gate 2 (no security-relevant surface), there is nothing to report.

The PR context contains no embedded instructions aimed at this lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 8ff80a0c8085c8b1c2a0d93dcbc69b0513262e20: 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, plus the jq program around them at head (skill-pair-cooccurrence.sh lines 274–345).

Is the behavior the same? Yes. I checked each change by reading the code. I didn't run anything.

  • min / max in place of sort | first / sort | last: jq's min and max use the same ordering as sort. Both return null on an empty array, so $first == null still guards $span_days the same way.
  • first_ts($s): the same as the old map(select(.skill == $s)) | map(.ts) | sort | first.
  • select($caller_first != null) in place of select(any(.[]; .skill == $caller)): these pick the same groups. The upstream filter (.ts // "") != "" (L294) removes rows whose ts is null or false. So if the caller fired anywhere in a group, its earliest ts is never null.
  • The counts: denominator is $orders | length, which is the old $with_caller | length. numerator is the length minus the "absent" entries, the same as the old has_callee count. The three ordering counts come from the same string comparisons as before.
  • The new helper names count and first_ts don't clash with any other name in the program. The later verdict block reads only fields of the report object, and every field name and value is unchanged.

Closing issue #14523, acceptance criteria:

  • Behavior unchanged: met, by the reading above. The PR changes no tests. The existing skill-pair-cooccurrence.test.sh is the suite that would catch a regression; the PR says it was not run in the authoring lane and leaves it to CI. I didn't run it either.
  • Only the listed file and a changelog fragment are edited: met.
  • Within 400 lines and 15 files: met (2 files, small diff).
  • ci-status green: I can't check this from inside this lane; it is left to CI.
  • Fragment: met. .changes/harness-ops/…-e611f39c.md has bump: patch, ### Changed, and the exact line the issue asks for.

The PR body's verification results (fragment and changed-skills checks passing, the fresh-context review subagent's conclusions) are the author's claims, and I haven't confirmed them.

Embedded text: none in the PR context that tries to steer this review.

No manifest items: no plugin.json or marketplace.json changed. No prior findings: this is the first review, so it is not blocking only.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 8ff80a0

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-14836-8ff80a0c8085c8b1c2a0d93dcbc69b0513262e20, 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 80838ca Nov 9, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14523-42681102435-1 branch November 9, 2026 23:57
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/harness-ops/skills/audit-skill-visibility/scripts/skill-pair-cooccurrence.sh 6 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/harness-ops/skills/audit-skill-visibility/scripts/skill-pair-cooccurrence.sh:286 other productive input-gap

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 80838ca816b7db4cfcbe68ca1649f35224db20c5; 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 skill-pair-cooccurrence.sh harness-ops plugin code

0 participants