Skip to content

Pre-push hook leaks repository-local Git environment into child tests #70

Description

@flyingrobots

Problem\n\nGit exports repository-local GIT_* variables to pre-push hooks. The current hook forwards that environment into Vitest, contaminating tests and examples that create or access temporary repositories. The same unit suite passes standalone but fails under git push with fatal: not a git repository, fatal: not in a git directory, and downstream EPIPE errors.\n\n## Required fix\n\n- Clear variables reported by git rev-parse --local-env-vars before launching lint/tests.\n- Keep the quality gates enabled; do not bypass the hook.\n- Add a regression contract for the hook boundary.\n- Demonstrate a normal push with the full hook passing.\n\n## Acceptance criteria\n\n- [ ] Hook sanitizes repository-local Git variables before child commands.\n- [ ] Focused regression and previously failing Git-backed tests pass.\n- [ ] Normal git push completes with lint and the full unit suite enabled.\n

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions