fix(server): make debug-path startup receipt durable so logger.separation tests never time out on it - #674
Merged
Merged
Conversation
…e absence, env hygiene, stat-comment precision, cloud verification step)
…nds; pin LOG_LEVEL in immediate-exit probe env)
…ort-lived imports never lose it
…n new logger marker tests
…immediate-exit code in debug-log separation tests
…assertions; correct probe lifecycle comment
danshapiro
added a commit
that referenced
this pull request
Aug 22, 2026
…utput on content-wait timeouts (kata ep0f; re-applied onto #674's durable-receipt version)
danshapiro
added a commit
that referenced
this pull request
Aug 22, 2026
…l durable receipt); branch rebased onto it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
test/integration/server/logger.separation.test.tsflaked on the cloud backend with a 30s timeout waiting for theResolved debug log pathmarker line. Root cause: the marker was routed through pino's multistream intorotating-file-stream, which opens the file lazily and buffers writes — a short-lived probe process exiting before the async open completed silently discarded the line, so no file-content wait could ever see it. (The earlier 5s→30s wait widening on main only changed how long we wait for a line that was never written.)Verified empirically: the immediate-exit probe (import logger then
process.exit(0)) loses the marker 20/20 at the base commit.Fix
In
server/logger.ts, the one-time resolved-path receipt is now appended synchronously (fs.appendFileSync) duringcreateLogger(), gated onisLevelEnabled('info')to preserve the exact prior suppression semantics, with an identical JSON shape (byte-compatible with what the tests parse; nopid/hostname). The rotating stream continues to handle the ongoing verbose flow unchanged. A narrow try/catch degrades a marker write failure to a diagnostic warning instead of crashing startup.Tests
env/versionpresence/omission) andLOG_LEVEL=warnsuppression.Verification
Fixes the flake without touching any wait durations.