Repository navigation
fix(gateway): Land PR works with configured repository hooks - #129576
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
d512bb1 to
4fc77db
Compare
|
Refreshed this PR onto main with single focused head Verified locally:
The new exact-head CI run https://github.com/openclaw/openclaw/actions/runs/32900590726 is currently blocked by an unrelated deterministic main regression in The canonical owner fix is already in flight in #129607; it removes the incomplete metadata mock and isolates only provider normalization. Do not duplicate that separately owned repair in this focused gateway PR or rerun this deterministic merge ref. Once #129607 lands, refresh this PR onto the repaired main and rerun exact-head CI before native prepare/merge. Live deployed Gateway publication cannot be verified before deployment; the real-Git owner-boundary integration tests above are not live deployed proof. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 5:27 PM ET / 21:27 UTC. ClawSweeper reviewWhat this changesThe PR permits normal repository-local and worktree-scoped Git hook paths during Gateway publication while disabling hooks for managed branch, index, and push operations. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: this focused maintainer PR remains necessary and has no blocking correctness findings. It removes the current managed-publication failure path while preserving explicit suppression of repository hooks during side effects. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherGateway publication validates an approved worktree, creates a publication commit, updates the local branch/index, pushes it to GitHub, then creates or finds a pull request. Git configuration enters at workspace validation and managed Git commands are the side-effect boundary. flowchart LR
A[Approved worktree] --> B[Git configuration validation]
B --> C[Publication commit]
C --> D[Branch and index update]
D --> E[Hardened branch push]
E --> F[GitHub pull request]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -2, Tests +90. Total +88 across 6 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Retain a single transport-level hook override and the shared hardened index-command policy so ordinary hook configuration works without permitting repository-controlled hook execution. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: the pre-repair validation rejects core.hooksPath, and the added real-Git test configures both supported scopes and exercises publication recovery plus push. No deployed Gateway run was performed. Is this the best way to solve the issue? Yes—the shared Git argument builders are the owner boundary, avoiding an executor-only exception and preserving rejection of unrelated unsafe configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 46e4520bd5db. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
4fc77db to
16cc679
Compare
|
Maintainer verification for exact head
Remaining proof gap: live deployed Gateway publication cannot be exercised before deployment; the real-Git integration tests above are not deployed live proof. |
16cc679 to
2a2568d
Compare
|
Merged via squash.
|
Fixes #129573
AI-assisted; reviewed and verified by the submitting maintainer.
What Problem This Solves
Fixes an issue where users requesting "Land PR" would get
workspace_changedand no pull request when their approved repository or linked worktree configured the normal Gitcore.hooksPathsetting.Why This Change Was Made
The GitHub publication owner incorrectly classified ordinary repository-local and worktree-scoped hook paths as unsafe before it could push or create a missing pull request. Permit
core.hooksPathduring workspace validation, explicitly disable hooks and filesystem monitoring for every hook-capable managed Git mutation, including push and interrupted-recoverywrite-tree, and continue rejecting every other unsafe Git configuration.User Impact
"Land PR" can safely publish an approved branch and create a pull request when none exists, including in normal OpenClaw checkouts and linked worktrees that configure repository hooks. Repository-controlled Git hooks and filesystem monitors remain unable to execute during managed publication, and unrelated unsafe Git configuration remains rejected.
Evidence
+9/-11(net-2); tests:+91/-1(net+90).node scripts/run-vitest.mjs src/gateway/github-publication-git-index.test.ts src/gateway/github-publication-boundaries.test.ts src/gateway/github-publication.test.ts— 3 files passed, 61 tests passed.node scripts/check-changed.mjs -- src/gateway/github-publication-base.ts src/gateway/github-publication-executor.ts src/gateway/github-publication-git-index.ts src/gateway/github-publication-git-transport.ts src/gateway/github-publication-git-index.test.ts src/gateway/github-publication.test.ts— all applicable changed-file gates passed.git diff --check origin/main...HEAD— passed.pre-push,post-index-change, andreference-transactionhooks, along with interrupted publication recovery; these tests verify the hooks never execute.