Repository navigation
fix: preserve validated legacy checkout blobs - #978
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 1:17 PM ET / 17:17 UTC. ClawSweeper reviewWhat this changesThe PR updates ClawSweeper’s repair checkout identity so a staged restoration of an existing legacy Git blob keeps its original bytes instead of being rewritten by current line-ending normalization. Merge readinessThis PR remains necessary: current Priority: P1 Review scores
Verification
How this fits togetherClawSweeper’s repair lane checkpoints an edited target checkout, validates its identity, and later publishes the resulting branch. The checkout-tree builder converts target worktree and index state into a Git tree that feeds checkpoint commits, validation bindings, and replacement-history compaction. flowchart LR
A[Target checkout] --> B[Index and worktree scan]
B --> C[Git attribute safety checks]
C --> D[Checkout-tree construction]
D --> E[Checkpoint and validation binding]
E --> F[Published repair branch]
B --> G[Poisoned-index rejection]
G --> D
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the shared raw-blob preservation only after the current head retains both the ordinary poisoned-index rejection and the new legacy-CRLF restoration chain across checkpointing, validation binding, and history compaction. Do we have a high-confidence way to reproduce the issue? Yes. The supplied production repair trace reproduces a legacy CRLF blob being normalized during checkpointing and then rejected after a legitimate staged base restoration; the new subprocess regression exercises that same chain. Is this the best way to solve the issue? Yes. Preserving the source object only after an exact raw worktree hash match fixes the shared tree-construction root cause while preserving canonical normalization for genuinely changed files and retaining poisoned-index rejection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 61a02b0f9e3c. LabelsLabel changes:
Label 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
|
* fix: preserve validated legacy checkout blobs * test: skip nonportable pathspec fixture on Windows --------- Co-authored-by: Peter Steinberger <[email protected]>
What changes
.gitattributeswould normalize those bytes differently.openai/gpt-5.6-sol/xhighconfiguration.Real production root cause and integration proof
The trusted real writer https://github.com/openclaw/clawsweeper/actions/runs/30647636922 implemented openclaw/openclaw#98276, passed its actual OpenClaw validation, and reached Codex review under the required model:
The actual exported execution artifact records exactly why: checkpoint normalization changed unrelated
apps/android/gradlew.batfrom the pinned base's legacy CRLF blob to LF. Codex review correctly identified that unrelated change; its repair restored the exact original blob withgit restore --source=<base> --staged --worktree, passed actualpnpm check:changed, and reduced the intended final tree to only these three files:The publisher then incorrectly rejected the legitimate staged restoration because its canonical checkout tree ignored the exact already-tracked bytes. This PR fixes the actual initial root cause: an unchanged existing tracked blob is recognized from its byte-for-byte raw Git object hash, so it is preserved throughout every downstream identity surface rather than rewritten and patched later.
The current head's executable subprocess integration exercises the complete relevant publication chain, not checkpoint behavior alone: existing CRLF blob preservation, a separately simulated pre-fix normalized checkpoint, staged pinned-base restore, a simultaneous substantive review edit, accepted final checkout binding, replacement-history compaction, and the post-compaction final checkout binding. Hostile staged-index poisoning is rejected for both an ordinary filename and the literal Git pathspec-magic filename
:(exclude)*.Accepted review-finding disposition
:(exclude)*case only on platforms whose filesystems permit that filename; the ordinary poisoned-index rejection still runs on Windows, and existing Windows launcher coverage remains intact.No untrusted Git callback, filter, pathspec override, identity-check bypass, or broader write permission is introduced.