Commit 92ac6df
fix: replace
* Initial plan
* fix: replace <PACK> placeholders, add path traversal checks, and strengthen 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>
* style: ruff-format the new-cmd validation if-chain (one-liner -> multi-line)
The single-line if chain in new() (added in this PR) exceeds ruff-format's
preferred wrapping. Auto-applying `uv run ruff format` to clear the
`lint` (ruff format --check) and `quality-gate` failures on PR #52.
No semantic change. 381 tests still pass, mypy strict clean, both
ruff check and ruff format clean.
* fix: address Codex P1 + Copilot findings on PR #52
1. [Codex P1 + Copilot] pack-validator.md: pack-specific pytest step
was outside the per-pack `for PACK ... done` loop, so $PACK held
only the LAST iteration's value and earlier packs' tests were
silently skipped. A regression in earlier-changed packs would slip
through the validator. Moved the test inside the same loop body
and renumbered the cross-cutting tests as step 3.
2. [Copilot] cli.py render_cmd error message: previous wording
('without dot or dot-dot components') didn't match the actual
checks (`startswith('.')` rejects '.foo'; `'..' in name`
substring rejects 'foo..bar'). Reworded to match the rules:
'must not start with .', 'must not contain .. or path separators'.
Skipped from the same review batch:
- Copilot's note that PR description claims apply/diff hardening:
only render and new construct Path-from-name; apply/diff take
--target as a Click Path. PR description should be updated but
code is correct.
381 tests still pass, mypy strict clean, ruff + format clean.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Fieldnote-Echo <202828230+Fieldnote-Echo@users.noreply.github.com>
Co-authored-by: Nelson Spence <nelson@projectnavi.ai>
Co-authored-by: Navi Bot <267427491+project-navi-bot@users.noreply.github.com><PACK> placeholders, harden path traversal checks, strengthen empty-list tests (#52)1 parent 77a05f6 commit 92ac6df
5 files changed
Lines changed: 45 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
| 132 | + | |
| 133 | + | |
125 | 134 | | |
126 | 135 | | |
127 | | - | |
| 136 | + | |
128 | 137 | | |
129 | 138 | | |
130 | 139 | | |
| |||
577 | 586 | | |
578 | 587 | | |
579 | 588 | | |
580 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
581 | 597 | | |
582 | 598 | | |
583 | | - | |
| 599 | + | |
584 | 600 | | |
585 | | - | |
| 601 | + | |
586 | 602 | | |
587 | 603 | | |
588 | 604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
458 | 459 | | |
459 | 460 | | |
460 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
0 commit comments