Skip to content

chore: verify capture bytes across catalog expiry cycles - #157660

Closed
roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/address-catalog-capture-p0-blockers
Closed

roboclaw-bot wants to merge 2 commits into
mainfrom
openclaw/address-catalog-capture-p0-blockers

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #157568, #157300, #157459

What Problem This Solves

The catalog expiry regression could miss growth inside a live source capture while its plugin-registration count stayed unchanged.

User Impact

No runtime behavior changes. This strengthens regression evidence for the 2026.9.7 catalog/capture investigation; it does not clear the affected-host soak requirement or establish a general disk/heap quota.

Why This Change Was Made

The existing real-worker expiry test now observes the worker's actual captured entry, requires a nonempty 1 MiB payload, and compares physical capture directory identities, logical bytes, and allocated bytes after each of its three renewal cycles. A shared test helper also preserves the existing explicit-refresh and retirement proof without following linked host SDK trees. No extra worker boots, expiry cycles, timers, or runtime diagnostics are added.

The merged catalog owner already shares unchanged plugin contexts across agents and grows the required plugin set. This PR does not reintroduce the older per-agent/32-registry cache proposal. The affected installation still needs its original configuration measured through startup and a settled post-ready interval, plus working Gateway and local-agent turns.

Requested by @RomneyDa. The expiry capture-identity check also follows the earlier independent validation reported by @goslingmanagment.

Worked on by

Work sessions

Evidence

  • Blacksmith Testbox proof, Node 24.19.0: 2/2 integration tests passed. The repository wrapper verified source base 85bab529911a284b2d0ef2ee102877eb853ab090 and candidate tree 44b7e537f0847a31f8e0a91dbe7cb1dafba17407 before execution; that is also the committed tree in fe9bf14872885b92375028f5a22e8c165131e589.
  • Expiry proof: 1 capture, 1,051,238 logical bytes, 1,060,864 allocated bytes, unchanged path/device/inode across all three cycles; 8 completed tasks, zero failed tasks, retained agent-specific credentials, and native admission while provider renewal was held.
  • Explicit-refresh sibling: 2 captures, 2,112,520 logical bytes, 2,129,920 allocated bytes, unchanged through refresh, then physical capture-root removal on retirement. Absolute fixture byte totals depend on embedded temporary paths; the assertion compares within one run.
  • Observer negative controls detected same-count byte growth and same-byte directory replacement, and excluded a linked host tree. These validate measurement sensitivity, not reproduction of the affected-host leak.
  • All changed-file checks passed (core and agent-test typechecks, targeted typed lint, formatting, dead-export scans, and structural guards). Independent P0–P2 autoreview was scoped-clean.

Command: pnpm test src/agents/prepared-model-catalog-worker.captures.integration.test.ts src/agents/prepared-model-catalog-worker.native-renewal.integration.test.ts --maxWorkers=1. Test bodies: 2.007 s expiry and 1.790 s explicit refresh; Vitest 34.94 s including cold compilation, test wrapper 88.25 s including the 45.9 s runtime prerequisite build. Real workers are necessary to observe physical captures and disposal. The one-shot lease tbx_01m3asq2z64xsmwd7wzkxezh4v stopped successfully; its backing Actions job may show cancellation during provider cleanup.

The unchanged native-renewal test was blocked locally by the host loopback egress policy; the clean Testbox run above supplies execution proof instead. No full-package upgrade, external Codex heap soak, or WSL/macOS affected-host soak is claimed.

Hosted CI follow-through

Ready-state CI run on head 6b50d7f5be7655b3a8359bf8f7f2971d97f4622a failed test-type and extension-package-boundary checks on the merged main context. Both inspected failure logs report src/infra/package-update-npm-pack.ts(7,15): TS2459 because UpdateStepResult is imported from update-runner-types.js instead of its canonical owner, update-step-result.ts. This file was introduced upstream by 48437d6a0ae632548993ef7f213eceeb211f61fb and is absent from this PR head. The integration defect remains on main at the latest check; hosted CI is not green. No blind rerun or unrelated source fix is included here.

ClawSweeper reviewed this exact head at 23:04 UTC with no actionable findings and marked it ready for maintainer review.


View the OpenClaw team session

roboclaw-bot and others added 2 commits September 24, 2026 22:55
Worked on by:
- @RomneyDa

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 73485e46-911c-4890-a2bb-707312579d04
@clawsweeper

