docs(oidc): lock A02 zero-replica RCA scope before validator changes
This commit is contained in:
1 parent
eaf299f36f
commit
798f878644
1 file changed
+30
@@ -0,0 +1,30 @@
|
||||
# P05-OIDC-08-A02 — Docker Compose Normalized Zero-Replica RCA & Full Synthetic Contract Acceptance
|
||||
|
||||
**Date:** 2026-11-23 (Asia/Dhaka).
|
||||
**Approved immutable baseline:** `eaf299f36ff12e625657521f97bd1d269904eaec`, live Gitea `main` independently matched.
|
||||
**Previous CI:** [Gitea Run #102](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/102), Job #218 `completed/failure`, source-tested `07c91ea5bcb2037e3c7b76261e1eb106b49d223f`. Synthetic Compose `config --quiet` PASS, all five services emitted safe `command: null` and `entrypoint: null`, previous `RUNTIME_BEHAVIOR` blocker resolved, next `ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED` FAIL. Original 25 and four new runtime negative fixtures NOT EXECUTED; manual-only/no Docker resource action policy PASS, Gitea task cleanup PASS.
|
||||
**Prior real login acceptance:** imported source-built Login V2 [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) separate disposable OIDC success, unchanged; not production authentication.
|
||||
**Initial tracked file inventory:** 785; untracked root `AI_INSTRUCTIONS.md` must remain untouched.
|
||||
|
||||
## Pre-source-change exact Scope Lock (user APPROVED)
|
||||
|
||||
**FIRST WRITE:** commit `notes/P05-OIDC-08-A02.md` **before any source edit**.
|
||||
|
||||
**SOURCE WRITE (EXACT, only):** `tests/ci/production_contract/validate.py`. Do not change the unchanged declarative fixture `deployment/production-contract/compose.ci.yaml`, `routing-policy.json`, original manual workflow, or any other source.
|
||||
|
||||
**DOCUMENTATION WRITE:** `notes/**`, relevant `project/**`, `docs/**`, and necessary associated existing `README.md`/`MINIFEST.md` files.
|
||||
|
||||
**STRICT READ-ONLY:** `auth/**`, `users/**`, `core/**`, all `deployment/**`, all existing `.gitea/workflows/**`, all `tests/**` except the approved validator and associated documentation, all package manifests/lockfiles, runner setup, live DNS/VPS/Coolify/Cloudflare/SSL, production secrets/infrastructure, unrelated files and untracked `AI_INSTRUCTIONS.md`.
|
||||
|
||||
**PROHIBITED:** local application builds/tests, Docker Compose `up`/`run`/`build`/`pull`, service startup or image publish, real DNS/TLS queries, production secret or user creation, registration, production deployment, tags/releases, repeated CI dispatch or post-run source patch. This is a synthetic source-based static contract only.
|
||||
|
||||
## Evidence and implementation gate
|
||||
|
||||
1. First inspect read-only the prior validator, unchanged synthetic YAML/JSON, workflow and previous Run #102. The checked-in YAML `compose.ci.yaml` explicitly declares `deploy:\n replicas: 0` in **each of five** service blocks (`ingress-policy`, `zitadel-api`, `zitadel-login`, `account`, `postgres`). Its actual Docker Compose JSON normalization of those declarations is **UNKNOWN** before this phase's approved one-shot CI.
|
||||
2. Modify **only** the validator to emit sanitized, allowlisted service identifiers and safe `deploy` presence/object shape, `replicas` present/missing and type/classified zero/nonzero values; no arbitrary keys, input values, URLs, environments, secrets, full JSON or unsafe logs. Reuse the previously approved safe null runtime-field diagnostics.
|
||||
3. Verify raw synthetic YAML **read-only from the tracked repository** for *exactly* five canonical service blocks, **one** exact `deploy: replicas: 0` per block and no additional replica entries. Require a separate normalized JSON security check, which can accept **only** an explicitly verified harmless omission of a zero in this known fixture if Compose normalization drops it. Do not generally interpret missing replica as safe for arbitrary Compose files; no broad bypass. A normalized nonzero integer/string/bool, extra deployment keys, unfamiliar field, deployable image, nonempty command/entrypoint/config, build, privileged access, Docker socket, published port, wrong network or missing secret must fail closed.
|
||||
4. Preserve all existing **25** original negative fixtures and **4** runtime negative fixtures. Add a focused explicit nonzero replica mutation (if needed), strict expected `DEPLOY_DISABLED` failure class and safe positive static markers.
|
||||
5. Focused pre-CI exact source/security diff audit, commit and push the source; **exactly one separately approved** existing manual `p05-production-contract-dry-run.yml` Gitea CI run on that SHA. Validate `docker compose config --quiet`, policy positive checks (issuer/callback, Login V2/Console/API h2c, Host/Forwarded, private network/no ports/secret refs), all original 25 and four new negatives plus zero-replica negative, manual-only workflow safety and runner-owned task cleanup. On failure, stop, document actual evidence and propose a separately approved narrow correction, **no rerun**.
|
||||
6. Synchronize notes/project/docs, appropriate README/MINIFEST/inventory, perform one cumulative scope/secret/diff audit, commit/push documentation and verify exact remote Gitea `main` SHA. Report **PASS/FAIL/NOT EXECUTED**; documentation SHA is not the CI source-tested SHA.
|
||||
|
||||
**Before source edit:** exact normalized `deploy.replicas` value/type remains UNKNOWN, source fixture declares five zeroes. Runtime TLS/DNS/MFA/SSO/prod secrets and deployment remain UNVERIFIED and out of scope.
|
||||
Reference in new issue
Block a user