[claude] Verify hardcoded-home path guard on burn/921 branch (#962) #964

Merged
gemini merged 3 commits from claude/issue-962 into main 2026-04-22 13:39:33 +00:00
Member

Fixes #962

What

QA verification of the hardcoded-home path guard from burn/921-poka-yoke-hardcoded-paths (commit 5dcb905).

Cherry-picked tools/path_guard.py and tests/test_path_guard.py from the burn branch into the main line so the guard and its 21 tests are exercisable against the current codebase.

Results

All 21 tests pass:

Acceptance Criterion Result
Hardcoded /Users/<name>/ paths rejected PASS
Hardcoded /home/<name>/ paths rejected PASS
~/.hermes/... via expanduser() allowed PASS
Valid relative paths pass PASS
Valid /tmp/ absolute paths pass PASS
# noqa: hardcoded-path-ok escape hatch works PASS
Comments skipped by static scanner PASS
Directory scanner skips test files and __pycache__ PASS
Fixes #962 ## What QA verification of the hardcoded-home path guard from `burn/921-poka-yoke-hardcoded-paths` (commit `5dcb905`). Cherry-picked `tools/path_guard.py` and `tests/test_path_guard.py` from the burn branch into the main line so the guard and its 21 tests are exercisable against the current codebase. ## Results All 21 tests **pass**: | Acceptance Criterion | Result | |---|---| | Hardcoded `/Users/<name>/` paths rejected | PASS | | Hardcoded `/home/<name>/` paths rejected | PASS | | `~/.hermes/...` via `expanduser()` allowed | PASS | | Valid relative paths pass | PASS | | Valid `/tmp/` absolute paths pass | PASS | | `# noqa: hardcoded-path-ok` escape hatch works | PASS | | Comments skipped by static scanner | PASS | | Directory scanner skips test files and `__pycache__` | PASS |
claude added 1 commit 2026-04-22 02:27:07 +00:00
test: verify hardcoded-home path guard from burn/921 branch
All checks were successful
Lint / lint (pull_request) Successful in 29s
9e00a59791
Cherry-picks tools/path_guard.py and tests/test_path_guard.py from
burn/921-poka-yoke-hardcoded-paths (commit 5dcb905). All 21 tests pass:

- hardcoded /Users/<name>/ paths are rejected at runtime
- hardcoded /home/<name>/ paths are rejected at runtime
- ~/.hermes/... via expanduser() passes (safe, expanded at runtime)
- valid relative and /tmp/ absolute paths pass
- static scanner catches violations and respects # noqa: hardcoded-path-ok
- comments are skipped by scanner
- directory scanner skips test files and __pycache__

Refs #962

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner

🔎 Merge sweep 2026-04-21: not merging this PR in the current sweep. Blocked pending CI / review gates on head 9e00a597: Lint / lint (pull_request): pending (Waiting to run).

🔎 Merge sweep 2026-04-21: not merging this PR in the current sweep. Blocked pending CI / review gates on head `9e00a597`: Lint / lint (pull_request): pending (Waiting to run).
claude added 1 commit 2026-04-22 03:55:44 +00:00
test: add pre-commit path guard hook from burn/921 (Refs #962)
All checks were successful
Lint / lint (pull_request) Successful in 24s
5d3e13ede2
Brings hooks/pre-commit-path-guard.py from burn/921-poka-yoke-hardcoded-paths
to complete QA verification of all guard layers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude added 1 commit 2026-04-22 04:26:19 +00:00
Merge: bring in prior QA work on path guard (Refs #962)
All checks were successful
Lint / lint (pull_request) Successful in 15s
1f5067e94a
gemini merged commit 64a8059f9f into main 2026-04-22 13:39:33 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/hermes-agent#964