Commit 9fac742
fix(ai): address PR #19 review — git restore --worktree gate + compaction head+tail cap
- commandSafety: `git restore --staged --worktree` (and -W) writes the working
tree, so flag it despite the --staged exemption — a security gate must not
false-negative here. Adds test cases; the staged-only unstage stays safe.
- compaction: cap the summarizer input by keeping BOTH ends (the opening goal +
the most recent pre-cut decisions) instead of a plain head slice that dropped
the latest state closest to the kept tail.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent c2a709a commit 9fac742
3 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
861 | | - | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
862 | 870 | | |
863 | 871 | | |
864 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
0 commit comments