Skip to content

feat: pre-PR local test runner gate (Closes #580) - #597

Merged
Lexus2016 merged 2 commits into
Lexus2016:mainfrom
Da-Mikey:issue-580-pre-pr-test-runner
Jun 28, 2026
Merged

feat: pre-PR local test runner gate (Closes #580)#597
Lexus2016 merged 2 commits into
Lexus2016:mainfrom
Da-Mikey:issue-580-pre-pr-test-runner

Conversation

@Da-Mikey

Copy link
Copy Markdown
Contributor

Automated evolution PR for issue #580. Adds evolution_pre_pr_test_runner.py — a targeted test shard gate that identifies and runs the most relevant tests before PR creation, shifting validation left and reducing CI failure rate.

Implement a targeted test shard runner that maps changed source files
to their most relevant test counterparts BEFORE gh pr create. This
shifts validation left — catches regressions locally instead of
waiting for CI minutes later.

Four-tier mapping heuristic:
  1. Exact match: agent/foo.py → tests/agent/test_foo.py
  2. Module match: built into the exact-match lookup by basename
  3. Directory fallback: hermes_cli/config.py → tests/hermes_cli/
  4. Last resort: pytest tests/ -x -q --timeout=120 -k 'not slow and not docker'

Files:
- scripts/evolution_pre_pr_test_runner.py — the gate script (541 lines)
- tests/scripts/test_evolution_pre_pr_test_runner.py — 30 pure tests
- skills/evolution/evolution-implementation/SKILL.md — integrated as
  Step 1 in the 'Validate LOCALLY' section of the PR-creation flow

The script is standalone + import-safe: pure functions are injectable
for offline testing. Logs go to
~/.hermes/profiles/user1/evolution/pre-pr-test-results/{timestamp}.log.

Co-Authored-By: Hermes Evolution <evolution@hermes.ai>
@Lexus2016
Lexus2016 merged commit 3b57fe8 into Lexus2016:main Jun 28, 2026
33 checks passed
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.

2 participants