clawsweeper Bot commented Sep 24, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 24, 2026 22:56
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 7:29 PM ET / 23:29 UTC (Revision 2).

ClawSweeper review

What this changes

The branch adds physical capture-directory and byte measurements to existing catalog-worker expiry tests and shares that observer with the explicit-refresh test.

Merge readiness

✅ Ready for maintainer review

This PR still adds useful regression coverage that current main lacks. Its real-worker assertions check capture growth that the existing registration-count assertion could miss; they do not claim to fix the separately reported WSL host failure.

Priority: P3
Reviewed head: 6b50d7f5be7655b3a8359bf8f7f2971d97f4622a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful real-worker regression guard has detailed run evidence and no identified patch defect.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The changed tests observe production catalog-worker captures while a synthetic HTTP provider drives three expiry renewals. The PR records a Testbox run of the matching source tree with stable capture identity and byte totals plus two passing integration cases; this proves the added guard, not the affected-host leak. 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 (terminal): The changed tests observe production catalog-worker captures while a synthetic HTTP provider drives three expiry renewals. The PR records a Testbox run of the matching source tree with stable capture identity and byte totals plus two passing integration cases; this proves the added guard, not the affected-host leak. No stored-data contract changes.
Evidence reviewed 8 items Introduced expiry assertion: The pinned introduced diff adds a 1 MiB plugin payload, locates the real worker capture root from its registered filename, and compares the complete footprint after each of three renewals.
Physical filesystem observer: The helper uses lstat, so it does not follow linked host SDK trees; it records capture path, device, inode, logical bytes, and allocated bytes.
Current-main gap: Current main retains the three-cycle native-renewal test but has no payload or footprint assertion, so this test change is not already present.
Findings None None.
Security None None.

How this fits together

OpenClaw prepares model catalogs in a worker that loads plugins and retains captured plugin files while the worker is active. These tests drive catalog renewal and check the worker's resulting files and published models.

flowchart LR
 A[Configured agents and plugins] --> B[Catalog worker]
 B --> C[Plugin source captures]
 B --> D[Provider renewal cycles]
 C --> E[Footprint observer]
 D --> E
 E --> F[Stable capture assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +34. Total +34 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 55 21 +34
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 55 21 +34

Review metrics

Metric Value Why it matters
Expiry coverage 3 renewal cycles; 1 MiB fixture payload The payload makes byte growth observable through the real worker capture path.
Reported test-body cost 2.007 s expiry; 1.790 s explicit refresh Both reported file times fit the repository's five-second target; the cold runtime build dominates the wrapper time.

Technical review

Best possible solution:

Retain this worker-boundary regression guard and investigate the affected WSL installation separately through startup and post-ready capture measurements.

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

Not applicable to a new product defect: the synthetic worker expiry scenario ran, but it does not reproduce the affected WSL host's capture growth.

Is this the best way to solve the issue?

Yes. Extending the existing real-worker case observes physical capture retention without adding runtime instrumentation or another worker boot.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3e4adbb6763a.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is focused internal regression coverage with no runtime behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed tests observe production catalog-worker captures while a synthetic HTTP provider drives three expiry renewals. The PR records a Testbox run of the matching source tree with stable capture identity and byte totals plus two passing integration cases; this proves the added guard, not the affected-host leak. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed tests observe production catalog-worker captures while a synthetic HTTP provider drives three expiry renewals. The PR records a Testbox run of the matching source tree with stable capture identity and byte totals plus two passing integration cases; this proves the added guard, not the affected-host leak. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 11d36eb adds src/agents/prepared-model-catalog-worker.native-renewal.integration.test.ts:225 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 11d36ebc2583; files: src/agents/prepared-model-catalog-worker.native-renewal.integration.test.ts)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (1 earlier review cycle)
  • reviewed 2026-09-24T23:04:16.664Z sha 6b50d7f :: needs maintainer review before merge. :: none

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Consolidated into #157300, preserving the original contributor author/history and explicit coauthor credit. That PR now includes these byte-footprint guards plus scoped reuse coverage, and exact-head CI passed at 24bfdb0 (https://github.com/openclaw/openclaw/actions/runs/36079186069). Closing this redundant proof PR without merging. The affected-host soak in #157568 remains unresolved.

@RomneyDa
RomneyDa deleted the openclaw/address-catalog-capture-p0-blockers branch October 22, 2026 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

1 participant