feat(x-engine): smart spotlight cadence — daily when there's news, quiet when there isn't (#374)

CEO verdict on the blind 3-day timer: 'It should default to 1 day and
be more like... smart.' Now: interval defaults to 1 day; the cycle
skips (with logged reasons) while a spotlight draft is still awaiting
the CEO, and stretches to 3x the interval when nothing has shipped
(CHANGELOG sections via the read clone) since the last spotlight
activity — where activity is a materialized draft's seen_at or a
completed exploration's updated_at, deliberately excluding the stale-
cycle janitor's cancels. The HoM gains an explicit skip exit
(propose_feature_spotlight skip=true + reason: completes the
exploration, no draft, no seen-slug, still counts as activity), and
its spawn prompt now carries the seen ledger WITH dates, what shipped
since the last spotlight, and recently rejected drafts with the CEO's
reasons — fresh-but-unspotlighted first. Fail-open on changelog read
errors so a signal outage never starves the engine.

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
Renzo F
2026-07-09 20:59:53 +02:00
committed by GitHub
co-authored by Renn F
parent 3cb32e3c5f
commit 0450ec9e89
15 changed files with 957 additions and 39 deletions
+11
View File
@@ -10,6 +10,7 @@ from roboco.services.settings import FEATURE_FLAGS, validate_setting
_DEFAULT_INTERVAL = 1800
_DEFAULT_MAX_OPEN = 10
_DEFAULT_SPOTLIGHT_INTERVAL_SECONDS = 86400 # 1 day
def test_x_engine_disabled_by_default() -> None:
@@ -46,3 +47,13 @@ def test_x_feature_spotlight_disabled_by_default() -> None:
def test_x_feature_spotlight_flag_registered_in_feature_flags() -> None:
assert "x_feature_spotlight_enabled" in [key for key, _ in FEATURE_FLAGS]
def test_x_feature_spotlight_interval_defaults_to_one_day() -> None:
"""CEO directive: default cadence is 1 day (was 3 days) — the engine's
own smart-cadence guard stretches this to 3x when quiet instead of the
interval itself defaulting slower."""
assert (
Settings().x_feature_spotlight_interval_seconds
== _DEFAULT_SPOTLIGHT_INTERVAL_SECONDS
)