Skip to content

perf(plugins): reuse declared tool membership during resolution - #156205

Merged
vincentkoc merged 6 commits into
mainfrom
perf/plugin-declared-tool-membership-20260923
Sep 24, 2026
Merged

vincentkoc merged 6 commits into
mainfrom
perf/plugin-declared-tool-membership-20260923

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #156203

What Problem This Solves

Plugin tool registration and resolution repeatedly rebuild or scan the same declared-name membership. Large tool sets pay this work for each registration and each resolved tool.

User Impact

Reduces repeated work for large plugin tool sets without changing tool availability, declaration validation, factory freshness, or returned order. This is a scaling repair, not a universal CPU or memory improvement: the common 35-tool batch case uses more warm CPU, and the 512-tool individual-registration case has higher phase RSS.

Why This Change Was Made

Keep one lazy, detached, trim-only and case-sensitive declaration Set per PluginRecord. Share it across that record's registrations, attaching it after PluginInstance wraps callable fields. Prepare raw media-name membership lazily once per plugin resolution. Keep the host array helper, produced-name arrays, unnamed-registration fallback, conflict short-circuit, and current factory/lifecycle behavior.

The declaration Set remains live with its registrations. The raw media Set is rebuilt per resolution; unnamed registrations materialize an availability array. These allocations have costs. The measured RSS differences do not identify retained objects or prove a leak, and this change makes no allocation-only or net-memory claim.

Evidence

Published integration 0e4b2c2ef3044580e72db829e98b033fe0130e1c preserves the original PR ancestry and integrates main 29b4f90bb6b813eeb72a07d034c57784b6f91077. Its tree is exactly the qualified f350bd3d2bd35328d9728d933caab7ad6a3c4859. The eight plugin postimages are unchanged; the Gateway test retains main's claim lifetime, blocked-writer barrier and joined cleanup, plus the stored failed-transcript assertion. Fresh native focused proof passed the complete persistence file: 9/9 cases, original order, no failed, pending or todo cases. The receiver verified selected source and frozen installation on Node 24.19.0 / Linux x64, pnpm 12.4.2 and Vitest 5.0.1; source and dependency checks remained stable through final closeout. The owned runner and processes are closed. A portal-sync timeout warning remains recorded separately from the successful test and closure evidence. Exact published-head CI remains pending; earlier CI and performance results below retain their stated source scope.

ClawSweeper revision 5 completed for exact head 0e4b2c2ef3044580e72db829e98b033fe0130e1c at 2026-09-24 22:17 UTC (review run). It reports no actionable code or security findings and sufficient behavior proof. Its remaining maintainer-decision item repeats the measured scaling tradeoff already accepted in the execution-owner decision. That existing decision carries forward: all four production Git blobs are unchanged from 0916cdf9d29f32e12c662fd647017bda6100c66b to this integration head: conversation-read-tools.ts (5e4c42f7db272176882e4bcbb62adcdcde0ba01d), registry-registrars-tools-hooks.ts (ea87f18e6e5962e780da0e952cb84b4b84b32415), registry-types.ts (377664d21edaa1472fa46826dc679e28b352dd2b), tools.ts (8087db29b30aeedb549118fbd42bf4a983f8724d). This records no new human approval. The disclosed CPU, RSS and registration costs, measurement limits and scoped acceptance remain unchanged.

Retained native baseline/candidate proof used the real PluginInstance registration API and prepared-runtime tool resolution on Node 24.19.0 / Linux x64. Before the subsequent test-only corrections, candidate passed all 261 leaves across six files; baseline passed 258 and failed the three intended regression assertions. Both arms have the same leaf inventory, including duplicate-title multiplicity. Three baseline fixture emission bindings adapt only the original private array representation; assertion/input order is unchanged. Eight functional commands and twelve measurement workers completed, with matched source/dependency endpoints and complete owned-process/provider closeout. A preceding timed-out attempt contributes no functional or measurement credit.

Independent review of the production change found no actionable P0–P2 findings. The measured production logic remains unchanged. Later changes are formatter line wrapping, an explicit return type for a deliberately throwing test getter, and a verbatim extraction of the optional-tool registry fixture into a sibling test helper. The fixture extraction preserves every test body, assertion and hook order. The Gateway persistence test now waits for main's canonical exact-claim settlement notification, asserts no persistence warnings, and verifies the stored failure receipt before checking the clear-requested owner state. It retains the blocked-writer assertion and original case order; the superseded persistence spy is removed. The retained functional proof predates these test corrections; fresh scoped reviews found no actionable P0–P2 findings.

