feat(automation): couple scheduler triggering to LCM session activity#218
Conversation
The scheduler previously ran memory_curator/session_reflector/skill_writer on blind wall-clock intervals, and min_idle_secs measured time since the task's own last run rather than real user inactivity. Read the newest session_messages timestamp as a per-tick activity signal so min_idle_secs gates on true idle, and skip session_reflector/skill_writer with a new no_new_session_activity reason when nothing was ingested since their last successful run; the scheduler status API additively reports last_session_activity.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ffb28b5fce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
min_idle_secson newest LCM session-message activity instead of task run history.session_reflectorandskill_writerscheduler ticks withno_new_session_activitywhen no fresh session evidence landed since their last successful run.Test Plan
TMPDIR=/home/zack/.cache/tmp-r3-activity CARGO_TARGET_DIR=/home/zack/.cache/tracedecay-target-r3-activity cargo test --test automation_runner_test schedulerTMPDIR=/home/zack/.cache/tmp-r3-activity CARGO_TARGET_DIR=/home/zack/.cache/tracedecay-target-r3-activity cargo test --test automation_runner_test runnerTMPDIR=/home/zack/.cache/tmp-r3-activity CARGO_TARGET_DIR=/home/zack/.cache/tracedecay-target-r3-activity cargo test --test dashboard_api_test automation_config_is_dashboard_controllable_and_persistentTMPDIR=/home/zack/.cache/tmp-r3-activity CARGO_TARGET_DIR=/home/zack/.cache/tracedecay-target-r3-activity cargo test --test dashboard_api_test dashboard_session_and_skill_runs_emit_activity_when_evidence_is_unavailableTMPDIR=/home/zack/.cache/tmp-r3-activity CARGO_TARGET_DIR=/home/zack/.cache/tracedecay-target-r3-activity cargo checkNote: an earlier isolated build under
/scratch/cargo-target-r3-activityfailed before tests because/scratch/tmpwas full while compiling bundled SQLite; reran successfully using home-backed temp and target directories.