Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed September 22, 2026, 12:10 AM ET / 04:10 UTC (Revision 20). ClawSweeper reviewWhat this changesAdds an optional worktree-local push guard that checks reviewed paths, commit identity, privacy rules, overlapping pull requests, and approval of the exact commit. Merge readiness⛔ Blocked before merge - 11 items remain Keep open: the first-publication use case remains distinct from current main and the merged hook repair. The contribution remains useful, but this review identifies four blocking defects and product sponsorship is still unresolved. Priority: P3 Review scores
Verification
How this fits togetherThis contributor tool sits between local branch preparation and Git push. It combines Git state, a saved review manifest, and GitHub pull-request inventory to allow or reject an opted-in push; hosted publication controls remain authoritative. flowchart TD
A[Explicit worktree opt-in] --> B[Local push hook]
C[Git branch and changed paths] --> D[Publication preflight]
E[GitHub pull request inventory] --> F[Review manifest and approval]
F --> D
B --> D
D --> G[Allow exact push or explain rejection]
Decision needed
Why: The existing PR landing flow requires an already-open PR, so the proposal has distinct value, but neither the discussion nor adjacent merged repair approves ownership of this additional workflow. Before merge
Findings
Agent review detailsSecurityNeeds attention: The new privacy detector misses sensitive content retained in intermediate commits; no dependency, credential-access, or hosted-permission expansion was found. PR surfaceTests +561, Docs +66, Other +966. Total +1593 across 7 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: A sponsored first-push workflow should preserve current hook ownership, inspect complete outgoing history and path inventories, and work interactively with authenticated GitHub collection. Do we have a high-confidence way to reproduce the issue? Yes, source establishes concrete triggers in the proposed implementation: interactive stdin, file-type changes, reverted intermediate secrets, and capped GitHub inventories. These were not executed during this read-only review and are not current-main bug reproductions. Is this the best way to solve the issue? No, the current implementation does not reliably enforce its stated checks. The first-push boundary is distinct from scripts/pr, but it needs complete Git-history and API-inventory handling while retaining the current hook setup owner. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5b22b5522468. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What 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
HistoryReview history (19 earlier review cycles; latest 8 shown)
|
43ab022 to
2cafdef
Compare
|
@clawsweeper re-review\n\nFresh exact-head proof refresh request for 03c094b. No merge requested. |
|
Closing this draft because the opt-in path disables the existing prepare-installed pre-commit hook and duplicates the canonical publication/landing controls. A successor, if requested, should integrate into the maintained flow rather than create a parallel gate. Branch preserved. |
|
Reopening for remediation. The next pass will preserve the existing pre-commit hook and reshape any publication security gate around the canonical maintained flow. |
|
@clawsweeper re-review Please re-review exact head Both P1 findings are repaired: automatic pre-commit hook installation is preserved, and the documented |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
🦞🧹 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:
|
|
2026-09-10 current-main audit at 10af9ba: the publication-preflight capability remains unique; current main has extensive maintainer scripts but no equivalent opt-in local overlap declaration and publication inventory gate. The branch is 12,994 commits behind and 11 ahead. A synthetic current-main merge conflicts only in CONTRIBUTING.md, scripts/prepare-git-hooks.mjs, and its test; the standalone preflight implementation and declaration remain distinct. The 71 terminal green checks are historical, not current-main proof. Recommended next step: retain the PR, reduce/re-extract the security preflight against today's scripts/pr trust model, then rerun its focused tests and current policy guards. Do not close as obsolete and do not blindly merge the stale branch. |
|
Thanks for the PR. We're closing older pull requests that have gone stale against current This draft has had no commits since August 11, still needs behavior proof, and adds a large opt-in tooling surface without a maintainer sponsor. Please open a fresh, smaller proposal if you still want this guard. |
What Problem This Solves
Contributors preparing security-sensitive branches have no optional worktree-local guard that binds an explicit reviewed path set, branch identity, and exact head before a push. The repository's hosted CI and canonical
scripts/prlanding controls remain authoritative, but they do not provide that additional pre-publication convenience at the contributor worktree.What This Change Does
Adds an opt-in, worktree-local publication preflight for contributors who want an additional local check before pushing a reviewed branch. It does not replace hosted CI, branch protection, or the maintained
scripts/prlanding controls; those remain authoritative.Current
scripts/pr prepare-pushsynchronizes an already-open PR head under lease and ancestry checks. It does not cover this branch's distinct before-first-publication contributor use case. The standalone lane therefore retains unique behavior, but the PR stays draft while maintainers decide whether OpenClaw wants that optional convenience surface.Review findings repaired
git-hooksinstallation during packageprepare, including the maintained pre-commit hook.--installfor manual setup and exact-valueOPENCLAW_INSTALL_GIT_HOOKS=1for non-interactive setup. Other values do not enable the preflight.git push origin HEADform while still requiring one exact branch update at the current reviewed SHA.gh api --paginate --slurp; malformed, truncated, or incomplete response shapes fail closed.--inventory-filepath is documented only for trusted tooling that supplies a complete canonical snapshot, never a partial hand-written list.git push. This avoids a Windows test-harness dependency on whichever incompatiblebashhappens to resolve first while preserving the direct multi-ref rejection assertion.update_existingto select an actual overlapping PR on the current feature branch, rejects a wrong-branch selection, and fails closed when any additional overlap is undeclared. The same complete-overlap requirement applies tosupersede_existing.Evidence
Reviewed head:
d9700ba75ebc76c0be6198b483d02f6f033d8cdbFrozen upstream base merged for this validation:
d91b3970b47f3df9ebd36bb93c5074b24515dd82Inspectable real hook behavior
The focused suite uses temporary Git repositories and real local bare remotes. On native Windows, the final exact-head run passed 11/11, including:
Those tests exercise real
git pushbehavior and prove:git push origin HEADat the approved exact SHA succeeds;Pagination proof
The regression fixture supplies multiple PR pages and multiple file pages, proves every PR/path is retained, asserts every request uses
api --paginate --slurp, and verifies malformed page/file shapes fail closed.A prior read-only live GitHub API shape check returned:
{"pages":22,"pulls":2191,"allPagesArrays":true}This confirms the former 100-PR limit was materially incomplete and that the implemented page-array contract matches the observed response shape.
Current exact-head checks
pnpm tsgo:scripts, type-aware Oxlint (with only the branch's inherited test-line-48 conversion rule allowed), Oxfmt, andgit diff --check.gpt-5.6-solhigh-reasoning bundle; findings[];patch is correctat 0.98 confidence; reviewer exited 0.git diff --checkpassed.a69400bb79e2f50b3d3c4ba3176351f1a3a88bf6against the frozen base: TruffleHog clean in 6.5 seconds; 58,581-byte one-pass Codexgpt-5.6-solhigh-reasoning bundle; findings[];patch is correctat 0.99 confidence; terminal resultautoreview clean: no accepted/actionable findings reported.d9700ba75ebc76c0be6198b483d02f6f033d8cdbare attached at run 31502685750. The substantive CI matrix is intentionally skipped while the PR remains draft; light repository checks are monitored separately.Limitations and hosted proof
pnpmlauncher reported Node 24.14.0 below the repository's current engine floor, while the direct runtime andpnpm exec nodewere Node 24.18.0. All selected gates completed successfully, but hosted exact-head CI remains authoritative for a supported clean runner.Maintainer decision
This branch provides a contributor pre-publication surface that current
scripts/pr prepare-pushdoes not. Please decide whether to retain that optional standalone convenience or reject the product policy in favor of no local pre-publication layer. No merge, ready-for-review transition, or claim that a bypassable local hook is the repository's security boundary is requested by this update.