Repository navigation
test(server): pin the tailnet identity read after the Node probe - #1400
Conversation
#1384 started the first tailnet identity read before the PTY sidecar's Node probe, a spawnSync that can hold the thread longer than the read's own timeout; #1393 moved it back. Nothing tested that order. The sidecar option now also takes a probe to run in place of the real one, and startup-order.test.ts records the probe and the identity read and expects the probe first. With the read moved back before createCore, it fails. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
This answers one open question from the
server/index.tssplit: what keepscreateServer's start-up order from breaking. Nothing pinned it, and #1384 broke it. That PR started the first tailnet identity read before the PTY sidecar's Node probe, and #1393 moved the read back. This PR pins the order that broke.The order and why it matters
sidecarAvailable→isRealNode) is aBun.spawnSyncwith a 3 s timeout.openaccess.What changes
server/startup-order.test.ts(new). The test runscreateServerwith a probe that records itself and aTailnetIdentitySourcewhose status reader records itself. It waits for the read, then expects the probe first. I movedidentityOf(false, null)back beforecreateCore, as it was in refactor(server): route socket frames by type and build the core in createCore #1384, and the test failed with["identity read", "probe"]. With the code as it is, the test passes.sidecaroption also takes a function, a probe to run in place of the real one, the wayterminalAttachalready takes a value or a function. A boolean works exactly as before, so nothing else changes.The handoff's other order question was about the collector's first frame carrying live OmO and Claude status. It is left to
createCore's comment: nothing has broken there, and it would need a much heavier test.Verification
bun run typecheckis clean. The conventions tests pass.sidecar(conversation-push,api,usage-login) plusdevice-access(the tailnet access paths). Each ran with--rerun-each 3, onmainfirst and then on this branch: 495 pass, 0 fail onmain, 495 pass, 0 fail on the branch.bun run check fast: 4,502 pass, 0 fail, 8 skip.bun run check integration: 589 pass, 0 fail, 1 skip.🤖 Generated with Claude Code