Repository navigation
fix(claude-ops): report a directory marketplace's checkout staleness in plugins sync - #4457
Conversation
…in plugins sync claude plugin marketplace update validates a directory source as it is and fetches nothing, so sync reported "current" while the checkout sat 28 commits behind origin/main. sync-run.sh now reads a directory source's checkout (branch, upstream, ahead/behind as of the last fetch, modified tracked files) into the digest's source_checkout field without fetching, pulling, or writing. The render adds a source row, swaps "current" for "source checkout behind <upstream>" when behind, and names the git pull --ff-only to run. Also accept update as an alias for sync. Fixes #4456 Co-Authored-By: Claude Opus 5.5 (1M context) <[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 finished @kyle-sexton's task in 5m 30s —— View job
|
|
Claude finished @kyle-sexton's task in 1m 59s —— View job Security review: no issues found
Reviewed the full diff ( The new attack-surface-relevant code is the Checked specifically for:
No CRITICAL, IMPORTANT, or SUGGESTION-level security findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37c2b1a970
ℹ️ 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".
|
Last security-reviewed head: |
Skill evidence: a gap at
|
|
Claude has reviewed this PR 2 times. Deleting this comment resets the count. |
…ce in the rerun The Action needed bullet interpolated the raw path between double quotes, which a path carrying $, backticks or a quote would break; it now renders through jq's @sh. The rerun also names the marketplace, since a bare sync targets only the default marketplace. Both from the Codex review on #4457. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Claude finished @kyle-sexton's task in 1m 19s —— View job
|
|
Claude finished @kyle-sexton's task in 1m 26s —— View job Security review: no issues foundTask list
ScopeThis PR's last review ran at What changed and what I checked
Both match the new golden fixture I re-verified the rest of the attack surface this PR introduces,
The remaining changed files ( No CRITICAL, IMPORTANT, or SUGGESTION-level security findings. |
Fixes #4456
Summary
/claude-ops:plugins syncreportedMarketplace: melodic-software: currentwith zero updates while thedirectorysource's checkout was 28 commits behindorigin/main. After a fast-forward, the same sync updated 22 plugins.claude plugin marketplace updateon a directory source validates the directory as it is and fetches nothing, so the catalog is only as fresh as the checkout, and nothing in the report said so.Fix
sync-run.sh: newsource_checkoutdigest field, computed once per marketplace block and only for adirectorysource (parsed from thedirectory:<path>catalog_sourcethe digest already carried, backslashes folded the wayfleet-state.shfoldsinstallLocation). It recordsstate(tracking,no_upstream,detached,not_a_repo), branch, upstream, ahead/behind fromgit rev-list --left-right --count HEAD...@{u}as of the checkout's last fetch, and whether tracked files are modified. Every git call is read-only and runs with--no-optional-locks, sostatusdoes not refresh the index. The script never fetches or pulls the checkout. Other source kinds getnull, so every existing golden is unchanged.sync-run.sh, notfleet-state.sh, becausefleet-state.shruns four or more times per sync and the probe includes agit statuson the checkout.render-report.jq: asource:row under theMarketplace:line for a directory source; the status readssource checkout behind <upstream>instead ofcurrentwhen behind > 0; anAction neededbullet namesgit -C '<path>' pull --ff-only(path quoted with@sh), then/claude-ops:plugins sync <marketplace>, noting when local commits or modified files would make the pull refuse.needs updatestill means only this run's own failures and gaps.updateis an alias forsyncin the Action Router (the description already lists "update my plugins" as a trigger).context/sync.mddigest enumeration. claude-ops 0.59.4 → 0.60.0 with CHANGELOG entry.Verification
fixtures/render/directory-source-behind.txt, driven by a real clone two commits behind its origin with a modified tracked file. On Git Bash the source path is recorded in native backslash form viacygpath -w, which is how Claude Code records it on Windows.origin/main, and the.git/indexchecksum are unchanged after the run.no_upstream,detached, andnot_a_repoare asserted on the digest state and the rendered row, and each keeps thecurrentstatus. A github source assertssource_checkout: null.shellcheckis clean, markdownlint is clean, andcheck-changelog-parity.sh --check-bumpagainst origin/main passes. One unrelated case,--only-install: and only INSPECTED the project-scope map, fails locally on Windows; it fails the same way when the origin/main copy of these scripts runs alone, so this change did not cause it. It passes on CI Linux.test-linuxrunssync-run.test.shand passes the new cases.test-windowsdoes not run this suite, so Windows coverage of the native-path case comes from the local run only.@sh, and the rerun names the marketplace.Related
🤖 Generated with Claude Code