Repository navigation
feat(harness-ops): read claude plugin --json results in plugins sync-run.sh - #10363
Conversation
…run.sh sync-run.sh now calls `claude plugin install` and `claude plugin update` with --json and classifies each update from the result line's updateOutcome and newVersion instead of its English sentence. Unset userConfig options and a disabled-by-default install have no field of their own (attended probe, Claude Code 2.1.310), so those two are still matched in the result's message. Output with no result line, from a CLI older than the flag, is still read as text. The test stub prints the captured result-line shapes, and new cases reword the message so only the fields can decide. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tub to them fixtures/cli-json-results.jsonl keeps the install and update result lines an attended probe captured from Claude Code 2.1.310. A new check holds each stub result line to its recording's keys and updateOutcome. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #10363, no findings. I read the whole diff and the PR context. This is a script parsing change plus its tests, fixture and docs. None of the changed files match a trusted path. The PR touches no trust control: no trusted-actor list, token scope, kill switch, merge hold or CODEOWNERS entry. It has no plugin manifest change and deletes no standing instruction. I checked these points:
Spend: none. The change adds no billed resource or paid setting. critical-findings: 0 |
|
claude-review reviewed No findings. I read the full diff, the PR context and the surrounding What I checked
Not a finding: the real result lines are never parsed. The contract check compares only the stub's key sets and Spend: no billing or paid-plan change. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09d34f1a22
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ence The sync spoke restated the plugin CLI's JSON result fields, its result sentences and a version-specific absence of fields, which the skill-body rule forbids. Keep the decision (sync-run.sh classifies both install facts from the result message) and replace the restatement with a pointer record naming the probe fixture and the script's basis comment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ects it A CLI older than --json fails the call with an unknown-option error, so every install and update landed in the failure branch and the text fallback never ran. run_cli now repeats such a call once without --json. The test stub's text mode rejects --json the same way. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #6757
Summary
pluginssync now callsclaude plugin installandclaude plugin updatewith--jsonand readsthe result line. An update's
updateOutcomeandnewVersiondecide whether it moved and to whichversion. The English sentence no longer decides.
Fix
sync-run.sh:cli_jsonfinds the result line.cli_move_resultandcli_reported_versionreadupdateOutcome(updated,up_to_date)and
newVersion.cli_outcome_linefalls back to the result'smessage.have no
--jsonfield. Both appear only as sentences insidemessage, sounset_user_config_ofand
install_disabled_noticematch those sentences inmessage. Output with no result line, asfrom a CLI older than the flag (2.1.268), is still read as text.
context/sync.mdstates both rules.changes the sentence, and has a text mode for an older CLI.
fixtures/cli-json-results.jsonlrecords the real lines. A contract check holds every stub lineto its recording's keys and
updateOutcome.Verification
CLAUDE_CONFIG_DIRandHOME, against a guarded local staging of this repository's marketplace,with non-essential traffic off. The full record is in the session's
.work/issue-lane-powers/PROBE-claude-cli.md(gitignored, not in this PR). The raw result linesare in
plugins/harness-ops/skills/plugins/scripts/fixtures/cli-json-results.jsonl. That runshows:
update --jsonwith a version change returns"updateOutcome":"updated","oldVersion":"1.0.0","newVersion":"2.0.0";"updateOutcome":"up_to_date";message:2 userConfig options not yet set (1 required) — ....bash plugins/harness-ops/skills/plugins/scripts/sync-run.test.sh: all tests pass.cli_jsonforced to return nothing, "json result: up_to_date for an id that moved is amoved-during-run row" fails.
pluginId, "recorded shape: a failed install" fails.scripts/check-affected.sh: 12 passed, 1 skipped.Related
claude plugin configure.sync-run.shclassifies from--jsonfields, and the remaining scrape is named and justifiedabove.
🤖 Generated with Claude Code