5.3 KiB
P05-OIDC-08-A01 — Normalized Compose Runtime-Field RCA & Synthetic Contract Acceptance
Date: 2026-11-23 (Asia/Dhaka)
Approved baseline: f3528841f444d1bc119bc067db2e044269141555; Gitea main matched before changes.
Prior tested source: 2ca1b4493bd47209d0c7eabf7453feaeb1f5174a
Prior CI: Run #101, Job #217 completed/failure; docker compose config --quiet PASS, strict normalized Compose service validator ZITPLANE_P08_FAIL_CLOSED_RUNTIME_BEHAVIOR FAIL, all original 25 negative fixtures NOT EXECUTED, manual workflow/no-resource-action check PASS and runner job cleanup observed. Previously accepted imported custom Login V2 Run #99 remains SUCCESS.
PRE-SOURCE-CHANGE Scope Lock — USER APPROVED
MUST commit this note before modifying code.
SOURCE WRITE EXACT:
tests/ci/production_contract/validate.pyONLY.
DOCUMENTATION WRITE:
notes/**- relevant
project/** - relevant
docs/** - associated README/MINIFEST entries only if necessary.
STRICT READ-ONLY: auth/**, users/**, core/**, all deployment/** (including unchanged synthetic production-contract/** and dev Compose), all existing Gitea workflows, tests/** except the one validator source and necessary existing associated README/MINIFEST, package manifests/lockfiles, runner configuration, VPS, DNS, Coolify, Cloudflare, SSL, production secrets/infrastructure and unrelated files. Preserve untracked AI_INSTRUCTIONS.md. No local app builds/tests or local Compose execution, Docker up/run/build/pull, real DNS/network endpoints or users, new secrets, image registry, production deploy, tags/releases.
Evidence-first RCA and exact design
Verified from original source (read-only): validate_compose() rejects any normalized service dictionary containing one or more of build, command, entrypoint, configs; then a second exact-key allowlist rejects all unknown service keys. Thus it is certain the Run #101 failure arose from at least one of these four fields being present in the docker compose config --format json output for a service, but the actual offending field and value/type were NOT logged in Run #101. Gitea fixture Compose source contains no explicit build/command/entrypoint/configs directives and all image refs are synthetic.invalid, replicas zero. This is suggestive of an inert normalization default, not proof of its precise field; the one approved new CI run must capture safe field-name/type/null-or-empty evidence.
Only in validate.py:
- Inspect only allowlisted field NAMES
build,command,entrypoint,configsand a sanitized TYPE/CATEGORY (NULL,EMPTY_LIST,EMPTY_STRING,LIST,DICT,STRING,NUMBER,OTHER), never raw values, arbitrary keys, environment, credentials, original JSON, URL, tokens or secret references. Print fixed safe diagnostics before applying the field-specific fail-closed gate, keyed to known five service IDs. Unknown field names are not echoed. - Support only non-executable Compose-normalized optional
command: null,entrypoint: null,configs: nullorconfigs: []if real new CI evidence demonstrates those defaults. Do not accept anybuildfield (even null) without separate evidence/approval. Reject all non-null command/entrypoint, and any nonempty configs, build context, unknown runtime keys, actual image deployment, ports, network escape, Docker socket, privileged mode, nonzero replicas. Enforce the remaining original exact service allowlist after excluding only verified inert fields. - Preserve exact original 25 independent negative fixtures and their classification/markers. Add four focused separate negative fixtures: nonempty
command, nonemptyentrypoint,buildand nonemptyconfigsrejected withRUNTIME_BEHAVIOR; require exact class, no false positive. Print distinct original-25 and additional-4 summary PASS markers only if all executed. - Ensure any other unexpected normalized field still fails closed; do not relax policy schema, OIDC issuer/callback/PKCE, Login/Console/API h2c, trust-boundary Host/forwarded headers, secrets, zero replicas, private networks, no published ports or workflow safety.
- Perform one focused source/diff/security audit before dispatch; commit and push exact tested source to Gitea
main. - Exactly ONE new separately approved manual
p05-production-contract-dry-run.ymlGitea run; verifydocker compose configstructural 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. - Documentation-only closure:
notes/project/docs+ associated README/MINIFEST, one cumulative exact scope/inventory security audit, remotemainSHA 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.