DRAFT: fix(platformctl): block auto-apply for missing compose services #288

Closed
codex wants to merge 1 commit from codex/269/meerkat-compose-guard into main
Collaborator

Canary status: missing — fire canary 3+3 manually before merge

DRAFT — prepared for post-#260 morning push. This PR is safe to review now, but should land before retrying np-meerkat-frontend F2.

Canary Context Pack

Product story

A module that exists in module.yaml but is absent from canonical compose should not enter the auto-apply lane and produce confusing runtime failures. Agents need an explicit blocker instead of rediscovering the Meerkat gap through failed smokes.

What changed

auto_apply_scope.py now parses the module's canonical compose file and repo-local include: graph, then blocks modules whose spec.runtime.compose_service is absent from that graph.

Why it changed

np-meerkat-frontend is marked as a stateless F2 candidate, but its service is not present in compose/apps/compose.yaml or included compose files. F2 already found this as a data gap. This PR turns that class of gap into a deterministic pre-apply blocker.

Files touched

  • control-plane/platformctl/ci/auto_apply_scope.py
  • control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py

Relevant context

  • #269 Meerkat follow-up.
  • #142 F2 ramp thread.
  • ADR-0018: fix root causes and prevent recurring agent-visible false fire.

Runtime evidence

No runtime mutation. Local classifier proof:

{
  "status": "blocked",
  "allowed_modules": [],
  "blockers": [
    "np-meerkat-frontend: compose_service 'np-meerkat-frontend' is missing from canonical compose graph 'compose/apps/compose.yaml'"
  ]
}

Known constraints

This does not import Meerkat into canonical compose. It only prevents auto-apply from treating missing canonical service data as deployable.

Explicit out-of-scope

  • No Meerkat compose import.
  • No route/auth decision for meerkat.pdurlej.com.
  • No production smoke.

Requested decision

Merge before retrying Meerkat F2. Then decide separately whether to import Meerkat into canonical compose, retire it, or keep it blocked.

Merge blockers

  • Any existing valid F2 candidate becomes blocked incorrectly.
  • The compose parser ignores include: and therefore sees an incomplete graph.
  • The blocker is warning-only rather than fail-closed.

Spec sources read

  • control-plane/platformctl/ci/auto_apply_scope.py — auto-apply classifier.
  • control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py — workflow/auto-apply contract tests.
  • modules/np-meerkat-frontend/module.yaml — failing module manifest.
  • compose/apps/compose.yaml, compose/base/compose.yaml, compose/core/compose.yaml — canonical compose graph.
  • prompts/codex-f2-ramp-continuation-2026-05-14.md — F2 context and #269 deferral.

Test plan

python3 -m venv /tmp/platformctl-test-venv
. /tmp/platformctl-test-venv/bin/activate
python -m pip install -q jsonschema PyYAML click httpx pytest
PYTHONPATH=control-plane pytest control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py -q
# 26 passed

PYTHONPATH=control-plane python control-plane/platformctl/ci/auto_apply_scope.py \
  --module np-meerkat-frontend \
  --json /tmp/meerkat-scope.json \
  --markdown /tmp/meerkat-scope.md \
  --fail-on-blocked
# exits 4 with missing canonical compose service blocker

Refs #269

