Repository navigation
fix(test): restore custodian UUID mocks under Bun - #139832
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. Reviewed September 6, 2026, 2:28 AM ET / 06:28 UTC. ClawSweeper reviewWhat this changesThe PR makes Custodian UI tests mock OpenClaw’s UUID helper instead of native crypto, preserving deterministic IDs without leaking the mock into later Bun tests. Merge readiness✅ Ready for maintainer review Keep open: current main retains the problematic native spies, and this focused repair introduces no actionable correctness findings. The maintainer-authored, protected PR remains a useful landing candidate. Priority: P3 Review scores
Verification
How this fits togetherCustodian powers the Control UI’s Ask OpenClaw setup and repair conversation. Its tests mount the UI with simulated Gateway responses and use predictable session identifiers to check conversation behavior. flowchart TD
A[Custodian test setup] --> B[Mock UUID helper]
B --> C[Session identity creation]
C --> D[UI and simulated Gateway]
D --> E[Behavior assertions]
E --> F[Restore mocks after test]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +6. Total +6 across 6 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep deterministic UUIDs scoped to the existing project helper while preserving independent session-regeneration assertions and per-test restoration. Do we have a high-confidence way to reproduce the issue? Unclear independently: the PR reports a failing original-order Bun campaign, and source identifies the affected producers and identity assertions, but this read-only review did not execute that campaign. Is this the best way to solve the issue? Yes: mocking the existing UUID helper removes the native spy mutation at its producer without weakening assertions or changing runtime identity generation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d5144e4a97a9. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where custodian UI tests leaked a deterministic UUID mock into later tests under Bun, causing session identity regeneration checks to fail.
Why This Change Was Made
Mock the existing project-owned UUID function in six test producers. Bun's inherited native crypto method cannot be restored reliably by the previous spy; the existing module boundary supports normal per-test restoration.
User Impact
No production behavior changes. The UI tests retain their deterministic IDs without affecting later session identity tests.
Evidence