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
fix(nip-fi): close F1 scheduling witness and remove empty_for_test()
Thufir pass-3 escalation items, addressed:
Item 1 — production scheduling loop witness.
Extract the inner JWKS refresh scheduling loop (sleep/due-selection +
run_jwks_refresh_step call) into run_jwks_refresh_loop<S>. The supervisor
inner task now calls this function directly; removing that call site breaks
the test. Add f1_supervisor_loop_drives_recovery_and_restores_admission
(start_paused Tokio time): spawns run_jwks_refresh_loop with a real
ProductionJwksSource<ToggleJwksFetcher>, drives warm → hard-dead → fast-retry
→ recovery, then asserts IssuerKeySource::key_set returns Some (admission
restored). Red on three mutations: (1) remove run_jwks_refresh_loop from
supervisor → cache never updates → None; (2) revert cadence logic to warm
interval → 6 s advance misses 300 s deadline → None; (3) stub
snapshot_available to false → cache never warms → None.
Item 2 — remove empty_for_test(); seal AssertionKeySet construction.
Change JwksRefreshSource::get_snapshot return type to bool
(snapshot_available). Production impl maps
ProductionJwksSource::get_snapshot(…).is_some(). Mocks return bool
directly — no AssertionKeySet construction needed outside buzz-auth.
Add ToggleJwksFetcher to buzz-auth behind cfg(any(test, feature="test-utils"))
and re-export it: the only path for downstream crates to build a
controllable ProductionJwksSource without implementing the sealed
JwksFetcher trait themselves. Delete empty_for_test() from AssertionKeySet.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
0 commit comments