Files
corp-v1-channel-uat/references/journey-repository-contract.md
T

57 lines
2.7 KiB
Markdown

# Journey repository contract
The UAT repository is a standalone pnpm/Playwright project. It contains no Kubernetes, Helm, Argo CD, application implementation, image publication, or deployment logic.
## Required baseline
```text
applications/functional/
packages/journeys/
packages/testing/
packages/evidence/
artifacts/.gitkeep
package.json
pnpm-lock.yaml
pnpm-workspace.yaml
Taskfile.yml
.gitea/workflows/change-validation.yaml
.gitea/workflows/integrated-regression.yaml
```
A smaller standalone repository may keep `journeys/`, `fixtures/`, `helpers/`, and `playwright.config.ts` at the root. The responsibility boundaries and two-workflow contract remain the same.
## Journey rules
- Stable journey IDs appear in test titles and evidence.
- `UAT_BASE_URL` is required; no production-looking default is embedded.
- Authentication is loaded from runtime secrets and never persisted in committed storage-state files.
- Retries are explicit and low; a retry cannot turn a flaky first failure into an undisclosed pass.
- Failure evidence includes trace and screenshot; video is opt-in when data handling permits it.
- Taskfile is the human and automation interface and delegates to package scripts.
- The README documents local execution, evidence locations, environment-variable names, failure classification, and workflow behavior.
## Gitea Actions contract
```text
non-default branch push
└── CI / Change Validation
├── formatting, linting, type checks, contract tests, journey discovery, build when applicable
└── smoke journeys only when the exact commit is an open PR head
PR opened or reopened
└── CI / Change Validation
├── the same repository validation
└── smoke journeys
push to test after merge
└── UAT / Integrated Regression
├── exact integrated-commit validation
├── smoke journeys
├── complete regression journeys
└── deployment-bound evidence validation and upload
```
Use one change workflow rather than separate branch and PR workflow files. It subscribes to non-default `push` plus `pull_request` `opened` and `reopened`, but not `synchronize`; later branch pushes are the single trigger. The workflow detects whether the exact pushed commit is an open PR head and conditionally adds smoke. Cancel superseded runs for the same branch and expose one required aggregate result.
The integrated workflow runs only on `push` to `test`. It requires an exact frozen deployment tuple, healthy synchronized Argo CD state, explicit non-production base URL, and runtime-only authentication when the regression set requires it. Missing or contradictory inputs fail closed. Smoke is not complete UAT, and full regression does not run on a PR.