Codex/refactor 06 11 sequence#8
Closed
dbrosio3 wants to merge 32 commits into
Closed
Conversation
… documentation (#17)
* feat: add v2 config schema validation * fix: run config tests without shell globstar
* feat: implement hook runner test harness and update CI checks * feat: enhance error handling and add detailed diagnostics for v2 config loading * fix: avoid hook harness stdin pipe errors
…pt (#23) - Updated the installer script to reflect the new name "Pushgate" instead of "push-review". - Changed the repository URLs in the installation script to point to the new Pushgate repository. - Modified output messages in the installer for consistency with the new naming. - Adjusted the configuration file name from `.push-review.yml` to `.pushgate.yml`. - Enhanced error handling and argument parsing in the installation script. - Added tests for the installation process, ensuring the managed runner, hook backup, and configuration are correctly set up. - Introduced a new runner test suite to validate the behavior of the Pushgate runner. - Updated hook tests to accommodate the new runner and its expected behavior. - Removed legacy tool and provider stubs in favor of a managed runner approach.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Add meta.json for analysis tracking. - Document refactor plans for: - Process and Git helpers to reduce duplication in command handling. - CLI pre-push workflow to streamline command boundaries. - Path policy to split concerns and improve maintainability. - Config loading to separate responsibilities while preserving public API. - AI provider and prompt cleanup to eliminate duplication and enhance clarity.
- Introduced runCommand utility for executing shell commands with better output handling. - Created Git command functions for executing Git commands and handling results. - Enhanced error handling with GitCommandError for clearer debugging. - Updated CLI and review prompt to utilize new Git command functions. - Removed deprecated spawn logic in favor of the new command utilities.
- Moved error handling logic to a new `errors.ts` file for better separation of concerns. - Created a new `push-args.ts` file to encapsulate the parsing of push command arguments. - Introduced a `pre-push.ts` workflow file to handle the pre-push logic, improving code organization. - Updated the main CLI entry point to utilize the new modularized functions, enhancing readability and maintainability. - Removed redundant code from the CLI file, streamlining the pre-push execution flow.
- Moved Git-related error handling to a new `errors.ts` file. - Created `filtering.ts` for ignore path filtering and tool path selection. - Introduced `git-resolution.ts` to handle Git command resolution and diff reading. - Added `diff-parsers.ts` for parsing changed files and diff stats. - Consolidated types into a new `types.ts` file for better organization. - Updated `index.ts` to export new functions and types, removing redundant code. - Improved overall structure and readability of the path-policy module.
- Updated test command in package.json to use new MD loader registration. - Enhanced build-runner to support loading .md files as text. - Refactored Claude and Copilot providers to utilize a shared command execution function. - Introduced normalizeProviderReviewOutput for consistent output handling across providers. - Created runProviderCommand to streamline command execution and output management. - Added support for loading .md files with a custom loader. - Updated review prompt to load from an external markdown file. - Added TypeScript declarations for .md module imports. - Improved TypeScript configuration to allow arbitrary extensions.
…tor, process execution, deterministic gate, local AI gate, and review context - Added detailed plans for refactoring the distribution module to improve maintainability and clarify generated artifacts. - Proposed a plan to precompile schema validators, reducing runtime dependencies in the generated runner. - Outlined a strategy for deepening the process execution seam to centralize command execution behavior. - Created a plan to enhance the deterministic gate by isolating tool execution and transcript rendering. - Developed a plan to split the local AI gate into distinct modules for provider registry and verdict handling. - Established a plan to separate review context collection from prompt rendering, improving module clarity and locality.
…odules - Removed the existing config split plan document and implemented the refactor to separate config loading, validation, and normalization responsibilities. - Created new modules for constants, errors, validation, normalization, and loading, while preserving the public facade. - Ensured that existing tests pass and that the public API remains unchanged. Refactor: Clean up AI provider and prompt handling - Deleted the AI provider and prompt cleanup plan document and executed the refactor to reduce duplication in provider adapters. - Extracted shared command execution and output normalization into dedicated modules. - Made the review prompt a single source of truth while maintaining existing behavior. Refactor: Simplify distribution module generation - Removed the distribution module plan document and implemented changes to mark the generated runner as such. - Improved visibility into bundle composition and ensured the source remains the implementation truth. - Updated contributor instructions to clarify where changes should be made. Refactor: Precompile schema validators to reduce runtime dependencies - Deleted the schema validator precompile plan document and executed the refactor to generate standalone validators. - Preserved public validation interfaces while moving heavy runtime dependencies out of the bundled runner. - Ensured that existing tests validate behavior remains intact. Refactor: Enhance process execution handling - Removed the process execution seam plan document and implemented a shared command execution module. - Consolidated timeout handling, output capture, and stdin delivery into a single seam for better maintainability. - Updated existing modules to utilize the new process execution methods. Refactor: Deepen deterministic gate logic - Deleted the deterministic gate deepening plan document and executed the refactor to isolate tool execution and transcript rendering. - Maintained the public interface while improving internal module locality for better maintainability. - Ensured existing behavior and output remain stable. Refactor: Split local AI gate functionality - Removed the local AI gate split plan document and implemented changes to separate provider registry and guardrail checks. - Preserved the public interface while enhancing internal module organization for clarity and maintainability. - Ensured that existing tests validate the behavior remains unchanged. Refactor: Separate review context from prompt rendering - Deleted the review context split plan document and executed the refactor to isolate Git diff and full-file context collection. - Kept prompt rendering focused on formatting while moving context collection to a dedicated module. - Ensured that existing tests validate the behavior remains unchanged.
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.
Description
Type of change
fix:— Bug fix (patch version bump)feat:— New feature (minor version bump)feat!:/fix!:— Breaking change (major version bump)docs:— Documentation only (no version bump)chore:— Maintenance or config (no version bump)refactor:— Code restructure, no behaviour change (no version bump)Changes made
Testing
bash -n hook/pre-pushpasses with no outputbash -n install.shpasses with no outputChecklist
eval, heredoc variable expansion, or unquoted variable interpolation in shell scriptsVERSION,CHANGELOG.md,.release-please-manifest.json, andrelease-please-config.jsonwere not manually edited — these are managed by release-pleaseREADME.md(if applicable)install.shusage comment (if applicable)Screenshots / output