Repository navigation
test(review): log each fake call atomically so an aborted fake leaves no cut-off line - #722
Conversation
Quest-Claim: 814f15be3c30eb1d
… no cut-off line Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: the full diff of the test-only fix for the cut-off fake log line.
- Atomic per-call logging: each fake CLI call in
test/review.test.tswrites<µs-start>-<pid>.tmpinto theFAKE_LOGdirectory and renames it to.json, so an aborted fake leaves no partial record. - Reader:
calls()lists only.jsonfiles and sorts them. Names are fixed-width microsecond timestamps, so the lexicographic sort matches call order. - Setup:
FAKE_LOGis now a directory created insetup(). No stalecalls.logreferences or unused imports remain. - Quest file: the finished quest
quest/m0/review-test-partial-log.mdis deleted.
claude-sonnet-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughFake reviewer CLI invocations are now written to separate JSON files through temporary files that are renamed after writing. The test fixture creates a call-log directory and reads sorted JSON entries, ignoring temporary and other files. The document describing the rejected-login test plan was removed. Merge Risk:
|

Fixes the flaky rejected-login review test at its root and finishes the quest, deleting it.
Caused by
#706 is not listed: its diff only loosened the status-check count (the abort can stop the sibling's check before it logs, which is a real race) and touched neither the fake nor the log reader, so it left this defect rather than introducing it.
Summary
Each fake CLI call in
test/review.test.tsnow writes its record to its own.tmpfile in theFAKE_LOGdirectory and renames it to.jsononce whole;calls()reads only the.jsonfiles, sorted by their microsecond start time. A fake killed mid-write leaves only a.tmp, so a cut-off line can no longer reachJSON.parse. #706's1..2bound on status checks stays: that count is a real race (the abort may stop the sibling before it spawns or logs), not a flake, and the reproduction below hit a different failure.No public API or wire change; test code only. Dropped: the shared
calls.logfile.test/agent.test.tshas a similar append-only fake log, left alone since nothing kills its fakes mid-write.Validation
a login the API rejects fails as logged outcases withSyntaxError: JSON Parse error: Expected '}'ats.calls()(the reported cut-off line)..tmp), all five cases pass.test/review.test.tspassed 93/93 three runs in a row;just checkandjust testpass.Follow-ups
None.
Models
Size: XS
Implementer: Claude Code, claude-sonnet-5-5, high effort
(Written by Sonnet 5.5 with high effort)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 9374666
Base: origin/main at 4ab5dae
Risk: low,
Only test fake logging and a development plan change, so any breakage is confined to the test suite and a revert fully undoes it without affecting users or dependent repositories.Classified: low by Codex, gpt-6.1-sol, low effort, session
01a1d7a1-3aea-7da3-add7-aea559e6f621Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1d7a1-4aaa-7692-9d9d-f81bd3e03f49, round 1Score: 9/10,
Atomic per-call log files address the logging race without changing existing assertions; no actionable regressions were found by inspection, though tests were not run as instructed.Rounds: 1; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1d7a1-4aaa-7502-aa1f-e2e15e7a8d1c, round 1Score: 9/10,
Per-call files and atomic rename prevent partial JSON reads, with no actionable defects found by inspection; tests were not run as instructed.Rounds: 1; findings 0: fixed 0, refuted 0, open 0
Findings: none