Repository navigation
fix(backup): preserve Git failure tails through console redaction - #183448
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 preserves Git push diagnostic tails by separating escaped newlines before console credential redaction. Example: A rejected backup push prints a URL ending in ?access_token=*** followed by stderr-tail-🦞 and stdout-tail-🐚 on later lines.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review This PR repairs a current-main diagnostic regression with a focused change; no introduced correctness or security defects were found, and CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Git backup owner supplies bounded, credential-redacted diagnostics to the backup command, which escapes terminal controls before the console applies its own redaction and emits the warning. flowchart LR
A[Git push failure] --> B[Backup diagnostic formatter]
B --> C[Backup command renderer]
C --> D[Console credential redaction]
D --> E[Operator terminal]
B --> F[Recorded backup outcome]
Technical reviewBest possible solution: Keep the focused rendering fix and existing redaction owners, then land through the normal exact-head CI gates. Do we have a high-confidence way to reproduce the issue? The current-main sanitizer and console query matcher establish the failure path, corroborated by the linked shipped-CLI failure; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete fix: preserve whitespace at the existing rendering boundary without weakening either redactor or changing stored diagnostics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 192947deb5f3. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +5, Docs 0. Total +5 across 3 files. 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 25, 2026, 4:47 AM ET / 08:47 UTC. |
What Problem This Solves
Git backup push failures lose their useful stderr/stdout tails in the shipped CLI when diagnostics include credential-bearing URLs. Related: #183248.
User Impact
Operators retain the Git failure reason and diagnostic tails while URL credentials remain redacted and terminal controls remain escaped. A successful local backup still succeeds when the optional push fails. JSON results and recorded diagnostics are unchanged.
Why This Change Was Made
Escaping real newlines without whitespace turns subsequent diagnostic text into part of a URL query value for console redaction. The CLI renderer now sanitizes each line and puts whitespace around escaped line breaks. Neither redactor changes. Production LOC is +3/−3 (net zero); the existing owner test gains five lines to cover the real console-redaction boundary.
Evidence
On main
3672bd28a26f, the existing shipped-CLI file reproduced 6 passed / 1 failed:keeps Git backup failures useful through the shipped CLIloststderr-tail-🦞. Its preceding assertion confirms the push failed;Git backup committedreports the intentionally successful local commit. The added owner assertion also fails before the fix, because console redaction consumes the diagnostic labels and tail text.Focused tests passed: 55 tests across
src/commands/backup-git.test.ts,src/snapshot/git-backup.test.ts,src/snapshot/git-backup-failure.test.ts, andsrc/snapshot/git-backup.cleanup.test.ts; one existing Windows-only case skipped on macOS. Changed-file oxfmt, lint, and diff checks passed. One initial test preparation was invalidated by concurrent formatting and replaced with the frozen-source run; it is not product evidence.Shipped-CLI fixed-runtime E2E: all 7 tests passed, including both diagnostic tails and all synthetic credential absence assertions. The full prerequisite runtime build passed. The configured pre-commit hook passed against the exact reviewed staged patch; its resulting tree matched the commit. Focused proof used Node 26.12.1 on macOS; PR CI supplies Linux and broad validation.
Independent subagent review (autoreview route unavailable): clean at P0–P2. The configured review helper refused the requested provider route; configuration was not changed. Simplification retained the existing rendering and redaction owners, without new state, configuration, or helpers.
These are correctness fixes, not performance claims. After deployment, a failing optional Git push should show both retained diagnostic tails without credentials or terminal control bytes. No production system was exercised. Ready for maintainer review; merging is reserved for the lead.
Final published head:
b243566b240485b434d7e19d485b153ef4fd693b. The requiredopenclaw/ci-gateis SUCCESS, and CI run 40177068369 completed successfully, including all three PostgreSQL conformance shards. No CI rerun was requested. The pre-push rebase left the tested owner and regression files byte-identical. PR remains ready and open for the lead to merge.