docs(oidc): record Run 102 normalized null-field RCA and exact zero-replica blocker

This commit is contained in:
victorsteele428 committed 2026-11-23 12:58:59 +00:00
1 parent 07c91ea5bc
commit ad9fa59812
2 files changed
+75 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
# P05-OIDC-08-A01 — Normalized Runtime-Field RCA
**Outcome:** [Gitea Run #102](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/102), Job #218 — **COMPLETED FAILURE** on tested source `07c91ea5bcb2037e3c7b76261e1eb106b49d223f`. One run only; no repeat or post-run source edit.
## Exact evidence
The previous [Run #101](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/101) failed at the normalized `RUNTIME_BEHAVIOR` field check without key-specific diagnostics. A01 updated **only** `tests/ci/production_contract/validate.py` to print allowlisted **field name and safe shape**, never values, environment variables, URLs, full JSON or secrets. It permits only null Compose-generated `command`/`entrypoint` and null/empty `configs`; actual build or executable overrides are still rejected.
Run #102 observed `command: null` and `entrypoint: null` on **all five synthetic services**, identifying the old false-positive exact cause. `docker compose config --quiet` PASS; the runtime default check then proceeded to the next **`ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED`**. This new error's precise `deploy.replicas` representation is **not known**, so **the full policy positive checks and all 29 negative fixtures were not reached**. Workflow manual-only/no Docker lifecycle action checker PASS. The Gitea runner removed its own task container, two task volumes and network.
| Check | Status |
| --- | --- |
| Exactly one source-only patch and pre-source Scope Lock | PASS |
| Static Compose config parse | PASS |
| Null command/entrypoint RCA across five services | **VERIFIED** |
| Rejecting actual executable overrides | **IMPLEMENTED, NOT CI EXECUTED** |
| Normalized zero-replica safety gate | **FAIL** |
| Canonical issuer/callback/routing/secret final success markers | **NOT EXECUTED** |
| 25 original negative + four new runtime negative tests | **NOT EXECUTED** |
| Manual-only/no resource action workflow check | PASS |
| Actual public DNS/TLS, ZITADEL human login, production deployment | **NOT EXECUTED / OUT OF SCOPE** |
**Do not run** `docker compose up/run/build/pull` on the `deployment/production-contract/compose.ci.yaml` fixture; it is deliberately non-deployable. No production SSL/HTTPS/domain/Console/MFA or release acceptance is established. Previously accepted imported source-built Login V2 [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) remains valid as disposable CI authentication evidence.
**Next recommended separately approved P05-OIDC-08-A02:** change **only** `tests/ci/production_contract/validate.py` to inspect the *normalized* `deploy.replicas` existence/type/zero category and, if safely justified by read-only synthetic source evidence, accept only inert zero-replica normalization while retaining nonzero/unsafe runtime rejection. Reverify all 29 synthetic negatives in one newly approved Gitea run. See the exact plan in [notes/P05-OIDC-08-A01.md](../notes/P05-OIDC-08-A01.md).
+50 -1
View File
@@ -33,4 +33,53 @@ Only in `validate.py`:
6. Exactly **ONE** new separately approved manual `p05-production-contract-dry-run.yml` Gitea run; verify `docker compose config` structural parse, sanitized field evidence, positive and original 25/additional 4 negative gates, `always()` workflow safety, terminal status and runner-owned task cleanup (not a claim to inspect production). **No rerun** if blocked. Note result as PASS/FAIL/NOT EXECUTED.
7. Documentation-only closure: `notes/project/docs` + associated README/MINIFEST, one cumulative exact scope/inventory security audit, remote `main` SHA verification. Distinguish **source tested SHA** from docs-final SHA. No production HTTPS DNS/SSL, real certificates, real secrets/backups, Login/Console/MFA/SSO acceptance in this scope.
**Status on scope-note creation:** implementation not yet edited; new CI not yet dispatched. Actual offending normalized key/type **UNKNOWN** until evidence from the next single run.
## Terminal one-run forensic RCA and acceptance ledger — 2026-11-23
**Approved baseline:** `f3528841f444d1bc119bc067db2e044269141555`; **scope-first commit:** `b235a39078a80464aaf01ee9fa1aca1f1f3e5c15`. **Exact edited application/CI source:** `tests/ci/production_contract/validate.py` **ONLY**. Tested source SHA `07c91ea5bcb2037e3c7b76261e1eb106b49d223f`. No existing workflow/Compose/fixture/policy/Auth.js/Login/dependency/runner edit. The one source change introduced only allowlisted-field/type diagnostics; permits **null command/entrypoint** or null/empty configs as inert, rejects ANY build and any non-null command/entrypoint/nonempty configs; preserves all 25 prior negatives and adds 4 dedicated runtime-command/build/config negative fixtures. One focused source/security diff audit passed before dispatch.
**Exactly ONE new manual Gitea run:** [Run #102](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/102), Job #218, `completed/failure`, tested `07c91ea5bcb2037e3c7b76261e1eb106b49d223f`, started 2026-11-23T12:56:43Z, terminal 12:57:04Z. Steps #0 toolchain **SUCCESS**, #1 checkout **SUCCESS**, #2 Compose/static validator **FAILURE**, #3 `always()` manual-only/no Docker resource action safety check **SUCCESS**. No extra run, rerun or post-dispatch source edit.
| Gate | Exact result and grounded evidence |
| --- | --- |
| Toolchain and immutable checkout | **PASS** steps #0 and #1 |
| `docker compose config --quiet` (synthetic only, no runtime) | **PASS**, `ZITPLANE_P08_COMPOSE_STATIC_CONFIG_PASS` |
| Original Run #101 `RUNTIME_BEHAVIOR` **root cause** | **VERIFIED** via normalized output: `command: null` and `entrypoint: null` for **all five** named synthetic services; no `build`/`configs` diagnostic markers in this run |
| Safe key/type diagnostics without values | **PASS**; ten allowlisted fixed `ZITPLANE_P08_NORMALIZED_RUNTIME_FIELD_*_COMMAND_NULL` / `*_ENTRYPOINT_NULL` markers, five services |
| Runtime default compatibility reaches subsequent gate | **PASS — narrow observation:** prior `RUNTIME_BEHAVIOR` abort was **not** repeated; execution proceeded to next gate. Does NOT establish all runtime-negative assertions PASS |
| Next normalized service zero-replica guard | **FAIL**, `ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED` |
| Exact normalized `deploy` / `replicas` field, existence, safe type and zero value | **UNKNOWN**, not included in diagnostics; do **not** assert e.g. missing replica or string `"0"` without evidence |
| Canonical HTTPS issuer/callback, Login/Console/API h2c, Host/forwarded and secret refs positive PASS markers | **NOT EXECUTED / NOT REACHED** — normalizer rejected before aggregate success markers; earlier ordering checks may have evaluated but not independently reported successful gate |
| Original 25 in-memory malformed security fixtures | **NOT EXECUTED** — `negative_cases()` never entered |
| New four nonempty command/entrypoint/build/config negatives | **NOT EXECUTED** — `negative_cases()` never entered |
| Manual workflow no Docker lifecycle commands configured | **PASS**, `ZITPLANE_P08_MANUAL_ONLY_NO_RESOURCE_ACTIONS_CONFIGURED_PASS` (both validator start and always step) |
| Runner job cleanup | **PASS in Gitea log**: runner deleted its temporary task container, two task volumes and network; **not** a production-resource inspection |
| Real DNS/TLS, issuer, Login/Console/Auth.js, secrets, backup/restore, release, MFA/SSO | **NOT EXECUTED / OUT OF SCOPE**, no production deployment |
### Confirmed actual root cause vs new blocker
The old P05-OIDC-08 **`RUNTIME_BEHAVIOR`** error was due to Compose output automatically including **`command: null` and `entrypoint: null` on each of five services**, despite the source synthetic YAML containing no explicit command/entrypoint. Run #102 diagnostic markers directly prove field names and null categories. The narrow compatibility gate accepted these inert defaults and proceeded to the next fail-closed rule. This conclusively **resolves the old field-identification RCA**, not the complete static contract acceptance.
**New blocker:** `DEPLOY_DISABLED` in `validate_compose()`, whose current code checks each normalized service's `deploy` mapping contains an exact int `replicas == 0` and no other keys. This failure occurred **after** runtime-field acceptance, but its precise reason (e.g. service, normalized presence, type or extra metadata) is **NOT logged**, so it remains **UNKNOWN**. The static fixture YAML declares `deploy: {replicas: 0}` for all five services; do NOT infer how Docker Compose JSON represented it or relax replica safety prematurely.
**Phase outcome:** Source fix implemented, exact Run #101 blocker identified and its null-field compatibility passed in Run #102; **overall synthetic CI security acceptance FAILED**, all 29 negative fixtures **NOT EXECUTED**, no deployability or production acceptance. Previously accepted [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) source-built Login V2 **real disposable OIDC PASS** remains unchanged. P05-OIDC-07 production readiness **BLOCKED** remains unchanged.
### Proposed next separately approved exact Scope Lock — P05-OIDC-08-A02
**Title:** Docker Compose Normalized Zero-Replica RCA & Full Synthetic Contract Acceptance.
**Baseline:** final Gitea documentation-closure SHA from A01 (verify at closure); previously tested source `07c91ea5bcb2037e3c7b76261e1eb106b49d223f`, terminal failure Run #102 / Job #218.
**Write first:** new `notes/P05-OIDC-08-A02.md` with pre-source Scope Lock, commit before implementation.
**SOURCE WRITE ONLY:** `tests/ci/production_contract/validate.py` — no changes to any other source.
**Documentation WRITE:** `notes/**`, relevant `project/**`, `docs/**`, and necessary existing associated README/MINIFEST only.
**STRICT READ-ONLY:** `auth/**`, `users/**`, `core/**`, `deployment/**` including synthetic Compose/JSON and dev Compose, existing `.gitea/workflows/**`, `tests/**` other than validator, package manifests/lockfiles, runner configuration, production DNS/VPS/Coolify/Cloudflare/SSL/secrets, unrelated files and untracked `AI_INSTRUCTIONS.md`.
**Evidence-first RCA:** add allowlisted, *value-free* field name/existence/type classification in validator for **only** synthetic service `deploy`, `replicas` and any unexpected **field name from a fixed safe allowlist**, without printing raw JSON, arbitrary keys/values, commands, secret refs, hostnames or real credentials. Check raw checked-in synthetic fixture **read-only** to independently prove every intended `replicas: 0` source declaration if normalization drops zero; do not trust missing normalized replicas unless both exact fixture provenance and strict non-deployability are proven. If Compose outputs an inert normalized representation, support only that evidence-proven representation. Fail closed on **nonzero replicas**, real deployable images, build, nonempty command/entrypoint/configs, public ports, Docker socket, privileged service and unknown metadata. Do **NOT** weaken existing 25+4 negative cases.
**CI acceptance:** one focused source/security/diff audit, source commit/push, **exactly one newly authorized manual run** of unchanged `p05-production-contract-dry-run.yml`; verify safe deploy field diagnostics, static Compose parse, issuer/callback, Login/Console/API h2c routing, trusted Host/forwarding, no secrets/ports, all **original 25** and **new four** runtime negative cases, plus focused **nonzero replica** negative (only if needed) and manual workflow-safety PASS. No repeat CI on failure, no Docker application lifecycle, DNS/TLS/real production, image build/publish, secrets/users or release. Exact PASS/FAIL/NOT EXECUTED, runner cleanup, docs synchronization and final remote Gitea SHA.
**No automatic execution of next phase:** A02 requires fresh explicit user approval.