fix: fail safe on missing workspace revisions
This commit is contained in:
@@ -38,3 +38,28 @@ Self-review:
|
||||
|
||||
Concerns:
|
||||
- The composer still retains backward-compatible behavior for summaries that omit `revision` entirely; only explicit `revision.state === "migration_required"` is blocked. That matches the current mixed-test environment, but once summary responses are guaranteed to include `revision`, that fallback may be removable.
|
||||
|
||||
Fix round 1/5 — August 8, 2026
|
||||
|
||||
Summary:
|
||||
- Made missing or invalid workspace summaries fail safe in frontend session creation and composer selection instead of falling open as legacy.
|
||||
- Added an actionable unavailable message in workspace management for incomplete summaries with no canonical revision.
|
||||
- Replaced the old runtime-oriented example descriptor files with exact backend WorkspaceV3 descriptor YAML.
|
||||
|
||||
Additional files changed:
|
||||
- `frontend/src/api/sessions.test.ts`
|
||||
- `backend/test/workspaces-schema.test.ts`
|
||||
|
||||
Fix-round verification:
|
||||
- `cd frontend && npx vitest run src/api/sessions.test.ts src/shell/SteerInput.test.tsx src/shell/WorkspaceManager.test.tsx src/shell/WorkspaceEditor.test.tsx src/shell/WorkspacePublishDialog.test.tsx src/workspaces/drafts.test.ts src/api/workspaces.test.ts`
|
||||
- Result: 7 files passed, 73 tests passed.
|
||||
- `cd frontend && npx tsc -b`
|
||||
- Result: passed.
|
||||
- `cd backend && npx vitest run test/workspaces-schema.test.ts`
|
||||
- Result: 1 file passed, 17 tests passed.
|
||||
- `git diff --check`
|
||||
- Result: passed.
|
||||
|
||||
Notes:
|
||||
- Missing `revision` in a workspace summary now fails with the same session/composer safety posture as `migration_required`, using the existing safe workspace-policy error for session creation and an explicit unavailable message in workspace management.
|
||||
- The committed example files now validate as actual schema-v3 descriptors instead of deployment/runtime templates with forbidden semantic endpoint fields.
|
||||
|
||||
Reference in New Issue
Block a user