[AZ-455] [autodev] Add Blackbox Tests component to module-layout

Adds a cross-cutting "Blackbox Tests" entry to
_docs/02_document/module-layout.md so the implement skill's Step 4
(file ownership) can resolve OWNED / READ-ONLY / FORBIDDEN globs for
every AZ-455 test task (AZ-456..AZ-482). Owns: tests/**, e2e/**,
**/*.{test,spec}.{ts,tsx}, vitest.config.ts, test sections of
package.json, scripts/run-tests.sh + run-performance-tests.sh
(extension only). Imports from src/types/index.ts only (P9 black-box
discipline). Advances Step 6 sub_step to phase 1 (parse).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-05-11 01:55:27 +03:00
parent 15a878d6f1
commit 355317d7c2
2 changed files with 32 additions and 3 deletions
+24
View File
@@ -157,6 +157,28 @@
- **Imports from**: every other component (it is the composition root) - **Imports from**: every other component (it is the composition root)
- **Consumed by**: (none — top of the graph; bundled by Vite) - **Consumed by**: (none — top of the graph; bundled by Vite)
### Component: `Blackbox Tests` (cross-cutting)
- **Epic**: AZ-455
- **Directories**: `tests/` (fast-profile shared helpers, MSW, fixtures, setup), `e2e/` (Playwright config, suite-e2e docker-compose, stubs, runner, e2e specs, e2e fixtures), plus colocated `*.test.{ts,tsx}` and `*.spec.{ts,tsx}` files under any production component directory.
- **Public API**: none (tests are not consumed by production code).
- **Internal**: every file under owned paths.
- **Owns** (exclusive write):
- `tests/**`
- `e2e/**`
- `**/*.test.{ts,tsx}` and `**/*.spec.{ts,tsx}` — colocated test files (Vitest convention) override every production component's `Owns` glob for that filename pattern only.
- `vitest.config.ts`, `tsconfig.test.json`
- `scripts/run-tests.sh`, `scripts/run-performance-tests.sh` (extension only — the files were created in autodev Step 4 as Step 6 placeholders).
- `package.json` test-scoped sections only: `scripts.test*`, `scripts.lint:tests`, `devDependencies` for runners (`vitest`, `@vitest/*`, `@playwright/test`, `msw`, `@testing-library/*`), and any test-only `peerDependencies` overrides.
- ESLint test-override blocks (`overrides` entries scoped to `tests/**`, `e2e/**`, `**/*.test.{ts,tsx}`).
- **Imports from**: `00_foundation` only (and only `src/types/index.ts` — typed wire-contract enums per `_docs/02_document/tests/environment.md` § Black-box discipline / `P9`). NEVER any other production component's internal files. The static profile enforces this via ripgrep.
- **Consumed by**: (none — tests are not part of production runtime).
- **Notes**:
- Every test task spec under epic AZ-455 carries `**Component**: Blackbox Tests` and resolves its file ownership through this entry.
- Colocated test files are OWNED by the test task that creates them, even when the parent directory belongs to a production component. The production files in that same directory remain READ-ONLY for the test task (compile-time imports of the production module under test are permitted; modifications are not).
- Test-related `package.json` edits (devDependencies, test scripts) are OWNED here. Production `dependencies` and non-test `scripts` are FORBIDDEN — those remain owned by the production component whose runtime they affect (typically `10_app-shell`).
- `mission-planner/` test files (e.g., `mission-planner/src/test/jsonImport.test.ts`) are OWNED here for the same reason; the `mission-planner/**` production glob remains owned by `05_flights`.
## Shared / Cross-Cutting ## Shared / Cross-Cutting
> No `src/shared/` directory exists today. Two cross-cutting concerns are tracked here as **proposed** shared modules; they require a physical file move scheduled for Step 4 (testability) or Step 8 (refactor). > No `src/shared/` directory exists today. Two cross-cutting concerns are tracked here as **proposed** shared modules; they require a physical file move scheduled for Step 4 (testability) or Step 8 (refactor).
@@ -190,6 +212,8 @@ Read top-to-bottom; an upper layer may import from a lower layer but NEVER the r
Violations of this table are **Architecture** findings in code-review Phase 7 and are High severity. Violations of this table are **Architecture** findings in code-review Phase 7 and are High severity.
The `Blackbox Tests` cross-cutting component sits **outside** this table. It imports from `00_foundation` only (specifically `src/types/index.ts` for typed wire-contract enums) and is consumed by no production component. The static-profile ripgrep checks enforce that no test imports from any other production component's internal files.
## Verification Needed ## Verification Needed
The following inferences could not be made cleanly from code alone. They are surfaced for the user to confirm or override at the Step 2.5 BLOCKING gate. The following inferences could not be made cleanly from code alone. They are surfaced for the user to confirm or override at the Step 2.5 BLOCKING gate.
+8 -3
View File
@@ -4,13 +4,14 @@
flow: existing-code flow: existing-code
step: 6 step: 6
name: Implement Tests name: Implement Tests
status: not_started status: in_progress
sub_step: sub_step:
phase: 0 phase: 1
name: awaiting-invocation name: parse
detail: "" detail: ""
retry_count: 0 retry_count: 0
cycle: 1 cycle: 1
tracker: jira
step_4_5_glossary_vision: confirmed step_4_5_glossary_vision: confirmed
step_2_baseline_routing: per-finding-recommended (option A) step_2_baseline_routing: per-finding-recommended (option A)
step_3_results_report_authoring: agent (option A) step_3_results_report_authoring: agent (option A)
@@ -25,3 +26,7 @@ step_3_ac_gap_handling: rollback-to-6c (option A)
- Legacy reference: `_docs/legacy/wpf-era.md` + research copy at - Legacy reference: `_docs/legacy/wpf-era.md` + research copy at
`suite/annotations-research` (detached @ `22529c2`). `suite/annotations-research` (detached @ `22529c2`).
- /document scope was src/ AND mission-planner/ (two disjoint groups). - /document scope was src/ AND mission-planner/ (two disjoint groups).
- 2026-05-11 Step 6 entry: added "Blackbox Tests" cross-cutting
component to `_docs/02_document/module-layout.md` so the implement
skill's Step 4 (file ownership) can resolve test-task ownership
for AZ-456..AZ-482 (epic AZ-455).