Historical CI for PR head 128fbd9250a and native hosted preparation passed. The CI checkout was merge 2958af493ef20c107a5d6eb6e7ba25cba17ef753 (PR head 128fbd9250a745293737d81bb2d14ca02ac82be3 with base 80bab7e23ce05a0cf68f4f54d38f8702d0238d35), using Node 24.19.0 / Linux x64 and Vitest 5.0.0. Actual shard plans and test output confirm the full persistence file: 9/9 cases, persistence-owner sibling: 13/13, and run-failure sibling: 23/23 passed. The persistence file ran in its original case order, including the blocked-writer and repaired settled-failure case; the repaired block is unchanged in that merge checkout. The required combined openclaw/ci-gate status and native merge verification subsequently passed for that head. A later conflict with main's settlement-notification repair was resolved by integrating pinned main 2e9a2eceb11bd937a64dc01fb7894ff23eb80ef7, retaining its canonical notification and the failure-receipt assertion. Signed integration head 9ddc44ce6165069cc127c8b0236cab764fe014ef preserves the original PR ancestry. Its core type-check job then failed on a UI route-loader type error. The failing file is byte-identical in the pinned main, CI base, PR head and CI merge. The canonical main fix 813a10e7deb is integrated in signed head 0916cdf9d29f32e12c662fd647017bda6100c66b. All 11 PR files and the main-relative PR diff remain byte-identical; the existing scoped source review applies. Historical head CI and native hosted preparation passed for 0916cdf9d29f32e12c662fd647017bda6100c66b. A separate native focused run passed the complete persistence file, 9/9 cases in original order, including blocked-writer, queued end/cancellation/settled-failure and native cancellation cases. Exact head/tree/file, frozen installation, Node 24.19.0 / Linux x64, pnpm 12.4.0 and Vitest 5.0.0 were verified, with stable source endpoints and complete provider/process/source/install closeout. That CI also proves the persistence-owner sibling: 13/13. The earlier 45-case results, including run-failure 23/23, remain historical evidence for their stated merge checkout.

Untimed delegated-work counts are separate from timing. At 512 tools, 100 warm resolutions replace 26,214,400 declaration-array entries with 51,200 Set membership calls. Individual registration reads the declaration source 512 times on baseline and once on candidate (262,144 versus 512 entries). Raw media checks replace 51,200 Array.includes calls with one Set construction per resolution reading 51,200 source entries; native includes comparison counts were not measured.

Timing uses five same-ordinal serial AB/BA pairs, each worker running all eight rows in the same order. Individual means separate registrations; batch means one factory registration producing the tool set. After 25 warmups, each warm interval contains 100 resolutions. The table reports the median of the five paired percentage changes (candidate versus baseline), not a ratio of arm medians.

Tools Registration shape Warm wall Warm CPU
0 Individual +6.99% +6.46%
0 Batch -0.55% -0.32%
1 Individual +2.61% -6.21%
1 Batch +2.69% +5.27%
35 Individual -23.01% -3.07%
35 Batch -2.81% +5.43%
512 Individual -49.71% -42.92%
512 Batch -51.41% -46.29%

Both 512-tool shapes improve warm wall and CPU in all five pairs. Tiny rows have mixed signs. The 35-tool batch warm CPU is higher in every pair (+2.56% to +77.97%); its paired median increase is 8.524 ms per 100 resolutions.

Registration, first resolution, warmup, imports and fixture/setup are distinct phases. The 512-tool batch registration total (first plus remaining registration intervals) rises by paired medians of 1.568 ms wall and 8.051 ms CPU, higher in all five pairs. Its first resolution improves by paired medians of 12.730 ms wall and 22.140 ms CPU. These phase medians are not summed into a net estimate.

Memory is mixed. After the 512-tool individual row's warm phase, paired current RSS rises by a median 142.45 MiB (137.71–182.63); after joined owner/cache disposal it remains higher by 138.94 MiB (129.06–174.90), in all five pairs. Whole-worker peak RSS is lower in four of five pairs, with paired median -13.91 MiB (range -86.03 to +37.04). The peak covers imports, setup, all eight rows, validation and disposal; it is not a per-row peak. Explicit paired GC points measure process-wide retained heap around registration with the owner strongly held, outside CPU/wall timing; they do not attribute the RSS increase or measure allocated bytes.

