Repository navigation
fix(claims): bound inventory file reads - #1380
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 6:38 AM ET / 10:38 UTC. ClawSweeper reviewWhat this changesBounds read-only Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessThis PR remains necessary: current main still reads each local claim file in full, while the proposed bounded inventory reader addresses the linked reliability bug. No actionable patch defect was found; maintainers should confirm the new stable inventory contract before merge. Priority: P2 Review scores
Verification
How this fits togetherThe claims inventory CLI scans local JSON claim files without contacting providers, then emits human or JSON inventory output. This change sits between local file reads and that output, preserving valid partial results while classifying oversized records. flowchart LR
A[Local claim files] --> B[Read-only inventory scan]
B --> C{File within 1 MiB?}
C -->|Yes| D[Decode valid claim]
C -->|No| E[Bounded oversized-file problem]
D --> F[Human or JSON inventory]
E --> F
F --> G[Exit status for operators]
Decision needed
Why: The linked bug establishes the need for bounded reads, but its report explicitly leaves the exact threshold and problem-code spelling as product choices, and this changes output for previously valid oversized local state. Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the bounded read-only inventory behavior after explicitly accepting the 1 MiB limit and stable oversized-file problem code as the operator-facing contract. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible with high confidence: current main still routes the read-only inventory through Is this the best way to solve the issue? Yes, subject to maintainer acceptance of the public limit: a pre-read size check plus a limit-plus-one reader preserves the existing race checks while bounding unknown or growing inputs without changing runtime claim loading. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 808764aa25cc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Reject local claim inventory files above the inclusive 1 MiB limit while preserving bounded partial output and the existing runtime reader. Refs #1373 Co-authored-by: Coy Geek <[email protected]>
c8a6bea to
abf7661
Compare
|
Maintainer decision: adopt the inclusive 1 MiB per-file limit and stable |
…1188) Production diagnostics from openclaw/crabbox#1380 showed xvfb-run guarding the display with an xauth cookie, refusing the readiness probe and ffmpeg recorder outside its wrapper. The driver now starts Xvfb :99 directly (local-only, no TCP listener) with xterm in its own session pointed at the display, and the workflow installs xfonts-base so xterm's default bitmap font exists on hosted runners.
Summary
crabbox claims listat an inclusive 1 MiB per claim fileclaim_too_largeproblem while preserving valid partial output and exit code 2Closes #1373
Verification
go vet ./..., docs validation,gofmt, andgit diff --check