Repository navigation
test(runtime): write the probe's report aside and rename it into place - #547
Conversation
The probe service wrote its report with writeFileSync where the test polls for it, so the test could read the file after it was created and before its bytes were in it, and fail with 'Unexpected end of JSON input'. Refs #543
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
|
Review attestation: ready to merge at A push to this PR makes this attestation stale; the new head needs its own review. |
Refs #543 (item 1). Found while working on #497.
What changed
The probe service in
apps/runtime/test/service-artifact-input.spec.tswrote its report withwriteFileSync(args.report, ...)at the path the test polls. The test reads the file as soon asexistsSyncis true and parses it, so it could read the file after it was created and before its bytes were in it:The probe now writes
<report>.partialand renames it to<report>, so the report exists only once it is complete. The fix is in the writer; the test's assertions are unchanged.What stays the same
Product code, every assertion, and the other probe steps (
signalfiles are only checked for existence, never read).Verification
corepack pnpm vitest run apps/runtime/test/service-artifact-input.spec.ts, 5 runs in a row: 15/15 passed each time. (The race was intermittent and was not reproduced on demand before the fix either.)corepack pnpm verifyon this head:EPERM(packs/browser-playwright/test/driver.spec.ts,injection.spec.ts). Both pass alone (2 files, 18 tests). Recorded on Windows: runtime suites time out under parallel verify, then fail cleanup with EPERM #535.Known limitations / remaining
The e2e failures in #543 item 2 (seen only in the full Playwright run) are not addressed here; their causes are not yet found.
Docs impact
None (test only).