git-reviewer 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/bin/reviewer.js +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://github.com/dheerajjha/reviewer/actions/workflows/ci.yml)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](package.json)
|
|
6
|
-
[](test/)
|
|
7
7
|
[](package.json)
|
|
8
8
|
|
|
9
9
|
When an agent writes the code, reading it becomes the bottleneck — and the tool
|
|
@@ -290,7 +290,7 @@ rather than a public issue.
|
|
|
290
290
|
|
|
291
291
|
```bash
|
|
292
292
|
npm install # 3 dependencies, no build step, ~6MB
|
|
293
|
-
npm test #
|
|
293
|
+
npm test # 271 tests
|
|
294
294
|
npm run test:watch
|
|
295
295
|
npm run test:coverage
|
|
296
296
|
```
|
package/bin/reviewer.js
CHANGED
|
@@ -172,6 +172,25 @@ async function main() {
|
|
|
172
172
|
// what to run next, and keeps serving.
|
|
173
173
|
const handingOff = !process.stdout.isTTY;
|
|
174
174
|
|
|
175
|
+
// One newline, now, before anything else happens.
|
|
176
|
+
//
|
|
177
|
+
// This looks pointless and is not. A reader on the other end of the pipe may
|
|
178
|
+
// give up waiting for the first byte long before there is a review to send —
|
|
179
|
+
// `claude -p` waits three seconds and then proceeds without stdin at all,
|
|
180
|
+
// printing a warning and exiting 0, so the whole thing fails silently and
|
|
181
|
+
// the agent is asked to apply a review it never received. Reviewing takes
|
|
182
|
+
// minutes, not seconds. A single byte at startup holds the stream open; the
|
|
183
|
+
// rest arrives whenever the review is submitted.
|
|
184
|
+
//
|
|
185
|
+
// Measured against claude 2.1.270: producer silent for 8s then sending the
|
|
186
|
+
// instruction, the instruction was ignored and the file left unchanged; the
|
|
187
|
+
// same producer emitting one newline first had it applied. It is a
|
|
188
|
+
// first-byte timeout, not a total one.
|
|
189
|
+
//
|
|
190
|
+
// A leading blank line costs nothing — the review is Markdown, and every
|
|
191
|
+
// other consumer of a pipe is indifferent to it.
|
|
192
|
+
if (handingOff) process.stdout.write('\n');
|
|
193
|
+
|
|
175
194
|
let handedOff = false;
|
|
176
195
|
const stop = () => {
|
|
177
196
|
server.close(() => process.exit(0));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-reviewer",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Review your coding agent's changes like a pull request — locally, with inline comments and threaded follow-ups, then hand the marked-up review back to the agent",
|
|
5
5
|
"author": "Dheeraj Jha",
|
|
6
6
|
"license": "MIT",
|