Repository navigation
test(update): compare capture directory entries without readdir order - #186728
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR compares capture-directory entries as sets in two recovery-status tests. Example: readdir returns ["manifest.json", ".openclaw-private-update-capture"].
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes two filesystem-order-dependent assertions while preserving their exact directory-content checks; no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherRecovery-status tests create on-disk captures, invoke the update-status command in process, and verify reported recovery state and unchanged capture contents. flowchart LR
A[Capture fixtures] --> B[Update status command]
B --> C[Recovery inspection]
C --> D[Filesystem evidence]
B --> E[Status assertions]
D --> F[Directory content assertions]
Technical reviewBest possible solution: Keep the two set comparisons so inspection tests enforce exact contents without depending on filesystem enumeration order. Do we have a high-confidence way to reproduce the issue? The base assertions visibly reject the reversed ordering of the same two filenames; no target code was executed during this read-only review. Is this the best way to solve the issue? Set equality is the smallest complete repair because directory entry names are unique and the protected invariant is exact membership. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against eb82abff6695. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceTests 0. Total 0 across 1 file. Added test files: 0. View PR surface stats
LabelsLabel 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 Reviewed October 28, 2026, 7:54 AM ET / 11:54 UTC. |
…openclaw#186728) Two status recovery assertions compared raw fs.readdir output against a fixed order; readdir order is filesystem-dependent, so they failed on hosted Linux after openclaw#186663 added the capture marker. They now compare entry sets.
Only privacy-marked directories are captures. Preserve marked incomplete/corrupt handling and filesystem errors while ignoring OS metadata and unrelated entries. Include order-independent fixture assertions from the necessary test-only companion #186728. (cherry picked from commit 5c91550) (cherry picked from commit 0f1de69) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 13325c05ca33424858dc1193b1c4a522ecaf6079)
What Problem This Solves
#186663 added the capture privacy marker to the status recovery fixtures. Two assertions in
src/cli/update-cli/status.recovery.test.tsthen compared rawfs.readdiroutput against a fixed order.readdirorder depends on the filesystem: macOS returns the dotfile first, Linux ext4 often does not. So the test fails on hosted Linux CI, which showed up asreports standalone Doctor captures as manual evidenceandvalidates forward resolution against retained generations without writingfailing on #186648.Why This Change Was Made
Both assertions check that inspection wrote nothing new into the capture directory. That is a property of the set of entries, not their order, so they now compare sets.
User Impact
None. Test-only.
Evidence
[".openclaw-private-update-capture", "manifest.json"], received the reverse).