Repository navigation
fix(test): keep invalid fixture JSON diagnostics bounded - #139837
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:29 AM ET / 06:29 UTC. ClawSweeper reviewWhat this changesThe PR limits invalid-JSON fixture diagnostics to the output path and existing bounded tail, and strengthens the regression assertion against leaked input prefixes. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and v2026.9.2 still forward parser details outside the diagnostic tail. No introduced correctness defect was found, and the maintainer-authored PR is protected from cleanup closure. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s end-to-end fixture dispatcher checks captured CLI output from the shared-workspace agent deletion smoke test. Its assertions turn those files into validation results and failure diagnostics. flowchart TD
A[Agent deletion smoke test] --> B[Captured CLI output]
B --> C[Fixture dispatcher]
C --> D{Valid JSON?}
D -->|Yes| E[Check deletion and workspace results]
D -->|No| F[Report path and bounded tail]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +2, Other +4. Total +6 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep syntax failures confined to the existing bounded diagnostic path while preserving filesystem errors and successful fixture assertions. Do we have a high-confidence way to reproduce the issue? Yes, source inspection identifies a focused reproduction: run the fixture assertion on invalid JSON containing an old prefix outside its trailing 16 KiB. Current main forwards parser details; the existing subprocess regression targets that path, but was not executed during this review. Is this the best way to solve the issue? Yes. Removing raw parser details at the diagnostic owner directly closes the extra output path without changing successful parsing or adding another abstraction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c54319089356. 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 invalid JSON from a fixture command could be repeated outside its bounded diagnostic tail through an engine-generated parser message or error cause.
Why This Change Was Made
Report the output path and existing bounded tail without forwarding raw parser details. Keep filesystem read errors separate from JSON syntax errors.
User Impact
Failed fixture assertions retain useful output context while respecting the existing diagnostic bound on Node and Bun.
Evidence