docs(oidc): record Run 103 zero-replica verified and unknown extra deploy-field blocker

This commit is contained in:
victorsteele428 committed 2026-11-23 13:13:04 +00:00
1 parent 45a2edb854
commit f9ad59e554
2 files changed
+78 -1

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
# P05-OIDC-08-A02 — Docker Compose Zero-Replica Forensic Acceptance
**CI outcome:** [Gitea Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103), Job #219 **COMPLETED FAILURE** on tested source `45a2edb854acd98546e60a68482075bc5f742bd2`, exactly one approved dry-run. The existing zero-replica source is non-deployable synthetic configuration, not actual production.
## Precisely observed
Run #102 had established null `command`/`entrypoint` normalized defaults, but zero-replica normalization was unknown. A02 added safe name/type/classification diagnostics and an exact read-only check of the five **`deploy.replicas: 0` source declarations**.
Run #103 printed `ZITPLANE_P08_SOURCE_ALL_FIVE_REPLICAS_ZERO_PASS`; each of the five normalized `deploy` mappings was an object containing **integer `replicas: 0`**, so missing or nonzero replica is *not* the cause. But each deploy mapping also contained **additional unknown fields**. The allowlist rejected them with `ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED`; **their names and values were not logged and must not be invented**.
| Verification | Run #103 |
| --- | --- |
| Static Compose config (no application startup) | **PASS** |
| Five tracked source declarations `replicas: 0` | **PASS** |
| Five normalized `replicas` each integer zero | **VERIFIED** |
| Extra normalized deploy fields on all five | **PRESENT, exact names/types UNKNOWN** |
| Strict deploy-field security gate | **FAIL** |
| Original 25 invalid fixture checks | **NOT EXECUTED** |
| Runtime four negative checks | **NOT EXECUTED** |
| Replica three negative checks | **NOT EXECUTED** |
| Manual-only/no-resource-action workflow check | **PASS** |
| Runner task container/two volumes/network cleanup | **PASS** |
| Real DNS/TLS/production deployment/secrets/real users | **NOT EXECUTED** |
**No source patch or second CI run occurred after this failure.** The unchanged `synthetic.invalid` images, zero-replica fixture and placeholder secrets are *not deployable*. Do not run `docker compose up`, image pulls, builds or registry publishing. The previously accepted custom Login V2 [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) remains a separate disposable login acceptance, not a public site.
**Next independently approved P05-OIDC-08-A03:** the only source edit may be `tests/ci/production_contract/validate.py`. Safely identify normalized `deploy` additional keys and harmless default shapes, accept only evidence-proven inert metadata, reject all deployment-capable options, then verify the original 25 plus four runtime plus three replica negative fixtures in one new Gitea CI dry-run. Exact source/security Scope Lock: [notes/P05-OIDC-08-A02.md](../notes/P05-OIDC-08-A02.md).
+51 -1
View File
@@ -27,4 +27,54 @@
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**. 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. 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. ## Terminal Gitea CI — One-run A02 acceptance and forensic root-cause narrowing
**Pre-source Scope Lock committed FIRST:** `798f87864414c81ecf50b9fc58f078ac338e5747`. The only source modification was `tests/ci/production_contract/validate.py` in tested SHA `45a2edb854acd98546e60a68482075bc5f742bd2`; manual workflow, Compose YAML, routing-policy JSON, all other application/CI files and production resources unchanged. Pre-CI exact scope/security audit confirmed only the new A02 note and approved validator changed; original 25, runtime four and new three replica negatives present in source. No local tests/builds or independent Docker environment execution.
**Exactly one manual CI run:** [Gitea Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103), Job #219, immutable source `45a2edb854acd98546e60a68482075bc5f742bd2`. Terminal **`completed/failure`**; 2026-11-23T13:10:43Z to 13:11:07Z. Step #0 toolchain SUCCESS, #1 checkout SUCCESS, #2 static Compose+validator FAILURE, #3 `always()` workflow-safety SUCCESS. No rerun, no post-dispatch code edit, no production/service startup.
| Acceptance checkpoint | Terminal evidence (PASS / FAIL / NOT EXECUTED) |
| --- | --- |
| `docker compose config --quiet` syntax/shape validation | **PASS** `ZITPLANE_P08_COMPOSE_STATIC_CONFIG_PASS` |
| Source fixture original five `deploy.replicas: 0` declarations | **PASS** `ZITPLANE_P08_SOURCE_ALL_FIVE_REPLICAS_ZERO_PASS` |
| Docker-normalized inert `command: null` and `entrypoint: null` in five synthetic services | **VERIFIED** with the 10 allowlisted field/type-only markers from A01, unchanged |
| Actual normalized `deploy` mapping for five services | **VERIFIED** via `ZITPLANE_P08_NORMALIZED_DEPLOY_*_OBJECT` — each is a nonempty object |
| Actual normalized `deploy.replicas` for five services | **VERIFIED** via `ZITPLANE_P08_NORMALIZED_DEPLOY_*_REPLICAS_INT_ZERO` — all integer 0, no missing/string/nonzero |
| Additional normalized `deploy` keys | **VERIFIED PRESENT** via `ZITPLANE_P08_NORMALIZED_DEPLOY_*_UNEXPECTED_FIELDS_PRESENT` on **all five**; exact names, safe type, values and behavioral effects **UNKNOWN** (not logged) |
| Strict normalized deployment safety allowlist | **FAIL** `ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED`; unexpected extra deploy keys, not zero-replica mismatch |
| Synthetic canonical HTTPS issuer/callback, h2c Login/Console/API, headers, private network, no-port/secret final success markers | **NOT REACHED / NOT INDEPENDENTLY VERIFIED** after early fail |
| Original 25 negative fixtures | **NOT EXECUTED** (source present, validator never entered `negative_cases()`) |
| Four nonempty runtime field negative fixtures | **NOT EXECUTED** |
| Three additional string/bool/extra-deploy replica negative fixtures | **NOT EXECUTED** |
| Workflow manual-only/no Docker lifecycle action configuration | **PASS** `ZITPLANE_P08_MANUAL_ONLY_NO_RESOURCE_ACTIONS_CONFIGURED_PASS` during run and in `always()` step |
| Gitea ephemeral job resources removed | **PASS** in terminal job log: task container, its two volumes and task network removed; does NOT inspect production |
| Live production DNS, HTTPS/TLS, master key, PATs, images, Console/MFA/SSO, backup/restore, users or deployment | **NOT EXECUTED / OUT OF SCOPE** |
### What this resolves, and what remains unknown
**A02 actually settled the Run #102 replicas ambiguity:** The unchanged source explicitly requests five numeric zero replicas, and the normalized Compose JSON **retains all five as integer 0**. The `DEPLOY_DISABLED` block now has a much narrower proven cause: **additional top-level fields inside each normalized `deploy` object**, not missing or nonzero replicas. The current exact-key validator restricts `set(deploy)` to subset `{"replicas"}`, so it correctly fails closed when the additional keys appear. **No actual extra deploy key name or semantics were measured**. Do not assume `resources`, `restart_policy`, `placement`, `mode` or any other particular key. Do not accept unknown deploy fields or reinterpret a different deployment mode as inert.
**A02 result:** partial RCA PASS (source=0 and normalized=integer zero), full static contract CI **FAILED**; all 32 invalid fixtures (25+4+3) **NOT EXECUTED**. The existing successful [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) imported Login V2 custom-source *disposable HTTP localhost* browser OIDC success stands separately. Nothing public/production is verified.
### Prioritized remaining blockers
- **P0 / next CI:** identify exact additional Compose-normalized `deploy` field names, allowlisted safe types/empty-vs-nonempty, evaluate whether truly inert and fail closed on dangerous settings; reverify the full positive static contract and 25+4+3 invalid fixtures. **Do not change Compose/YAML or existing workflow.**
- **P0 / later production phases:** immutable source-built image provenance and current dependency security, secure master-key/PAT/client-secret custody and encrypted PostgreSQL backup/restore/break-glass, canonical real HTTPS ingress/issuer/h2c and strict cookies/redirects.
- **P1 / separate acceptance:** Admin Console cutover/recovery, real MFA/passkeys/SMTP and multi-app SSO. Not bundled into this static contract RCA.
### Proposed next exact Scope Lock — P05-OIDC-08-A03 (SEPARATE APPROVAL REQUIRED)
**Title:** Safe Extra `deploy` Normalization RCA & Complete Static Security Contract Gate.
**Baseline:** final A02 documentation closure Gitea SHA (verify and copy in approval). Prior tested source `45a2edb854acd98546e60a68482075bc5f742bd2`, existing Run #103 / Job #219 `completed/failure`.
1. **Commit `notes/P05-OIDC-08-A03.md` first**, with approved baseline and exact read/write security scope, before new source edit.
2. **SOURCE WRITE ONLY** `tests/ci/production_contract/validate.py`. **DOCS WRITE** `notes/**`, relevant `project/**`, `docs/**` and necessary associated README/MINIFEST. All `deployment/**`, existing `.gitea/workflows/**`, `auth/**`, `users/**`, `core/**`, other `tests/**`, manifests/locks, runner settings, live DNS/VPS/Coolify/SSL/secrets and unrelated files strictly **READ ONLY**. Preserve untracked `AI_INSTRUCTIONS.md`.
3. Add strictly safe diagnostics of the **extra normalized `deploy` field names** from a predefined finite allowlist of known Compose deployment metadata and only type/empty/nonempty categories; unknown keys must be classified as **UNKNOWN_KEY_PRESENT**, never printed. Do not print raw JSON, values, arbitrary key names, credentials, URLs, Host headers or secrets. The actual names/types from Run #103 are **unknown** now.
4. Verify canonical raw source still has exactly five `replicas: 0` and no other deployment directives, with normalized five true integer zero replicas. **Only if grounded in evidence** approve specifically named **semantically inert** Compose-added default fields (and safe shapes) while rejecting deployment-capable nonempty placement/mode/resources/update/restart/replica behavior. Do not broadly allow all `deploy` keys or remove `DEPLOY_DISABLED`.
5. Preserve original **25**, runtime **4**, replica **3** targeted negative checks and strengthen with an explicit nonempty/unknown-extra deploy-key rejection fixture (only if necessary). Reject Docker lifecycle, unsafe ingress/headers, missing secrets, altered issuer/callback, real images, public ports or mutable app security policies.
6. Perform one focused source/security/diff audit, commit/push tested SHA and dispatch **exactly one independently approved** manual `p05-production-contract-dry-run.yml` Gitea run; record source static parse, positive issuer/route/headers/secrets/private network/zero replicas, 25+4+3 (and any extra) negative fixtures and `always()` workflow safety as PASS/FAIL/NOT EXECUTED. If fails, stop; no repeated CI, no post-run source patch.
7. Synchronize notes/project/docs and associated manifests, one cumulative exact diff/inventory/secret audit, push documentation and verify remote SHA. No local app test, service startup, DNS/TLS/production data, secret generation, registry, tag or release.
**No A03 implementation without separate user approval.**