Repository navigation
Conversation
|
Codex review: needs changes before merge. Reviewed June 12, 2026, 10:19 AM ET / 14:19 UTC. Summary PR surface: Source +104, Tests +88. Total +192 across 3 files. Reproducibility: yes. The supplied real-package probe deterministically shows retained finished transactions, and direct inspection of fake-indexeddb 6.2.5 confirms the persistent backing-array mechanism on current main. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Match both exact Matrix rust-crypto database suffixes— Do we have a high-confidence way to reproduce the issue? Yes. The supplied real-package probe deterministically shows retained finished transactions, and direct inspection of fake-indexeddb 6.2.5 confirms the persistent backing-array mechanism on current main. Is this the best way to solve the issue? No, not as submitted. The Matrix-local ownership and wrapper approach are reasonable, but omitting rust-crypto’s metadata database leaves the same dependency leak active on a sibling store. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0fc5a57a3440. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +104, Tests +88. Total +192 across 3 files. View PR surface stats
Acceptance criteria:
What 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
|
|
Closing this stale draft PR because it has been open for a long time without merge. I can reopen or resubmit if needed. |
Summary
fake-indexeddb/autoin the Matrix crypto runtime.::matrix-sdk-crypto, so unrelated fake-indexeddb databases keep their current behavior.Test Plan
node /tmp/openclaw-auto-90455/proof-red.mjsagainst unpatched[email protected]failed as expected with 6 retained finished transactions../probe/node_modules/.bin/esbuild proof-green.ts --bundle --platform=node --format=esm --outfile=proof-green.mjs && node proof-green.mjspassed against the patched helper/runtime source.esbuildbundledfake-indexeddb-prune.tsandfake-indexeddb-prune.test.tssuccessfully in the API-only temp workspace.git diff --no-index --check main patchedreported no whitespace errors.CI repair follow-up (2026-06-12)
After the draft PR was rechecked, CI reported TypeScript-only failures in
extensions/matrix/src/matrix/sdk/fake-indexeddb-prune.ts:API-only repair commit
264c6fbd2ba6c807fb79b35680aee466b50cd4f8narrows the raw database before readingtransactions, gives the patched prototype the DOMIDBDatabase["transaction"]signature, and returnsIDBTransaction & FakeIndexedDbTransaction.Verification run after the CI repair (temp source-level type probe, no clone):
Real behavior proof
Behavior or issue addressed: Matrix E2EE uses fake-indexeddb for
openclaw-matrix-*::matrix-sdk-cryptostores. Current fake-indexeddb 6.2.5 retains every finished transaction in the rawtransactionsarray, which grows without bound during long-running Matrix crypto sync. This patch installs a Matrix-scoped runtime pruner so finished transactions are removed for Matrix crypto stores after completion/abort, without changing unrelated fake-indexeddb databases.Real environment tested: API-only temp workspace
/tmp/openclaw-auto-90455on macOS runner; Node.js v22.22.1; npm-installed[email protected]and[email protected]; source downloaded fromopenclaw/openclawmain viagh api(no clone).Exact steps or command run after this patch:
cd /tmp/openclaw-auto-90455 ./probe/node_modules/.bin/esbuild proof-green.ts --bundle --platform=node --format=esm --outfile=proof-green.mjs node proof-green.mjs ./probe/node_modules/.bin/esbuild patched/extensions/matrix/src/matrix/sdk/fake-indexeddb-prune.ts --bundle --platform=node --format=esm --outfile=/tmp/openclaw-auto-90455/helper-check.mjs ./probe/node_modules/.bin/esbuild patched/extensions/matrix/src/matrix/sdk/fake-indexeddb-prune.test.ts --bundle --platform=node --format=esm --packages=external --outfile=/tmp/openclaw-auto-90455/test-check.mjs git diff --no-index --check main patchedEvidence before fix (RED, expected failure):
Evidence after fix:
Observed result after fix: Five sequential writes to a Matrix crypto-store database leave
raw.transactions.length === 0andfinishedTransactions === 0; the same probe against an unrelated fake-indexeddb database still retains 6 finished transactions, proving the mitigation is Matrix-scoped.What was not tested: I did not run the full OpenClaw Vitest suite or a live Matrix gateway/E2EE sync because this cron run must stay API-only without cloning the OpenClaw repository or using a full checkout. The focused proof uses the real fake-indexeddb package and API-downloaded patched source.
Risk/Notes
pnpm-lock.yaml,pnpm-workspace.yaml, shrinkwrap files, package versions, or dependency graph policy surfaces.IDBDatabase.prototype.transactionafter fake-indexeddb installs the globalIDBDatabaseconstructor._stateis"finished"; active/inactive/waiting transactions remain in the raw queue.Fixes #90455