49 lines
2.3 KiB
Markdown
49 lines
2.3 KiB
Markdown
# Capability Spec Delta: testing-integration-resolve-check (testing-integration-vite-entry-fix)
|
|
|
|
**Capability**: `testing-integration-resolve-check`
|
|
**Status**: PROPOSED
|
|
|
|
## ADDED Requirements
|
|
|
|
### Requirement: Repo-level resolve check exists
|
|
|
|
The repository SHALL ship a script at `scripts/check-fixture-resolves.ts` that, when executed, performs a programmatic dynamic `import()` for every `@suaveplan/testing-integration-*` package by its public name and asserts each import succeeds. The script MUST exit with code 0 when all imports succeed and a non-zero code with a clear per-package error message otherwise.
|
|
|
|
#### Scenario: passes when every fixture resolves
|
|
|
|
- **WHEN** `bun scripts/check-fixture-resolves.ts` runs after a clean repo build
|
|
- **THEN** the process prints a PASS row for each of the seven packages and exits with code 0
|
|
|
|
#### Scenario: fails with a clear per-package error
|
|
|
|
- **WHEN** any `testing-integration-*` package's `dist/index.js` is missing or unreachable
|
|
- **THEN** the process prints `FAIL: @suaveplan/testing-integration-<name> — <error>` and exits with non-zero code
|
|
|
|
**Verified by:** `scripts/check-fixture-resolves.ts` itself; runtime execution in CI gate.
|
|
|
|
---
|
|
|
|
### Requirement: Turbo task wires the check into the dependency graph
|
|
|
|
`turbo.json` SHALL declare a `check:fixture-resolves` task that depends on `^build` and is invoked by `bun run check:fixture-resolves` at the repo root.
|
|
|
|
#### Scenario: turbo runs the check after dependent builds
|
|
|
|
- **WHEN** `bunx turbo check:fixture-resolves` runs
|
|
- **THEN** turbo first executes `build` for every `testing-integration-*` package and then invokes the script
|
|
|
|
**Verified by:** `turbo.json`, `package.json` (root) script entry.
|
|
|
|
---
|
|
|
|
### Requirement: CI gate runs the check before any integration suite
|
|
|
|
CI SHALL invoke `bun run check:fixture-resolves` before any consumer integration suite (`bunx turbo test:integration --filter=*`). Failure of the resolve check MUST short-circuit the job before docker-compose is brought up — the bug is structural and a successful container would not change the outcome.
|
|
|
|
#### Scenario: integration job aborts when fixtures are unresolvable
|
|
|
|
- **WHEN** the resolve check fails in CI
|
|
- **THEN** the job exits before any `docker compose up` step runs and the failure log names the offending package
|
|
|
|
**Verified by:** the CI workflow file added in this change.
|