Skip to content

fix(harness-ops): make plugins sync other-path updates opt-in - #12538

Merged
kyle-sexton merged 6 commits into
mainfrom
fix-plugins-sync-serial-updates
Nov 3, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
fix-plugins-sync-serial-updates

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

Closes #12525

Summary

/harness-ops:plugins sync no longer updates every other present path by default. A real run went from about 27 minutes projected to 16.7 s on the same fleet. Updating other paths is now opt-in through the update_other_paths option or --update-other-paths.

This reverses the default set by #7458, on the owner's decision in the session that filed #12525.

Fix

  • Step 3a is off by default. Off, it makes no calls. The report shows Behind in other paths: N record(s) in M path(s) with the remedy, and those records stay out of the converge count and the user-home row.
  • Calls stay serial when on. In a sandbox, 29 calls at xargs -P 8 left 5 of 29 records moved on a full-size installed_plugins.json and 17 of 29 on a small one, with nothing on stderr.
  • Measurement: the journal records each CLI call's duration, and timings has an other_paths step instead of folding that time into user_sweep.
  • Accuracy: the report names a catalog that moved between the pre and post reads, which is how one run left records on different versions.

Verification

  • sync-run.test.sh: 0 FAIL, run from inside the repository, with new cases for the default-off path and for a catalog that moves during a run.
  • shellcheck sync-run.sh is clean.
  • Real sync on a host with 1,572 install records: 16.7 s total, 3 user-scope updates, 257 records in 55 paths reported and left alone, no errors. other_paths took 0.043 s.

The new skill text and the --update-other-paths route through the skill body were not run through a released build. The real run called the branch's sync-run.sh directly.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VQb9PzQ9BSguFLNuXtTPBz

kyle-sexton and others added 4 commits November 2, 2026 17:31
Step 3a made one serial `claude plugin update` per lagging record in every
other present path, which took a fleet with many checkouts from seconds to
tens of minutes. It now runs only with --update-other-paths or the new
update_other_paths option, default false. Off, the report counts the records
and names the remedy, and they are not counted for converge.

Calls stay serial: parallel calls lost records in a sandbox probe.

The journal records each CLI call's duration, timings carry an other_paths
step instead of folding it into user_sweep, and the report names a catalog
that moved during the run.

Refs #12525

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9PzQ9BSguFLNuXtTPBz
Restores sync-run.sh's case indentation, so the diff holds only the
behavior change, and regenerates the README options table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9PzQ9BSguFLNuXtTPBz
@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T22:44:15.334661Z c4473d2 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

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #12538, head 6989d2d9

I found no security issues. I read every hunk of all 9 changed files in .claude-lane/pr.diff.

What the change does: Step 3a of /harness-ops:plugins sync used to run claude plugin update -s <scope> from every other present path. Now it runs only when the user opts in through the new update_other_paths userConfig key (default false) or the --update-other-paths flag. When the step is off, the records are counted and left alone. This narrows what sync changes by default.

What I checked:

  • The new flag. The --update-other-paths case arm (sync-run.sh around L434) sets a fixed UPDATE_OTHER_PATHS=1 and takes no operand. On resume, the value is read back from the script's own $RUN_DIR/flags.json and accepts only .update_other_paths == true (L3071). It is written as a literal true or false (L3094–3097). No outside input reaches a command.
  • The new .other-paths-skipped.<mp>.jsonl file. It is built with jq -R from the $cands rows the script selects from local install records, and it is consumed only through --slurpfile (with /dev/null when it is absent). Paths and ids become JSON data, never shell words or a jq program. No eval or command construction was added.
  • catalog_moved. It is computed in jq from the script's own pre and post reads, so it is data only.
  • Audit. /harness-ops:plugins-audit can be started by the model, and its skill text now passes --update-other-paths. The flag only adds the "would update" prediction: audit still makes no update call, and the test asserts audit: no update call from any path. The mutating plugins skill keeps disable-model-invocation: true.
  • Tests. The changes to sync-run.test.sh (the CLAUDE_STUB_MOVE_CATALOG stub and fixtures) affect only the test stubs.

Manifest:

  • manifest userConfig.update_other_paths: pass. This is a new key, and it is a guard: it decides whether sync makes one mutating CLI call per lagging record in every other path. Its default is the restrictive value: "default": false at plugin.json L68. No hooks, mcpServers, dependencies or other field that runs code was touched.

Instruction surface: the edits to SKILL.md and context/sync.md add an opt-in flag and describe the new off-by-default behaviour. They delete or soften no rule in a protected class. The edit narrows what a run changes without being asked.

Trust controls: no changed file matches a trusted path. The change touches no trusted-actor check, token scope, kill switch or merge hold.

