Repository navigation
fix(e2e): read bounded plugin summaries during upgrade checks - #178801
ChuLaiTheGreat wants to merge 2 commits into
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. What this changesThe PR adds a bounded SQLite summary reader for upgrade assertions and Doctor-budget measurement while preserving complete install receipts. Example: An upgrade fixture contains a 1,063,044-byte plugin index with 76 plugins.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR provides a focused fix for false upgrade-validation failures that remain possible on current main; no actionable correctness or security finding remains. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe shared E2E plugin-index helper reads persisted plugin state and supplies install receipts and plugin fields to release-validation assertions and Doctor-budget calculation. flowchart TD
A[Persisted plugin index] --> B[Existing schema selector]
B --> C[Bounded SQL projection]
C --> D[Complete receipts and selected plugin fields]
D --> E[Upgrade survival assertions]
D --> F[Doctor budget calculation]
B --> G[Unchanged full index reader]
Technical reviewBest possible solution: Use the existing helper's bounded projection for these two consumers while retaining complete-index reads for callers that compare catalogue metadata. Do we have a high-confidence way to reproduce the issue? Current-main source rejects the entire persisted index above 1 MiB, and the contributor reports an exact-base negative control failing with ETOOBIG through the Doctor-budget consumer; no target code was executed during this review. Is this the best way to solve the issue? The fix addresses the read boundary without increasing quotas, dropping receipt fields, changing persisted state, or weakening upgrade assertions; the added reader strategies reuse existing schema selection and fallback ownership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7db22d13bf4e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +208, Other +121. Total +329 across 4 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 21, 2026, 6:37 PM ET / 22:37 UTC (Revision 3). |
|
@clawsweeper re-review The requested after-fix native upgrade-survivor execution is now terminal success: https://github.com/ChuLaiTheGreat/openclaw/actions/runs/39504398170 (job Actual shipped updater: published Package build/registry/updater and installed identity pass; update takes 1,444.545 s against the unchanged 1,500 s command budget. The earlier failed runs remain disclosed; quotas, assertions, timeouts and resource caps are unchanged. This is genuine shipped CLI/Gateway synthetic execution, without live Telegram/model calls, client credentials, production deployment or a Clarity-10.3 migration/RAM claim. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Head The updated description records the fresh checks and their exact limits: 29 index cases and five Doctor-budget cases completed successfully; the unchanged assertion suite subsequently passes all 79 cases with native container exit 0, PID 0, no OOM and verified removal. The full native script-test type graph, typed lint and formatting pass. Earlier setup failures and the compiler OOM remain disclosed. All three production MJS files remain byte-identical to |
|
🦞👀 Re-review progress:
|
The E2E SQLite reader applied its byte cap before projecting fields, so large unrelated catalog metadata aborted upgrade checks. It now projects complete receipts and required plugin fields first, preserving the full reader's limits. Supersedes #178801, thanks @ChuLaiTheGreat. Co-authored-by: Samuel Benainous <[email protected]>
|
Thank you @ChuLaiTheGreat! We re-implemented this fix in #180458, which landed with you credited as co-author. Closing this one as superseded. |
…law#180458) The E2E SQLite reader applied its byte cap before projecting fields, so large unrelated catalog metadata aborted upgrade checks. It now projects complete receipts and required plugin fields first, preserving the full reader's limits. Supersedes openclaw#178801, thanks @ChuLaiTheGreat. Co-authored-by: Samuel Benainous <[email protected]>
What Problem This Solves
The native upgrade-survivor recipe can finish updating a package, then fail while reading
plugins.installedIndex: the stored JSON exceeds the E2E reader’s 1 MiB aggregate cap, even when the fields needed by its assertions fit within that cap. The two failing consumers only need complete install receipts and each plugin’spluginId,enabled, androotDir.User Impact
Release validators can complete the upgrade checks when unrelated plugin catalogue metadata exceeds the full-reader limit. This changes validation tooling; it does not deploy or change a production runtime.
Why This Change Was Made
Add an explicit bounded summary reader for those two consumers. SQLite projects the required fields before returning JSON to Node; install receipts and their unknown fields remain complete. The projection preserves JSON types, missing fields and plugin order. Its required JSON is still capped at 1 MiB in UTF-8 bytes. The original full reader, writers, migration assertions and aggregate limit remain unchanged. Failure diagnostics expose only byte counts and plugin count.
Evidence
ETOOBIGbefore invoking the new summary export. The final negative run uses the exact final test file against that base and fails on the expectedETOOBIG, not on a missing export or setup error.Native upgrade-survivor proof
The complete native published-package
sqlite-volumesurvivor recipe passes in run 39504398170, job118909878709, completed 20 October 2026 at 22:49 UTC. Candidate package source is09517e7ab48747e2935ffbab41d3c90d2bde4202(treefb409e5571e51267017a43b478f9052f5ce886c3); the actual mounted E2E tooling is public PR #178801,637db088c3fb0edcf516c74d63892becbbd7466e(tree10e70ebae01184a134d2b01eefffebb37f3f5bdc, sole parent5a0b5006). The native entry point isbash scripts/e2e/upgrade-survivor-docker.sh, installing the complete candidate tarball through the shipped updater from published[email protected].80bef2833f9ee9f8327a32f16d9ab6ec2d78ee084bb684802827d4c4f903799e. Complete registry source/version/integrity validation passes for all four required packages.Selected redacted native terminal output (the full job log is linked above):
The job is terminal success, with native driver exit 0 and successful final phase receipts. The four explicitly inspected host-owned package/image/mount/registry containers settle at exit 0 without OOM or a remaining PID; no unavailable inner-container inspect receipt is invented. Exported summaries are tail-limited and redacted, so the conclusion also uses the complete phase entries, valid targeted Gateway/budget receipts and native terminal result. This is synthetic package compatibility and actual shipped CLI/Gateway execution; it provides no live model/Telegram/account proof, production deployment, Clarity-10.3 migration qualification or idle-RAM comparison.
Related validation: #178124.
Conflict resolution on 21 October 2026
Head
0917b711a0e82b9f277b384bb9aaee892545169fintegratesmain 8c6ce699b3464044322e36d075e6ac219fe058a0to resolve the test-fixture conflict introduced by upstream #179728. It preserves the upstreamwithSqlitecleanup/table refactor and this PR's extra fixture fields; the asynchronous WAL writer retains explicit rollback and close. All three production MJS modules are byte-identical to637db088. Native Git also merges this head cleanly with the latermain ce009c218d71084796395b9f83d7ee289b3b0f7d.Fresh checks on tree
de762b94f224e504eaff5ac22b8aec9c21bd9f2d: the index-reader file passes 29 cases and the Doctor-budget file passes five; the full native root-scripts type graph, typed lint for the test and three MJS files, and formatting pass. The combined test command still exited 2 because the remaining assertion suite initially lacked its declared QuickJS compile dependency. After that dependency was installed, its compiled-subprocess preparation hit the isolated 3.5 GiB container limit (Docker OOM event; compiler exit 137), before any assertion case ran. The subsequent fresh native assertion run now passes all 79 cases, with actual DockerState.ExitCode=0, PID 0, no OOM and verified container removal. It uses a 4 GiB container, a 1,536 MiB Node heap and two native compiler threads under the unchanged production parent caps. Together with the completed 29 index and five Doctor cases, this qualifies 113 distinct cases on the published tree; duplicated reporter summaries are counted once. The failed setup and OOM runs remain disclosed and are not relabeled as successes. The earlier assertion runs and complete shipped upgrade-survivor execution above retain their original tree identities; the packaged E2E has not been rerun or relabeled as a new-head packaged proof. At the final current-head readback, all 114 observed checks are terminal: 59 success, 54 skipped and one neutral, with no failure or running check. Skipped and neutral checks are not counted as test passes.