No production-frequency, startup, whole-VM, uniform CPU, overall RSS, or leak-causation claim.

@vincentkoc vincentkoc self-assigned this Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review September 23, 2026 05:16
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: M labels Sep 23, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

Please review head 9f37641. The PR body includes the qualified functional evidence, paired performance tradeoffs, phase RSS limits, and final formatting-only source lineage.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

Punchcard-Session: ember-river-harbor-t4
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 24, 2026, 6:37 PM ET / 22:37 UTC (Revision 6).

ClawSweeper review

What this changes

The branch reuses each plugin record’s declared tool-name membership during registration and resolution, and updates plugin and Gateway tests for the internal representation and related persistence assertions.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open: current main still lacks the optimization, and this member-authored PR is paired with an open issue. The code review found no actionable defect; a project maintainer still needs to decide whether the measured performance tradeoff is acceptable.

Priority: P2
Reviewed head: 0e4b2c2ef3044580e72db829e98b033fe0130e1c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has focused boundary coverage and credible native performance proof, with project acceptance of the measured tradeoff still outstanding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The captured PR body links native before/after evidence through real PluginInstance registration and prepared-runtime tool resolution, with passing candidate behavior and measured 512-tool gains; later integration retains the production blobs and links a passing exact-head persistence run. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The captured PR body links native before/after evidence through real PluginInstance registration and prepared-runtime tool resolution, with passing candidate behavior and measured 512-tool gains; later integration retains the production blobs and links a passing exact-head persistence run. No stored-data contract changes.
Evidence reviewed 8 items Introduced registration change: The PR creates one declaration-membership Set per plugin record, validates registered names against it, and attaches it after the callable registration is wrapped.
Introduced resolution change: Resolution tests actual trimmed tool names against declared membership and prepares raw bundled-media membership within each plugin resolution.
Existing plugin contract: The documented contract requires runtime tool registrations to match manifest contracts.tools; the PR retains this validation at registration and resolution.
Findings None None.
Security None None.

How this fits together

OpenClaw reads plugin manifests and registrations to decide which tools an agent can use. The plugin resolver applies availability and name checks, calls tool factories, and returns the resulting agent tool list.

flowchart LR
A[Plugin manifest declarations] --> B[Plugin registration]
B --> C[Declared tool membership]
C --> D{Available and allowed?}
D --> E[Plugin tool factories]
E --> F[Resolved agent tools]
Loading

Decision needed

Question Recommendation
Should OpenClaw accept the measured 35-tool CPU and 512-tool phase-RSS increases in exchange for the consistent 512-tool warm-resolution gains? Accept the scoped tradeoff: Endorse the documented CPU and RSS costs for the large-tool resolution gain, retaining the current implementation.

Why: The native comparison establishes a bounded tradeoff, but the execution owner expressly did not claim project approval and production workload frequency is unknown.

Before merge

  • Resolve merge risk (P1) - A project maintainer has not endorsed the workload tradeoff: the measured 35-tool batch uses 5.43% more warm CPU, and the 512-tool individual-registration case shows about 142 MiB higher warm-phase RSS. Production workload frequency and the cause of the RSS difference remain unmeasured.
  • Complete next step (P2) - Have a project maintainer endorse or reject the measured CPU and phase-RSS tradeoff before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source -1, Tests +239. Total +238 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 4 26 27 -1
Tests 7 347 108 +239
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 373 135 +238

Review metrics

Metric Value Why it matters
Production versus test LOC production +26/-27; tests and test support +347/-108 Production is net one line smaller; test growth includes an extracted fixture and new boundary regressions.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #156203
Summary: This PR is the candidate fix for the open repeated-membership-scan issue; the merged Gateway fixture PR addresses a separate test-lifecycle problem.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Endorse the measured tradeoff (recommended)
    A project maintainer can explicitly accept the recorded CPU and RSS increases for the measured large-tool gains.
  2. Revise the optimization
    Keep the PR open for a representation that lowers the measured costs without restoring repeated membership scans.

Technical review

Best possible solution:

Keep lifecycle-scoped membership reuse if a project maintainer accepts the measured workload costs; otherwise adjust the representation while retaining one manifest owner and the current tool-selection contract.

Do we have a high-confidence way to reproduce the issue?

