Skip to content

Commit d36050d

Browse files
committed
Document ASGI shell testing guidance
1 parent 51d9c49 commit d36050d

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/engineering/skills/testing.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,24 @@ python scripts/export_migration_contracts.py
2222
python -m pytest tests/contract tests/unit/test_migration_flags.py tests/unit/test_migration_contract_artifacts.py tests/unit/test_capture_migration_baseline.py tests/unit/routes/test_migration_context_logging.py -q
2323
```
2424

25+
For PR 2 FastAPI shell or Flask fallback changes, verify the ASGI entrypoint and
26+
the v1 route contracts together:
27+
28+
```bash
29+
FLASK_DEBUG=1 python -m pytest tests/unit/test_asgi_factory.py tests/contract/test_v1_route_contracts.py tests/unit/routes/test_migration_context_logging.py -q
30+
```
31+
32+
If the change touches service compatibility behavior used by migrated or
33+
candidate endpoints, add the relevant focused service tests. For budget-window
34+
simulation compatibility, run:
35+
36+
```bash
37+
FLASK_DEBUG=1 python -m pytest tests/unit/services/test_economy_service.py::TestEconomyService::TestGetBudgetWindowEconomicImpact -q
38+
```
39+
40+
Regenerate and review `docs/engineering/generated/migration_contracts.md` when
41+
route inventory, migration registry flags, or v1 contract expectations change.
42+
FastAPI shell-only fallback changes should not change the route catalog.
43+
2544
Run `ruff format --check` and `ruff check` on changed Python files before
2645
handoff.

0 commit comments

Comments
 (0)