Repository navigation
chore: verify catalog capture reuse across agents and scopes - #157300
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 9:42 PM ET / September 25, 2026, 01:42 UTC (Revision 8). ClawSweeper reviewWhat this changesAdds real-worker tests that check catalog capture bytes, provider-scope reuse across agents, request-local credentials, and cleanup. Merge readiness✅ Ready for maintainer review Keep this PR open. Current main contains the catalog repair, but it lacks this distinct regression coverage. The latest-head proof addresses the prior review request. The affected-host soak remains separately tracked and does not determine whether these tests are useful. Priority: P2 Review scores
Verification
How this fits togetherThe prepared model catalog worker discovers provider models for agent runtimes. Agent and provider requests enter a shared worker, which returns catalog results while retaining and eventually releasing plugin source captures. flowchart LR
A[Agent requests] --> B[Provider scopes]
B --> C[Shared catalog worker]
C --> D[Plugin source captures]
C --> E[Model catalog results]
D --> F[Footprint checks]
E --> G[Credential isolation checks]
F --> H[Retirement cleanup]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +337. Total +337 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the focused worker regressions alongside the shared catalog owner, and assess the affected installation through its separate soak issue before claiming release clearance. Do we have a high-confidence way to reproduce the issue? Not applicable to a test-only PR. The latest-head real-worker scenario has a reported passing run; it does not reproduce the affected host's full disk-growth incident. Is this the best way to solve the issue? Yes. The tests observe worker registration, capture identity and bytes, credential isolation, and retirement at the existing owner boundary without adding another runtime cache. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 691d2e5cd48c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
|
Adding a production data point for the retention bound, since the PR notes that fleets above five agents are not validated. Our shape
What happened on 2026.9.5 (2026-09-21)
Why the bound matters for a fleet like ours Would the maintainers consider either:
Once this lands in a published build, we can run it and report capture births per 10 minutes, retained bytes and worker heap over a full afternoon. |
|
The retention follow-up is now in Local evidence: 28 focused tests plus the opt-in 28-agent × six-scope native stress case passed. Physical retained captures fell from 113 to 17; two synthetic weighted passes completed under the 512 MiB old-generation setting, with a maximum sampled worker heap of 380.5 MiB. Correct auth, one worker, eviction cleanup, and native shutdown cleanup were checked. This is a count bound and synthetic workload result, not a universal byte bound or a representative full Codex-fleet benchmark. Final commit @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Adding a data point from a 27-agent Linux install on the unpatched 2026.9.6 release, since the PR notes larger fleets are not validated. We have not run this PR; everything below is observational, from the journal, Our shape
Onset is the 9.4 -> 9.6 upgrade
Cost while looping
Effects we saw (correlation only, cause not established)
If maintainers want a specific measurement from a 27-agent install (worker counters, capture counts over a fixed window), tell us which and we can collect it read-only. |
Preserve the contributor history while adapting scope and byte-footprint regressions to the merged shared-context catalog owner. Remove the superseded per-agent cache without claiming affected-host soak completion. Co-authored-by: htuyer121 <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Use individual lifecycle publication for the cold-scope fixture instead of the fleet publisher that eagerly renews all credentialed providers. Keep the cold registration assertion and existing fleet coverage intact, and fix the two fixture lint findings. Co-authored-by: htuyer121 <[email protected]> Co-authored-by: RomneyDa <[email protected]>
The publication observer consumes explicit provider outcomes; model rows alone do not create one. Report the generated provider as ready without changing timeouts or weakening reuse, auth, or footprint assertions. Co-authored-by: htuyer121 <[email protected]> Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review The corrected scope-reuse proof now passes on head 24bfdb0. The PR body now records the completed exact-head CI result and requested timings: https://github.com/openclaw/openclaw/actions/runs/36079186069 All six selected files executed and passed (23 tests), plus 142 changed-boundary tests. The two-agent/three-scope reuse case passed in 2.401 s; Vitest took 11.38 s and its test wrapper 14.20 s. No source changed after that successful run. The prior request for an observed corrected-fixture result and measured wall time is now covered. This remains synthetic regression proof, not the affected-host soak or release clearance. |
|
🦞👀 Re-review progress:
|
|
@htuyer121 a competing fix was up and I chose to land that one and change this to extra regression coverage. Thanks for the contribution! |
…w#157300) * fix: reuse warm model catalogs across agents and provider scopes * fix: bound shared catalog retention across agents * test: satisfy catalog fixture lint rules * fix: align catalog cache publication with lint contracts * chore: keep scoped catalog proof cold Use individual lifecycle publication for the cold-scope fixture instead of the fleet publisher that eagerly renews all credentialed providers. Keep the cold registration assertion and existing fleet coverage intact, and fix the two fixture lint findings. Co-authored-by: htuyer121 <[email protected]> Co-authored-by: RomneyDa <[email protected]> * chore: report scoped fixture catalog readiness The publication observer consumes explicit provider outcomes; model rows alone do not create one. Report the generated provider as ready without changing timeouts or weakening reuse, auth, or footprint assertions. Co-authored-by: htuyer121 <[email protected]> Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: htuyer121 <[email protected]> Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Related: #157568, #157107, #156191, #156571
What Problem This Solves
The catalog capture regression coverage must distinguish first-time provider-scope expansion from repeated agent/scope requests, and detect physical byte growth even when registration counts stay unchanged.
User Impact
This is regression coverage for the shared-context catalog architecture merged in #157459. It does not change runtime retention policy, impose a 32-registry quota, or establish a disk/heap bound for arbitrary plugins. The affected-host soak in #157568 remains required; this PR must not be treated as release clearance.
Why This Change Was Made
The original per-agent/exact-scope cache was overtaken by the merged owner-level repair. This refactor preserves the contributor's four commits and authorship, merges current main without rewriting that ancestry, removes the superseded cache and its obsolete unit tests/docs, and adapts the useful synthetic bundled-provider scope fixture to the current owner.
The byte-footprint regression checks developed in #157660 are consolidated here so the contributor PR can carry the combined evidence rather than maintaining two competing proof PRs. The current-main production catalog owner remains unchanged.
Original investigation, implementation, and scope-regression fixture: @htuyer121. Refactor requested by @RomneyDa. The expiry capture-identity checks also follow independent validation reported by @goslingmanagment.
Work sessions
Evidence
Exact-head CI passed at 2026-09-25 01:29:59 UTC: 34 successful jobs, 22 skipped, none failed. The Actions
openclaw/ci-gatecheck passed. This is CI proof, not an affected-host soak or permission to merge.24bfdb01065fbffaa63445b537451e786e97e625; tree:293d3dd306c993e645c5597938704e3c1fd9fde9.46b97bd5bfca737c63b4859944fc4f66a61ee089, combining base281967681fd031ef58de7288d4cfd71e87d70585with that exact PR head.The complete reuse scenario passed: cold scope expansion, second-agent reuse, only requested provider hooks, request-local model/auth credentials, external-auth snapshot isolation, reversed warm scope order, stable physical footprint, one idle worker, and shutdown capture-root removal. The cold case uses the real individual lifecycle publisher with a shared loader workspace; existing startup/expiry cases retain normal fleet publication.
Capture refresh retained identical paths/inodes and 2,112,650 logical / 2,129,920 allocated bytes across refresh, then removed the captures on retirement. Native renewal retained one identical capture at 1,051,303 / 1,060,864 bytes across all three expiry revisions, with 8 completed tasks and zero failures. These are within-run synthetic measurements; temporary path lengths affect absolute fixture byte totals. They do not establish a general disk quota, cumulative-write bound, or external-plugin heap bound.
Local agent-test types, targeted typed lint, formatting, whitespace and line-cap checks passed. Independent source reviews found no actionable P0–P2 defect. Real workers are necessary to observe physical capture identity, retention and disposal; the changed case bodies remain below five seconds each.
Refactor provenance and earlier validation corrections
Merge
3195c1cdbcf5da249a46580afcfc949a813958f8retains the original contributor head2644d04775c1e1a99b5660c631e2cd881df84181and main checkpoint15d59cc7d5148d38baa94cc516ac6ddfe32fae42as parents. All four original commits remain ancestors; every refactor commit explicitly coauthors @htuyer121 and @RomneyDa. The final delta contains five test/support files and no production or documentation changes.Earlier CI exposed two lint issues and two fixture-contract mistakes: fleet publication eagerly renews credentialed providers, and model rows do not synthesize provider readiness outcomes. The corrections use individual publication for the cold case and an explicit matching
readyoutcome. No timeout was increased and no reuse/auth/footprint assertion was removed. Earlier failing runs and the retired 32-entry LRU/weighted-fleet measurements are not presented as proof of this revision.Still missing: a build containing the shared-context repair measured on the affected configuration through startup and a settled post-ready interval, with capture birth/byte and generation-owner attribution, successful Gateway and local-agent turns, and safe retirement. No affected host has been exercised by this refactor.
View the OpenClaw team session