Yes for the performance mechanism: current-main source retains the repeated scans, and the linked native comparison exercises registration and resolution. This read-only review did not execute the benchmark.

Is this the best way to solve the issue?

Yes for the code boundary: the lifecycle-scoped membership projection removes repeated work without changing the documented manifest contract or factory freshness. Its measured operational cost still needs project acceptance.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3813c048eb7b.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded plugin-tool scaling improvement with no established urgent user-facing regression.
  • merge-risk: 🚨 other: The introduced optimization has measured CPU and phase-RSS costs that normal correctness CI does not decide.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The captured PR body links native before/after evidence through real PluginInstance registration and prepared-runtime tool resolution, with passing candidate behavior and measured 512-tool gains; later integration retains the production blobs and links a passing exact-head persistence run. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured PR body links native before/after evidence through real PluginInstance registration and prepared-runtime tool resolution, with passing candidate behavior and measured 512-tool gains; later integration retains the production blobs and links a passing exact-head persistence run. No stored-data contract changes.

Evidence

What I checked:

  • Introduced registration change: The PR creates one declaration-membership Set per plugin record, validates registered names against it, and attaches it after the callable registration is wrapped. (src/plugins/registry-registrars-tools-hooks.ts:212, 0e4b2c2ef304)
  • Introduced resolution change: Resolution tests actual trimmed tool names against declared membership and prepares raw bundled-media membership within each plugin resolution. (src/plugins/tools.ts:683, 0e4b2c2ef304)
  • Existing plugin contract: The documented contract requires runtime tool registrations to match manifest contracts.tools; the PR retains this validation at registration and resolution. Public docs: docs/plugins/manifest/capabilities.md. (docs/plugins/manifest/capabilities.md:91, 0e4b2c2ef304)
  • Current-main necessity: The four affected production files on fetched main remain unchanged from the PR base. The PR’s original implementation commit is not an ancestor of fetched main and has no containing local release tag. (src/plugins/tools.ts:683, 3813c048eb7b)
  • Relevant regression coverage: New cases check detached, case-sensitive declarations, replacement records, absent versus empty membership, raw media names, and conflicted registrations. The PR body reports baseline failures for the intended regression assertions and a passing candidate. (src/plugins/tool-factory-context.test.ts:49, 0e4b2c2ef304)
  • Production-path proof: The captured PR body links native baseline/candidate proof through the real PluginInstance registration API and prepared-runtime tool resolution, reporting 261 passing candidate leaves and five paired performance comparisons. It also links an exact-head focused persistence run with 9/9 cases; the production blobs are reported unchanged since the measured implementation. (0e4b2c2ef304)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • SunnyShu: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record a project maintainer’s decision on the disclosed CPU and phase-RSS costs.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-23T05:52:52.269Z sha 128fbd9 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T07:07:49.709Z sha 9ddc44c :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T07:23:45.897Z sha 0916cdf :: needs maintainer review before merge. :: none
  • reviewed 2026-09-23T09:49:32.933Z sha 0916cdf :: blocked before merge. :: none
  • reviewed 2026-09-24T22:17:13.374Z sha 0e4b2c2 :: blocked before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

Please review head 9ddc44c. It integrates pinned main while preserving the original PR ancestry and composes the canonical exact-claim settlement notification with the real failure-receipt assertion. The PR body retains historical production proof and paired performance costs; new-head CI remains pending.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

Please review head 0916cdf. It integrates the canonical main UI type repair813a while preserving the original PR ancestry. All eleven PR files and the main-relative PR diff are unchanged; the retained scoped source review applies. The PR body retains historical production proof and paired performance costs; new-head CI remains pending.

@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Sep 23, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Execution-owner decision for head 0916cdf9d29f32e12c662fd647017bda6100c66b: accept the bounded scaling tradeoff requested in the review.

This records the execution owner's existing performance disposition, not human approval or a merge instruction. The production change remains unchanged from the originally published implementation; the retained native proof and subsequent test-only corrections keep their stated scopes.

The accepted costs and benefits are the five-pair, candidate-minus-baseline results:

  • 35-tool batch warm CPU: +5.43%, or +8.524 ms per 100 resolutions by paired medians; higher in all five pairs.
  • 512-tool individual-registration RSS: warm-phase current RSS +142.45 MiB and post-disposal current RSS +138.94 MiB by paired medians; higher in all five pairs.
  • 512-tool warm CPU: individual −42.92% and batch −46.29%; improved in all five pairs for each shape.
  • 512-tool batch registration: paired median increases of 1.568 ms wall and 8.051 ms CPU; higher in all five pairs. Registration and first-resolution costs remain separate from warm resolution; phase medians are not added into a net estimate.