Settled threads: four threads are settled (the changelog bump, the catalog_moved test, the mid-read timing and the as-of record). None of them raised a security point, and I did not re-raise any.

Prior findings: this lane's earlier reviews reported 0 findings, so there is nothing to repeat. The round cap did not apply (past the cap: no).

This change adds no billing or spend.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on c4473d2ab0483ee4498a1842b620b92f1bbfd64e; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

claude-review: no new findings on 6989d2d9.

I read every hunk of all 9 changed files. I also read the head versions of other_paths_step, finalize_other_paths, would_pins/divergence_block, the Step 1–3 flow in run_marketplace and the report rows in render-report.jq.

Prior findings: all four are fixed at this head, so none is re-raised.

  • Changelog bump. The fragment is now bump: minor, under ### Added and ### Changed.
  • catalog_moved test. It now has a real end-to-end test: CLAUDE_STUB_MOVE_CATALOG changes a catalog manifest during the update call, and the test asserts 1 with the report row, and 0 with no row on an unchanged run.
  • Mid-read timing. The mid fleet read is timed under other_paths again: T_OP_S="$T_US_S" is stamped before fleet_read … mid (sync-run.sh#L1886-L1898), and context/sync.md says so.
  • Serial-call rationale. The rationale in context/sync.md Step 3a now carries an as-of date (2026-11-02), the CLI version it was probed on (2.1.316) and a recheck trigger, as .claude/rules/skill-bodies-state-current-rules.md requires.

Checks on the new code:

  • Off path. catalog_moved diffs pre.$mp.json against post.$mp.json. pre is the read taken after Step 1's refresh (L1787), not the pre-refresh read, so a normal refresh is not counted as a move during the run.
  • Off path. Without the flag, Step 3a writes only .other-paths-skipped.<mp>.jsonl. That file feeds two things:
    • skipped.{records,paths} in the digest;
    • would_pins, which reads those pins at the catalog version, so they are left out of the converge count. The left_to_step3a change keeps the same records out of the user-home row. Both match what context/sync.md Step 3a documents, and the new "other paths off" tests assert them.
  • --only-install re-entry. update_other_paths is saved in flags.json and restored on re-entry. The skipped file stays in the run dir, so the converge split on re-entry matches the first pass.
  • Backward compatibility. The reset OTHER_PATHS_JSON has no skipped or catalog_moved keys. The renderer guards both with // 0.

Closing issue #12525:

  • Opt-in decision (an option defaulting to false, plus a flag): met. The PR body records it as the owner's decision.
  • Report the lagging records and the remedy: met, and tested.
  • Duration per CLI call in the journal: met, and tested (# elapsed ).
  • Flag a catalog that moved during the run: met, and tested end to end.
  • Baseline and target: handed off to perf(harness-ops): reduce plugins sync's remaining wall clock and digest size #12539 in an owner comment on the issue, so it is not checked here.

Manifest:

  • manifest userConfig.update_other_paths (new field): pass. It defaults to false, and both skill bodies read ${user_config.update_other_paths} to decide whether to pass --update-other-paths.
  • manifest version: pass. The fragment's bump: minor matches a new option plus a changed default whose old behaviour stays available.
  • manifest description: pass. Nothing the plugin or marketplace text names is removed, and the new option is listed in the README options table.

Not verified: I did not run sync-run.test.sh or shellcheck. The PR's "0 FAIL", "shellcheck clean" and the 16.7 s real run are the author's claims.

Spend: none. With the default off, sync makes fewer CLI calls, and no billing setting changes.

Runs the digest computation with a catalog that changes during the run and
with one that does not, where the earlier test only rendered a planted value.
Raises the fragment to a minor bump under Added and Changed, since this adds
an option and a flag and changes a default, and restores the base's
indentation on the inserted lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9PzQ9BSguFLNuXtTPBz

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on 4f6ce1ce2e3a15caaa7a6ff291b0dbbb59d0c24d; the summary is in this lane's pull request comment.

claude-lane: claude-review

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

The pr-unblock lane stopped resolve-conflicts on this pull request: the lane could not resolve every conflict. The lane sets no label: the run ends in a failing pr-unblock/conflict status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=12538 -f activity=resolve-conflicts

Takes main's `# elapsed` journal line, which also carries the exit code and
feeds the digest's cli totals. Times the mid read with the other_paths step so
it stays under a named step, and brings the timings list, the user_home_records
contract and the serial-calls record in line with the change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9PzQ9BSguFLNuXtTPBz
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit c307014 Nov 3, 2026
49 checks passed
@kyle-sexton
kyle-sexton deleted the fix-plugins-sync-serial-updates branch November 3, 2026 00:06
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.

perf(harness-ops): plugins sync takes tens of minutes from serial per-record updates in every present path

1 participant