44 lines
1.6 KiB
Markdown
44 lines
1.6 KiB
Markdown
# M1 Runtime and Metadata Evidence
|
|
|
|
## RED
|
|
|
|
Commit: `8f78484 test(v2): define runtime and metadata contracts`
|
|
|
|
Command:
|
|
|
|
```bash
|
|
.venv/bin/python -m pytest tests/unit/test_config.py tests/integration/test_migrations.py -q
|
|
```
|
|
|
|
Observed result: exit 2 during collection because `backup_tool.clock` did not exist. This proves the test-only commit preceded runtime implementation.
|
|
|
|
## GREEN
|
|
|
|
Migration gate executed against a disposable absolute SQLite database:
|
|
|
|
```bash
|
|
cd backend
|
|
BACKUP_TOOL_DATABASE_URL=sqlite+aiosqlite:////absolute/path/.m1-gate.db ../.venv/bin/python -m alembic upgrade head
|
|
BACKUP_TOOL_DATABASE_URL=sqlite+aiosqlite:////absolute/path/.m1-gate.db ../.venv/bin/python -m alembic downgrade base
|
|
BACKUP_TOOL_DATABASE_URL=sqlite+aiosqlite:////absolute/path/.m1-gate.db ../.venv/bin/python -m alembic upgrade head
|
|
../.venv/bin/python -m pytest ../tests/unit/test_config.py ../tests/integration/test_migrations.py -q
|
|
cd ..
|
|
make check
|
|
```
|
|
|
|
Observed results:
|
|
|
|
- Alembic upgrade, downgrade, and second upgrade each exited 0.
|
|
- Focused M1 suite: `13 passed`.
|
|
- Fast unit/contract suite: `28 passed`.
|
|
- Ruff check/format and strict mypy: passed.
|
|
- Frontend typecheck/build: passed.
|
|
- Disposable database removed after verification.
|
|
|
|
## Hand Review
|
|
|
|
- Baseline revision contains explicit `op.create_table`, constraints, foreign keys, and indexes for all 14 v2 entities; it does not call `create_all`.
|
|
- SQLite connections enable foreign keys, WAL, and a bounded busy timeout.
|
|
- Startup compares the database Alembic revision with the current script head and rejects unmigrated databases.
|
|
- Runtime roles are explicit CLI subcommands; no role starts another role in M1.
|