feat(experiments): add scheduler integration (#1317)#1349
Merged
Conversation
…1317) Wire ExperimentEngine into the scheduler as a new TaskKind::Experiment with non-blocking execution via tokio::spawn and tokio::select! for graceful shutdown propagation. Scheduled runs use ExperimentSource::Scheduled tagging, separate wall-time limits, and an AtomicBool guard to prevent overlapping sessions.
Update mdbook pages (experiments, scheduler, daemon, feature-flags, configuration) and README files (root, zeph-core, zeph-scheduler) to document the new TaskKind::Experiment, ExperimentSchedule.max_wall_time_secs, cron-based scheduled runs, and overlap guard behavior.
The mock feature flag was removed in #1346 but the module remains unconditionally available. Remove the dead cfg gate to fix CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TaskKind::Experimentto zeph-scheduler andScheduledTaskKind::Experimentto config typesExperimentTaskHandlerin root binary with non-blocking execution (tokio::spawn+tokio::select!for shutdown)bootstrap_scheduler()when bothschedulerandexperimentsfeatures enabledExperimentEngine::with_source()builder to tag scheduled runs asExperimentSource::Scheduledmax_wall_time_secstoExperimentSchedule(default 1800s) for background run limitsAtomicBoolrunning guard prevents overlapping experiment sessionsBenchmarkSet::from_filewrapped inspawn_blockingto avoid blocking async runtimeVariationGeneratortrait now requiresSync;Random::rngwrapped inMutexCloses #1317
Part of epic #1312 (Phase 5/6)
Test plan
cargo nextest run --features full)cargo clippy --workspace --features full -- -D warningscleancargo +nightly fmt --checkcleanconfig/testing.toml+[experiments.schedule]enabled