231 lines
43 KiB
Markdown
231 lines
43 KiB
Markdown
# ZitPlane P05-CI-01 - Gitea Actions verification architecture
|
||
|
||
**Status:** P05-CI-01 Run #81 overall FAIL; P05-CI-02 Run #83 **3 PASS / 1 FAIL** (Account, Login, Security pass; backend proxy host-port collision). CI-only portless source correction after Run #83 remains unverified. Full OIDC and runtime acceptance pending. **Approved baseline:** `7ecf53169776cc7f08af3dde6fe4b4492acf3ea1` (2026-11-22).
|
||
|
||
## Exact job map
|
||
|
||
| Job | Runner / source | What PASS means | Not covered |
|
||
| --- | --- | --- | --- |
|
||
| `account` | `ubuntu-latest`, `node:22-bookworm`; `users/ui/` | Structural guard + `npm ci`, `tsc --noEmit`, Next standalone production build | Real login/redirect, live Account Portal |
|
||
| `login` | `ubuntu-latest`, `node:22-bookworm`; `auth/ui/v2/` | Frozen pnpm install, Nx proto/client/login build and original Login unit suite | Interactive admin/password/MFA/SSO integration |
|
||
| `security` | `ubuntu-latest`, `node:22-bookworm` | NPM and pnpm production dependency advisories at HIGH+ thresholds triaged by runner registry | License/legal or full application security proof |
|
||
| `backend` | `ubuntu-latest`, `node:22-alpine`; `deployment/docker/compose.backend.dev.yaml` read-only | Docker daemon preflight, Python helper contracts, disposable ZITADEL stack, readiness, OIDC discovery and JWKS | Portal OIDC callback, MFA, live account session, production TLS |
|
||
|
||
All jobs use the previously seen Gitea standard `ubuntu-latest` runner label; no separate runner is created or installed. A failed runner capability is a **BLOCKED** gate, never a PASS. Docker job must not run from an untrusted pull request; the workflow is `workflow_dispatch` only.
|
||
|
||
## Dependency/root cause fixes
|
||
|
||
- `auth/ui/v2/pnpm-workspace.yaml` has only the 3 actually imported packages. P03's original `pnpm-lock.yaml` retains exact `packages:/snapshots:` resolution graph; 4 missing-upstream importers were removed, 4 present importers retained.
|
||
- Account Portal package-lock v3 generated using local `npm install --package-lock-only --ignore-scripts --no-audit --no-fund --engine-strict`, **not** an install/test/build. Root package manifest matches lock manifest.
|
||
- Login CI sets up pinned pnpm `10.30.3`, runs `--frozen-lockfile` and the upstream Nx dependency graph; no upstream UI/auth logic was modified.
|
||
- Account CI uses `npm ci` only from committed lock, plus TS + production Next build. No automatically loosened package versions or npm install fallback.
|
||
- Security jobs audit dependency advisory metadata on the runner. Any failure is reported verbatim with severity/package/version; no blind package updates.
|
||
|
||
## Disposable backend safety and behavior
|
||
|
||
The P02 Compose has a fixed named network `zitplane-backend-dev-internal` and loopback-only `127.0.0.1:8080`. CI **refuses** to start if that network already exists. It generates independent random `.env` in runner checkout and uses unique Compose project name `zitplane-p05-${GITHUB_RUN_ID}`. A marker is written only after the network absence check; cleanup uses that exact Compose project, deletes its ephemeral volumes, and removes its temporary credentials. It never connects to `auth.vib.tools`, `account.vib.tools` or any production database.
|
||
|
||
`tests/ci/oidc_discovery.py` probes ready/discovery/JWKS inside disposable Docker network only, avoiding exposing admin PATs. **OIDC full user-session acceptance is explicitly NOT VERIFIED**: P05 does not provision a disposable confidential OIDC app, fake user or Session API script. A 200 readiness/discovery alone does not constitute user login, MFA, PKCE callback, protected account route or logout acceptance.
|
||
|
||
## Future gates
|
||
|
||
1. Document actual Gitea runner job results and exact failure/line in `notes/P05-CI-01.md` and `docs/P05-CI-01.md`.
|
||
2. If any job fails, keep immutable logged evidence; fix only reproduced narrow defects with separate approval if outside P05 Scope Lock.
|
||
3. Provide disposable OIDC client/user provisioning and Account Portal auth/session lifecycle tests in a narrow separately approved integration phase.
|
||
4. Production Docker/Coolify/TLS and DNS are out of scope.
|
||
|
||
Reference: `notes/P05-CI-01.md`, `docs/PHASES.md`, `.gitea/workflows/p05-ci.yml`, `tests/ci/`.
|
||
|
||
|
||
## P05-CI-02 Narrow Auth.js and CI additions
|
||
|
||
- `users/ui/src/auth.ts` `callbacks.session`: `const subject: string = typeof token.zitadelSubject === "string" ? token.zitadelSubject : "";` explicitly narrows the JWT claim. Session still sets `id` only when subject nonempty and OIDC access-token expiry is in the future. `users/ui/src/types/next-auth.d.ts` was not changed. This addresses Run #81's `TS2345` (`user.id: {}`) without a cast or altered PKCE/state/nonce.
|
||
- `tests/ci/account_negative.py` + Account job: anonymous identity API 401/no-store and protected route redirect; no fake logged-in account. `tests/ci/oidc_discovery.py`: issuer/origin/JWKS negative contracts plus actual disposable ready/discovery/JWKS. Tests are CI-only.
|
||
- `tests/ci/advisory_triage.py`: parse live npm/pnpm registry JSON into advisory IDs, package, affected range, patch availability. Prior high/critical failure threshold maintained; no dependency versions changed.
|
||
- Backend CI: after safe Docker/network preflight and startup, write one marker in **disposable Postgres database `postgres`**, restart its container, verify marker persists and ZITADEL becomes ready, then test OIDC discovery/JWKS. Always cleanup only the current CI Compose project and its volumes; failure must remain visible.
|
||
- Corrected Alpine Git checkout from P05-CI-01 is exercised by the new run. Fixed name `zitplane-backend-dev-internal` is a known isolation limitation: existing network triggers fail-closed instead of reuse.
|
||
- No full interactive user login callback, MFA, Admin Console user session or production TLS verification; separate future scope.
|
||
|
||
## Verified Gitea Run #81 and source follow-up
|
||
|
||
Initial dispatched commit `42b79362c13b9dbb07f85a58ad278742d91b1f5b`. Two PASS: Login V2 frozen reproducible install, production build and 1219/1219 upstream unit tests; dependency advisory gate at high/critical only (18 moderate findings outstanding). Two FAIL: Account Portal TS2345 Auth.js session callback type mismatch; Alpine backend actions/checkout fallback `Not found` because Git missing before checkout. The Docker runtime and full interactive OIDC flow **were not executed**.
|
||
|
||
Pre-checkout Git install inserted in the backend workflow after this failed run; this is only a **source fix** until a future run actually passes. Reference `docs/P05-CI-01.md` for job numbers and `notes/P05-CI-01.md` for the next phase defect IDs. There was no second CI run or local test.
|
||
|
||
|
||
## P05-CI-02 Run #83 final evidence and post-run portless exception
|
||
|
||
Gitea [Run #83](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/83) on SHA `c27fe3d3234d16375b962b88014cdd8733ab2fb4`: three job PASS (Account `npm ci`/typecheck/build/anonymous 401 and protected redirect; Login V2 frozen/Nx build + **1219 tests**; HIGH/CRITICAL security audit with 18 Moderate Login records and 1 Moderate Account package); Docker job FAIL after Postgres, ZITADEL API and prebuilt Login V2 reported healthy. Traefik proxy attempted to bind occupied runner TCP 8080. Always cleanup removed only job-owned containers, network and volumes; persistence and OIDC discovery were not reached.
|
||
|
||
**Only after that run**, a P05-scoped CI overlay at `tests/ci/compose.portless.override.yaml` set `proxy.ports: !reset []`, as documented by Docker Compose: https://docs.docker.com/reference/compose-file/merge/#reset-value. Every backend workflow Compose call now includes this override; a fail-closed effective-config probe rejects any inherited host port. The P02 Compose and application logic remain untouched. **Post-run override has not been CI tested.** New exact Gitea main commit is documentation/source only and must not be described as the tested Run #83 SHA.
|
||
|
||
Unresolved: one separately approved isolated backend re-verification cycle for the portless override, Postgres restart persistence and live OIDC/JWKS; distinct disposable authenticated OIDC/client/user + MFA E2E; targeted dependency-only security remediation of Moderate findings (no upgrades in P05-CI-02).
|
||
|
||
|
||
## P05-CI-03 — backend-only disposable acceptance
|
||
|
||
This is a **separate** `.gitea/workflows/p05-backend-acceptance.yml` triggered manually on Gitea `main`. It does not schedule the previous Account/ Login V2/ security jobs again.
|
||
|
||
- A short Alpine Git prerequisite precedes `actions/checkout@v4`. After checkout, only Python 3 stdlib and Docker CLI/Compose are installed in CI (not on the developer PC).
|
||
- `tests/ci/backend_acceptance.sh` accepts only a numeric `GITHUB_RUN_ID`; derives a unique Compose project `zitplane-p05-<run-id>`; refuses existing hardcoded P02 network, same project containers or volumes. An existing local `.env` or ownership marker also causes fail-closed.
|
||
- The original `deployment/docker/compose.backend.dev.yaml` is read-only; `tests/ci/compose.portless.override.yaml` removes `proxy.ports` and JSON merged configuration explicitly rejects host publishing. This isolates the shared Actions Docker host from an occupied TCP 8080.
|
||
- After source-level P02 unit contracts (CI only) and fresh ignored `.env` creation, a marker `.p05-ci-owned` is created **only after** all collision/config checks. Then `docker compose up -d --wait` runs official pinned PostgreSQL, ZITADEL API, Login V2 and Traefik images. Postgres/API/Login need `healthy`, proxy needs `running`.
|
||
- A synthetic marker row in disposable Postgres default `postgres` DB is written then validated after a database container restart and Compose health recovery.
|
||
- Existing `tests/ci/oidc_discovery.py` runs in a throwaway `python:3.12-alpine` container on the owned internal network, validates negative issuer/JWKS fixtures, real `/debug/ready`, exact OIDC issuer/metadata and a nonempty public JWKS.
|
||
- `tests/ci/backend_cleanup.sh` is run by an **always** step: it must find an ownership marker before any Docker teardown; only its Compose project is removed with `down -v`. Cleanup then checks that no owned containers, volumes or the fixed network remain. A missing marker means Docker was never started by this run and cleanup is not required; **not** a backend PASS.
|
||
|
||
This phase can verify local disposable backend runtime only. It **cannot** certify real account login, Admin Console session, MFA, global SSO logout, production TLS/Coolify or open Moderate package vulnerabilities. See `docs/P05-CI-03.md` for actual run evidence and `notes/P05-CI-03.md` for approval/scope.
|
||
|
||
|
||
## P05-CI-03 verified runtime outcome — Gitea Run #86
|
||
|
||
Gitea manual backend-only [Run #86](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/86), job #184, tested `03fb58954dec886128a4011b6121754cbcdd79ff`; **SUCCESS**. The Git checkout, isolated acceptance and always-run cleanup steps all succeeded. P02 3/3 backend contract tests, combined portless config, four service health, disposable Postgres write/restart/read marker, local ZITADEL readiness, exact issuer metadata, OIDC discovery, nonempty JWKS and malformed-input contract checks each produced real PASS markers. The CI-owned network, containers and named volumes were removed; no host TCP 8080 binding remained. Docker v29.9.3 and Compose v5.7.2 used on the runner.
|
||
|
||
This confirms **disposable backend acceptance**, not ZITADEL Console user login, Account Portal positive/authenticated callback, real MFA, global SSO, production routing or Moderate advisory remediation. The original P02 Compose and official source/lock versions remain untouched. No repeated Account/Login build/test jobs ran in P05-CI-03. Runtime outcome recorded in `notes/P05-CI-03.md` and `docs/P05-CI-03.md`; final docs-only commit is not a new tested binary/SHA.
|
||
|
||
|
||
## P05-SEC-01 — Independent frozen-build and strict dependency audit gates
|
||
|
||
Manual Gitea-only `.gitea/workflows/p05-security-acceptance.yml` has four independent jobs: Account `npm ci`/TypeScript/Next.js build plus anonymous negative route checks; official Login V2 `pnpm@10.30.3 install --frozen-lockfile`, Nx proto/client/standalone build and upstream Vitest regression; standalone Account production registry audit; standalone Login workspace production registry audit. Independent jobs prevent a remaining Moderate advisory from hiding build/test results.
|
||
|
||
Each registry job first runs `npm audit --omit=dev --audit-level=high` or `pnpm audit --prod --audit-level high` under `set -eu` to fail-closed on High/Critical. Then nonmutating JSON is collected, `tests/ci/advisory_triage.py` prints exact IDs/package/range/fix, and `tests/ci/security_advisory_gate.py` requires complete/count-consistent JSON and **zero Moderate/High/Critical**. Any Moderate is an actual failed gate, not a warning disguised as acceptance.
|
||
|
||
Only approved manifest and lockfile metadata were patched; original Login/auth/API/UI source, `pnpm-workspace.yaml`, P02 backend, Compose, real credentials and production unchanged. Two transitive glob/minimatch risks may remain because the root PNPM override configuration is outside Scope Lock and those require semver-major upgrades. See `project/DEPENDENCY-SECURITY.md` for the original 18+1 records and exact immediate parents; source state is not proof of advisory resolution until actual Gitea run.
|
||
|
||
|
||
## P05-SEC-01 Run #87 terminal job results
|
||
|
||
Manual [Run #87](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87) tested `752d243`. Account job #185 PASS; Login job #186 PASS (frozen pnpm, Nx Next 16.4.6 build and 1219 unit cases); Account security job #187 PASS at all levels with 0 findings; Login security job #188 FAIL on **two Moderate** `glob`/`minimatch` advisories (0 High/Critical). The strict `tests/ci/security_advisory_gate.py` did not suppress them, so **overall run FAILURE** is expected and correct. Full source/security acceptance remains blocked pending a separate narrow transitive dependency phase; no repeated run or application source change.
|
||
|
||
|
||
## P05-SEC-02 — focused Login-only CI acceptance mode
|
||
|
||
Existing manual `.gitea/workflows/p05-security-acceptance.yml` now offers `workflow_dispatch.inputs.login_only` (default false retains the prior full Account/Login jobs). For **this** phase dispatch **`login_only=true`**, which conditionally skips `account` and `security_account` jobs; only `login` and `security_login` should execute. No production secrets or remote identity client.
|
||
|
||
`login` starts with CI-only `python3 ../../../tests/ci/transitive_override_contract.py` for the exact seven owned parent overrides and no affected glob/minimatch lock versions, then pinned PNPM frozen install, upstream proto/client/Login standalone build and full `vitest --run` regressions. `security_login` uses existing production PNPM HIGH/CRITICAL audit and independent JSON detail + zero Moderate+ gate; **no suppression**. Both jobs must conclude SUCCESS before declaring P05-SEC-02 accepted. The historical Account zero-vulnerability proof is Gitea Run #87, **not retested** in this focused phase.
|
||
|
||
A single manual run is authorized; Git source commit/push precedes dispatch, and final evidence-only documentation commit/push follows without a second run. Source-only audit and actual runner results are distinct; see `notes/P05-SEC-02.md` and `docs/P05-SEC-02.md`.
|
||
|
||
|
||
## Run #88 and CI helper parsing defect — acceptance remains blocked
|
||
|
||
Gitea Run #88 source `66cfed5`, exact tree `9a1d2abd`, intentionally skipped Account jobs #189/#191. Login security #192 **PASS** (zero Moderate/High/Critical). Login build #190 **FAIL before frozen install** in `transitive_override_contract.py` due misclassification of existing `>=` version-range keys as parent-scoped overrides. Build/unit steps were **skipped**, not failed application regressions. Narrow post-run regex correction now explicitly accepts only `>glob` / `>minimatch`; **unverified until a newly approved run**. One focused run only; follow-up P05-SEC-02-A01 should run *only* Login frozen/build/unit with security gate, under a separately approved baseline.
|
||
|
||
|
||
## P05-SEC-02-A01 — final frozen-build acceptance scope
|
||
|
||
Run #88 (`66cfed5`) proved strict Login production vulnerability audit 0 but *did not execute* frozen PNPM install, Nx standalone build or Vitest: new CI-only `overridden()` parser previously misread `axios@>=` etc. Corrected suffix-only `>glob`/`>minimatch` version is already committed at baseline `7655dbd`; no further source/CI changes are planned.
|
||
|
||
One manual `p05-security-acceptance.yml` dispatch with `login_only=true` tests this existing code; Account build/security jobs intentionally skipped and previously accepted (Run #87). Login job: exact seven parent→child contract, PNPM v10.30.3 frozen install, Nx original proto/client/Login standalone build and upstream Vitest; Login security job: fail-closed live registry zero Moderate/High/Critical. No local tests/build/Docker or production usage; exact CI job outcomes recorded under `notes/P05-SEC-02-A01.md`. If a gate fails, this acceptance remains BLOCKED and no unapproved repeat run occurs.
|
||
|
||
|
||
## P05-SEC-02-A01 terminal acceptance — Gitea Run #89
|
||
|
||
**One** manual Gitea [Run #89](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/89) tested SHA `ff4c58ed861474061c8f045be3a9f0752caf6ca0`, 2026-11-22 16:30:28–16:34:54 UTC, **overall SUCCESS**. `login_only=true` skipped Account build/security jobs #193/#195, previously accepted in Run #87. Login job #194 **SUCCESS**: corrected exact seven-parent override source contract/lock matched (`ZITPLANE_EXACT_SEVEN_PARENT_OVERRIDES_PASS`, `ZITPLANE_GLOB_MINIMATCH_PATCHED_LOCK_CONTRACT_PASS`), PNPM 10.30.3 frozen installation (`Lockfile is up to date`, 1121 packages) PASS, official Nx proto/client/Login 16.4.6 standalone build/artifact PASS, upstream Vitest **84/84 test files, 1219/1219 unit tests PASS**. Login security job #196 **SUCCESS**: fail-closed HIGH/CRITICAL gate PASS, production registry `pnpm audit --prod` **0 Moderate/High/Critical**, `ZITPLANE_PNPM_ZERO_MODERATE_HIGH_CRITICAL_PASS`.
|
||
|
||
No new CI/auth/application/manifest/lock changes in A01; all checks were against the existing corrected validator. This closes the dependency-security/frozen-build acceptance only, **not** human OIDC login/callback, real MFA or production integration. See `notes/P05-SEC-02-A01.md` for exact markers/timestamps.
|
||
|
||
|
||
## P05-OIDC-01 — Gitea-only real OIDC browser acceptance
|
||
|
||
New manual workflow `.gitea/workflows/p05-oidc-acceptance.yml` executes **one** isolated Docker runner job. `tests/ci/oidc_e2e/run.sh` creates the unchanged P02 stack under exact numeric run ownership and no host ports; a CI-only FirstInstance IAM_OWNER machine PAT and official API provision a disposable OIDC client/user. A pinned Chromium image runs the **unmodified** Account Portal in isolated CI development mode, driving official prebuilt Login V2 and real Auth.js PKCE/state/nonce, callback, authenticated Account API/page, negatives and local logout. An `always()` step calls `tests/ci/oidc_e2e/cleanup.sh` to remove only owned browser/forwarder/secrets and invokes audited backend owned-data cleanup. The run must fail if cleanup is incomplete; no browser secrets are logged/uploaded.
|
||
|
||
**Important:** The original backend external issuer is HTTP localhost, while Account Portal production mode correctly requires HTTPS. This **CI development-origin** browser acceptance does not certify production TLS, full self-hosted login source wiring, MFA or Admin Console human login. See `project/OIDC-E2E-ARCHITECTURE.md` for individual modules and `notes/P05-OIDC-01.md` for the actual run status.
|
||
|
||
|
||
**P05-OIDC-01 real CI evidence:** Manual Gitea Run #90 (tested `cbcd60e`) had healthy 4-service portless backend PASS, **CI-only localhost:8080 namespace forwarder readiness FAIL**, no disposable OIDC project/client/user or Chromium browser launched; `always()` cleanup job step PASS, no leftover CI resources. Overall job FAILED; **not** an authenticated login test PASS. Next narrowly scoped P05-OIDC-02 must instrument/repair private forwarder lifecycle and reverify the full browser acceptance, without changing original application or backend code.
|
||
|
||
|
||
## P05-OIDC-02 scoped follow-up
|
||
|
||
New source in `tests/ci/oidc_e2e/run.sh`: test namespace-local Traefik proxy Host route before creating sidecar, resolve published `alpine/socat:1.8.1.3` to immutable digest, validate prebuilt `socat` entrypoint, create no-host-port loopback sidecar, check running state/exit plus bounded private forwarded HTTP 200. `provision.py` now treats `/debug/ready` as HTTP status-only; official management provisioning and all browser/auth assertions unchanged. Existing manual Gitea workflow and always-run owned cleanup unchanged. One separate Gitea acceptance run needed; never mark a static stage check as an actual real OIDC browser PASS.
|
||
|
||
|
||
**P05-OIDC-02 Gitea Run #91 result:** tested `4831165`, job #198 overall FAIL. All 4 services healthy PASS, no runner host port PASS, private Traefik:80 Host-route HTTP 200 PASS, prebuilt socat/digest verification PASS. The run-owned socat sidecar **exited 1** before forwarded 8080 check, so no project/client/user or Chromium/Auth.js checks executed. Mandatory cleanup PASS, no remaining owned resources. Source-only status readiness fix in `provision.py` **was not exercised**. Root cause inside sidecar unproven without redacted startup error diagnostics. Next separately approved P05-OIDC-03 limited to private CI process/diagnostics.
|
||
|
||
|
||
**P05-OIDC-03 approved CI-only source:** The existing manual workflow is unchanged. Run #91's verified socat exit 1 justifies a single-run diagnostic attempt plus a one-time deterministic, digest-pinned `python:3.12-alpine` stdlib private forwarder fallback. Only run-labeled containers, 127.0.0.1:8080 → private Traefik:80, bounded error-class diagnostics and original proxy Host HTTP 200 gate are permitted. The diagnostic/fallback happens before real provisioning; no authentication, browser or cleanup source changed. A new single Gitea run must prove all real client/user/browser/callback/session and mandatory owned cleanup checks or remain BLOCKED.
|
||
|
||
|
||
**P05-OIDC-03 queued CI evidence:** The only approved Gitea Run #93 (source `7b80f411b2981e2274d171c12596301ed757b768`) was still **QUEUED** at last inspection; job #206 has not started, so neither the socat diagnostic/Python fallback nor the browser/provisioning/cleanup ran. Do not mark technical failure/success; **runner scheduling is a pending dependency**, not a proven outage. Source audit passed, and no second dispatch occurred. Follow-up should examine **the same Run #93** terminal steps/actual cleanup and update docs, not rerun prior suites.
|
||
|
||
|
||
## P05-OIDC-03-A01 — existing Run #93 read-only queue audit (2026-11-23)
|
||
|
||
The existing `p05-oidc-acceptance.yml` manual workflow is **active** and declares one `runs-on: ubuntu-latest` job. Run #93 requested on 2026-11-22T18:08:45Z at tested SHA `7b80f411b2981e2274d171c12596301ed757b768` is still **queued** at the A01 read-only inspection. Job #206 is also `queued` with no actual start/completion times or steps; Gitea returned HTTP 404 `job not started` for its log. This is a **scheduling/queue dependency, not a proved technical error** in the new socat diagnostic, Python TCP fallback, IAM_OWNER API or browser/PKCE/session checks. **No Run #93 authentication or cleanup gates executed.**
|
||
|
||
Historical Run #91 used this workflow and reached a terminal job, but that only proves prior runner availability. The connected Gitea read tools contain no online runner/registration/label-capacity read endpoint; current `ubuntu-latest` runner availability is therefore **unknown**, and offline/mismatched/saturated runner or scheduler failure cannot be distinguished. No runner config, workflow, source, credentials or live system touched; no second dispatch. Full read-only ledger: `notes/P05-OIDC-03-A01.md`. Operator guide: `docs/P05-OIDC-03-A01.md`.
|
||
|
||
|
||
## P05-OIDC-03-A02 — terminal existing Run #93 (supersedes queued snapshot)
|
||
|
||
[Run #93](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/93) tested `7b80f411b2981e2274d171c12596301ed757b768`, job #206 **started 2026-11-22T18:36:26Z and completed 18:37:47Z with FAILURE**. The manual workflow/runner job was scheduled and checkout/Docker executed; current runner availability outside this historical run cannot be established through available Gitea read actions. Four-service backend startup, no published host ports, exact private Traefik Host routing and pinned/digest image metadata passed. Socat exited 1 with `SOCKET_BIND_ERROR`, Python stdlib fallback image/digest/start attempt passed but its private IPv4 listener exited 1 with `ADDRESS_IN_USE`. **Exact process holding namespace-local TCP port 8080 was not identified**; the source Compose Traefik service is configured to listen on :80, while ZITADEL API listens in its own container namespace on :8080, so neither is proved to own the collided private socket. No official client/user provisioning, original Chromium Login V2 authorization, PKCE/state/nonce/Auth.js callback, protected Account session, negative auth or logout tests executed. Mandatory exact run-owned cleanup **PASS** on both expected markers. No workflow rerun/source change under A02. Full evidence: `notes/P05-OIDC-03-A02.md`, `docs/P05-OIDC-03-A02.md`.
|
||
|
||
## P05-OIDC-04 — one-run CI evidence (not authenticated OIDC acceptance)
|
||
|
||
Manual Gitea [Run #95](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/95) job #209 checked out exact source `79dac4f5bb76e1cee4dfaf61657c6e84268b3dfb`: Docker/portless Compose PASS, 4/4 backend services healthy PASS, private Traefik Host/socket probe FAIL (`OIDC_CI_PRIVATE_PROXY_SOCKET_OR_HTTP_BLOCKED`), listener forensics and isolated forwarder NOT EXECUTED, official OIDC project/client/human/browser/Auth.js/negative/logout NOT EXECUTED, always-owned cleanup PASS. This is a new narrower/earlier blocker, not verification or regression of the authentication implementation. See `notes/P05-OIDC-04.md` and `docs/P05-OIDC-04.md`. No new workflow, auto trigger, runner change or repeated CI.
|
||
|
||
## P05-OIDC-04-A01 — terminal single-run acceptance
|
||
|
||
Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96) on source `670e225db477f180ff14ffa62e6654860a166f17`, job #210 **COMPLETED SUCCESS**, all four workflow job steps SUCCESS. Four backend/portless services, private Host HTTP, socket PID1 Traefik on TCP6 8080, dedicated Socat/issuer, official ephemeral project/client/human, browser real password/PKCE/state/nonce/Auth.js/subject/protected API/page, anonymous and callback negatives, local logout and mandatory exact-owned cleanup **PASS**. `tests/ci/oidc_e2e/run.sh` alone changed in A01: bounded/no-secret classified readiness failures and conditional transient retry; retry not exercised. No workflow, auth backend, package, deployment or runner edits. The source-tested SHA is distinct from the later documentation-only commit; production integration remains outside Run #96.
|
||
|
||
## P05-OIDC-05 CI coverage audit — no new test
|
||
|
||
Gitea [Run #96](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/96) is terminal SUCCESS for disposable original-prebuilt Login V2 / ZITADEL / Account real Chromium authentication, negative tests, portal-local logout and cleanup. Run #89 separately tested upstream imported Login V2 frozen build/1219 units/registry security; Run #87 Account build/security jobs passed. No accepted workflow builds a **custom-source Login V2 image** and substitutes it into full real OIDC E2E. No production TLS/domain/MFA/Admin Console/two-app SSO pipeline is demonstrated. This docs-only audit did not dispatch or rerun anything. See `notes/P05-OIDC-05.md`.
|
||
|
||
## P05-OIDC-06 — manual workflow and cleanup
|
||
|
||
New `.gitea/workflows/p05-custom-login-acceptance.yml` on a Docker-capable runner builds unchanged imported Login source in an isolated Node22/bookworm run-labeled builder, packages standalone output with existing upstream Dockerfile into `zitplane-login-ci:$GITHUB_RUN_ID` and opts into a single Compose image-only overlay. `tests/ci/oidc_e2e/run.sh` is unchanged in default mode; its opt-in would check the running image ID after four-service readiness. Run #98 built the local image, then failed before that identity assertion at OCI entrypoint permission denied. Both cleanup scripts under `always()` PASS. No reruns and no registry publish.
|
||
|
||
## P05-OIDC-06-A01 — terminal single-run custom source acceptance
|
||
|
||
Source SHA `7d6b6d0704b9e39bcb6e74257dadf0b64a19fc0f` changed only the `tests/ci/login_image/build.sh` temporary copied entrypoint mode gate. Existing `.gitea/workflows/p05-custom-login-acceptance.yml`, CI Compose overlay, `tests/ci/oidc_e2e/run.sh`, Chromium/provision/cleanup and upstream sources unchanged in A01. Exactly one manual [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) / job #214 **COMPLETED SUCCESS**, all 5 job steps success. Frozen PNPM/NX/Next standalone build, copy `644→755`, final image default-user executable test, custom image ID matching actual container, private issuer/forwarder/4 services, official disposable credentials, full Chromium Login V2 Auth.js/negative/logout and both cleanups PASS. No runner workflow or production change. Optional Python fallback and diagnostic negative branches NOT EXECUTED; real HTTPS/domain/MFA/SSO are outside CI scope.
|
||
|
||
## P05-OIDC-07 — acceptance gate gap and next dry-run proposal
|
||
|
||
This phase dispatched **no new CI**. Earlier manual Run #99 [SUCCESS](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) on `7d6b6d0704b9e39bcb6e74257dadf0b64a19fc0f` verified authentic custom-source Login OIDC and both cleanup systems, not production network/security/operations. **No existing workflow** is accepted as a production TLS/issuer/secret/backup contract validator. Propose independently approved `P05-OIDC-08` with *new only* manual `.gitea/workflows/p05-production-contract-dry-run.yml`, synthetic `deployment/production-contract/{README.md,MINIFEST.md,compose.ci.yaml,routing-policy.json}` and `tests/ci/production_contract/{README.md,MINIFEST.md,validate.py}`: static schema/Compose config (no `up`), exact positive + negative allowlist and secret-reference checks, zero external services, one CI run and no registry/deploy. Existing workflows and source remain strictly read-only. See `notes/P05-OIDC-07.md`.
|
||
|
||
## P05-OIDC-08 — synthetic-only production contract validation and blocked gate
|
||
|
||
New **manual** `.gitea/workflows/p05-production-contract-dry-run.yml` uses a disposable Node22 Alpine job, Git checkout, `docker compose -f deployment/production-contract/compose.ci.yaml config --quiet` and `--format json | python3 tests/ci/production_contract/validate.py --compose-json-stdin`; the `always()` step runs `--workflow-safety`. No `docker compose up`, Docker build/pull/run, real DNS/TLS inquiry or application auth occurs. Job toolchain/checkout may use the CI runner environment, but not production endpoints.
|
||
|
||
[Run #101](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/101) / Job #217, exact source `2ca1b4493bd47209d0c7eabf7453feaeb1f5174a`, **COMPLETED FAILURE**: Compose parsing PASS `ZITPLANE_P08_COMPOSE_STATIC_CONFIG_PASS`; normalized security validator **FAIL `ZITPLANE_P08_FAIL_CLOSED_RUNTIME_BEHAVIOR`**; manually dispatched/no-resource-actions configured verification PASS; **25 in-memory negative cases NOT EXECUTED**. Normalized field name/type not logged, so the specific cause remains UNKNOWN. CI job container/task volumes/network removed by Gitea runner; this is not inspection of production resources. Existing imported custom Login V2 E2E [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) remains a separate accepted result.
|
||
|
||
Next independent **P05-OIDC-08-A01** should modify **only** `tests/ci/production_contract/validate.py` to classify the offending Compose-normalized service field without values/secrets and permit only independently proven inert defaults, while rejecting real commands/build/configs. Then one separately approved CI static run, no rerun in P05-OIDC-08.
|
||
|
||
## P05-OIDC-08-A01 — normalized Compose null RCA and next gate (one-run evidence)
|
||
|
||
Exactly one manual [Gitea Run #102](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/102) / Job #218 `completed/failure` on `07c91ea5bcb2037e3c7b76261e1eb106b49d223f`, workflow/Compose unchanged. `docker compose config --quiet` **PASS**. New safe diagnostics inside `tests/ci/production_contract/validate.py` showed **`command: null` and `entrypoint: null` for all five services**, proving the Compose-normalized defaults behind historical Run #101 `RUNTIME_BEHAVIOR`. The narrow null-allowlisting proceeded past that gate; the subsequent normalized `deploy.replicas` strict rule **FAILED** `ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED`. Exact deploy/replica normalized type/value not logged. **Both original 25 and new four runtime negative fixtures NOT EXECUTED**, not accepted. `always()` manual-only/no Docker lifecycle action configuration check PASS; Gitea runner-owned task container/volumes/network removed. No application services, DNS/TLS/production or source changes after the run. Follow-up `P05-OIDC-08-A02` needs separate approved validator-only `deploy.replicas` RCA and one manual static CI. Previous custom Login V2 real OIDC Run #99 remains accepted.
|
||
|
||
## P05-OIDC-08-A02 — five normalized zero replicas confirmed, unknown extra deploy keys
|
||
|
||
Exactly one existing manual Gitea [Run #103](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/103) / Job #219 `completed/failure` at source `45a2edb854acd98546e60a68482075bc5f742bd2`. Unchanged synthetic `compose.ci.yaml` parses under `docker compose config --quiet` **PASS**. Stdlib validator independently confirmed all five tracked source `deploy.replicas: 0` declarations and read the canonical Compose JSON: **each** of five service `deploy` mappings retained a true JSON/Python **integer zero** `replicas` property, **but each also contained additional unknown top-level deploy keys**. Strict `set(deploy).issubset({"replicas"})` therefore fail-closed with `ZITPLANE_P08_FAIL_CLOSED_DEPLOY_DISABLED`. Extra key **names, types and effects NOT VERIFIED**; do not infer harmlessness. Source original 25 + four runtime + three new replica negatives **NOT EXECUTED**; separate `always()` manual-only/no Docker lifecycle action checker **PASS**. Runner task container/two volumes/network removed. No application service or production DNS/TLS/secret/deployment touched. Next independently approved `P05-OIDC-08-A03`: validator-only safe exact extra-key classification and evidence-proven inert-default narrowing, one manual CI; do not change Compose/workflow. Prior real imported Login V2 OIDC Run #99 separate success.
|
||
|
||
## P05-OIDC-08-A03 — inert Compose deploy fields verified; normalized secret grant blocks full CI
|
||
|
||
The unchanged **manual-only** `.gitea/workflows/p05-production-contract-dry-run.yml` dispatched exactly once in [Run #104](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/104), Job #220, **completed/failure** on immutable source `7954938fcee4d11c0b27751c7cf7abdcc64cd243`. CLI install/checkout and `docker compose ... config --quiet` **PASS**. The only source patch, `tests/ci/production_contract/validate.py`, pinned the original `compose.ci.yaml` Git blob, safely classified named normalized `deploy` entries and allowed only structurally empty/null known deployment metadata. Five normalized `deploy` mappings each had `replicas: 0` integer, `resources: {}`, `placement: {}` and no unknown-key marker, **VERIFIED**. The prior `DEPLOY_DISABLED` barrier was passed on the execution path, then **`ZITPLANE_P08_FAIL_CLOSED_SERVICE_SECRET_REFS`** stopped the validator. Secret list item/target detail **UNKNOWN**; 25 original, 4 runtime, 3 replica and 8 deploy negative assertions all **NOT EXECUTED**. `always()` manual-only/no Docker lifecycle command checker **PASS**, runner task container/two volumes/network removed as job logs show. No app services or production state touched. Next proposed independently approved A04: only validator source, safe grant type/target classification, then one manual CI; no new run in A03.
|
||
|
||
## P05-OIDC-08-A04 — full manually dispatched synthetic production security contract accepted (Run #105)
|
||
|
||
**Gitea manual-only [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) / Job #221 `COMPLETED SUCCESS`**, immutable source `daaa8b259a519ae0290ba28936ef2279b3a9172c`, with existing unchanged `.gitea/workflows/p05-production-contract-dry-run.yml` and source `deployment/production-contract/compose.ci.yaml` / `routing-policy.json`. Runner installs Git/Python stdlib/Compose CLI, checks `docker compose ... config --quiet` and pipes normalized **JSON only to static validator**; no application service `up/run/pull/build`. Original synthetic images use `synthetic.invalid`, all five source and normalized replicas integer zero, internal-only network and symbolic external secret refs. Gitea runner independently provisions a temporary job container/volumes/network and cleans its owned task state.
|
||
|
||
**RCA verified:** `docker compose config --format json` yields **seven** per-service secret grant dictionary entries with approved symbolic `source` and exact canonical `target` under `/run/secrets/<source>`, not the earlier same-name target assumption. Safe diagnostics verified 7 `OBJECT` + `TARGET_CANONICAL_MOUNT` + `SOURCE_EXPECTED` markers, no sensitive values. Validator now enforces exact six external registry refs/required per-service sets, default-root/read-only mount grant metadata, no duplicates or extra/unknown source/target/fields. Normalized deploy `resources:{}, placement:{}, replicas:int 0` and runtime `command:null, entrypoint:null` remain narrowly allowed inert defaults.
|
||
|
||
**All static positive policy gates PASS**: proposed canonical HTTPS issuer/separate Account callback/OIDC policy, Login V2/Console/API h2c route policy, Host/forwarded trust/TLS policy, private internal-only networking, no exposed ports, inline creds, socket, privileged/build/active runtime. **48/48 negative fixtures PASS with exact rejection classes** (25 original, 4 runtime, 3 replica, 8 deploy, 8 new secret grants). Inert-positive and canonical-grant-positive cases PASS. Manual-only/no configured Docker lifecycle action check PASS in validator and `always()` step, job task container/two volumes/network cleanup evidenced. No CI rerun. **This is static synthetic-contract acceptance, not live production HTTPS, image, backup, MFA/passkey or SSO verification.** Prior isolated imported custom Login browser OIDC [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) stands separately. Next proposed P05-OIDC-09 docs-only release preflight requires separate approval.
|
||
|
||
## P05-OIDC-09 — CI evidence versus unreleased production artifact boundary
|
||
|
||
Read-only reviewed accepted [Run #105](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/105) job #221, source `daaa8b259a519ae0290ba28936ef2279b3a9172c`: `COMPLETED SUCCESS` **static** nondeliverable Compose `config --quiet`, normalized security policy and 48/48 negative fixture checks, manual-only resource-action safety, cleanup of owned runner job resources. There is no signed registry image, live issuer or Console/MFA/SSO proof from that workflow. Independent [Run #99](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/99) source-built **temporary** custom Login image/Chromium OIDC and cleanup accepted; no image was retained as a production artifact. Historical [Run #89](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/89) accepted Login frozen PNPM/build/1219 units/then-current zero Moderate+ registry advisories; Account [Run #87](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87) frozen npm build/security accepted. Fresh pre-release risk/advisory/SBOM/signature checks remain **BLOCKED**. Current six `.gitea/workflows/*.yml` are CI-specific; no signed/published production release workflow evidenced. Next individually approvable `P05-OIDC-10` is a **new separate CI-only** Login image provenance gate, not a replacement/rerun of accepted workflows. No new CI dispatched in P05-OIDC-09. Operator failure/rollback thresholds in `notes/P05-OIDC-09.md`.
|
||
|
||
## P05-OIDC-10 — single-run CI imported Login OCI provenance gate, partial evidence
|
||
|
||
New `.gitea/workflows/p05-login-provenance.yml` is **manual-only** with a pinned `node:24-alpine@sha256:116b800c…` task container, read-only SHA-pinned checkout, targeted `tests/ci/login_image/provenance.py` source/security and 12 mutation-negative assertions, opt-in existing `build.sh` for pinned Node22 Bookworm builder `sha256:e13726ca…` and temporary pinned Node24 Alpine runtime Dockerfile, an isolated no-network entrypoint probe and unchanged always `cleanup.sh`. Original Run #99 custom Login OIDC workflow, Run #105 static contract workflow, imported `auth/**` and dev Compose untouched.
|
||
|
||
Exactly one [Gitea Run #106](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/106) Job #222 `COMPLETED FAILURE`, tested SHA `6ba004808ef47c8856c1a7906faaf7ee807d15a6`. Toolchain/checkout and 12/12 negatives PASS, Git immutable source tree and lock PASS, 1121 packages frozen root PNPM10.30.3 install and Next16.4.6 standalone/proto/client build PASS; nested Login package invokes its own hash-qualified PNPM10.28.2. Temporary 644→755 entrypoint PASS, pinned runtime OCI image `sha256:9ddaccf7f6e60e6d72d580de6b285df697d1404cc8f48e5d2719953a4ea69078` built and no-network executable probe PASS, builder linux/amd64 index PASS. `ZITPLANE_P10_FAIL_CLOSED_IMAGE_SECRET_ENV_KEY` **FAIL** before final source-to-image material SPDX-lite/unsigned attestation, so those files **NOT EXECUTED/EMITTED**. Env key unknown; plain regex `PAT` may match ordinary `PATH`, unverified hypothesis. `always()` run-owned builder/image/context cleanup PASS; Gitea runner-owned job container/two volumes/network removed. No CI rerun/post-run source edit. No registry publish/release/live services. Full gate **BLOCKED** pending separately approved P05-OIDC-10-A01 provenance.py-only safe key-boundary RCA.
|
||
|
||
## P05-OIDC-10-A01 — validator-only env-key boundary, CI dispatch queued
|
||
|
||
Scope-first `notes/P05-OIDC-10-A01.md` commit `46e2897380b736b970a0b1de15a161c3600abcb6` and immutable tested source `4452a61b0f5a0892399060fd7569231a564bce02`. Source change ONLY `tests/ci/login_image/provenance.py`; `.gitea/workflows/p05-login-provenance.yml`, builder `build.sh`, `cleanup.sh`, OCI index lock, imported `auth/**` and existing Run #99/105 workflows unchanged. Old unanchored `PAT` matcher is proven by source logic to also match benign `PATH`; exact Run #106 rejected key was never logged and remains **UNKNOWN**. New `classify_oci_env_key()` recognizes whole underscore-separated credential segments, allowing only finite expected Node/OCI key names. New `diagnose_oci_image_env()` emits fixed allowlisted benign key names or generic sensitive/unknown/invalid/duplicate classes; no arbitrary keys, values or inspect JSON. Existing 12 + new 14 rejection fixtures and positive PATH fixture are present in source and not yet CI-executed.
|
||
|
||
One [Gitea Run #108](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/108) / Job #230 was dispatched on `4452a61b0f5a0892399060fd7569231a564bce02`, existing workflow **active** but run and job **QUEUED** at last read; job `started_at` unset, steps empty, no log; runner online/ubuntu-latest match/capacity/registration **UNKNOWN**, not assumed offline. **No successful/failing A01 job check yet**: immutable runtime build, 12+14 negatives, partial SPDX/unsigned provenance and cleanup are all NOT EXECUTED for Run #108. No new run/rerun/post-dispatch source patch. Proposed P05-OIDC-10-A02 read-only **existing Run #108 scheduling/terminal acceptance** requires separate approval. Prior [Run #106](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/106) local image build/cleanup and Run #99/105 historical acceptance remain separate.
|