Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

Commit 6e06192

Browse files
committed
test: keep only real API integration coverage
1 parent 2267551 commit 6e06192

18 files changed

Lines changed: 180 additions & 1759 deletions

‎.github/workflows/update-dex-dependencies.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ jobs:
8484
README.md \
8585
go.mod \
8686
go.sum \
87-
internal/templatecontract/contract_test.go
87+
tools/checkcontract/main.go
8888
git diff --cached --check
89-
go test ./internal/templatecontract
89+
make check-contracts
9090
- name: Create or update dependency pull request
9191
if: steps.update.outputs.changed == 'true'
9292
shell: bash

‎.superverse/template.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schemaVersion": 1,
33
"buildProfile": "go-react-v1",
4-
"templateVersion": "1.8.1",
4+
"templateVersion": "1.8.2",
55
"minimumSandboxImageContractRevision": 3,
66
"openapiSpec": "openapi/openapi.yaml",
77
"applicationManifest": "dex-app.yaml",
@@ -11,7 +11,7 @@
1111
"generate": "make generate",
1212
"checkFdgV2": "make check-fdg-v2",
1313
"releaseArtifacts": "make superverse-release-artifacts",
14-
"testUnit": "make test-unit",
14+
"checkContracts": "make check-contracts",
1515
"testIntegration": "make test-integration",
1616
"testE2E": "make test-e2e",
1717
"build": "make build",

‎AGENTS.md‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ retain either stem, and compound names such as `AppRuntime`, `RuntimeManager`,
3636
or `NormalizeInput`. Renaming must update the package path, declarations,
3737
imports, callers, and tests together; do not retain compatibility aliases for
3838
repository-owned names. `internal/worker` owns the Dex Worker, Client,
39-
and blob cache lifecycle. The Go naming contract in `internal/templatecontract`
40-
runs with `make test-unit` and `make check`; do not bypass it or add exceptions
41-
for new repository-owned names.
39+
and blob cache lifecycle. The static Go naming check in `tools/checkcontract`
40+
runs with `make check-contracts` and `make check`; do not bypass it or add
41+
exceptions for new repository-owned names.
4242

4343
The Dex Flow has stable Step, Attribute, Channel, Timer, and RPC identities.
4444
Keep external effects in `Execute`; `WaitForApproval.WaitFor` only declares the
@@ -58,7 +58,7 @@ If `make check` fails or cannot run, report `blocked=true`. Do not weaken, skip,
5858
or delete a failing check.
5959

6060
Stable commands are `make bootstrap`, `make generate`, `make check-fdg-v2`,
61-
`make superverse-release-artifacts`, `make test-unit`,
61+
`make check-contracts`, `make superverse-release-artifacts`,
6262
`make test-integration`, `make test-e2e`, `make build`, `make dev`, and
6363
`make check`.
6464

@@ -97,12 +97,20 @@ Dex Skills discovers the release and opens its own baseline pull request. Once
9797
the matching Dex Skills release exists, Superverse advances both immutable
9898
release pins in one pull request.
9999

100-
Use Vitest mocks of the generated client for isolated loading, failure, and
101-
terminal UI states. When a browser-only edge case cannot be reached
102-
economically, use test-local Playwright request interception. Do not add an
103-
application mock server, a second business state machine, or user-visible Mock
104-
Controls. Mock evidence never replaces real Dex integration and E2E tests.
100+
Only integration tests that call real dependency APIs are permitted. Never add
101+
unit tests, isolated component tests, or mock integration tests in any language.
102+
Go tests must use the `integration` build tag and a real Dex Server. Playwright
103+
E2E tests must drive the production application backed by real dependencies.
104+
Do not use mocks, fakes, stubs, simulated providers, or intercepted/fulfilled
105+
API responses to replace dependencies, including for failure or edge cases.
106+
Exercise those cases through real dependency APIs or report the coverage gap.
107+
An integration label or build tag alone does not qualify a test: review its
108+
actual API calls. Dependency startup failures must fail verification, never
109+
skip a test or fall back to a mock. Do not restore unit-test targets, frameworks,
110+
fixtures, or dependencies. `make check-contracts` statically checks repository
111+
contracts, naming, test placement, and known mocking APIs; it is not a test suite
112+
and does not replace real integration or E2E evidence.
105113

106114
When structure, commands, or required tooling changes, update this file,
107-
`.superverse/template.json`, `README.md`, and contract tests together. Do not
108-
maintain a separate static repository map.
115+
`.superverse/template.json`, `README.md`, and static contract checks together.
116+
Do not maintain a separate static repository map.

‎Makefile‎

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL := /usr/bin/env bash
22

