Repository navigation
fix: keep CI preparation from changing Git hooks - #192138
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. What this changesThis PR skips automatic Git hook configuration during CI preparation while retaining generator execution and local hook setup. Example: Run source preparation with CI=true in a checkout without core.hooksPath.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a current CI configuration mutation with a focused fix; it remains a draft awaiting its recorded qualification. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe package prepare lifecycle invokes this script, which runs source generators and initializes developer hooks through the existing Git configuration helper. flowchart TD
A[Package prepare lifecycle] --> B[Kysely preparation]
B --> C[CI environment check]
C -->|Local| D[Existing hook configurator]
C -->|CI| E[Native protocol preparation]
D --> E
Technical reviewBest possible solution: Keep the CI guard at the prepare entry point and complete the draft’s focused qualification without changing existing hook selections or generator behavior. Do we have a high-confidence way to reproduce the issue? Current main demonstrably reaches the hook write during CI when hooks are unset; the author reports a matching isolated CLI reproduction, but this review ran no target code and does not attribute the earlier remote failure. Is this the best way to solve the issue? The smallest complete fix uses the existing prepare owner to omit developer-only setup in CI, preserving the explicit helper and the earlier configuration-ownership repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c5828d072ba5. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +53, Docs 0, Other +5. Total +58 across 4 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 November 3, 2026, 12:55 PM ET / 17:55 UTC. |
* fix: keep CI preparation from changing Git hooks * chore: format CI preparation regression (cherry picked from commit 3bbbcd4)
* fix: keep CI preparation from changing Git hooks * chore: format CI preparation regression
) * fix(crabbox): preserve Boat source and retained claim ownership * test(crabbox): avoid map spreads in source fixtures * fix(crabbox): restore Boat transport Git after source execution * fix: keep CI preparation from changing Git hooks (#192138) * fix: keep CI preparation from changing Git hooks * chore: format CI preparation regression (cherry picked from commit 3bbbcd4) * fix(crabbox): restore source Git when SSH output closes
…claw#191845) * fix(crabbox): preserve Boat source and retained claim ownership * test(crabbox): avoid map spreads in source fixtures * fix(crabbox): restore Boat transport Git after source execution * fix: keep CI preparation from changing Git hooks (openclaw#192138) * fix: keep CI preparation from changing Git hooks * chore: format CI preparation regression (cherry picked from commit 8c449fe) * fix(crabbox): restore source Git when SSH output closes
* fix(crabbox): preserve Boat source and retained claim ownership * test(crabbox): avoid map spreads in source fixtures * fix(crabbox): restore Boat transport Git after source execution * test(crabbox): reproduce unpublished Boat source seeding * fix(crabbox): seed Boat capsules from the captured base * fix: keep CI preparation from changing Git hooks (#192138) * fix: keep CI preparation from changing Git hooks * chore: format CI preparation regression (cherry picked from commit 3bbbcd4)
…2164) * fix(crabbox): preserve Boat source and retained claim ownership * test(crabbox): avoid map spreads in source fixtures * fix(crabbox): restore Boat transport Git after source execution * test(crabbox): reproduce unpublished Boat source seeding * fix(crabbox): seed Boat capsules from the captured base * fix: keep CI preparation from changing Git hooks (openclaw#192138) * fix: keep CI preparation from changing Git hooks * chore: format CI preparation regression (cherry picked from commit 8c449fe)
What Problem This Solves
Source preparation in CI writes a developer Git hooks setting into the checkout. In a reusable workspace, that persisted setting can make the next strict Git synchronization probe reject an otherwise valid checkout.
User Impact
CI preparation leaves Git hook configuration untouched. Local installation still initializes an unset hooks path, and source preparation still invokes Kysely and native-protocol generation.
Why This Change Was Made
Skip only automatic hook setup at the prepare entrypoint when
CIis set. The explicit hook configurator and its existing configuration-ownership behavior are unchanged.Evidence
ad5218d25d403dea2bd470c829131337a32ca7ad: both generator fixtures ran, then CI preparation persistedcore.hooksPath=git-hooks.ad5218d25d403dea2bd470c829131337a32ca7ad..a35f75172e65562d33b6216f0b57017b985cda89found no actionable correctness or security defects. ClawSweeper did not execute tests.scripts/pr review-tests 192138 test/scripts/prepare-git-hooks.test.tspassed all 13 tests in 4.65s (3.298s test time) ata35f75172e65562d33b6216f0b57017b985cda89. The finald8e837c689ad544fb1c94b93b3990de252f006e5changes only an array wrap and its line allowance; production bytes are identical.Related: #190941