Repository navigation
improve(tests): reduce database module-identity setup time - #148223
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: blocked before merge. Reviewed September 14, 2026, 8:06 AM ET / 12:06 UTC. ClawSweeper reviewWhat this changesThe PR switches the database module-sharing test’s fixture build to tsdown and adds an assertion that the transformed plugin evaluates a separate module graph. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this is a focused, useful test-performance improvement that is absent from inspected main and the latest release. No actionable correctness defect was found. Likely related people: steipete (routing candidate, medium confidence). Priority: P3 Review scores
Verification
How this fits togetherThis test builds native host and SQLite SDK fixtures, then loads a transformed plugin through OpenClaw’s plugin loader. It checks that independently evaluated modules still share database connections, queues, transaction observers, and cache lifecycles. flowchart LR
A[Host and SDK source] --> B[tsdown fixture build]
B --> C[Native host and SDK]
B --> D[Transformed plugin loader]
C --> E[Shared database owner]
D --> E
E --> F[Ownership and lifecycle assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +11. Total +11 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the complete database ownership regression while reducing fixture construction cost through the established sibling build configuration. Do we have a high-confidence way to reproduce the issue? Not applicable to this performance cleanup; the body supplies comparative timings but explicitly leaves the Linux timeout unreproduced. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes: the patch reuses an established fixture-build pattern, preserves the meaningful behavioral checks, and strengthens verification that the transformed graph is independent. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7eb75ef60712. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The merge-risk item is retained as a measurement limitation: this PR reduces fixture construction cost; it does not claim to reproduce or definitively fix the original intermittent Linux timeout. The same-machine comparison retains the complete database ownership regression, adds an independently evaluated graph assertion, and reduces construction from 11.28s to 4.07s using the existing reply-admission fixture configuration. The original 45-second case and 30-second child deadlines are unchanged. Jiti itself was slightly slower in the diagnostic pair, which is reported in the body. The chosen mitigation is the review's first option: retain the complete ownership regression and land the measured setup improvement after exact-head CI is green. Subsequent normal-main and dependent-PR observations will establish whether the intermittent timeout persists. We will not weaken deadlines, retries, graph independence, or ownership assertions to declare it fixed. |
|
Merged via squash.
|
What Problem This Solves
The agent-database module-identity test spends most of its time building a large fixture graph before it checks database ownership.
User Impact
There is no user-visible behavior change. The test continues to exercise the real native host, public SQLite SDK and independently transformed plugin graph, including shared connections, queues, statement caches, transactions, observers and registry invalidation.
Why This Change Was Made
Use the existing reply-admission sibling’s tsdown fixture configuration, which matches the packaged build approach, while retaining the original entrypoints and exports. An explicit function-identity assertion also verifies that the plugin really evaluates a separate graph; it passed with the original builder too.
Only one test changes (+18/-7 lines). Production code, schemas, loader/cache settings, assertions and the existing 45-second case and 30-second child deadlines are preserved.
Evidence
On one pinned local source snapshot, the same case with the graph-identity assertion improved from 16.31s to 11.77s; command wall time improved from 18.01s to 13.18s. Separate diagnostics measured fixture construction at 11.28s versus 4.07s and generated output at 64.07MB versus 47.87MB. Jiti loading increased from 4.48s to 5.19s, so the improvement comes from fixture construction.
The one-file change was then applied independently to a canonical main snapshot. Its full case passed in 10.77s and the existing reply-admission identity sibling passed in 16.65s. All 20 classified checks passed, and independent P2 review found no actionable findings with unchanged source inputs.
The original Linux CI timeout was not reproduced locally. This is a measured fixture-build improvement; exact-head CI remains necessary before claiming that timeout is resolved.