test: restore task 2 review coverage
This commit is contained in:
@@ -97,3 +97,69 @@ Concerns
|
||||
|
||||
- No code concerns remaining for Task 2.
|
||||
- One deliberate scope exception: a route test was updated to align with the already-established Task 1 / Task 3 fail-closed contract.
|
||||
|
||||
Fix round 1
|
||||
|
||||
Scope
|
||||
|
||||
- Restored meaningful route-level diagnoser coverage without reopening schema-v3 semantic runtime paths.
|
||||
- Added direct schema-v2 registry coverage for `migration_required` listing and lease rejection.
|
||||
|
||||
Covering test files
|
||||
|
||||
- `backend/test/routes-workspaces.test.ts`
|
||||
- `backend/test/workspace-registry.test.ts`
|
||||
|
||||
RED command and output
|
||||
|
||||
Command:
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npx vitest run test/routes-workspaces.test.ts test/workspace-registry.test.ts
|
||||
```
|
||||
|
||||
Observed result on top of `76bc94d` after adding the restored/new assertions:
|
||||
|
||||
- 2 files passed
|
||||
- 37 tests passed
|
||||
- 0 failures
|
||||
|
||||
Why no RED appeared:
|
||||
|
||||
- The review items exposed missing/weakened coverage, not a production behavior bug.
|
||||
- `/workspaces/:id/test` already reaches the diagnoser for resolvable legacy v2 descriptors.
|
||||
- Schema-v3 `/workspaces/:id/test` already fails closed before diagnoser entry.
|
||||
- Schema-v2 descriptors were already listed as `migration_required` and already rejected by `acquireSessionRevision()`.
|
||||
|
||||
GREEN command and output
|
||||
|
||||
Command:
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npx vitest run test/routes-workspaces.test.ts test/workspace-registry.test.ts
|
||||
npx tsc --noEmit -p .
|
||||
```
|
||||
|
||||
Fresh results:
|
||||
|
||||
- covering tests: 2 files passed, 37 tests passed
|
||||
- backend typecheck: passed
|
||||
|
||||
Changed files
|
||||
|
||||
- `backend/test/routes-workspaces.test.ts`
|
||||
- `backend/test/workspace-registry.test.ts`
|
||||
- `.superpowers/sdd/2026-08-08-internal-qdrant-ollama/task-2-report.md`
|
||||
|
||||
What changed
|
||||
|
||||
- Split route coverage so `POST /workspaces/validate` still checks canonical validation independently.
|
||||
- Restored route-level diagnoser coverage through a migration-required schema-v2 descriptor with resolvable legacy bindings.
|
||||
- Added an explicit schema-v3 fail-closed regression for `POST /workspaces/:id/test`.
|
||||
- Added a direct schema-v2 registry regression proving `list()` returns `migration_required` and `acquireSessionRevision()` rejects it.
|
||||
|
||||
Concerns
|
||||
|
||||
- No production concerns. This round only tightened coverage and corrected the weakened test expectation.
|
||||
|
||||
Reference in New Issue
Block a user