fix(room): advance directory pages past skipped entries - #58
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 23, 2026, 3:49 AM ET / 07:49 UTC. ClawSweeper reviewWhat this changesCorrects room-node directory pagination after skipped entries and adds fault-injection coverage, documentation, and a changelog entry. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still has the pagination defect. The focused correction and production-handler filesystem evidence support it, with no actionable correctness findings. Priority: P2 Review scores
Verification
How this fits togetherThe room-node file service exposes a board-approved storage directory through registered commands. Directory-list requests produce bounded JSON pages and a continuation token for subsequent requests. flowchart LR
A[Directory request and page token] --> B[Validate approved storage path]
B --> C[Visit directory entries]
C --> D[Skip unreadable metadata]
C --> E[Collect bounded result page]
D --> C
E --> F[Return entries and iterator token]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain the existing listing API while making continuation tokens reflect every visited entry and preserving the documented non-snapshot behavior. Do we have a high-confidence way to reproduce the issue? Yes: current-main source establishes the counter mismatch when metadata reads fail during a paginated listing, and the contributor reports a failing-before regression. This read-only review did not execute it. Is this the best way to solve the issue? Yes: using the actual iterator position fixes the mismatch without changing the command contract or introducing a parallel pagination mechanism. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 9d905d30e549. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
The pagination regression and component-test firmware build passed on Both failures were reproduced independently on the remote build host and are repaired in #59. Its final candidate built the Tab5 firmware, passed camera object/provenance verification, all 20 camera compatibility tests, four SDIO allocator tests, and all three real LVGL 9.6 UI host scenarios. Please review/land #59 first; this PR remains awaiting review and the build repair. The pagination change itself has red/green registered-handler proof and scoped-clean P0–P2 autoreview. |
|
#59 is now merged as e4988f4, with all five firmware jobs and CodeQL green. This branch includes the repaired main at c3caae1. Its diff against main remains only the pagination fix, regression tests and documentation; the merge preserved all changelog entries. Independent autoreview of the updated complete diff is scoped-clean through P2. Fresh CI is running on this exact head before landing. |
|
Merged as b9ea051 after all five firmware jobs and CodeQL passed on exact head c3caae1: https://github.com/openclaw/esp-openclaw-node/actions/runs/35837703448. Remote red/green proof used The original room-build failures were resolved in #59 before this final CI run. No physical SD-card/VFS or device execution is claimed. Main is pulled and clean at the merge commit. |
dir.listcan repeat files on later pages when it skips an entry whose metadata cannot be read. Its page token usedoffset + added, even though skipped entries also advance the directory iterator. Continue from the actual iterator position, excluding the lookahead entry that belongs to the next page.The regression calls the registered production handler against a real temporary directory. It injects
EIOfor two entries in the filesystem’s actual iteration order and checks that page sizes 1, 2 and 5 return every readable entry exactly once. Directory iteration, JSON and the remaining filesystem operations are real. Documentation retains the existing limitation that pagination is not a snapshot of a changing directory.Validation on a remote Linux host:
assert(!returned[index])because a file is returned twice.CJSON_DIRand encountered Git’s filesystem-boundary discovery diagnostic; both were resolved in the test environment before rerunning.