fix: replace <PACK> placeholders, harden path traversal checks, strengthen empty-list tests#52
Open
fix: replace <PACK> placeholders, harden path traversal checks, strengthen empty-list tests#52
<PACK> placeholders, harden path traversal checks, strengthen empty-list tests#52Conversation
…ngthen empty-list tests Agent-Logs-Url: https://github.com/Project-Navi/navi-bootstrap/sessions/604f9871-000e-4f48-b728-1c2a85fe6c4c Co-authored-by: Fieldnote-Echo <202828230+Fieldnote-Echo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix placeholder in pack validation commands
fix: replace Apr 22, 2026
<PACK> placeholders, harden path traversal checks, strengthen empty-list tests
Nelson Spence (Fieldnote-Echo)
approved these changes
Apr 22, 2026
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.
Several issues across the agent script, CLI validation, and tests: literal
<PACK>placeholders in the pack-validator agent rendered commands non-functional;..path components were not blocked in spec/project name validation; and empty-list tests for hooks/validations lacked subprocess mock assertions..claude/agents/pack-validator.mdfor PACK in $(git diff ...)loop —<PACK>was a literal string, making everynboot apply/diffcall invalidpack_snake=$(echo "$PACK" | ...)to use the loop variable2>/dev/nullstderr suppression from the firstpytestinvocationsrc/navi_bootstrap/cli.pyapply/diff): replace exact{".", ".."}membership check with".." in stripped_namesubstring check; addstartswith(".")guard; apply consistentname.strip()normalizationnew): add".." in namesubstring check; applyname.strip()normalization — both sites now use identical rulesTests
test_empty_hooks/test_empty_validations: add@patch+mock_run.assert_not_called()— previously the tests only checked the return value, not that no subprocess was spawnedtest_detects_async_test_functions: addassert result["test_framework"] == "pytest"to cover the previously untested fieldOriginal prompt