From ce9a8f8edf4ec162bae3aa087803bd57a1b33a66 Mon Sep 17 00:00:00 2001 From: tegwick Date: Mon, 28 Sep 2026 12:18:51 +0200 Subject: [PATCH] Enable verified monthly PQRST schedule and retain CI coverage Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a0e759-301a-78b1-bbc1-040ef094b12d --- Dockerfile | 2 +- k8s/gitops/runtime.yaml | 3 +-- k8s/railiance/20-runtime.yaml | 3 +-- tests/test_pqrst_monthly.py | 18 ++++++++++++++++++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 054ad05..d1e1ae9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ COPY .forgejo/workflows/image.yaml ./.forgejo/workflows/image.yaml COPY schemas/ ./schemas/ COPY k8s/ ./k8s/ COPY scripts/render_gitops.py scripts/check_gitops_promotion.py ./scripts/ -RUN uv sync --frozen --extra dev && uv run --no-sync python scripts/render_gitops.py --check --verify-frontend --verify-platform && uv run --no-sync pytest -q -p no:cacheprovider tests/test_frontend_patterns.py tests/test_frontend_monthly_review.py tests/test_repository_grant.py tests/test_instruction_evaluation.py tests/test_admin_sync_api.py tests/test_gitops_release.py tests/test_release_broker.py tests/test_release_transport.py tests/test_release_dispatch.py +RUN uv sync --frozen --extra dev && uv run --no-sync python scripts/render_gitops.py --check --verify-frontend --verify-platform && uv run --no-sync pytest -q -p no:cacheprovider tests/test_frontend_patterns.py tests/test_frontend_monthly_review.py tests/test_pqrst_monthly.py tests/test_repository_grant.py tests/test_instruction_evaluation.py tests/test_admin_sync_api.py tests/test_gitops_release.py tests/test_release_broker.py tests/test_release_transport.py tests/test_release_dispatch.py # Stage 2 — runtime image FROM python:3.12-slim@sha256:78387bc3881b8273120a12ebe6c1ab22b018ccc2c9adf565ae1ac9b536e184ea AS runtime diff --git a/k8s/gitops/runtime.yaml b/k8s/gitops/runtime.yaml index f9dad03..1673dd8 100644 --- a/k8s/gitops/runtime.yaml +++ b/k8s/gitops/runtime.yaml @@ -358,7 +358,7 @@ data: --- id: monthly-pqrst-review name: Monthly PQRST Data Review - enabled: false + enabled: true owner: pqrst-practice governance: custodian status: active @@ -367,7 +367,6 @@ data: cron_expression: "30 9 1 * *" timezone: Europe/Berlin misfire_policy: catchup_latest - catchup_window_seconds: 86400 context_sources: - type: pqrst query: monthly diff --git a/k8s/railiance/20-runtime.yaml b/k8s/railiance/20-runtime.yaml index 6031068..f511b5d 100644 --- a/k8s/railiance/20-runtime.yaml +++ b/k8s/railiance/20-runtime.yaml @@ -357,7 +357,7 @@ data: --- id: monthly-pqrst-review name: Monthly PQRST Data Review - enabled: false + enabled: true owner: pqrst-practice governance: custodian status: active @@ -366,7 +366,6 @@ data: cron_expression: "30 9 1 * *" timezone: Europe/Berlin misfire_policy: catchup_latest - catchup_window_seconds: 86400 context_sources: - type: pqrst query: monthly diff --git a/tests/test_pqrst_monthly.py b/tests/test_pqrst_monthly.py index 4e24e01..1f5ea7f 100644 --- a/tests/test_pqrst_monthly.py +++ b/tests/test_pqrst_monthly.py @@ -77,3 +77,21 @@ def test_unavailable_does_not_publish_partial_or_zero_means(monkeypatch): monkeypatch.setattr(p,'collect',lambda: (_ for _ in ()).throw(ValueError('truncated'))) r=json.loads(p.PqrstResolver().resolve('monthly',None,{})) assert r['status']=='unavailable' and r['months']==[] and r['model_calls']==0 + + +def test_projected_definition_uses_report_only_native_schedule(tmp_path): + import yaml + from activity_core.definition_parser import parse_file + root = Path(__file__).resolve().parents[1] + docs = list(yaml.safe_load_all((root / 'k8s/railiance/20-runtime.yaml').read_text())) + cm = next(x for x in docs if x and x['kind'] == 'ConfigMap' and x['metadata']['name'] == 'actcore-external-activity-definitions') + path = tmp_path / 'monthly-pqrst-review.md' + path.write_text(cm['data']['monthly-pqrst-review.md']) + definition = parse_file(path) + assert definition.trigger_config['cron_expression'] == '30 9 1 * *' + assert definition.trigger_config['timezone'] == 'Europe/Berlin' + assert definition.rules == [] + instruction = definition.instructions[0] + assert instruction['model'] == 'deterministic' + assert [sink['type'] for sink in instruction['report_sinks']] == ['working-memory', 'state-hub-progress'] + assert instruction['report_sinks'][1]['event_type'] == 'pqrst_monthly_review'