Canary status: missing — fire canary 3+3 manually before merge DRAFT — prepared for post-#260 morning push. This PR is safe to review now, but should land before retrying `np-meerkat-frontend` F2. ## Canary Context Pack ### Product story A module that exists in `module.yaml` but is absent from canonical compose should not enter the auto-apply lane and produce confusing runtime failures. Agents need an explicit blocker instead of rediscovering the Meerkat gap through failed smokes. ### What changed `auto_apply_scope.py` now parses the module's canonical compose file and repo-local `include:` graph, then blocks modules whose `spec.runtime.compose_service` is absent from that graph. ### Why it changed `np-meerkat-frontend` is marked as a stateless F2 candidate, but its service is not present in `compose/apps/compose.yaml` or included compose files. F2 already found this as a data gap. This PR turns that class of gap into a deterministic pre-apply blocker. ### Files touched - `control-plane/platformctl/ci/auto_apply_scope.py` - `control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py` ### Relevant context - #269 Meerkat follow-up. - #142 F2 ramp thread. - ADR-0018: fix root causes and prevent recurring agent-visible false fire. ### Runtime evidence No runtime mutation. Local classifier proof: ```json { "status": "blocked", "allowed_modules": [], "blockers": [ "np-meerkat-frontend: compose_service 'np-meerkat-frontend' is missing from canonical compose graph 'compose/apps/compose.yaml'" ] } ``` ### Known constraints This does not import Meerkat into canonical compose. It only prevents auto-apply from treating missing canonical service data as deployable. ### Explicit out-of-scope - No Meerkat compose import. - No route/auth decision for `meerkat.pdurlej.com`. - No production smoke. ### Requested decision Merge before retrying Meerkat F2. Then decide separately whether to import Meerkat into canonical compose, retire it, or keep it blocked. ### Merge blockers - Any existing valid F2 candidate becomes blocked incorrectly. - The compose parser ignores `include:` and therefore sees an incomplete graph. - The blocker is warning-only rather than fail-closed. ## Spec sources read - `control-plane/platformctl/ci/auto_apply_scope.py` — auto-apply classifier. - `control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py` — workflow/auto-apply contract tests. - `modules/np-meerkat-frontend/module.yaml` — failing module manifest. - `compose/apps/compose.yaml`, `compose/base/compose.yaml`, `compose/core/compose.yaml` — canonical compose graph. - `prompts/codex-f2-ramp-continuation-2026-05-14.md` — F2 context and #269 deferral. ## Test plan ```bash python3 -m venv /tmp/platformctl-test-venv . /tmp/platformctl-test-venv/bin/activate python -m pip install -q jsonschema PyYAML click httpx pytest PYTHONPATH=control-plane pytest control-plane/platformctl/tests/test_forgejo_ci_scripts_contract.py -q # 26 passed PYTHONPATH=control-plane python control-plane/platformctl/ci/auto_apply_scope.py \ --module np-meerkat-frontend \ --json /tmp/meerkat-scope.json \ --markdown /tmp/meerkat-scope.md \ --fail-on-blocked # exits 4 with missing canonical compose service blocker ``` Refs #269
fix(platformctl): block auto-apply for missing compose services
All checks were successful
canary-required / collect-diff (pull_request) Successful in 3s
infra-docs-drift / docs-drift (pull_request) Successful in 3s
platformctl plan / auto-apply scope (pull_request) Successful in 19s
pyfallow / Pyfallow gate (control-plane) (pull_request) Successful in 17s
python-ci / Python 3.11 (pull_request) Successful in 36s
python-ci / Python 3.12 (pull_request) Successful in 37s
python-ci / Python 3.13 (pull_request) Successful in 36s
workflow-lint / lint (pull_request) Successful in 4s
base-is-main / guard (pull_request) Successful in 1s
canary-required / canary (pull_request) Successful in 12s
c6a7003a7b
Author
Collaborator

Fork D triage — closing superseded

Role: executor
Decision: close, no rewrite.

The original idea is valid, but it is already represented on current main: control-plane/platformctl/ci/auto_apply_scope.py now checks canonical compose membership via compose_service_exists(...), including compose includes, and the test suite covers the missing-canonical-compose-service blocker.

This branch is stale/non-mergeable and would regress newer F3/stateful backup override logic if merged. A fresh PR is not needed for the Meerkat/missing-compose guard.

No production mutation performed. Closing as superseded.

## Fork D triage — closing superseded **Role:** executor **Decision:** close, no rewrite. The original idea is valid, but it is already represented on current `main`: `control-plane/platformctl/ci/auto_apply_scope.py` now checks canonical compose membership via `compose_service_exists(...)`, including compose includes, and the test suite covers the missing-canonical-compose-service blocker. This branch is stale/non-mergeable and would regress newer F3/stateful backup override logic if merged. A fresh PR is not needed for the Meerkat/missing-compose guard. No production mutation performed. Closing as superseded.
codex closed this pull request 2026-05-24 08:00:00 +02:00
Some checks are pending
canary-required / collect-diff (pull_request) Successful in 3s
infra-docs-drift / docs-drift (pull_request) Successful in 3s
platformctl plan / auto-apply scope (pull_request) Successful in 19s
pyfallow / Pyfallow gate (control-plane) (pull_request) Successful in 17s
python-ci / Python 3.11 (pull_request) Successful in 36s
python-ci / Python 3.12 (pull_request) Successful in 37s
python-ci / Python 3.13 (pull_request) Successful in 36s
workflow-lint / lint (pull_request) Successful in 4s
base-is-main / guard (pull_request) Successful in 1s
Required
Details
canary-required / canary (pull_request) Successful in 12s
patchwarden-pr-sanity / sanity (pull_request)
Required

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pdurlej/platform!288
No description provided.