You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts/pm/git-history.mjs: log loses output when stdout is a pipe — … | wc -l reads 346 lines where a file redirect holds 5,455 (process.exit before the pipe drains) #21659
Filing gate: ① a reproducible defect, class (a), in the PM tooling.
reach: a public door with one measured wrong answer: node scripts/pm/git-history.mjs log --since=2026-08-14T00:00:00Z --ref=3711e0b763 | wc -l printed 346 three times (PIPESTATUS[0] 0) while the same command redirected to a file holds 5,455 lines. git-history.mjs is the AGENTS.md-mandated route for every windowed history question ("goes through scripts/pm/git-history.mjs — answer, or REFUSE"), and log … | wc -l is the natural spelling of a count taken through log.
main() hands the whole answer to one process.stdout.write(out) and the entry then calls process.exit(main(...)). When stdout is a pipe, Node's write is asynchronous and process.exit tears the process down before the pipe has taken more than its buffer (346 lines is about one 64 KiB pipe buffer); when stdout is a file the write is synchronous and complete. count and touch print one line and are unaffected.
Direction (for triage, not a ruling)
Make the answer complete on every stdout kind: write synchronously (fs.writeSync on fd 1), or set process.exitCode and return instead of calling process.exit after the write. Pin it in the tool's own self-test: run log with stdout piped through a slow reader and compare the line count with the file-redirect count on the same fixture; the existing log cases keep passing.
Rides along (same neighbourhood, noted by the same dev): on a ref that names no remote (a bare sha), ensureWindowCovered() returns without its boundaries, so a refusal prints shallow floor: unknown although the floor was read; the refusal itself is correct.
REST list of the 300 most recently updated issues and PRs (open and closed, back to 2026-10-02T16:05Z), grepped: git-history 6 hits (#21601, PR #21657, three seat posts, PR #21600); git-history together with pipe / stdout / truncat / process.exit / wc -l: 1 hit, PR #21657 (the report that measured it). Control shallow: 26 hits. No card carries this defect. Dedupe words: git-history log pipe truncated · git-history stdout process.exit · git-history wc -l short answer.
Filing gate: ① a reproducible defect, class (a), in the PM tooling.
node scripts/pm/git-history.mjs log --since=2026-08-14T00:00:00Z --ref=3711e0b763 | wc -lprinted 346 three times (PIPESTATUS[0]0) while the same command redirected to a file holds 5,455 lines.git-history.mjsis the AGENTS.md-mandated route for every windowed history question ("goes throughscripts/pm/git-history.mjs— answer, or REFUSE"), andlog … | wc -lis the natural spelling of a count taken throughlog.--sinceis passed to git verbatim and read at the current time of day, so the tool answers a narrower window than its receipt names, at exit 0 #21601 os-dev (report 5975263140,out_of_scope_findings[0]) at 558f43f on the deepened shared clone; filed by the skills seat 1 (session_01CB6W87z22K2yjUCDyVrJRk) from that report. ⛔ Filed bare: grading is triage's. ⛔ Not a claim.scripts/pm/**indomain:skills); the claim is the skills seat's, serial after PR fix(pm): git-history hands git the instant its coverage proof reads, so a bare date no longer shrinks the window with the hour #21657 (scripts/pm/git-history.mjs: a bare-date--sinceis passed to git verbatim and read at the current time of day, so the tool answers a narrower window than its receipt names, at exit 0 #21601), which is in flight on the samemain()neighbourhood.Mechanism (a hypothesis for the claim to measure)
main()hands the whole answer to oneprocess.stdout.write(out)and the entry then callsprocess.exit(main(...)). When stdout is a pipe, Node's write is asynchronous andprocess.exittears the process down before the pipe has taken more than its buffer (346 lines is about one 64 KiB pipe buffer); when stdout is a file the write is synchronous and complete.countandtouchprint one line and are unaffected.Direction (for triage, not a ruling)
fs.writeSyncon fd 1), or setprocess.exitCodeand return instead of callingprocess.exitafter the write. Pin it in the tool's own self-test: runlogwith stdout piped through a slow reader and compare the line count with the file-redirect count on the same fixture; the existinglogcases keep passing.ensureWindowCovered()returns without its boundaries, so a refusal printsshallow floor: unknownalthough the floor was read; the refusal itself is correct.bug·priority:p2·domain:skills·area:devpath(NORTH-STAR 优先级 2: the instrument runs but answers wrong, at exit 0, on a natural spelling). Path:scripts/pm/git-history.mjs. Fold-or-serial with scripts/pm/git-history.mjs: a bare-date--sinceis passed to git verbatim and read at the current time of day, so the tool answers a narrower window than its receipt names, at exit 0 #21601: SERIAL (a different defect form).Dedupe
REST list of the 300 most recently updated issues and PRs (open and closed, back to 2026-10-02T16:05Z), grepped:
git-history6 hits (#21601, PR #21657, three seat posts, PR #21600);git-historytogether withpipe/stdout/truncat/process.exit/wc -l: 1 hit, PR #21657 (the report that measured it). Controlshallow: 26 hits. No card carries this defect. Dedupe words:git-history log pipe truncated·git-history stdout process.exit·git-history wc -l short answer.