Skip to content

Commit 101f318

Browse files
committed
Rename runtime Workspace contract to Project Workspace - PR_26152_079-project-workspace-contract-rename
1 parent e19349b commit 101f318

8 files changed

Lines changed: 668 additions & 610 deletions
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Project Workspace Contract Rename Validation
2+
3+
PR: PR_26152_079-project-workspace-contract-rename
4+
Date: 2026-06-02
5+
6+
## Scope
7+
8+
- Continued from PR_26152_078.
9+
- Renamed runtime-only Workspace terminology to Project Workspace.
10+
- Updated contracts, contract tests, docs/specs, and required reports only.
11+
- No database implementation, authentication implementation, runtime UI, page, CSS, or HTML changes were made.
12+
13+
## Contract Rename
14+
15+
- The previous runtime-only contract file was renamed to `src/shared/contracts/projectWorkspaceRuntimeContract.js`.
16+
- The matching runtime-only contract test was renamed to `tests/shared/ProjectWorkspaceRuntimeContract.test.mjs`.
17+
- The runtime-only contract terminology was renamed to Project Workspace Runtime Contract.
18+
- Project Workspace is the active runtime working context for a Project.
19+
20+
## Project Workspace Rules
21+
22+
- Project Workspace is runtime-only.
23+
- Project Workspace does not persist tool payloads.
24+
- Project Workspace does not own saved tool state.
25+
- Project Workspace does not duplicate project storage.
26+
- Project Workspace does not duplicate tool state storage.
27+
- Project Workspace recovery points to Tool State recovery.
28+
29+
## Data Ownership
30+
31+
- Project = persisted DB container.
32+
- Project Workspace = current runtime working context for the Project.
33+
- Tool State = persisted DB record for one tool.
34+
- Manifest = portable export/import format.
35+
36+
## Docs
37+
38+
- Added `docs/dev/specs/PROJECT_WORKSPACE_RUNTIME_CONTRACT.md`.
39+
- Updated `docs/dev/specs/TOOL_LAUNCH_SSOT.md` to use Project Workspace terminology for prior runtime launch state.
40+
41+
## Validation Commands
42+
43+
Targeted contract tests:
44+
45+
```powershell
46+
$contractTests = @(
47+
'tests/shared/ProjectWorkspaceRuntimeContract.test.mjs',
48+
'tests/shared/ToolStateContract.test.mjs',
49+
'tests/shared/ProjectContract.test.mjs',
50+
'tests/shared/IdentityPermissionsContract.test.mjs'
51+
)
52+
$toolContractTests = Get-ChildItem -Path tests/shared/tools -Filter '*.test.mjs' | Sort-Object Name | ForEach-Object { $_.FullName }
53+
node ./scripts/run-node-test-files.mjs $contractTests $toolContractTests
54+
```
55+
56+
Result: PASS, `40/40 targeted node test file(s) passed`.
57+
58+
Static checks:
59+
60+
```powershell
61+
git diff --check -- src/shared/contracts tests/shared docs/dev/specs docs/dev/reports/project_workspace_contract_rename_validation.md docs/dev/commit_comment.txt
62+
git diff --name-only -- '*.css' '*.html'
63+
Test-Path src/shared/contracts/workspaceRuntimeContract.js
64+
Test-Path tests/shared/WorkspaceRuntimeContract.test.mjs
65+
rg -P "^# Workspace|^- Workspace|^Workspace(?! Manager)|^- workspace|^workspace" -n src/shared/contracts/projectWorkspaceRuntimeContract.js tests/shared/ProjectWorkspaceRuntimeContract.test.mjs docs/dev/specs/PROJECT_WORKSPACE_RUNTIME_CONTRACT.md docs/dev/specs/TOOL_LAUNCH_SSOT.md docs/dev/reports/project_workspace_contract_rename_validation.md
66+
rg '"workspaceState"' -n src/shared/contracts/projectWorkspaceRuntimeContract.js tests/shared/ProjectWorkspaceRuntimeContract.test.mjs
67+
```
68+
69+
## Expected Results
70+
71+
- PASS: Project Workspace contract tests validate terminology and behavior remain unchanged.
72+
- PASS: Project Workspace rejects old standalone workspace storage fields such as `workspaceState`.
73+
- PASS: Tool State remains the saved editing source.
74+
- PASS: Project, Identity/Permissions, and Tool contract tests remain compatible.
75+
- PASS: no runtime/UI/CSS/HTML files changed.
76+
- PASS: no repo-wide or samples tests run.
77+
78+
## Skipped
79+
80+
- Repo-wide tests were not run.
81+
- Samples tests were not run.
82+
- Runtime/UI validation was not run because this PR only changes contracts, contract tests, docs/specs, and reports.

docs/dev/reports/workspace_runtime_only_contract_validation.md

Lines changed: 0 additions & 77 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Project Workspace Runtime Contract
2+
3+
Date: 2026-06-02
4+
5+
## Purpose
6+
7+
Project Workspace is the runtime-only active working context for a Project.
8+
9+
## Rules
10+
11+
- Project Workspace is runtime-only.
12+
- Project Workspace does not persist tool payloads.
13+
- Project Workspace does not own saved tool state.
14+
- Project Workspace does not duplicate project storage.
15+
- Project Workspace does not duplicate tool state storage.
16+
- Project Workspace recovery points to Tool State recovery.
17+
18+
## Runtime Fields
19+
20+
Project Workspace may track:
21+
22+
- `activeProjectId`
23+
- `activeToolId`
24+
- `activeToolStateId`
25+
- `dirty`
26+
- `recoveryAvailable`
27+
- `recoveryToolStateId`
28+
- `activePaletteContext`
29+
- `flowState`
30+
31+
## Data Ownership
32+
33+
- Project = persisted DB container.
34+
- Project Workspace = current runtime working context for the Project.
35+
- Tool State = persisted DB record for one tool.
36+
- Manifest = portable export/import format.
37+
38+
## Prohibited Storage
39+
40+
Project Workspace must not contain saved tool state records, tool payload data, project records, manifest data, database IDs, Project Workspace storage records, or Project Workspace-owned recovery state.

docs/dev/specs/TOOL_LAUNCH_SSOT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ An external launch is any launch that begins from:
7171

7272
External launches MUST clear launch memory before loading the target tool or workspace.
7373

74-
External launches MUST NOT reuse prior tool state, prior workspace state, stale selected tool values, stale selected game values, stale launch context, or prior session carryover.
74+
External launches MUST NOT reuse prior tool state, prior Project Workspace state, stale selected tool values, stale selected game values, stale launch context, or prior session carryover.
7575

7676
## Query Contract
7777

0 commit comments

Comments
 (0)