Skip to content

refactor(review): name the explain-change destination from the medium registry - #13006

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-12670-41743087782-1
Nov 4, 2026
Merged

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #12670

Summary

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

review:explain-change already resolved its medium through the shared resolver (digest-policy.mjs calls lib/view-settings.mjs resolveMedium with the base commit as team ref) and printed the report line; what remained was the skill's own enumerated medium lists. digest-policy.mjs now also prints medium.where (the registry's reportName) and medium.publishes, and SKILL.md reads those instead of listing medium values for the offer line, the publish-gate opt-in and the connected-page condition. Design choice: I kept digest-policy.mjs as the resolver entry rather than adding a second view-settings.mjs resolve CLI call, because it already wraps the same resolveMedium with the base-commit team ref and the gate's explicit flag, so a second call would duplicate the resolution.

Not verified

  • node --test plugins/review/tests/explain-change.test.mjs was not run: this lane runs no interpreter. Left to the PR's CI.
  • Plugin-level evals under plugins/review/evals/ were checked only by grep, not by check-evals-quality; no model evals were run, as the issue asks.
  • Tidy: the ai-slop detector (detect.sh) could not run because the lane allows only the named wrappers, so pass 5 was a rubric read only, with no edits. Passes 1-4 ran. Pass 4 made one edit, rewording the step 1 sentence about the resolver.
  • SKILL.md still branches on single medium values (the publish-gate and hosted delivery steps name artifact, hosted, file, terminal one at a time). The issue's done-when targets enumerated lists, which are gone. Moving delivery dispatch fully into the registry's deliver() would be a larger…

Fix

  • plugins/review/skills/explain-change/scripts/digest-policy.mjs: resolveMedium output adds where (MEDIUMS[medium].reportName) and publishes from the medium registry
  • plugins/review/skills/explain-change/SKILL.md: step 1 says the script resolves medium through the shared resolver; the offer line names the destination from medium.where instead of an artifact/hosted/file/terminal list; the gate's file branch relays opt_in as it stands; the connected-page…
  • plugins/review/skills/explain-change/evals/evals.json: eval 9 prompt now includes the publish gate's printed output (with its opt_in), so the opt-in expectation is answerable now that the skill relays opt_in instead of naming the value
  • plugins/review/tests/explain-change.test.mjs: new test that medium.where and medium.publishes come from the registry for a local and the shipped default medium; the SKILL.md wording test asserts the new offer and opt_in wording
  • .changes/review/work-resolve-issue-issue-12670-41743087782-1-c09a18aa.md: patch changelog fragment for the review plugin

Verification

The runner ran each check from the base copy against 84937d3:

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

