Skip to content

Codex/refactor 06 11 sequence#8

Closed
dbrosio3 wants to merge 32 commits into
mainfrom
codex/refactor-06-11-sequence
Closed

Codex/refactor 06 11 sequence#8
dbrosio3 wants to merge 32 commits into
mainfrom
codex/refactor-06-11-sequence

Conversation

@dbrosio3

Copy link
Copy Markdown
Member

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-push passes with no output
  • bash -n install.sh passes with no output
  • Manually tested the hook on a real repository
  • Tested on macOS
  • Tested on Linux

Checklist

  • Commit messages follow Conventional Commits
  • No eval, heredoc variable expansion, or unquoted variable interpolation in shell scripts
  • File lists passed as arrays, never as interpolated strings
  • VERSION, CHANGELOG.md, .release-please-manifest.json, and release-please-config.json were not manually edited — these are managed by release-please
  • New template added to the table in README.md (if applicable)
  • New template name added to install.sh usage comment (if applicable)

Screenshots / output

dbrosio3 and others added 30 commits May 22, 2026 10:51
* 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.
dbrosio3 added 2 commits June 16, 2026 16:34
…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.
@dbrosio3 dbrosio3 closed this Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant