Reset persistent and in-memory scheduling state safely - #38
Conversation
- Clear persistent and in-memory scheduling state synchronously - Invalidate in-flight and queued version and review operations - Serialize dictionary mutations and add concurrency regression coverage
ReviewVerified locally
Overall: the core mechanism is sound. Per-environment generation counters plus environment-scoped execution keys are the right shape for making 1. Six near-identical conformance extensions (Medium)
protocol DailyScheduleBacked: AnyObject {
var dailySchedule: DailySchedule { get }
}
extension ReviewRequestExecutionControlling where Self: DailyScheduleBacked {
func reviewRequestPreflightToken(in userDefaults: SUKUserDefaults) -> SchedulingExecutionToken {
dailySchedule.executionToken(in: userDefaults)
}
// ...
}Each condition class then needs one line ( 2.
|
- Keep the update action of an already presented alert working after reset - Evaluate the version check condition before the in-progress gate so noop fires again - Rename notEligible to invalidated and separate its log from a declined condition - Capture the runtime snapshot in showUpdateAlert so its action uses that configuration - Deduplicate scheduling conformances with DailyScheduleBacked protocol extensions - Reduce SUKSchedulingStateStore to the context based API and drop ambient lookups - Document the gate lock invariant, thread local token bridge, and reset semantics - Split reset condition tests and scope scheduling tests to the development environment Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Re-review (699f626)Verified locally
All seven items from the previous round are addressed, and the two behavioral ones came with regression tests. LGTM. Previous findings
I re-checked order-independence across the suite: every test class sets its environment in New observations from this roundAll minor, none blocking.
The
|
Summary
Testing
Manual validation
Closes #15