The run reports:

  • Grep for an enumerated medium list (two backticked medium values on one line, a|b alternation, or a comma list) over plugins/review/{skills,evals}/**: no matches
  • check-evals-quality over the review plugin's three skill eval sets (explain-change, quality-gate, fanout): PASS, 0 FAIL, 5 pre-existing WARN in quality-gate and fanout cases
  • check-changelog-fragments: all 21 fragments valid
  • check-changed-skills: explain-change PASS, 0 errors, 1 warning (body 161 lines vs the 160 guideline; the line count is unchanged by this diff)
  • check-affected: 11 passed, 7 skipped, over 5 changed files
  • cant-fail-scan --file plugins/review/tests/explain-change.test.mjs on the new and changed test lines: no can't-fail tests
  • Fresh-context review subagent over the whole diff: 3 findings (a stale SKILL.md wording assertion, eval 9 missing the gate's opt_in, an ambiguous connected-page condition), all confirmed and fixed
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41743087782

Left out: the items under Not verified.

Related

#12670

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

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 84937d30b5beddce8d1e1783aea101bf75e081d8: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #13006, head 84937d3

No security issues found. I read every hunk of all 5 changed files. None of them matches a trusted-path glob.

What I checked

Publish decision (digest-policy.mjs)

  • resolveMedium now also returns where and publishes. Both come from mediumOf(resolution.medium) in plugins/review/lib/view-registry.mjs.
  • That lookup checks own keys only (Object.hasOwn), so a value like toString doesn't resolve to a medium.
  • The registry entries (view-registry.mjs L20-23) give terminal and file publishes: false, and artifact and hosted publishes: true.
  • The publish decision hasn't moved. The --publish-gate path, its repository-visibility lookup, its credential-hunk check and the --explicit rule are all unchanged.

Connected page (SKILL.md step 4)

  • The condition changed from "medium: file or the gate returned file" to "medium.publishes is false or the gate returned file".
  • In practice this widens it only to the terminal medium. The page is still served from 127.0.0.1 and is still never published, so no new audience can reach it.
  • A published medium (artifact/hosted) whose gate did not return file is still skipped.

Opt-in text and offer line

  • The skill now relays the gate's opt_in as printed. That text comes from the repository's own gate script, not from pull request content, so no untrusted text gets a new path.
  • The offer line now reads medium.where instead of a hard-coded list of mediums. That text also comes from the in-repo registry.

Instruction surface

  • The skill-body edits replace a hard-coded list of mediums with registry-driven wording. They don't remove any rule that prevented an action: the "do not publish" and "keep as file on unclear gate result" rules remain.
  • I didn't read the protected-class register file for this pass. I judged the edits by what each one changes.

Tests and evals

  • The added test and the updated eval 9 prompt are test data only.

PR context

  • No instructions are embedded in the PR text.
  • No plugin manifest changed and nothing in the diff can cause a charge, so there are no manifest lines or hold.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 84937d30b5beddce8d1e1783aea101bf75e081d8: read 5 of 5 changed file(s); 1 finding(s), 0 as inline comments.

Code review: PR #13006

Scope: I read every hunk of all 5 changed files: the changelog fragment, SKILL.md, evals.json, digest-policy.mjs and explain-change.test.mjs. No trusted path matches, and no plugin manifest changed, so there are no manifest lines.

What the PR changes: resolveMedium in digest-policy.mjs now also returns where (the registry's reportName) and publishes, both looked up with mediumOf() from lib/view-registry.mjs. SKILL.md uses those two values instead of listing medium values for the offer sentence and the connected-page condition. It also passes the gate's opt_in on unchanged instead of restating it.

Checks I ran by reading the code (no tests were run):

  • mediumOf, reportName and publishes exist with the expected shape in plugins/review/lib/view-registry.mjs#L17-L27. review:explain-change is registered with the shipped default artifact (L47), so the new test's expectation for the shipped default is consistent.
  • The existing medium test compares only {value, source, explicit} through the at() helper (test L68), so the two new keys don't break it.
  • The opt_in string in eval 9's prompt matches OPT_IN word for word in plugins/review/lib/publish-gate.mjs#L461.
  • The connected-page condition changed from medium: file to medium.publishes is false. That also covers terminal, but the skill's own line 73 says a terminal medium builds no page, so nothing is served. The hosted and artifact fallback cases are still skipped, as before. Behaviour is the same.

Closing issue #12670:

  • "a git grep for an enumerated medium list in the review plugin's skills and evals finds none": met, judging by the diff (the offer list is gone). The PR's grep result is the author's claim and I did not verify it. No test in the PR or the repository would fail if such a list came back; see the inline comment.
  • "the review evals validate with no FAIL; no model evals are run": met only on the author's word (check-evals-quality PASS). I did not verify it.

Prepaid usage (not a finding): none beyond the extra unit test.

No embedded instructions were found in the PR context.

critical-findings: 1

Findings not posted inline (their lines are not in the diff):

  • plugins/review/tests/explain-change.test.mjs:133 (RIGHT): Advisory: no test guards the issue's done-when criterion. refactor(review): resolve the view medium through the shared resolver #12670 says: "a git grep for an enumerated medium list in the review plugin's skills and evals finds none". This PR removes the list from the offer line, but the replacement assertion only checks that medium.where appears. If someone puts "a private Artifact on claude.ai" when medium is artifact, "the shared page host" when it is hosted… back on another line, or adds a similar list to an eval, every test still passes. I found no script under scripts/ or .github/scripts/ that runs this grep.

How it fails: add the old enumerated offer sentence back to SKILL.md next to the new one. node --test plugins/review/tests/explain-change.test.mjs still passes.

Fix: add a doesNotMatch over SKILL.md and evals/evals.json for two or more backticked medium ids on one line. Build the ids from Object.keys(MEDIUMS), which this file already imports. That makes the criterion something a test can fail on.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 84937d30b5beddce8d1e1783aea101bf75e081d8.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 7c97741 Nov 4, 2026
44 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-12670-41743087782-1 branch November 4, 2026 00:46
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 7c97741d23959f1bd20ce464853fa33cd5341d13; 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.

refactor(review): resolve the view medium through the shared resolver

0 participants