Skip to content

Feature: add scheduled Process Sentinel worker#252

Merged
smithaldon1 merged 1 commit into
mainfrom
feat/issue-239-sentinel-worker-runtime
May 27, 2026
Merged

Feature: add scheduled Process Sentinel worker#252
smithaldon1 merged 1 commit into
mainfrom
feat/issue-239-sentinel-worker-runtime

Conversation

@smithaldon1

Copy link
Copy Markdown
Member

Summary

  • Add a scheduled Process Sentinel worker entrypoint that loops on a configurable interval and logs run counts.
  • Keep the existing one-shot CLI available by routing it through the shared one-shot worker helper.
  • Wire Docker Compose sentinel-worker to the new runtime with SENTINEL_RUN_INTERVAL_SECONDS and docs/test coverage.

Closes #239

Test Evidence

  • .venv/bin/python -m pytest services/process-sentinel/tests/test_worker.py: 5 passed.
  • .venv/bin/python -m pytest services/process-sentinel/tests/test_worker.py services/process-sentinel/tests/test_rules.py services/process-sentinel/tests/test_governed_recommendations.py services/process-sentinel/tests/test_process_sentinel_readme_docs.py services/simulator/tests/test_docker_compose_runtime_docs.py: 23 passed.
  • docker compose -f infra/docker/docker-compose.yml config: passed.
  • PYTHONPATH=packages/factory-events:services/simulator:services/ingestion:services/process-sentinel:services/api FACTORY_STORAGE_BACKEND=jsonl FACTORY_EVENTS_STORE=.local/storage/sentinel_worker_smoke_events.jsonl SENTINEL_STATE_DIR=.local/storage/sentinel_worker_smoke .venv/bin/python -m process_sentinel.worker --once: completed with events=0 detections=0 evidence=0 recommendations=0.
  • make test-unit: 181 passed, 2 skipped. Initial sandbox run failed on loopback socket bind; rerun with approval passed.
  • make test-integration: 104 passed, 2 skipped.
  • make test: 285 passed, 4 skipped.
  • make lint: All checks passed.
  • make typecheck: compileall completed successfully.
  • Compose smoke with Demo-Factory running separately and FIP connector-worker/sentinel-worker: both workers healthy; Sentinel logs showed repeated runs with events=260 detections=0 evidence=0 recommendations=0; Postgres count query returned events=260, detections=0, evidence=0, recommendations=0.

Docs Impact

  • Updated .env.example, Process Sentinel README, Docker Compose runtime docs, troubleshooting env list, and docs/LEARNING_LOG.md.

Follow-up Work

  • Current Demo-Factory protocol events do not yet match the legacy fill-weight/nozzle Process Sentinel rules, so the Compose smoke verifies scheduled runs over external-source events but produces no detections. New rules are explicitly out of scope for Feature: Add scheduled Process Sentinel worker #239.
  • Task: Add Compose smoke test #241 should add the end-to-end Compose smoke gate across ingestion, Sentinel, API, and Workbench.

@smithaldon1 smithaldon1 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Reviewed and approved for merge

@smithaldon1 smithaldon1 merged commit 99acf85 into main May 27, 2026
3 checks passed
@smithaldon1 smithaldon1 deleted the feat/issue-239-sentinel-worker-runtime branch May 27, 2026 15:15
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.

Feature: Add scheduled Process Sentinel worker

1 participant