Commit 9a916c4
fix(publish): treat an empty patch.diff as a close, not a broken contribution (#95)
The close-disposition guard checked `patch.diff.is_file()` but not its
content. A verify-first close can leave a 0-byte (or whitespace-only)
patch.diff behind — `is_file()` let it past the guard, after which
`git apply` was a no-op and the commit failed with "nothing to commit",
aborting publish and leaving an empty local fix/ branch.
Fold an emptiness check into the existing guard so a present-but-empty
patch.diff short-circuits to the same non-fatal return 0 as a missing one.
Add a red->green regression over both empty shapes (0-byte and
whitespace-only), each of which the state machine reads as past-Do
(COMPLETE) and so reaches publish.
Closes #95.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Eduard Ralph <15236434+eduralph@users.noreply.github.com>1 parent 7777f76 commit 9a916c4
2 files changed
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
133 | 154 | | |
134 | 155 | | |
135 | 156 | | |
| |||
0 commit comments