3-
.PHONY: bootstrap generate check-fdg-v2 superverse-release-artifacts test-unit test-integration test-e2e build dev check
3+
.PHONY: bootstrap generate check-fdg-v2 check-contracts superverse-release-artifacts test-integration test-e2e build dev check
44
bootstrap:
55
go mod download
66
go -C tools/openapi mod download
@@ -12,27 +12,22 @@ check-fdg-v2:
1212
superverse-release-artifacts:
1313
@test -n "$(SUPERVERSE_RELEASE_ARTIFACT_DIR)" || { echo "SUPERVERSE_RELEASE_ARTIFACT_DIR is required" >&2; exit 1; }
1414
python3 ./scripts/generate-release-artifacts.py --output-directory "$(SUPERVERSE_RELEASE_ARTIFACT_DIR)"
15-
test-unit: generate
16-
go test ./...
17-
python3 -m unittest scripts/test_check_template_version.py scripts/test_generate_openapi.py scripts/test_generate_release_artifacts.py
18-
npm --prefix web test
19-
test-integration: generate
20-
./scripts/with-dex.sh go test -tags=integration ./...
21-
test-e2e: generate
15+
check-contracts:
16+
go run ./tools/checkcontract
17+
test-integration: generate check-contracts
18+
./scripts/with-dex.sh go test -count=1 -tags=integration ./...
19+
test-e2e: generate check-contracts
2220
./scripts/with-dex.sh ./scripts/run-e2e.sh
2321
build: generate
2422
npm --prefix web run build
2523
go build -o bin/basic-process ./cmd/server
2624
dev: generate
2725
./scripts/with-dex.sh bash -c 'npm --prefix web run build && go run ./cmd/server'
28-
check: bootstrap generate check-fdg-v2
26+
check: bootstrap generate check-fdg-v2 check-contracts
2927
@test -z "$$(gofmt -l $$(find . -name '*.go' -not -path './upstream-dex/*'))" || { gofmt -d $$(gofmt -l $$(find . -name '*.go' -not -path './upstream-dex/*')); exit 1; }
3028
go mod tidy -diff
3129
go vet ./...
32-
go test ./...
33-
python3 -m unittest scripts/test_check_template_version.py scripts/test_generate_openapi.py scripts/test_generate_release_artifacts.py
34-
npm --prefix web test
35-
./scripts/with-dex.sh go test -tags=integration ./...
30+
./scripts/with-dex.sh go test -count=1 -tags=integration ./...
3631
./scripts/with-dex.sh ./scripts/run-e2e.sh
3732
npm --prefix web run build
3833
go build -o bin/basic-process ./cmd/server

‎README.md‎

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ Repository-owned names must describe concrete responsibilities. The
3535
case-insensitive stems `runtime` and `normaliz` are prohibited in names,
3636
including package paths, types, aliases, receivers, and test helpers. Generated,
3737
third-party, framework-mandated, and immutable legacy references are exempt.
38-
Go naming contract tests enforce this rule in `make test-unit` and `make check`.
38+
Static checks in `tools/checkcontract` enforce this rule in
39+
`make check-contracts` and `make check`.
3940

4041
Applications that do not need a custom process UI keep only a non-business
4142
Hello World page and the Go/OpenAPI/React generation skeleton. Dex Web remains
@@ -108,21 +109,30 @@ the platform broker.
108109
## Verification
109110

110111
```bash
111-
make test-unit
112+
make check-contracts
112113
make test-integration
113114
make test-e2e
114115
make check
115116
```
116117

117118
Integration tests start a real Dex Server with `dexcli dev`. Playwright drives
118119
the production UI and uses `dexcli flow skip-timer` to exercise the reminder
119-
branch without waiting fifteen minutes. Every poll has a deadline.
120-
121-
Vitest mocks the generated client for isolated loading, failure, and terminal
122-
UI states. A test may use Playwright request interception for a browser-only
123-
edge case, but the template does not ship a mock API, a second business state
124-
machine, or user-visible Mock Controls. Mock evidence does not prove durable
125-
execution behavior.
120+
branch without waiting fifteen minutes. Every poll has a deadline. Go
121+
integration tests disable result caching so each run calls the real Dex APIs.
122+
123+
Only integration tests that call real dependency APIs are permitted, including
124+
the Playwright E2E journey against the production application. Unit tests,
125+
isolated component tests, mock integration tests, fakes, stubs, and Playwright
126+
API-response interception are prohibited, including for failure and edge cases.
127+
Exercise those cases through real dependency APIs or report the coverage gap.
128+
An integration label alone is insufficient. Missing dependencies fail the
129+
check; tests must never skip or fall back to mocks. Do not add unit-test
130+
frameworks, fixtures, or dependencies.
131+
132+
`make check-contracts` validates the template manifest, Go naming, test
133+
placement, and known mocking APIs through static source inspection. It is
134+
separate from API tests and does not prove dependency behavior. The dependency
135+
updater keeps its release assertions in `tools/checkcontract/main.go`.
126136

127137
`make check-fdg-v2` validates `internal/process/flow.go` with rendering schema
128138
2.0 and requires a diagnostic-free graph with `valid: true`. The required

‎internal/connectorconfiguration/configuration_test.go‎

Lines changed: 0 additions & 108 deletions
This file was deleted.

‎internal/process/flow_test.go‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎scripts/test_check_template_version.py‎

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)