Uh oh!
There was an error while loading. Please reload this page.
Login: wait for reconcile and report real capture state - #259
Conversation
The post-enrollment hint printed 'nothing is captured yet - run hyp attach' unconditionally and synchronously, before the daemon's first config pull. With org default config (server LLP 0043) shipped, auto-attach (LLP 0044) is the primary path, so the hint was stale on every login and pushed manual work the daemon was about to do. Trim the sink line to 'forwarding logs to <url>', then wait for the daemon's first reconcile (polling on-disk attach markers via collectHypAwareStatus) and report the truth: 'capturing <clients>' on attach, or point at 'hyp status' on timeout.
bf9fe69 to
6f135f6Comparephilcunliffe
commented
Jul 7, 2026
🔍 neutral review (Codex + Claude) — request_changesAdopted into neutral's review at the user's request. Tests green (41/41, typecheck clean) and the LLP 0063 doc edit is proper (Draft doc; appends a dated forward-ref note, preserves the interim record — no settled decision reversed). Two majors worth addressing before merge: Major 1 — false failure report on a login that actually succeeded
Major 2 — up-to-30s silent hang on the no-config / slow-pull pathThe attach-wait blocks the login for the full 30s default with zero output when the org publishes no config or the first pull is slow, then prints Minors
Heads-up: interaction with the in-flight |
… probe (PR #259 review round 1) Round-1 review fixes for the login-time client attach wait: - Major 1: guard the per-poll probe in waitForClientAttach so a transient fs error (EACCES/EMFILE/EIO) mid-poll is swallowed as not-attached-this-tick instead of crashing the command and discarding a successful enrollment. Also guard measureCacheStats in collectHypAwareStatus so the collector honors its best-effort docstring (walkForStats re-throws non-ENOENT). - Major 2: print a 'waiting for the daemon to attach clients...' line on stderr before polling so the up-to-30s wait no longer reads as a silent hang; budget named ATTACH_WAIT_DEFAULT_MS so the line and loop agree. - Minor A: replace the full-collector-per-poll with a marker-only probe (loadClientDescriptors once + probeAttachedClients per tick) so each poll is cheap and cannot throw on a cache walk. - Minor B: floor the poll sleep at 1ms so a non-positive intervalMs (exported seam only) cannot busy-spin. - Minor C: fix the stale 'deduped' test comment (Map keys, no dedup). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
philcunliffe
commented
Jul 7, 2026
🔍 neutral review round 2 (Codex + Claude) — approveRound-2 review of the fixes for the round-1 findings — head Round-1 findings — all verified resolved
Fresh bug scan (Claude): deadline/poll math correct, the One minor, non-blocking — test evidenceCodex (cat 9): the new login/wait tests stub the Verdict: Automated neutral review (Codex = independent second family). Findings only — the branch is yours; neutral hasn't modified or merged it. |
Problem
After enrollment,
hyp remote loginprinted this unconditionally and synchronously - right after provisioning the sink, before the daemon's first config pull:Two defects:
This repeatedly fooled operators into thinking a correctly configured, actively capturing fleet was broken. It also printed noisy internals (
provisioned '@hypaware/central' sink 'central' - ...).Fix
Two changes:
forwarding logs to <url>.collectHypAwareStatus, a cross-process read) and reports ground truth:capturing claude, codexonce clients attach, orno clients attached yet - check 'hyp status', or run 'hyp attach <client>' to captureon timeout (org publishes no config, or a slow pull).--no-daemonhas no reconcile to wait on, so it just prints the finish-enrolling note. A failed daemon install is reported and skips the wait.Files
src/core/cli/remote_commands.js- trimmed message;waitForClientAttachhelper (exported, injectable seam); daemon-installed path now waits then reports;enrollCentralSinkmade an injectable dep for testing.test/core/remote-login-command.test.js- updated--no-daemonassertions; added attach-reported, timeout-fallback, failed-install, and twowaitForClientAttachunit tests.llp/0063-...decision.md- dated forward-ref note recording that the server follow-up shipped and the interim hint was replaced by waiting on the reconcile (old text kept as the record; the decision is not rewritten).Checks
node --test test/core/remote-login-command.test.js- 41/41 passnpm run typecheck- clean