Skip to content

fix(harness-ops): forward-update plugin records in every present path - #11736

Merged
kyle-sexton merged 7 commits into
mainfrom
fix/plugins-sync-forward-update-all-paths
Nov 1, 2026
Merged

kyle-sexton merged 7 commits into
mainfrom
fix/plugins-sync-forward-update-all-paths

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #7458

Summary

/harness-ops:plugins sync now forward-updates plugin records in every present projectPath, home directories and linked worktrees included, and reads each record back. This follows the decision record.

Fix

  • Step 3a (new), sync-run.sh: for each other present path, it runs update -s project and update -s local from that path, and only for a record below the catalog version (forward-only). It reads each record back into other_paths: {updated, failed, not_moved, would_update}. A linked-worktree record that does not move keeps its worktree class.
  • .claude/ check: before and after each call, it compares git status -- .claude/, plus a hash of settings.json and settings.local.json; outside a git repository it uses the hash alone. A change stops that path, and the remaining records are reported as not tried. Step 2 (the run's own path) runs the same check.
  • Divergences: the line stops counting a pin that sync updated or, under --audit, would update. The User-home row now lists only the records update could not move.
  • converge: fleet-state.sh exposes each path's raw enabledPlugins entry state (projectEnabledEntry: true, false, other, absent, unreadable). converge-plan.sh uses it instead of reading settings.json itself, and still tells an explicit false from no entry.
  • Docs: context/converge.md, context/scope-semantics.md, context/sync.md, SKILL.md and script-contracts.md are updated.

Verification

  • sync-run.test.sh 634 PASS. The new assertions failed on the old scripts.
  • fleet-state.test.sh 97/97.
  • converge-plan.test.sh 40 PASS.
  • shellcheck and markdownlint are clean.

Host step after merge, which the lanes cannot run: one /harness-ops:plugins sync on a real fleet host, reading back the home-keyed records and each settings hash.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits October 31, 2026 18:47
sync now runs `claude plugin update -s project|local` from every other
present projectPath, a user home and a linked worktree included, for a
record below a readable catalog version, and reads each record back. A
change under the path's .claude/ (git status in a work tree, a checksum
of both settings files everywhere) stops that path.

The Divergences count no longer counts a pin sync updated or, under
audit, could update; linked worktrees keep their class, absent paths
stay in their own section, and the User-home row lists only records
update could not move.

fleet-state.sh exposes each present path's raw enabledPlugins entry as
projectEnabledEntry, and converge-plan.sh uses it instead of reading
the settings file, so an explicit project-level false is still told
from no entry.

Closes #7458

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 2's update calls in the run's own project now take the same
.claude/ check as the other-paths step: a change after a call stops the
step there, that call is a failure, and each later record is reported
as not tried, under Action needed as "update stopped in <path>".
Step 2's documented decline of the forward-only filter is unchanged.

converge.md now cites the decision record for the plugin list
false-versus-no-entry behaviour.

Refs: #7458

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 31, 2026 23:02
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-10-31T23:08:32.836998Z c296a37 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 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-security-review: 1 inline finding(s) on c296a37dd37032766b745bea3aafd6b9077edba5; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 5f0ba97b42a32e3cb00414f1379e0b692c37c382: 0 finding(s), 0 as inline comments.

Security review (incremental: 6c9bb80 → 5f0ba97)

No security issues found in this increment.

The incremental diff changes only prose. I checked both changes:

  • plugins/harness-ops/skills/plugins/scripts/fleet-state.sh (L1022–1028): only the comment above settings_bundle changed. It now says that a path containing a U+001C–U+001F byte is left out of the bundle, so that path's entry reads null. The code at fleet-state.sh#L1070-L1072 does exactly that: a file containing those bytes is marked U, and a path containing them is never appended. No executable line changed. The protection against separator forgery (one path's text posing as another path's enabledPlugins entry) is still in place.
  • plugins/harness-ops/skills/plugins/context/scope-semantics.md (L246): a wording fix ("sync It drops the record's scope" → "sync drops a home-keyed record's scope"). No standing instruction is deleted, narrowed or softened, so the instruction-surface lens finds nothing.

None of the changed files is on a trusted path, and none is a plugin manifest.

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 c296a37dd37032766b745bea3aafd6b9077edba5; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 5f0ba97b42a32e3cb00414f1379e0b692c37c382: 0 finding(s), 0 as inline comments.

Incremental review: 6c9bb80 → 5f0ba97. Two files changed: one comment and one doc sentence. No findings.

  • plugins/harness-ops/skills/plugins/context/scope-semantics.md:246 fixes a broken sentence (`sync` It drops the record's scope becomes `sync` drops a home-keyed record's scope). The new wording narrows the claim to home-keyed records, which matches the paragraph above about home-directory records and the PR's description of the User-home project records row.

  • plugins/harness-ops/skills/plugins/scripts/fleet-state.sh:1022-1028 corrects the settings-bundle comment. It used to say a path holding a U+001C–U+001F byte got the U marker. The code does something else:

    • a file holding such a byte becomes U (L1070);
    • a path holding one is left out of the bundle entirely (L1072).

    A path that is left out has no $pset key, so projectEnabledEntry resolves to null (L1208-L1209). That is what the new comment says, so the comment now matches the code.

Neither change touches behaviour, the closing issue's acceptance criteria, or a plugin manifest. Nothing in this increment matches a trusted path. I confirmed both changes by reading the code only and ran nothing. The test counts in the PR description are the author's claim and I did not verify them.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c296a37dd3

ℹ️ 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".

kyle-sexton and others added 4 commits October 31, 2026 19:39
fleet-state.sh joins each present path's raw .claude/settings.json text
into one payload split on U+001D/U+001E/U+001F before parsing, so a file
holding one of those bytes could forge another path's
projectEnabledEntry. A file (or path) holding any U+001C-U+001F byte is
now bundled as unreadable, never as text; valid JSON cannot carry them
raw.

Also: a test that an ignored settings.local.json changing in a git work
tree stops the path (only the checksum sees it), the changelog fragment
raised to a minor bump under Added, and the home-path `update`
behaviour in scope-semantics.md, converge.md and sync.md recorded as a
pointer to its probe and docs section instead of restated.

Refs: #7458

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment

Refs: #7458

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 60b4096 Nov 1, 2026
41 checks passed
@kyle-sexton
kyle-sexton deleted the fix/plugins-sync-forward-update-all-paths branch November 1, 2026 00:10
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 5, survived 2, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 71%; mutation score 71%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/harness-ops/skills/plugins/scripts/converge-plan.sh 1 1 0 0 0 0
plugins/harness-ops/skills/plugins/scripts/fleet-state.sh 2 0 0 0 0 0
plugins/harness-ops/skills/plugins/scripts/sync-run.sh 2 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/harness-ops/skills/plugins/scripts/converge-plan.sh:248 other productive input-gap
plugins/harness-ops/skills/plugins/scripts/sync-run.sh:1081 ROR productive input-gap

The run's summary has the full report.

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.

feat(harness-ops): sync should forward-update project pins in every present projectPath, not only the cwd's

1 participant