You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf\(harness-ops\): reduce plugins sync's remaining wall clock and digest size - part 3 of 4 #12543
Part 3 of 4 of #12539, split at intake (owner Q93). The done-when below is copied from #12539 as written.
Done when
Install record count. 771 of the 1,572 records point at paths that no longer exist, and installed_plugins.json is rewritten and read in full on each call. A sandbox update took 1.0 s per call on a 19 KB file and 2.0 s on a 696 KB one; load's share of that gap is UNVERIFIED. /source-control:worktree audit reports these and gives a gated reap, but nothing reaps the 90 local-scope ones.
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: intent
Blocked by: none
Decision recorded.
Agent choice, not an owner answer.
What counts as done (refinement questions 1 to 4): prune the dead-path install records, the local-scope ones included, through the existing gated reap, and report the per-call update time before and after. This is not an owner question: the intent (cut plugins sync's wall clock, part 3 of #12539) stays, and the choice changes no primary design and touches no secret, account or bill.
[quote truncated; the full decision is at the link]
The decision settles the four open questions: prune dead-path records (local-scope included) via the existing gated reap, measure load vs rewrite before any format change, and target zero candidate orphan paths. It keeps the confirmation of each dead path with a person, so I've applied needs-human for that step. The rest is host-run work: the audit, the reap and the before/after timings.
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Stale install records are pruned, including the 90 local-scope ones, with a measured per-call update time before and after, but the owner has not settled which of these is the done-when.
What counts as done: pruning the dead-path records, reaping the 90 local-scope ones, a measured per-call time drop, or some combination?
RECOMMENDED: Prune the dead-path records and reap the 90 local-scope ones, then report the per-call update time before and after. Basis: plugins/source-control/skills/worktree/context/audit.md:21
Reaping is a gated step in the audit that a person confirms (audit.md:118-134). May an unattended run reap records for paths it judges dead, or should this stay a human-run step with the issue limited to tooling changes?
RECOMMENDED: Keep the live-path confirmation with a person. The unattended run adds a non-interactive, liveness-checked reap mode that can be tested against fixtures. Basis: plugins/source-control/skills/worktree/context/audit.md:118
Should load's share of the 1.0 s vs 2.0 s gap be measured before any change to the file format or to how it is read?
RECOMMENDED: Yes. Measure load against rewrite on the 19 KB and 696 KB files first, and change the format only if load dominates. Basis: judgment
Do the done-when numbers (771 of 1,572 records dead, 90 local-scope) come from a particular machine? If so, what is the target count or time to reach?
RECOMMENDED: Treat them as one machine's snapshot. Use acceptance of zero candidate-orphan paths in the audit, not fixed counts. Basis: plugins/source-control/skills/worktree/context/audit.md:21
Sources read
plugins/source-control/skills/worktree/context/audit.md:21: the audit reports orphaned project- and local-scope install records, with the target of zero paths in the candidate-orphan bucket.
plugins/source-control/skills/worktree/context/audit.md:25-33: cleanup reaps records only for teardowns it performs, and nothing else reaps a record whose path is gone.
plugins/source-control/skills/worktree/context/audit.md:118-134: reaping is gated on confirmed paths and uses scripts/reap-orphaned-plugin-records.sh.
plugins/source-control/scripts/reap-project-plugin-records.sh: the existing per-worktree reap script.
To answer, post a comment that starts with this line:
**Decision recorded.** <answer>
Automated refinement by the lanes App. Answer with a comment whose first line is **Decision recorded.**.
Decision recorded.
Agent choice, not an owner answer.
What counts as done (refinement questions 1 to 4): prune the dead-path install records, the local-scope ones included, through the existing gated reap, and report the per-call update time before and after. This is not an owner question: the intent (cut plugins sync's wall clock, part 3 of #12539) stays, and the choice changes no primary design and touches no secret, account or bill.
The tooling is already on origin/main. plugins/source-control/scripts/reap-project-plugin-records.sh enumerates and removes records whose scope is project or local (:2, :226), and reap-orphaned-plugin-records.sh runs it for each path "a person individually confirmed as dead" (:2-3), because a live repository on an unmounted share looks the same as a dead worktree to an existence check (plugins/source-control/skills/worktree/context/audit.md:35-37). The body's "nothing reaps the 90 local-scope ones" is therefore a run that has not happened, not a missing tool. The person gate stays (refinement question 2); no unattended reap mode is added. The counts in the body are one machine's snapshot (question 4), so the target is the audit's own: zero paths in candidate orphan (audit.md:21). Load's share of the 1.0 s vs 2.0 s gap is measured before any change to the file format (question 3).
Every remaining item runs on the machine that holds the records, so this issue goes to the host queue (host-run), builder Automation Lanes.
/source-control:worktree audit is run on a fleet host, each dead path is confirmed by a person and reaped through plugins/source-control/scripts/reap-orphaned-plugin-records.sh, local-scope records included.
Install record count: local-scope records reaped and measured.
What ran: the owner confirmed the list on 2026-11-05 and ran reap-orphaned-plugin-records.sh on 82 paths under the worktree root (git config worktreeroot.path). It printed ok: 82 path(s) reaped and exited 0. Every one of those paths was absent on disk and held one local-scope record. This finishes what the 2026-11-04 project-scope reap left (#12539 comment).
Left in place: 28 records (local and project) on two absent Claude Code native worktrees under the main checkout's .claude/worktrees/. They are outside the worktree root, so audit Step 2b reports them for information only and offers no remedy (plugins/source-control/skills/worktree/context/audit.md:65). A directory recreated there would also sit inside the main checkout's work tree, where the reap helper's main-tree refusal does not apply.
Measurement. Sandbox CLAUDE_CONFIG_DIR with a local marketplace, the #6309 method. strace confirmed every write stayed in the sandbox. Claude Code 2.1.318, hyperfine with 9 runs per cell over two passes, 1-minute load average 1 to 4.
The fixtures were:
S: 465 B.
M: a copy of the real registry, before and after the reap.
L: 724 KB, held constant as a control.
The calls timed were update on a current plugin, which reads the registry 4 times and writes it 0 times, and a real update from 0.9.0 to 1.0.0, which reads it 7 times and writes it once (temp file, then rename).
Wall ms, median
Before M (232 KB)
After M (191 KB)
no-op update, same session
377
395
real update, same session
389
388
registry rewrite window (strace)
5.4 to 6.4
5.0 to 6.6
At this size the reap makes no difference per call that can be measured: the gap is inside a 90 to 120 ms spread.
Across sessions every cell got faster, the controls included (real update on S fell about 130 ms with the same file), so the host changed between sessions and that drop does not come from the reap.
How much a call costs depends little on registry size: about 0.1 s more at 724 KB than at 0.5 KB, and under 30 ms of that is the rewrite. The rest is reading and parsing.
/source-control:worktree audit ran on a fleet host. Each dead path was confirmed by a person, the owner, who reaped them through reap-orphaned-plugin-records.sh, local-scope records included: ok: 82 path(s) reaped, exit 0.
Per-call update time was measured before and after the reap, with load's share of the gap separated from the rewrite's. Load and parse cost about 0.1 s at 724 KB versus 0.5 KB, and the rewrite under 30 ms (strace). The 19 KB and 696 KB files no longer exist on this host, so a 465 B fixture and a synthetic 724 KB fixture stood in for them, beside the real registry before and after.
The audit on that host now reports 0 paths in candidate orphan.
Closing as done. The 28 records on the two .claude/worktrees/ paths fall outside this issue's audit remedy.
Activity
github-actions commentedon Nov 2, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Low
Uncertainty: Known
Flags: intent
Blocked by: none
#12543 (comment) is not the decision; the decision is kyle-sexton's comment: #12543 (comment)
The decision settles the four open questions: prune dead-path records (local-scope included) via the existing gated reap, measure load vs rewrite before any format change, and target zero
candidate orphanpaths. It keeps the confirmation of each dead path with a person, so I've appliedneeds-humanfor that step. The rest is host-run work: the audit, the reap and the before/after timings.Automated triage, applied by the lanes App.
melodic-automation-lanes commentedon Nov 2, 2026
The triage verdict left this issue at
status: needs-decision:melodic-automation-lanes commentedon Nov 2, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: Stale install records are pruned, including the 90 local-scope ones, with a measured per-call
updatetime before and after, but the owner has not settled which of these is the done-when.Related work
Open questions
RECOMMENDED: Prune the dead-path records and reap the 90 local-scope ones, then report the per-call
updatetime before and after. Basis: plugins/source-control/skills/worktree/context/audit.md:21RECOMMENDED: Keep the live-path confirmation with a person. The unattended run adds a non-interactive, liveness-checked reap mode that can be tested against fixtures. Basis: plugins/source-control/skills/worktree/context/audit.md:118
RECOMMENDED: Yes. Measure load against rewrite on the 19 KB and 696 KB files first, and change the format only if load dominates. Basis: judgment
RECOMMENDED: Treat them as one machine's snapshot. Use acceptance of zero candidate-orphan paths in the audit, not fixed counts. Basis: plugins/source-control/skills/worktree/context/audit.md:21
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.kyle-sexton commentedon Nov 4, 2026
Decision recorded.
Agent choice, not an owner answer.
What counts as done (refinement questions 1 to 4): prune the dead-path install records, the local-scope ones included, through the existing gated reap, and report the per-call
updatetime before and after. This is not an owner question: the intent (cut plugins sync's wall clock, part 3 of #12539) stays, and the choice changes no primary design and touches no secret, account or bill.The tooling is already on
origin/main.plugins/source-control/scripts/reap-project-plugin-records.shenumerates and removes records whosescopeisprojectorlocal(:2,:226), andreap-orphaned-plugin-records.shruns it for each path "a person individually confirmed as dead" (:2-3), because a live repository on an unmounted share looks the same as a dead worktree to an existence check (plugins/source-control/skills/worktree/context/audit.md:35-37). The body's "nothing reaps the 90 local-scope ones" is therefore a run that has not happened, not a missing tool. The person gate stays (refinement question 2); no unattended reap mode is added. The counts in the body are one machine's snapshot (question 4), so the target is the audit's own: zero paths incandidate orphan(audit.md:21). Load's share of the 1.0 s vs 2.0 s gap is measured before any change to the file format (question 3).Every remaining item runs on the machine that holds the records, so this issue goes to the host queue (
host-run), builder Automation Lanes./source-control:worktree auditis run on a fleet host, each dead path is confirmed by a person and reaped throughplugins/source-control/scripts/reap-orphaned-plugin-records.sh, local-scope records included.updatetime on the 19 KB and 696 KBinstalled_plugins.jsonfiles, with load's share of the gap separated from the rewrite's, is measured before and after the reap and reported on perf\(harness-ops\): reduce plugins sync's remaining wall clock and digest size - part 3 of 4 #12543.candidate orphanbucket, posted on perf\(harness-ops\): reduce plugins sync's remaining wall clock and digest size - part 3 of 4 #12543.kyle-sexton commentedon Nov 5, 2026
kyle-sexton commentedon Nov 5, 2026
Install record count: local-scope records reaped and measured.
What ran: the owner confirmed the list on 2026-11-05 and ran
reap-orphaned-plugin-records.shon 82 paths under the worktree root (git config worktreeroot.path). It printedok: 82 path(s) reapedand exited 0. Every one of those paths was absent on disk and held one local-scope record. This finishes what the 2026-11-04 project-scope reap left (#12539 comment).installed_plugins.jsoncandidate orphanpathsAudit after the reap (
/source-control:worktree auditStep 2b classification): 24 live-here paths (225 records), 2 live-elsewhere (2), 0 candidate orphans, 2 other-project paths (28 records).Left in place: 28 records (local and project) on two absent Claude Code native worktrees under the main checkout's
.claude/worktrees/. They are outside the worktree root, so audit Step 2b reports them for information only and offers no remedy (plugins/source-control/skills/worktree/context/audit.md:65). A directory recreated there would also sit inside the main checkout's work tree, where the reap helper's main-tree refusal does not apply.Measurement. Sandbox
CLAUDE_CONFIG_DIRwith a local marketplace, the #6309 method. strace confirmed every write stayed in the sandbox. Claude Code 2.1.318, hyperfine with 9 runs per cell over two passes, 1-minute load average 1 to 4.The fixtures were:
The calls timed were
updateon a current plugin, which reads the registry 4 times and writes it 0 times, and a realupdatefrom 0.9.0 to 1.0.0, which reads it 7 times and writes it once (temp file, then rename).Done when (from the 2026-11-04 decision comment)
/source-control:worktree auditran on a fleet host. Each dead path was confirmed by a person, the owner, who reaped them throughreap-orphaned-plugin-records.sh, local-scope records included:ok: 82 path(s) reaped, exit 0.updatetime was measured before and after the reap, with load's share of the gap separated from the rewrite's. Load and parse cost about 0.1 s at 724 KB versus 0.5 KB, and the rewrite under 30 ms (strace). The 19 KB and 696 KB files no longer exist on this host, so a 465 B fixture and a synthetic 724 KB fixture stood in for them, beside the real registry before and after.candidate orphan.Closing as done. The 28 records on the two
.claude/worktrees/paths fall outside this issue's audit remedy.