Skip to content

fix(testing): derive the visual-compare data directory from the install - #17494

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/17208-testing-data-id
Nov 19, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/17208-testing-data-id

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Refs: #17208

Summary

visual-compare.sh fell back to <config>/plugins/data/testing-melodic-software, one publisher's marketplace (#17208).

Fix

plugin_data_id derives the id the way Claude Code names it: testing@<marketplace> from <config>/plugins/cache/<marketplace>/testing/<version>, else testing@inline, with characters outside A-Za-z0-9_- replaced by -. This is the rule harness-ops' control driver uses (pluginDataId). Test fixtures use neutral ids. Fragment: testing patch.

Verification

plugins/testing/skills/check-visual-parity/scripts/visual-compare.test.sh: all 88 checks pass, including two new cases (a cached install gives testing-acme-co, a copy outside the cache gives testing-inline) that fail on the old fixed id; shellcheck clean.

Remaining

What #17208 still needs after this PR, each carried by its own follow-up PR under Refs: #17208:

  • Classify every other organization-specific match in shipped content as runtime behavior, instruction, permitted citation or test fixture (the plan's rows table), and record the result on Remove organization-specific dependencies from shipped plugins #17208.
  • Make the remaining runtime and instruction matches read a documented, overridable value: the source-control trust and cost settings, including the DECISION_ROW owner-decisions link in plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py (open in fix(source-control)!: read the merge trust and cost settings from userConfig #17473); plugin-quality standards_repo, playbooks' repo-sweep issue target and fleet's converge_docs_url (branches pushed, PRs to follow); the git-hooks git_url shared by the plugins that install git hooks; and the guardrails lane App login.
  • Add the CI portability check (scripts/check-skill-portability.sh or its token classes) that fails when shipped content adds a new organization dependency outside the allowed citation shapes. It lands last, after the fixes, so it is green when it arrives.

Related

Plan item 6 of #17208.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd

visual-compare.sh fell back to <config>/plugins/data/testing-melodic-software,
one publisher's marketplace. It now derives the plugin data id the way
Claude Code names it: testing@<marketplace> from an install under
<config>/plugins/cache/<marketplace>/testing/<version>, else
testing@inline, with characters outside A-Za-z0-9_- replaced by -. This is
the rule harness-ops' control driver already uses.

Refs: #17208

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgaQE4QB75SPD3ky1jd
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 19, 2026 19:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T19:03:54.283978Z c07d771 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

I read the whole diff for all 3 changed files. None of them is on a trusted path, and none is a manifest, workflow, trust control or instruction surface.

What changed: visual-compare.sh used to fall back to a fixed data directory, testing-melodic-software. It now builds the name with plugin_data_id(), which takes the marketplace segment from the script's own install path (<...>/plugins/cache/<marketplace>/testing/<version>) and uses inline when the script is not under the cache. The script then joins that name onto ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/data/.

What I checked:

  • Path traversal or injection through the derived id. It cannot happen. The marketplace segment comes from IFS=/ read, so it holds no /. Every character outside A-Za-z0-9_- becomes - before the name is used (visual-compare.sh#L53). A segment such as .. therefore becomes --, and the id cannot climb out of plugins/data/. The value goes into a double-quoted assignment, never into eval or an unquoted command.
  • Who controls the input. The input is the script's own resolved location on disk. No pull request, issue or comment author can set it.
  • Where npm installs. The install target still sits under the user's own config directory. The npm flags (--ignore-scripts --no-audit --no-fund) are unchanged.
  • Tests. The test changes swap the fixture ids for neutral ones and add two dry-run cases inside the temporary directory. They touch nothing security-relevant.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

The PR removes the fixed testing-melodic-software data id. In its place, plugin_data_id in visual-compare.sh builds the id from where the plugin is installed: testing@<marketplace> for a copy under <config>/plugins/cache/<marketplace>/testing/<version>, else testing@inline. Characters outside A-Za-z0-9_- become -.

What I checked:

  • Same rule as harness-ops. It matches harness-ops' pluginDataId (driver.mjs#L261-L266):
    • ${root##*/plugins/cache/} keys on the last /plugins/cache/ in the path, like lastIndexOf('cache').
    • The m n v extra split with its empty and non-empty tests gives the same exactly-three-non-empty-segments check.
    • The sanitizing is the same.
  • Script root. SCRIPT_DIR/../../.. resolves to the plugin root, as checkout_root and PCV already assume.
  • Error handling. The [[ … ]] && market= line is not the last command of the function, so a false test does not change its exit status. The script uses set -u only, no -e.
  • Tests. Two new cases cover a cached copy (acme.co becomes testing-acme-co) and a copy outside the cache (testing-inline). The suite unsets CLAUDE_PLUGIN_DATA and CLAUDE_CONFIG_DIR at the top, and the copies sit under a non-git mktemp directory, so neither the environment nor checkout_root can change the result. The fixtures were renamed from testing-melodic-software to testing-acme, with input and expected value changed together; the assertions are as strict as before.
  • Leftovers. Nothing left under plugins/testing still names testing-melodic-software.
  • Version bump. The changelog fragment is a bump: patch, which fits a bug fix.

I ran nothing. The PR says all 88 checks pass and shellcheck is clean; that is the author's claim and I have not confirmed it.

The PR context names no closing issue (Refs: #17208 only), so there are no acceptance criteria to check. No plugin manifest changed, and no added or removed line weakens any check.

Loosened-check verdict: fail (default; the prompt gave no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. With no loosened_check_decision_record: line, the citation requirement was not checked.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head c07d771461bd9d55dfe68e6c7c895a56d9c4faca. What it wrote, as data:

Summary: This PR is linked to #17208 by a `Refs:` line, so it is judged as a partial delivery. The
  code change is correct and in scope. `visual-compare.sh` used to fall back to a data directory
  that names one publisher's marketplace. It now uses Claude Code's rule for plugin data ids:
  `testing@<marketplace>` when the script runs from
  `<config>/plugins/cache/<marketplace>/testing/<version>`, otherwise `testing@inline`, with
  characters outside A-Za-z0-9_- replaced by `-`. The fixtures now use neutral ids, and two new
  tests cover a cached install (`testing-acme-co`) and a copy outside the cache (`testing-inline`).
  Test Bash (0) passed on the judged head
  (https://github.com/melodic-software/claude-code-plugins/actions/runs/44594096067/job/135807924611),
  and Lint Shell and Check Skills passed too. No check was weakened, nothing in the takeover set
  changed, and no secrets appear. The PR still fails one rule for partial deliveries: its body must
  name the work that remains on #17208. It only says "Plan item 6 of #17208" and does not list the
  rest. No capture summary was present.
- PR body: it says only "Plan item 6 of #17208" and does not name the work that remains on #17208.
  Add a section that lists it: classifying the remaining org-specific matches (runtime behavior,
  instruction, permitted citation, test fixture), making the runtime and instruction cases read a
  documented, overridable configured value, and adding a portability check in CI that fails when
  shipped content adds a new org dependency.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. and removed pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. labels Nov 19, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 24515f0 Nov 19, 2026
90 of 103 checks passed
@kyle-sexton
kyle-sexton deleted the fix/17208-testing-data-id branch November 19, 2026 20:50
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant