fix: mock plugin blob stores#47
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 1:24 AM ET / 05:24 UTC. Summary Reproducibility: no. high-confidence live reproduction was supplied. The source and tests clearly exercise the new mock path, but they do not demonstrate a real plugin capture using the host blob-store contract after the change. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the mock narrowly scoped, run the repository-required crabpot plugin-inspector smoke, and attach redacted real-plugin capture output showing a blob-store-using plugin completes under the capture harness. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction was supplied. The source and tests clearly exercise the new mock path, but they do not demonstrate a real plugin capture using the host blob-store contract after the change. Is this the best way to solve the issue? Unclear. The focused in-memory mock is a plausible narrow solution, but a real capture and the required crabpot smoke are needed to confirm it models the supported host contract rather than only its new unit tests. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 860206df74ca. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9276097125
ℹ️ 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".
| values.set(key, { | ||
| bytes: Uint8Array.from(bytes), |
There was a problem hiding this comment.
Enforce blob store limits in the mock
When a plugin creates blobs during registration or synthetic probes, this mock stores every entry unconditionally, so blobs larger than maxBytesPerEntry or writes that exceed maxEntries/maxBytesPerNamespace still succeed even though the real OpenClaw blob store rejects or evicts according to those options. That can make runtime capture report a trusted plugin as compatible when the same registration path would fail under the host runtime; please simulate the configured byte/row limits before inserting.
Useful? React with 👍 / 👎.
| const ttlMs = registerOptions?.ttlMs ?? options.defaultTtlMs; | ||
| values.set(key, { | ||
| bytes: Uint8Array.from(bytes), | ||
| metadata, |
There was a problem hiding this comment.
Clone blob metadata at store boundaries
If a plugin mutates the metadata object after register()/registerIfAbsent() or passes metadata that JSON persistence would reject, the mock keeps that original object reference and later lookup(), entries(), or deleteExpired() observes the mutated/invalid value. The real blob store persists metadata as JSON and parses it on reads, so metadata is copied and validated at the API boundary; this divergence can let capture pass for plugins that would fail or clean up the wrong artifact under OpenClaw.
Useful? React with 👍 / 👎.
Summary
runtime.state.openBlobStorecontractProof
npm test(206 tests)