Skip to content

test(guardrails): fix race in fake otari call log - #85

Merged
tbille merged 1 commit into
mainfrom
fix/guardrails-test-race
Nov 18, 2026
Merged

tbille merged 1 commit into
mainfrom
fix/guardrails-test-race

Conversation

@tbille

@tbille tbille commented Nov 18, 2026

Copy link
Copy Markdown
Member

Summary

  • The v0.7.0 publish (run 44349269027) failed on omp guardrails > checks every file of a multi-file hashline edit with SyntaxError: Unexpected non-whitespace character after JSON.
  • Cause: that test spawns one fake otari per file concurrently, and the fake appended stdin and its trailing newline in separate writes, so two payloads could end up on one line.
  • Fix: the fake reads stdin first and appends one args<TAB>payload line per call in a single write, replacing the separate args.log/stdin.log (which could also drift out of pairing).

Test plan

  • npm run check passes (256 tests)
  • test/guardrails.test.ts run 30× locally with no failures

🤖 Generated with Claude Code

…s don't interleave

The multi-file hashline edit test runs one check per file concurrently.
The fake binary appended stdin and its newline in separate writes, so on
CI two payloads could land on one line and JSON.parse failed (seen in the
v0.7.0 publish run 44349269027). Each call now appends a single
args<TAB>payload line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e46c690d-0f12-4c58-b8ce-450469de3962
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@tbille
tbille merged commit 0dec26b into main Nov 18, 2026
2 checks passed
@tbille
tbille deleted the fix/guardrails-test-race branch November 18, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant