Commit 64690ce
committed
Address remaining review comments: patch-path validation, CI clean-tree check
- Validate each patch path in the interactive TUI stepper before handing it
to Patch.from_file, mirroring SubProject._apply_patches' own skip checks
(missing file, or outside the current directory). A rejected patch logs
a warning and the step still advances, rather than crashing or silently
applying an unvalidated path. Filtering the patch list up front was
tried first but rejected: it shrinks the reported total, which threw off
the fully-patched restore-path decision in combined mode.
- CI: verify dfetch replay-patches actually leaves the working tree
unchanged (snapshot git status before/after) instead of just checking it
exits 0, in both the cygwin and the OS/Python matrix jobs. Runs under
shell: bash explicitly so the check is identical on Windows (Git Bash)
and Linux/macOS; verified against a real replay-patches run.
Left unfixed with reasoning:
- security/tm_usage.py's "preserve pre-existing staged changes" comment:
verified against current code -- _can_review_project already calls
has_local_changes_in_dir before staging, which skips any project with
staged OR unstaged changes, so there's never a pre-existing staged state
to lose. False positive; the reviewer's own analysis was scoped to
replay_patches.py and git.py only, missing this upstream guard.
- The dfetch.terminal import "layer violation": already verified in an
earlier round -- pyproject.toml's actual enforced import-linter contract
places dfetch.terminal in the same bottom layer as util/log, and
lint-imports passes. The reviewer's guideline source (AGENTS.md's prose
diagram) just omits it from the list.
- Generalizing asciinema's exit-status propagation across all ~19
generate-casts.sh demo scripts: out of scope for this PR, which only
fixed it for the two replay-patches demos it adds.
Verified: 734 unit tests, ruff/pylint/mypy/pydocstyle/bandit/lint-imports,
git+SVN replay-patches BDD scenarios, and the new CI check against a real
replay-patches run all pass.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A7miizBGMoLEXXZxuq6XUJ1 parent 4ceb0c1 commit 64690ce
3 files changed
Lines changed: 77 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
| |||
212 | 222 | | |
213 | 223 | | |
214 | 224 | | |
215 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
216 | 236 | | |
217 | 237 | | |
218 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
287 | 303 | | |
288 | 304 | | |
289 | 305 | | |
| |||
509 | 525 | | |
510 | 526 | | |
511 | 527 | | |
512 | | - | |
513 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
514 | 534 | | |
515 | 535 | | |
516 | | - | |
517 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
518 | 542 | | |
519 | 543 | | |
520 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
0 commit comments