feat(gateway): C8 PM-decision gate windowed satisfaction

_check_pm_decision_required now requires the latest journal:decision
within pm_decision_window_seconds (default 300). Older decisions no
longer satisfy the gate. Adds JournalService.latest_decision_at.

Future-tighten (out of scope): per-verb-group consumption tracking
would need persistent state — Choreographer is per-request today.
This commit is contained in:
Renn F
2026-05-12 06:27:33 +02:00
parent 89eacf028e
commit 41ef7f6b4e
38 changed files with 631 additions and 29 deletions
@@ -36,9 +36,7 @@ _MINIMAL_MANIFEST = {
@pytest.fixture()
def flow_module(
monkeypatch: pytest.MonkeyPatch, tmp_path: Path
) -> types.ModuleType:
def flow_module(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> types.ModuleType:
"""Import flow_server with minimal env vars needed for constant inspection."""
manifest_path = tmp_path / "tool-manifest.json"
manifest_path.write_text(json.dumps(_MINIMAL_MANIFEST))