You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Count one expired session once, not once per package per tick
`autosync_login_required` fired on every backoff-due tick, for every package on
the deployment — so one expiry became as many events as the user had packages,
times as many ticks as they took to log back in. Bounded by backoff, unbounded in
meaning.
The episode is per **deployment**, not per package: one expired session blocks
every package on that host, and they reach the code one per loop iteration. So
`login_episode` asks whether any other namespace is already blocked on this host
— before recording the failing one, or it would look like a continuation of
itself — and only `Began` emits. The state it reads already existed;
`login_blocked` is keyed by namespace with the host as its value.
`LoginBlock` rather than a bool, because `report_login_required(host, true)` says
nothing at a call site. The UI and log reporters take it and ignore it: they
re-render the same affordance idempotently, so nothing changes about when anyone
is *told* — only about what is counted.
Tested on the classifier rather than through `run_once`, and the reason is worth
recording: the loop prunes `login_blocked` to currently-installed namespaces on
entry, so a sibling cannot be injected without a second installed package, and
installation is not the property under test. My first attempt at a loop-level
test failed exactly there. Three cases: fresh host begins, sibling on the same
host continues, a different host begins its own. Plus one for the unattributed
case — two unknowns collapse, but an unknown must never be taken for a known
host.
`Began` is still covered end-to-end by the existing login-required tick test.
just lint 0, cargo fmt --check 0, 312 quilt-sync tests, workspace green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments