Refactor pre push logic to avoid long-sessions timeouts by git commands#69
Merged
Conversation
added 3 commits
June 28, 2026 16:24
- Add `local-push-gate-run.ts` to handle the local push gate execution, including changed file resolution, deterministic checks, warning confirmation, and local AI review. - Introduce `pre-push-hook-context.ts` to manage pre-push context and branch parsing from stdin. - Refactor `pre-push.ts` to utilize the new local push gate workflow, simplifying the decision-making process and removing deprecated run-decision logic. - Remove `run-decisions.ts` as its functionality has been integrated into the new workflow structure. - Update tests to reflect changes in the workflow, ensuring proper handling of skip controls and local AI checks.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a significant refactor and improvement to the local push workflow, especially around the
pushgate pushcommand. The main change is thatpushgate pushnow runs all local checks and confirmation prompts before opening a network session with the remote, usinggit push --no-verifyonly after all checks pass. This avoids holding a remote session idle during long local operations and ensures a more robust, testable, and user-friendly experience. The implementation also modularizes the local push gate logic and clarifies documentation throughout the codebase.Local Push Workflow Refactor and Clarification
Major changes to the push workflow:
pushgate pushnow runs the full local Pushgate workflow—including deterministic checks, warning confirmations, and local AI review—before invokinggit push --no-verify, ensuring the remote connection is only opened if all checks pass. [1] [2] [3]runLocalPushGatefunction, improving testability and maintainability.Documentation and Interface Updates
README.md,docs/architecture/overview.md,docs/architecture/runtime-flow.md,docs/domain/model.md) have been updated to reflect the new workflow, emphasizing thatpushgate pushruns local checks before the network push and clarifying the behavior of skip controls. [1] [2] [3] [4] [5] [6]Pre-push Hook Context Extraction
These changes collectively make the push workflow more robust, user-friendly, and easier to maintain.