From 1a602551ad9a791efcc594834f2fa6ce748339ae Mon Sep 17 00:00:00 2001 From: Vib Tools Date: Sun, 22 Nov 2026 05:53:38 -0800 Subject: [PATCH] docs: close P05 backend CI acceptance with run 86 evidence --- .gitea/workflows/README.md | 2 +- README.md | 8 ++++---- docs/FEATURES-STATUS.md | 12 ++++++------ docs/MINIFEST.md | 2 +- docs/P05-CI-03.md | 10 +++++++--- docs/PHASES.md | 2 +- docs/SETUP-GUIDE.md | 3 +++ docs/TROUBLESHOOTING.md | 10 +++++----- notes/CHANGELOG.md | 2 +- notes/MINIFEST.md | 2 +- notes/P05-CI-03.md | 29 ++++++++++++++++++++++++++++- project/CHANGELOG.md | 2 +- project/CI-ARCHITECTURE.md | 7 +++++++ project/FEATURES-AND-PAGES.md | 5 +++++ project/SETUP-AND-DEPENDENCIES.md | 5 +++++ project/SOURCE-INVENTORY.md | 2 +- tests/ci/README.md | 2 +- 17 files changed, 78 insertions(+), 27 deletions(-) diff --git a/.gitea/workflows/README.md b/.gitea/workflows/README.md index db6a88d..6b4bc88 100644 --- a/.gitea/workflows/README.md +++ b/.gitea/workflows/README.md @@ -10,7 +10,7 @@ Job responsibilities: **P05-CI-02 additions:** Account Portal CI negative route/API smoke, npm/pnpm structured Moderate advisory detail, and disposable Postgres restart persistence plus stronger OIDC issuer/JWKS negative checks. Run #83 passed Account, Login V2 and Security jobs but backend proxy bind to shared host port 8080 failed after Postgres/ZITADEL/Login healthy. **Post-run source fix:** all backend Compose calls include `tests/ci/compose.portless.override.yaml` (`ports: !reset []`), config rejects any published proxy port; this is not CI-verified. Full authenticated user sign-in/MFA remains deferred. -**P05-CI-03:** `p05-backend-acceptance.yml` runs **only** the isolated backend job with `tests/ci/backend_acceptance.sh` and always-run `backend_cleanup.sh`. It checks portless effective config, all four services, restart persistence, ready/discovery/JWKS and absence of CI leftovers. This avoids rerunning already accepted Account/Login suites. Manual only; no production. See `docs/P05-CI-03.md`. +**P05-CI-03:** `p05-backend-acceptance.yml` runs **only** the isolated backend job with `tests/ci/backend_acceptance.sh` and always-run `backend_cleanup.sh`. **Gitea Run #86 SUCCESS** on `03fb589`: portless config, all four services, restart persistence, ready/discovery/JWKS, negative cases and complete cleanup passed. No Account/Login build rerun; no production. See `docs/P05-CI-03.md`. **Run #81 evidence:** backend's first revision failed during checkout because Alpine had no Git. Added a pre-checkout Git installation afterward; the corrected backend job remains **UNVERIFIED** until a separately approved CI rerun. See `docs/P05-CI-01.md`. diff --git a/README.md b/README.md index 0b579da..1003cba 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,12 @@ Compact, developer-friendly monorepo for a central identity service, a branded l ## Current phase status - **P01 Foundation:** complete, initial commit `8f54ccb`. -- **P02 ZITADEL local backend:** pinned official images, development Compose and secure local bootstrap helper source prepared. **Docker startup and Admin Console integration remain unverified**; all follow-up local testing is explicitly deferred to a future Gitea Actions scope. -- **P03 Login V2 source:** official v4.20.4 source and matching client/proto workspace imported under `auth/ui/v2/`; no redesign or runtime build/test was performed. **CI validation remains pending.** -- **P04 Account Portal:** Next.js + ZITADEL OIDC Auth.js source, server-protected overview/profile/security pages and compact responsive foundation implemented under `users/ui/`. **No build/test/runtime validation yet; future Gitea Actions required.** +- **P02 ZITADEL local backend:** pinned official images, development Compose and secure local bootstrap helper. **Gitea Run #86 verified disposable four-service startup, PostgreSQL persistence and OIDC metadata/JWKS.** Admin Console **human login** and local PC startup remain unverified. +- **P03 Login V2 source:** official v4.20.4 source and matching client/proto workspace imported under `auth/ui/v2/`; original UI unchanged. Gitea Run #83 verified frozen install, production build and **1,219/1,219 unit tests**; interactive login not verified. +- **P04 Account Portal:** Next.js + ZITADEL OIDC Auth.js source, protected overview/profile/security pages and responsive foundation under `users/ui/`. Gitea Run #83 verified TypeScript/production build and anonymous API 401/redirect tests; real authenticated session still unverified. - **P05-CI-01:** Manual Gitea Run #81 **overall FAILURE**: Login V2 build + 1219 unit tests PASS, high/critical gate PASS (18 Moderate Login findings), Account Auth.js TS2345 and Docker checkout FAIL. Details: `docs/P05-CI-01.md`. - **P05-CI-02:** Gitea Run #83 **3 PASS / 1 FAIL**. Account Portal typecheck/build and negative identity checks PASS; Login V2 build + 1219/1219 tests PASS; High/Critical security threshold PASS (18 Moderate Login records + 1 Moderate Account package OPEN). Docker Postgres/ZITADEL API/Login healthy, but shared runner port 8080 blocked Traefik; cleanup PASS. CI-only portless override added afterward **not CI-verified**; full OIDC E2E deferred. See `docs/P05-CI-02.md`. -- **P05-CI-03:** Dedicated backend-only Gitea Actions verification for portless Compose, PostgreSQL restart persistence, ZITADEL ready/OIDC discovery and safe cleanup. **Source prepared; CI acceptance pending.** Existing Account/Login build suites are not rerun. +- **P05-CI-03:** **Gitea Run #86 SUCCESS** on `03fb589`: portless Docker Compose, four healthy/running services, PostgreSQL restart persistence, ZITADEL readiness, OIDC discovery/JWKS, negative contracts and complete CI cleanup verified. No repeated Account/Login suites. Full interactive OIDC E2E and Moderate dependency fixes remain pending. See `docs/P05-CI-03.md`. - **Production / Coolify:** not configured or deployed. ## Documentation and project knowledge diff --git a/docs/FEATURES-STATUS.md b/docs/FEATURES-STATUS.md index f7e67fa..c17c4ff 100644 --- a/docs/FEATURES-STATUS.md +++ b/docs/FEATURES-STATUS.md @@ -1,12 +1,12 @@ # ZitPlane - Actual feature availability / limitations -Snapshot: 2026-11-22, P05-CI-03 backend-only verification source prepared on baseline `4857558`; Gitea Run #83 (3 PASS / 1 FAIL) is historical. **P05-CI-03 run not yet executed.** **SOURCE EXISTS != RUNNING != VERIFIED != PRODUCTION**. +Snapshot: 2026-11-22, **Gitea P05-CI-03 Run #86 backend-only SUCCESS** on `03fb589`; Account/Login build tests had passed in Run #83. Live production and interactive authenticated OIDC still NOT verified. **SOURCE EXISTS != RUNNING != VERIFIED != PRODUCTION**. | Feature | Source present | CI/build verified | Live/deployed | | --- | --- | --- | --- | -| Official ZITADEL Go backend image configuration | Yes, P02 | Run #83 ZITADEL API healthy in disposable Docker; full startup/proxy/OIDC acceptance blocked | No | -| Local PostgreSQL and loopback Traefik stack | Yes, P02 | Run #83 Postgres healthy, Traefik host 8080 collision; DB restart untested | No | -| Official prebuilt Login V2 service in local Compose | Yes, P02 configuration | No | No | +| Official ZITADEL Go backend image configuration | Yes, P02 | **Run #86 PASS:** ZITADEL API healthy, local backend ready, OIDC discovery/JWKS | No | +| Local PostgreSQL and loopback Traefik stack | Yes, P02 | **Run #86 PASS:** Postgres restart persistence and portless CI Traefik healthy; developer PC stack not tested | No | +| Official prebuilt Login V2 service in local Compose | Yes, P02 configuration | **Run #86 PASS:** official Login V2 container healthy; interactive login flow not tested | No | | Official Login V2 customisable source | Yes, P03 v4.20.4 | Run #81 build + 1219/1219 unit tests PASS; integration not verified | No | | Login V2 signup/password/OTP/MFA/passkey/IDP source routes | Present upstream | Run #81 unit suite PASS; real account flows NOT tested | No | | Custom Account Portal Next.js app | Yes, P04 | Run #83 npm ci/typecheck/Next production build PASS | No | @@ -17,8 +17,8 @@ Snapshot: 2026-11-22, P05-CI-03 backend-only verification source prepared on bas | Mutable profile editing / device sessions / identity deletion | No | N/A | No | | Global ZITADEL SSO logout | No | N/A | No | | Subscriptions, payments and SaaS billing | Outside ZitPlane scope | N/A | No | -| Gitea Actions CI verification workflow | Yes, P05 manual dispatch | Run #83: 3 PASS / 1 FAIL; Docker proxy 8080 collision, cleanup PASS | Not deployed | -| Gitea Actions CI and isolated integration tests | Backend-only manual workflow, portless/persistence/discovery/cleanup scripts prepared; interactive E2E absent | Run #83 historical: Postgres/ZITADEL API/Login healthy; full backend acceptance blocked pending P05-CI-03 | No | +| Gitea Actions CI verification workflow | Yes, P05 manual dispatch | Run #83 full workflow 3 PASS / 1 FAIL; **Run #86 backend-only SUCCESS**, without rerunning other jobs | Not deployed | +| Gitea Actions CI and isolated integration tests | Backend-only workflow; interactive identity E2E remains absent | **Run #86 PASS:** disposable backend OIDC ready/discovery/JWKS, Postgres persistence, cleanup; authenticated user E2E pending | No | | Coolify production stack, TLS, routing and backups | No | No | No | | Public `auth.vib.tools/login` URL | Proposed only | No | No | | Public `account.vib.tools` account website | Proposed only | No | No | diff --git a/docs/MINIFEST.md b/docs/MINIFEST.md index 13c1b9b..a6a23a4 100644 --- a/docs/MINIFEST.md +++ b/docs/MINIFEST.md @@ -9,7 +9,7 @@ Every file listed below is a direct child of `docs/`. Add/remove rows whenever t | [USER-GUIDE.md](USER-GUIDE.md) | Source-grounded Account Portal page/button-by-button manual | DOCS-01 / active; runtime pending | | [P05-CI-01.md](P05-CI-01.md) | Gitea Actions manual verification workflow, gates, limitations and real run evidence | P05-CI-01 / Run #81 complete, acceptance blocked | | [P05-CI-02.md](P05-CI-02.md) | TypeScript remediation, Gitea CI verification, dependency risk and isolation evidence | P05-CI-02 / run #83 done; Docker acceptance blocked | -| [P05-CI-03.md](P05-CI-03.md) | Isolated backend-only Gitea CI procedure, checks and exact run outcomes | P05-CI-03 / acceptance pending | +| [P05-CI-03.md](P05-CI-03.md) | Isolated backend-only Gitea CI procedure, checks and exact run outcomes | P05-CI-03 / Run #86 SUCCESS | | [SETUP-GUIDE.md](SETUP-GUIDE.md) | Operator/developer prerequisites, configs, activation and safety | DOCS-01 / active; runtime pending | | [FEATURES-STATUS.md](FEATURES-STATUS.md) | Exact implemented/unavailable/unverified feature matrix | DOCS-01 / active | | [TROUBLESHOOTING.md](TROUBLESHOOTING.md) | Known blockers and safe diagnosis based on source status | DOCS-01 / active | diff --git a/docs/P05-CI-03.md b/docs/P05-CI-03.md index dc1f66b..2f44b0e 100644 --- a/docs/P05-CI-03.md +++ b/docs/P05-CI-03.md @@ -2,7 +2,7 @@ **Date:** 2026-11-22 **Approved baseline:** `485755800504a7dea6e4c303e6b39ec9cc610b54` -**Status:** Source prepared; no P05-CI-03 workflow run yet. +**Status:** Backend-only Gitea Run #86 SUCCESS — all scoped gates including cleanup CI-verified. ## Objective and user-visible effect @@ -25,7 +25,7 @@ The runner needs its registered `ubuntu-latest` label, a functional Docker daemo Expected markers: `ZITPLANE_CI_PORTLESS_CONFIG_PASS`, `ZITPLANE_FOUR_SERVICES_READY_PASS`, `ZITPLANE_POSTGRES_RESTART_PERSISTENCE_PASS`, `ZITPLANE_OIDC_NEGATIVE_CONTRACTS_PASS`, `ZITPLANE_BACKEND_OIDC_READY_DISCOVERY_JWKS_PASS`, `ZITPLANE_BACKEND_CLEANUP_VERIFIED_PASS`. -**Do not claim backend acceptance unless each required check actually executes and passes.** Before the run, all are PENDING. +**Backend-only acceptance is confirmed for Run #86**, with each check and the always-run cleanup step executed successfully. Do not extend this result to real login/MFA or production deployment. ## Out of scope / known boundaries @@ -33,6 +33,10 @@ Account Portal real authenticated login/callback and protected positive session; ## Actual acceptance ledger -**PENDING:** After the single Gitea run, record run ID, tested source SHA, job conclusion, each marker, Docker service state, Postgres persistence, exact issuer/JWKS results, cleanup outcome and reproduced blockers. If any gate fails, label acceptance BLOCKED/FAILED and propose a focused next phase. Gitea workflow source-only changes or historical P05 runs are not proof of this phase. +**CI VERIFIED — SUCCESS:** [Gitea Run #86](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/86), tested `03fb58954dec886128a4011b6121754cbcdd79ff`, manual `workflow_dispatch` on `main`, started 2026-11-22 13:47:58 UTC, concluded SUCCESS 13:48:56 UTC. Job #184 and all four steps SUCCESS: Git prerequisite, checkout, isolated backend acceptance and always-cleanup. + +**Actual PASS markers:** `ZITPLANE_DOCKER_DAEMON_PREFLIGHT_PASS`; 3/3 P02 focused tests; `ZITPLANE_CI_PORTLESS_CONFIG_PASS`; `ZITPLANE_FOUR_SERVICES_READY_PASS` (PostgreSQL, ZITADEL API, Login V2, Traefik running/healthy); `ZITPLANE_POSTGRES_RESTART_PERSISTENCE_PASS` (synthetic row remains after database restart); `ZITPLANE_OIDC_NEGATIVE_CONTRACTS_PASS`; `ZITPLANE_BACKEND_READY_PASS`; `ZITPLANE_OIDC_DISCOVERY_PASS` (issuer `http://localhost:8080`); `ZITPLANE_OIDC_JWKS_PASS`; `ZITPLANE_BACKEND_ACCEPTANCE_CHECKS_PASS`; `ZITPLANE_BACKEND_CLEANUP_VERIFIED_PASS` (network, containers and volumes removed). + +**Acceptance verdict: P05-CI-03 backend-only disposable CI acceptance PASS.** The original host port 8080 collision no longer occurred; proxy was verified portless and healthy. No real authenticated Account Portal session, Admin Console human login, OAuth callback, MFA/passkey or global logout E2E was tested. The previously triaged 18 Moderate Login advisory records and 1 Moderate Account package remain **OPEN**. Production deployment and the developer PC were untouched. Exactly one backend-only CI run executed; Account/Login build suites were not rerun. Final docs-only commit is **not** a retested SHA; the tested source SHA is `03fb589`. Developer details: [project/CI-ARCHITECTURE.md](../project/CI-ARCHITECTURE.md). Pre-change plan and final log: [notes/P05-CI-03.md](../notes/P05-CI-03.md). diff --git a/docs/PHASES.md b/docs/PHASES.md index 752fb1e..2b79956 100644 --- a/docs/PHASES.md +++ b/docs/PHASES.md @@ -51,7 +51,7 @@ Implement one explicitly approved phase at a time. Keep out-of-scope files, exis - **Exact Write Scope:** optional `.gitea/workflows/p05-backend-acceptance.yml`, narrow existing P05 workflow if justified, focused `tests/ci/**`, notes/project/docs, associated workflow README/MINIFEST and root navigation if needed. Core backend, developer Compose, Login V2, Account Portal, dependencies/locks and production config all READ ONLY. - **Manual backend-only** Gitea Actions acceptance: effective Compose proxy portless check, four-service health, disposable Postgres restart marker persistence, ZITADEL readiness/discovery/JWKS, malformed issuer/JWKS negative contracts and verified CI-only cleanup. - One focused isolated run after source commit/push, no local test/build/Docker, no repeated Account/Login suites, no real users/secrets or production deployment. Full interactive login/MFA remains a separate phase. -- Evidence: `notes/P05-CI-03.md`, `docs/P05-CI-03.md`. Backend PASS only after all gates and cleanup are proven in Gitea. +- **Gitea Actions Run #86 SUCCESS** on `03fb58954dec886128a4011b6121754cbcdd79ff`: portless effective config PASS, all four services ready, disposable PostgreSQL marker persisted after restart, ZITADEL ready/OIDC issuer/discovery/JWKS and negative contracts PASS, CI-owned network/containers/volumes cleanup verified PASS. No Account/Login build rerun, no local build/Docker. Full interactive OIDC login/MFA and Moderate dependencies remain outside this phase. Evidence: `notes/P05-CI-03.md`, `docs/P05-CI-03.md`. ## P05 - Full Integration (proposed, NOT approved) Shared design system, production-safe Compose topology and verified Login/Account OIDC wiring. No live deployment; separate approval. diff --git a/docs/SETUP-GUIDE.md b/docs/SETUP-GUIDE.md index d95ede5..dc14077 100644 --- a/docs/SETUP-GUIDE.md +++ b/docs/SETUP-GUIDE.md @@ -73,3 +73,6 @@ Refer to [FEATURES-STATUS.md](FEATURES-STATUS.md), [TROUBLESHOOTING.md](TROUBLES ## P05-CI-03 backend-only runtime verification (Gitea only) In Gitea `vibtools/ZitPlane` → **Actions** → **ZitPlane P05-CI-03 Backend Acceptance** → **Run workflow** → `main`. It uses the existing `ubuntu-latest` Linux Docker-capable runner; no Account or Login V2 production build suites are rerun. All credentials are generated in the disposable runner and are never used for production accounts. It checks portless effective Compose, four container states, a synthetic PostgreSQL restart marker, backend readiness, OIDC issuer/discovery and JWKS, and always-owned-resource cleanup. Results must come from the exact Gitea Actions run, not source presence. See `docs/P05-CI-03.md`. **This is not full interactive login, Coolify or production deployment.** + + +**P05-CI-03 verified result:** Gitea [Run #86](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/86) **SUCCESS** on source SHA `03fb589`. It confirmed the portless CI backend configuration, four-service readiness, PostgreSQL marker persistence after restart, ZITADEL OIDC discovery/JWKS and complete CI-owned cleanup. This **does not** mean the developer PC or production Coolify instance is configured, nor does it prove an authenticated user login/MFA. The run did not repeat earlier Account/Login builds. See `docs/P05-CI-03.md` for evidence. diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md index 965ca40..9667668 100644 --- a/docs/TROUBLESHOOTING.md +++ b/docs/TROUBLESHOOTING.md @@ -1,11 +1,11 @@ # ZitPlane — Troubleshooting and safe diagnostics -**Scope:** Only describe issues the current source or recorded phase evidence supports. No live environment has been verified. +**Scope:** Only describe issues the current source or recorded phase evidence supports. Run #86 verified an isolated disposable backend, but no developer-PC environment or production deployment has been verified. | Symptom | Known possible cause | Safe next action | | --- | --- | --- | | `docker` command not found | Docker CLI/Desktop was missing on the previously inspected Windows host during P02 | Install supported Docker Engine/Desktop and run only in a local disposable environment; do not treat a source manifest as runtime acceptance | -| `docker compose config` / `up` fails | Dev Compose, h2c proxy, dependencies and image pulls were never integration-tested | Review Compose output after an approved isolated CI/dev verification, without revealing secrets; inspect P02 evidence | +| `docker compose config` / `up` fails | Local machine Docker/config differences or occupied port may differ from validated CI stack | Gitea Run #86 verified isolated portless CI Compose; check environment-specific logs with secrets redacted; do not confuse its portless override with P02 local loopback Compose | | Admin Console login fails | First-instance bootstrap, Login V2 container/PAT, auth proxy or credentials not validated | Verify local health, first-init logs and policy in a secret-safe environment; do not reinitialize volumes casually | | Account Portal shows no page | App dependencies are not installed; no Account Portal image, runtime or domain is configured | Complete reviewed lockfile/build/CI and explicit integration phase before troubleshooting live UI | | Redirect/callback error after future login | OIDC issuer/callback URL, client type/secret, proxy headers, PKCE/state or allowed redirect may mismatch | Compare exact configured origins and registered callback; never weaken checks or wildcard redirects | @@ -22,11 +22,11 @@ Include environment (local disposable vs CI vs production), exact phase/commit, ## P05-CI-02 verification and error boundaries -- Prior Account Portal `TS2345` at `src/auth.ts(14,61)` in Gitea Run #81 was caused by the callback returning a JWT subject not statically narrowed to `string`. P05-CI-02 source narrows it with `typeof`; it is not considered fixed until CI typecheck/build passes. -- Previous Alpine backend checkout missed Git; Run #83 verified the fix. Postgres/ZITADEL API/prebuilt Login V2 became healthy, but the runner had host TCP 8080 allocated and Traefik could not start. A CI-only portless Compose override was added after Run #83; it is **not verified** until a separately approved run. Database restart/persistence and OIDC discovery were not reached. +- Prior Account Portal `TS2345` at `src/auth.ts(14,61)` in Gitea Run #81 was fixed by verified JWT subject narrowing; Gitea Run #83 Account Portal typecheck/build **PASS**. +- Previous Alpine backend checkout missed Git; Run #83 verified the fix. Run #83 also exposed an occupied shared-runner host TCP 8080. **Run #86 verified the portless CI Compose overlay**: all four services ready, disposable Postgres restart persistence, ZITADEL ready/OIDC discovery/JWKS and complete CI-only cleanup PASS. This does **not** prove the separate P02 local PC Compose or real user login. - A green HIGH/CRITICAL advisory audit gate still allows Moderate findings; the P05-CI-02 registry detail report records IDs/package/fix separately, without package upgrades. - CI negative access tests do not simulate real login; actual OIDC app registration/authorized login/MFA must receive separate approval. ## Known limitations -No live integration verification, Account Portal lockfile, CI pipeline, Coolify production deployment, tested authentication redirects or production support guarantees exist as of P04. Before adding any diagnostic workaround, consult the Scope Lock in `notes/` and preserve ZITADEL's security boundaries. +Account Portal and Login V2 build CI passed in Run #83, disposable backend acceptance passed in Run #86, and dependency lockfiles/workflows exist. **Real authenticated OIDC callback/positive session, MFA/passkey, Admin Console human login, production Coolify/TLS/backup and production support remain UNVERIFIED.** Preserve the Scope Lock in `notes/` and ZITADEL security boundaries. diff --git a/notes/CHANGELOG.md b/notes/CHANGELOG.md index 6c8446b..4e2d893 100644 --- a/notes/CHANGELOG.md +++ b/notes/CHANGELOG.md @@ -11,6 +11,6 @@ This is the chronological **index**. Phase-specific scope/implementation evidenc | 2026-11-22 | DOCS-01 | Knowledge folders, first-party file/function maps, exact source inventory, user guides and mandatory AGENTS documentation policy | Documentation implementation complete; focused manifest/link/scope audit PASS; Git SHA in DOCS-01 local commit, see [DOCS-01.md](DOCS-01.md) | | 2026-11-22 | P05-CI-01 | Gitea verification workflow, dependency lock reconciliation, narrow checkout remediation | Run #81: 2 PASS/2 FAIL; 1219 Login tests PASS, Account TS2345 and Docker checkout blocked; see [P05-CI-01.md](P05-CI-01.md) | | 2026-11-22 | P05-CI-02 | Narrow Auth.js TS2345 fix, CI negative tests, advisory triage and post-run portless override | Run #83: Account/Login/Security PASS, Docker FAIL on host 8080; cleanup PASS; portless override unverified. [Evidence](P05-CI-02.md) | -| 2026-11-22 | P05-CI-03 | Backend-only Gitea CI workflow and disposable portless/persistence/OIDC acceptance scripts | Source preparation; one CI run pending, [scope/evidence](P05-CI-03.md) | +| 2026-11-22 | P05-CI-03 | Backend-only Gitea verification of portless Compose, 4 services, Postgres persistence, OIDC/JWKS and safe cleanup | **Run #86 SUCCESS** on `03fb589`, no unrelated suites rerun; [evidence](P05-CI-03.md) | Rules: Append new phases or fixes; never silently rewrite a past result. Separate **implemented**, **verified**, **blocked**, and **proposed**. Never log a user secret or personal data. diff --git a/notes/MINIFEST.md b/notes/MINIFEST.md index 2cf36fb..07304c9 100644 --- a/notes/MINIFEST.md +++ b/notes/MINIFEST.md @@ -7,7 +7,7 @@ | [DOCS-01.md](DOCS-01.md) | This documentation-governance change: baseline, scope, plan, implementation and closure | DOCS-01 / implementation complete | | [P05-CI-01.md](P05-CI-01.md) | Scope/roots, allowed paths, implementation and Gitea CI acceptance evidence | P05-CI-01 / source complete, CI blockers open | | [P05-CI-02.md](P05-CI-02.md) | Auth.js narrow patch, isolated Gitea CI gate, advisory triage and exact acceptance evidence | P05-CI-02 / run #83 completed; residual Docker gate blocked | -| [P05-CI-03.md](P05-CI-03.md) | Backend-only pre-change scope, disposable CI run evidence and exact acceptance result | P05-CI-03 / planned, run pending | +| [P05-CI-03.md](P05-CI-03.md) | Backend-only pre-change scope, disposable CI run evidence and exact acceptance result | P05-CI-03 / Run #86 SUCCESS; acceptance complete | | [CHANGELOG.md](CHANGELOG.md) | Short append-only chronological phase log and links to detailed reports | DOCS-01 / active | Update this manifest whenever any direct child file or directory changes. Use **actual source state**; a planned file must be labeled planned, not present. diff --git a/notes/P05-CI-03.md b/notes/P05-CI-03.md index 150c965..725100f 100644 --- a/notes/P05-CI-03.md +++ b/notes/P05-CI-03.md @@ -1,7 +1,7 @@ # ZitPlane P05-CI-03 — Backend Runtime Final Acceptance **Date:** 2026-11-22 -**Status:** APPROVED — PRE-CHANGE PLAN (CI not started) +**Status:** BACKEND-ONLY CI ACCEPTANCE CLOSED/PASS — Run #86 SUCCESS; result documented and approved Git sync. **Baseline / Gitea main:** `485755800504a7dea6e4c303e6b39ec9cc610b54` **Prior CI:** [Run #83](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/83), tested `c27fe3d`; three jobs PASS (Account Portal, Login V2 including 1219 unit tests, High/Critical security gate), backend FAIL when proxy attempted to publish occupied host port 8080. @@ -33,3 +33,30 @@ E. Document exact CI SHA, PASS/FAIL/BLOCKED, remedy/outstanding risks and accept Backend PASS only if effective Docker config is portless, four services reach the intended state, Postgres restart retains synthetic marker, real local ZITADEL ready + OIDC discovery + JWKS and negative test cases all PASS, and CI-owned network/volumes/container cleanup verified. Else mark FAILED/BLOCKED and preserve real source/log evidence. **Not in scope:** real OIDC authorized login/callback, Admin Console human login, MFA/SSO, dependency Moderate fixes (18 Login + 1 Account package), UI redesign or production TLS/Coolify. + + +## Implementation, exact Gitea evidence and closure — 2026-11-22 + +**Source commit pushed before dispatch:** `03fb58954dec886128a4011b6121754cbcdd79ff`. +**Single focused Gitea run:** [#86](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/86), event `workflow_dispatch`, branch `main`, tested SHA `03fb58954dec886128a4011b6121754cbcdd79ff`. Started 2026-11-22 13:47:58 UTC, completed 13:48:56 UTC, **overall SUCCESS**. Exactly one backend-only job (#184); all four job steps completed SUCCESS, including always-run cleanup. No Account/Login/Security builds or full suites rerun. + +**Implemented files:** `.gitea/workflows/p05-backend-acceptance.yml` manual job; `tests/ci/backend_acceptance.sh` for ownership preflight/config, health, disposable Postgres marker and OIDC checks; `tests/ci/backend_cleanup.sh` for guarded disposal and explicit no-leftovers verification. Existing `compose.portless.override.yaml` and `oidc_discovery.py` reused without modification. Backend core, P02 Compose, Login V2/Account Portal, production config and package/lock versions unchanged. README/MINIFEST/project/docs updated in the approved scope. + +### Terminal CI evidence + +| Check | Result | Log marker/observable evidence | +| --- | --- | --- | +| Alpine Git + checkout, Docker/Compose preflight | **PASS** | Job #184 first two steps SUCCESS; `ZITPLANE_DOCKER_DAEMON_PREFLIGHT_PASS`; Docker 29.9.3 / Compose v5.7.2 | +| P02 backend static regression | **PASS** | 3/3 focused `test_backend_dev.py` cases; `ZITPLANE_P02_BACKEND_CONTRACTS_PASS` | +| Portless CI effective Compose | **PASS** | `ZITPLANE_CI_PORTLESS_CONFIG_PASS`; no host proxy ports; occupied 8080 irrelevant | +| Four services | **PASS** | PostgreSQL, ZITADEL API, prebuilt Login V2 healthy; Traefik proxy running/healthy; four `ZITPLANE_SERVICE_RUNNING_PASS` entries and `ZITPLANE_FOUR_SERVICES_READY_PASS` | +| Postgres restart persistence | **PASS** | Disposable marker table created, synthetic row inserted, container restarted, row reread; `ZITPLANE_POSTGRES_RESTART_PERSISTENCE_PASS` | +| OIDC negative security contracts | **PASS** | `ZITPLANE_OIDC_NEGATIVE_CONTRACTS_PASS` rejects mismatched issuer/unsafe endpoint/JWKS fixtures | +| Real backend ready, OIDC issuer/discovery, public JWKS | **PASS** | `ZITPLANE_BACKEND_READY_PASS`, `ZITPLANE_OIDC_DISCOVERY_PASS` with `http://localhost:8080`, `ZITPLANE_OIDC_JWKS_PASS`, `ZITPLANE_BACKEND_OIDC_READY_DISCOVERY_JWKS_PASS` | +| Always owned-resource cleanup | **PASS** | Compose down -v removed owned containers, volumes and fixed network; `ZITPLANE_BACKEND_CLEANUP_VERIFIED_PASS`; cleanup workflow step SUCCESS | + +**Verdict:** P05-CI-03 backend-only **ACCEPTED/PASS**. No local PC builds/tests/Docker/dev server were executed and no real-user/production deployment was touched. One Gitea cycle, not a repeated loop. All credentials were generated temporarily inside the runner, not committed or logged. + +**Still outside backend acceptance:** full authorized OIDC client/callback/positive portal session, Admin Console human sign-in, MFA/passkeys, federated logout, production HTTPS/Coolify and security patching of the 18 Moderate Login advisory records plus the 1 Moderate affected Account Portal `next` package. High/Critical audit gates passed in earlier Run #83; moderate issues remain OPEN. Future phases: targeted dependency-only P05-SEC-01, then isolated authenticated user P05-OIDC-01 with separate scope. + +**Source/security audit:** initial CI-source commit had 22 approved files, 0 unauthorized paths, 0 staged secret files, 0 broken checked relative links, 724/724 Git-tracked source paths inventoried and all five affected directory manifests exact. The final documentation-only follow-up commit records Run #86 terminal results; its SHA is NOT the tested CI source SHA. diff --git a/project/CHANGELOG.md b/project/CHANGELOG.md index c1449aa..d83ae8f 100644 --- a/project/CHANGELOG.md +++ b/project/CHANGELOG.md @@ -11,7 +11,7 @@ This is the **developer-focused implementation history**. `notes/CHANGELOG.md` i | 2026-11-22 | DOCS-01 | Documentation governance; developer architecture, reviewed first-party function/file/page mapping and 701-path source inventory; user manual/setup/status/troubleshooting | Documentation complete; manifest/link/source-scope audit PASS; `notes/DOCS-01.md`, local commit SHA via Git history | | 2026-11-22 | P05-CI-01 | `.gitea/workflows/p05-ci.yml`, `tests/ci/**`, Account npm lock, Login pnpm importer reconciliation and in-scope Alpine Git checkout correction | Run #81 overall FAIL; 2 jobs PASS, 2 FAIL; Login 1219/1219 tests PASS, Account TS2345 and Docker checkout blocked; `notes/P05-CI-01.md` | | 2026-11-22 | P05-CI-02 | Type-safe Auth.js subject narrowing, Account anonymous negative tests, Login regression, structured advisory triage and CI-only portless Docker override | Run #83: 3 PASS/1 FAIL; Docker proxy 8080 collision, cleanup PASS, portless fix unverified; see `notes/P05-CI-02.md` | -| 2026-11-22 | P05-CI-03 | Dedicated manual backend-only CI acceptance, guarded disposable Compose, persistence/ready/JWKS probes and owned-state cleanup | Source implemented, Gitea CI run pending; `notes/P05-CI-03.md` | +| 2026-11-22 | P05-CI-03 | Dedicated manual backend-only CI acceptance, guarded disposable Compose, persistence/ready/JWKS probes and owned-state cleanup | **Gitea Run #86 SUCCESS** on `03fb589`; all steps PASS; `notes/P05-CI-03.md` | ## Required entry for each future change diff --git a/project/CI-ARCHITECTURE.md b/project/CI-ARCHITECTURE.md index 28359da..d9c760e 100644 --- a/project/CI-ARCHITECTURE.md +++ b/project/CI-ARCHITECTURE.md @@ -75,3 +75,10 @@ This is a **separate** `.gitea/workflows/p05-backend-acceptance.yml` triggered m - `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. diff --git a/project/FEATURES-AND-PAGES.md b/project/FEATURES-AND-PAGES.md index c8e59c6..992f2ac 100644 --- a/project/FEATURES-AND-PAGES.md +++ b/project/FEATURES-AND-PAGES.md @@ -49,3 +49,8 @@ For every future page/feature change, record exact route/file, action, data sour ## P05 CI verification (not a UI feature) New manually dispatched workflow `.gitea/workflows/p05-ci.yml` defines four isolated runner gates: Account Portal reproducible dependency install/build, official Login V2 frozen install/build/unit, dependency security advisory triage, and disposable Docker ZITADEL/OIDC discovery smoke. Exact verification scripts reside at `tests/ci/source_contract.py` and `tests/ci/oidc_discovery.py`. The full Account Portal interactive OIDC callback/session/SSO flow is **not implemented as a CI test**; it remains a pending acceptance gate. Status must be updated from the actual Gitea run report in `notes/P05-CI-01.md`. + + +## P05-CI-03 verified backend runtime, not a user page + +Gitea [Run #86](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/86) verified P02's PostgreSQL, ZITADEL API, prebuilt Login V2 and Traefik running/healthy in a disposable runner, including restart persistence, exact `http://localhost:8080` OIDC issuer discovery/JWKS, negative metadata fixtures and cleanup. This is **not** verification of a human pressing Login/Sign Up/MFA or any positive Account Portal session. Those remain **unverified** and must be documented when future phases implement isolated real-identity E2E. diff --git a/project/SETUP-AND-DEPENDENCIES.md b/project/SETUP-AND-DEPENDENCIES.md index f23ee00..237cc73 100644 --- a/project/SETUP-AND-DEPENDENCIES.md +++ b/project/SETUP-AND-DEPENDENCIES.md @@ -49,3 +49,8 @@ Version security review, reproducible installs, TypeScript/typecheck, Next.js bu Gitea Run #83 proved Account Portal TypeScript and Next.js production build, anonymous identity API 401/no-store and protected route redirect. Login V2 frozen build/standalone and upstream unit tests 1219/1219 passed. Dependency audits exposed 1 Moderate Account `next` vulnerable package (npm recommends Next.js 16.4.6) and 18 Moderate Login workspace records (seven Next.js GHSA IDs, eight OpenTelemetry driver instrumentation records, one OpenTelemetry HTTP, `glob`, `minimatch`). No dependency package/lock versions were changed. The runner's published TCP 8080 was already in use, so P02's local-only Traefik mapping prevented the CI proxy from starting even though PostgreSQL, ZITADEL API and Login V2 became healthy. A **CI-only** two-file Compose merge uses `tests/ci/compose.portless.override.yaml` to clear `proxy.ports`; config asserts that no host ports will be published. This was added after Run #83 and remains **unverified**. Live DB restart/data persistence and discovery checks have not passed. No production secrets or volumes were accessed. + + +## P05-CI-03 backend acceptance — proven in Gitea only + +Run #86 on commit `03fb589` executed a backend-only manual Gitea Actions job and verified the original pinned P02 container images on a disposable Docker v29.9.3 / Compose v5.7.2 runner. The P05 portless CI override removed the developer-only host binding, all four containers came up, PostgreSQL retained a synthetic row across a restart, and ZITADEL ready/issuer/OIDC discovery/JWKS passed. Owned network/containers/volumes were verified removed by the always-run cleanup step. No local PC/docker startup, release or production deployment occurred. Remaining steps before deployment: review/patch 18 Moderate Login findings and 1 Moderate Account `next` package, then disposable authenticated OIDC and Admin Console/MFA tests plus production TLS/Coolify/backup readiness. diff --git a/project/SOURCE-INVENTORY.md b/project/SOURCE-INVENTORY.md index d98709f..5163729 100644 --- a/project/SOURCE-INVENTORY.md +++ b/project/SOURCE-INVENTORY.md @@ -1,6 +1,6 @@ # Source inventory ? all Git-tracked paths -**Snapshot:** 2026-11-22, P05-CI-03 backend-only source preparation based on `4857558`. No claim of runtime PASS until the focused Gitea run completes. +**Snapshot:** 2026-11-22, P05-CI-03 source and docs based on `4857558`. Dedicated backend-only source commit `03fb589` was **verified PASS** by Gitea Run #86; the subsequent documentation commit is not a new runtime test. **Git-tracked files: 724.** Untracked `AI_INSTRUCTIONS.md` and ignored secrets excluded. diff --git a/tests/ci/README.md b/tests/ci/README.md index 63452a3..79849c5 100644 --- a/tests/ci/README.md +++ b/tests/ci/README.md @@ -12,6 +12,6 @@ No real credentials or production domains are used. Never print bootstrap PATs, - `backend_acceptance.sh` (P05-CI-03) is the manual backend-only Gitea runner preflight, portless Compose gate, four-service readiness, disposable database restart persistence and OIDC/JWKS smoke. Refuses pre-existing fixed network/project/volumes. - `backend_cleanup.sh` (P05-CI-03) is the workflow's `always()` cleanup script. It tears down only a marked run-owned Compose project and verifies that no project containers, volumes or fixed network remain. Unverified cleanup is an explicit failure. -- Run from `.gitea/workflows/p05-backend-acceptance.yml` **only in isolated Gitea CI**, not on a production Docker host or local developer PC. +- Run from `.gitea/workflows/p05-backend-acceptance.yml` **only in isolated Gitea CI**, not on a production Docker host or local developer PC. **Run #86 PASS** on `03fb589`, including persistence and owned cleanup. No real user login/MFA E2E was run. Add new CI checks and update `MINIFEST.md`, `project/`, `docs/`, and `notes/` in the same approved phase.