The reason to accept is the scoped removal of repeated declaration preparation and membership scans through the real registration/resolution path, with consistent large-tool gains. It does not establish a universal CPU or memory improvement or production workload frequency.

Each fresh timing worker ran all eight ordered scenarios, with 25 warmups and 100 measured resolutions per row. Imports, setup, registration, first resolution, warmup, and explicit GC have distinct scopes; GC is outside the timed owner intervals. Shared-worker ordering limits attribution. Whole-worker peak RSS includes all rows and does not offset the phase RSS increases. Post-disposal RSS does not prove retained reachable allocations, a leak, or a GC cause. No startup, whole-VM, allocation-only, or net-memory claim is made.

@vincentkoc

Copy link
Copy Markdown
Member Author

Source-only integration note for head 0916cdf9d29f32e12c662fd647017bda6100c66b.

The test-only conflict is in src/gateway/session-lifecycle-state.persistence.test.ts: the upstream fixture-lifetime repair (commit 5b108eb5) overlaps the block where this PR adds the failed-transcript assertion.

The resolution should retain main's fixture lifetime and ownerClaimFixture.run, it.for, signal-aware settlement wait, afterEach join, existing teardown, and all nine cases. Retain this PR's loadTranscriptEvents import and failed-transcript assertion immediately after the persisted-status assertion, inside ownerClaimFixture.run.

At frozen main 6cf4b810c00d5d0eb9265874ecfb44105e57f209, the four production owner blobs were unchanged from merge base 813a10e7deb628a71d11c883636e9281a7911ac3: src/plugins/compat/conversation-read-tools.ts, src/plugins/registry-registrars-tools-hooks.ts, src/plugins/registry-types.ts, and src/plugins/tools.ts. The subsequent three-commit comparison through main fef6b1290e412761888865da5b61ee1c0ce29586 changes neither those owners nor the conflicting test. This evidence does not indicate supersession of the declaration-membership optimization.

This note records source diagnosis only. It does not report a conflict resolution, integrated test run, or new-head native qualification.

Punchcard-Session: ember-river-harbor-t4
@vincentkoc
vincentkoc merged commit 4fffee9 into main Sep 24, 2026
216 checks passed
@vincentkoc
vincentkoc deleted the perf/plugin-declared-tool-membership-20260923 branch September 24, 2026 23:13
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ai): share Mistral text delta appends

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
…claw#156205)

* perf(plugins): reuse declared tool membership during resolution

Punchcard-Session: ember-river-harbor-t4

* test(plugins): preserve fixture contracts in CI

Punchcard-Session: ember-river-harbor-t4

* test(gateway): join terminal persistence before claim assertions

Punchcard-Session: ember-river-harbor-t4
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* refactor(ai): share Mistral text delta appends

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  docs(gateway): show how we build OpenClaw on Team (#157675)
  refactor: verify IRC surrogate chunking over loopback (#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (openclaw#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131)
  refactor(msteams): share stored service URL validation (openclaw#157706)
  fix(codex): honor configured tool PATH in native commands (openclaw#157290)
  refactor(msteams): share approval kind labels (openclaw#157705)
  fix(sessions): keep session results current during cold reads (openclaw#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535)
  refactor(i18n): reuse native branch candidate extraction (openclaw#157636)
  fix(update): preserve recovery files after ownership refusal (openclaw#148890)
  fix(test): prevent late announcements from contaminating registry tests (openclaw#157681)
  fix(e2e): scan full onboarding logs for prompts (openclaw#157624)
  refactor(session-tools): derive contracts from schemas (openclaw#156365)
  refactor(channels): derive config contracts from schemas (openclaw#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689)
  refactor: reuse prepared fixtures in slow core tests (openclaw#157685)
  refactor(codex): reuse marketplace reference selection (openclaw#157621)
  chore(ui): refresh control ui locales (openclaw#157710)
  docs(gateway): show how we build OpenClaw on Team (openclaw#157675)
  refactor: verify IRC surrogate chunking over loopback (openclaw#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repeated membership scans add work when resolving large plugin tool sets

1 participant