Skip to content

feat(automation): couple scheduler triggering to LCM session activity#218

Merged
ScriptedAlchemy merged 2 commits into
masterfrom
codex/activity-coupled-triggering
Jul 2, 2026
Merged

feat(automation): couple scheduler triggering to LCM session activity#218
ScriptedAlchemy merged 2 commits into
masterfrom
codex/activity-coupled-triggering

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Gate scheduler min_idle_secs on newest LCM session-message activity instead of task run history.
  • Skip session_reflector and skill_writer scheduler ticks with no_new_session_activity when no fresh session evidence landed since their last successful run.
  • Add last-session-activity visibility through scheduler status/ledger-facing paths and document the contract.

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 scheduler
  • TMPDIR=/home/zack/.cache/tmp-r3-activity CARGO_TARGET_DIR=/home/zack/.cache/tracedecay-target-r3-activity cargo test --test automation_runner_test runner
  • TMPDIR=/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_persistent
  • TMPDIR=/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_unavailable
  • TMPDIR=/home/zack/.cache/tmp-r3-activity CARGO_TARGET_DIR=/home/zack/.cache/tracedecay-target-r3-activity cargo check

Note: an earlier isolated build under /scratch/cargo-target-r3-activity failed before tests because /scratch/tmp was full while compiling bundled SQLite; reran successfully using home-backed temp and target directories.

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.
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c0cc9da

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/global_db.rs
@ScriptedAlchemy ScriptedAlchemy merged commit 36eab97 into master Jul 2, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant