Repository navigation
[Bug]: Periodic reports are admitted for canonically stopped Goals #6076
Description
Preflight
- I searched existing issues and discussions for this behavior.
- This report is not an unpatched security vulnerability.
- The report and attachments contain no credentials or private/internal material.
Issue origin
Observed or reproduced in a real environment
LoopX version or commit
07eb7a1 (upstream main)
Host or runtime surface
Not host-specific
LoopX area
Control plane (goals, todos, quota, scheduler, registry, runtime)
Problem
A Goal stopped through the canonical activation owner can still admit periodic report work when its legacy top-level status remains active. The cadence capability checks only that legacy field, so it registers and invokes the turn-start hook, writes a cadence window, and can leave a pending report intent for a Goal whose automatic Turns should be paused.
Minimal reproduction
On upstream commit 07eb7a1288:
- Create a Goal with
status: active,activation.state: stopped, one registered reporter, and an enabled periodic-report calendar schedule. - Dispatch the
periodic_report.cadenceturn-start hook (for example, through the quota/turn-start path). - Observe the cadence hook is invoked and a cadence journal window is written. The delivery-subscription resolver also treats the Goal as active.
Expected behavior
A canonical activation.state: stopped Goal must not admit automatic periodic-report work. No cadence hook should be registered or invoked, no cadence window or pending report intent should be created, and standing delivery authority should resolve to no subscription. The documented activation contract says a stopped Goal projects automatic Turns as paused (docs/book/en/chapters/core-state-machines.md, “Goal activation does not mean automation is enabled”).
Actual behavior
With status: active and activation.state: stopped, the hook is invoked (invoked_count == 1) and writes a cadence journal. This was reproduced on upstream main with a local registry/runtime fixture using CPython 3.14.7 on macOS.
Sanitized diagnostics
Reproduction against upstream main: `uv run pytest -q tests/capabilities/test_periodic_report_pending_intent.py -k canonically_stopped_goal` (1 failed: expected `invoked_count == 0`, got `1`). The focused regression case uses the existing periodic-report fixture and the canonical stopped activation payload.Additional context
The collaboration admission fix in #5742 explicitly left periodic-report consumers as a separate capability-owner follow-up. This report concerns only periodic-report cadence admission and delivery authority.
Activity