Skip to content

Commit c64249d

Browse files
author
DavidQ
committed
Remove Workspace Manager default and query fallbacks
PR Details: - Removes first-tool default selection from Workspace Manager launch flow. - Removes legacy gameId || game query fallback. - Requires explicit gameId for games/index.html Workspace Manager launch path. - Restores docs/dev/specs/TOOL_LAUNCH_SSOT.md if missing. - Adds validation report for the recovery gate blocker.
1 parent 1a4109b commit c64249d

10 files changed

Lines changed: 576 additions & 186 deletions

docs/dev/codex_rules.md

Lines changed: 17 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,39 @@
22

33
These rules OVERRIDE all other instructions.
44

5-
Codex must prefer the existing repo pattern over any new pattern, unless the PR explicitly says otherwise.
6-
75
## This PR
86

9-
This PR is a validation and gate-lock PR.
10-
117
Allowed:
12-
- validation reports
13-
- recovery roadmap status markers only
14-
- blocked decision report if validation fails
8+
- targeted Workspace Manager fallback removal
9+
- restore missing docs/dev/specs/TOOL_LAUNCH_SSOT.md
10+
- validation report
1511

1612
Forbidden:
17-
- implementation code changes
1813
- broad cleanup
1914
- unrelated refactoring
2015
- new route systems
2116
- second SSoT
2217
- fallback/default behavior
2318
- start_of_day changes
2419
- roadmap text rewrite outside status markers
25-
- changing required UI labels
26-
27-
## Required UI Labels
28-
29-
Samples:
30-
- must use `Open <tool>`
20+
- changing labels
3121

32-
Games:
33-
- must use `Open with Workspace Manager`
22+
## Exact Removals Required
3423

35-
## Required Launch Targets
24+
Remove Workspace Manager launch residues:
3625

37-
Samples:
38-
- must route tools to `tools/<tool>/index.html`
26+
- `toolIds[0]` first-item/default tool selection in the launch path
27+
- `gameId || game` legacy query fallback in the launch path
3928

40-
Games:
41-
- must route Workspace Manager to `tools/Workspace Manager/index.html`
42-
43-
## Required Memory Behavior
29+
## Required Failure Behavior
4430

45-
External launches from samples or games:
46-
- must clear launch memory before loading target
47-
- must not reuse stale state
48-
- must not fallback to old context
31+
If `gameId` is missing or invalid:
32+
- fail visibly
33+
- report missing/invalid `gameId`
34+
- do not fallback to `game`
35+
- do not select first tool
36+
- do not reuse memory
37+
- do not silently redirect
4938

5039
## Anti-Patterns Forbidden
5140

@@ -62,15 +51,5 @@ External launches from samples or games:
6251
- duplicate event listeners
6352
- globals
6453
- new managers/factories/service layers
65-
- public API changes
54+
- public API changes outside this PR
6655
- scope expansion
67-
68-
## Required Failure Behavior
69-
70-
If launch SSoT data is missing or invalid:
71-
- fail visibly
72-
- report the missing field
73-
- do not guess
74-
- do not select the first item
75-
- do not reuse memory
76-
- do not silently redirect

docs/dev/reports/phase20_codex_rules_recheck.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,34 @@ BLOCKED
1010
- `tools/shared/toolLaunchSSoT.js`
1111
- `samples/index.render.js`
1212
- `games/index.render.js`
13-
- `tools/Workspace Manager/main.js` (Workspace Manager UAT gate path)
13+
- `tools/Workspace Manager/main.js`
1414

15-
## Rule Checks
15+
## Rules Checklist
1616

1717
- no alias variables: PASS
1818
- no pass-through variables: PASS
1919
- no duplicate launch state: PASS
2020
- no duplicated launch paths in SSoT resolver path: PASS
2121
- no silent redirects: PASS
22-
- no stale memory reuse: PASS
22+
- no stale memory reuse in external launch flow: PASS
2323
- no label-text guessing: PASS
2424
- no DOM-order guessing: PASS
25-
- no default/fallback behavior in recovery gate path: FAIL
25+
- no fallback/default behavior in recovery gate path: FAIL
2626

2727
## Failing Evidence
2828

29-
Default/fallback residues still present in Workspace Manager gate-path file:
29+
Fallback/default residues in `tools/Workspace Manager/main.js`:
3030

31-
- `tools/Workspace Manager/main.js:270` -> `return toolIds[0] || "";`
32-
- `tools/Workspace Manager/main.js:463` -> select fallback to `toolIds[0]`
33-
- `tools/Workspace Manager/main.js:475` -> `initialToolId` fallback to `toolIds[0]`
34-
- `tools/Workspace Manager/main.js:153` -> query compatibility fallback `gameId || game`
35-
- `tools/Workspace Manager/main.js:284` -> query compatibility fallback `game || gameId`
31+
- `:270` -> `return toolIds[0] || "";`
32+
- `:463` -> tool select fallback to `toolIds[0]`
33+
- `:475` -> initial tool fallback to `toolIds[0]`
34+
- `:153` -> `searchParams.get("gameId") || searchParams.get("game")`
35+
- `:284` -> `url.searchParams.get("game") || url.searchParams.get("gameId")`
3636

3737
## Conclusion
3838

39-
Codex rules recheck fails on the no-default/no-fallback requirement for gate lock.
39+
Codex rules recheck does not pass the no-default/no-fallback gate requirement.
4040

41-
Required follow-up:
41+
Next required BUILD_PR:
4242

4343
`BUILD_PR_LEVEL_20_13_REMOVE_WORKSPACE_MANAGER_DEFAULT_AND_QUERY_FALLBACKS`

docs/dev/reports/phase20_recovery_gate_decision.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ BLOCKED - recovery gate remains open
44

55
## Exact Blocker
66

7-
Workspace Manager launch flow still contains default/fallback residue in the validated path file.
7+
Workspace Manager launch flow still contains default/fallback behavior in the validated gate path.
88

99
## File Path
1010

@@ -14,10 +14,15 @@ Workspace Manager launch flow still contains default/fallback residue in the val
1414

1515
`games/index.html -> Open with Workspace Manager -> tools/Workspace Manager/index.html?gameId=<id>&mount=game`
1616

17-
Blocking fallback/default residues found:
17+
## Blocking Evidence
1818

19-
- default first-item selection: `toolIds[0]` at lines 270, 463, 475
20-
- legacy query fallback compatibility: `gameId || game` at lines 153 and 284
19+
- default first-item selection via `toolIds[0]`:
20+
- `tools/Workspace Manager/main.js:270`
21+
- `tools/Workspace Manager/main.js:463`
22+
- `tools/Workspace Manager/main.js:475`
23+
- legacy query fallback compatibility (`game` fallback):
24+
- `tools/Workspace Manager/main.js:153`
25+
- `tools/Workspace Manager/main.js:284`
2126

2227
## Next Required BUILD_PR
2328

Lines changed: 64 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,106 @@
11
# Phase 20 Recovery UAT Validation
22

3+
## Run Date
4+
5+
April 25, 2026
6+
37
## Status
48

59
BLOCKED
610

7-
## Required Inputs Read
11+
## Inputs Read
812

913
- `docs/dev/codex_rules.md`
1014
- `docs/dev/reports/tool_launch_ssot_routing_validation.md`
1115
- `docs/dev/reports/tool_launch_ssot_data_layer_validation.md`
1216
- `docs/dev/reports/legacy_launch_fallback_residue_validation.md`
1317

14-
`docs/dev/specs/TOOL_LAUNCH_SSOT.md` is still not present at the requested path in this repository.
15-
16-
## Validation Scope
17-
18-
Validation-only pass. No runtime implementation changes were made.
18+
`docs/dev/specs/TOOL_LAUNCH_SSOT.md` is not present at the requested path in this repository.
1919

20-
## Samples Validation
20+
## 1. Samples Validation
2121

2222
Result: PASS
2323

24-
- Action label remains `Open <tool>` in `samples/index.render.js:104`.
25-
- Sample launch resolves through SSoT resolver in `samples/index.render.js:92` and `tools/shared/toolLaunchSSoT.js:62`.
26-
- Target path resolves to `tools/<tool>/index.html` via SSoT data (`tools/shared/toolLaunchSSoTData.js:53`, `tools/shared/toolLaunchSSoTData.js:57`).
27-
- External launch memory clear remains in use through `launchWithExternalToolWorkspaceReset` (`samples/index.render.js:539`, `tools/shared/toolLaunchSSoT.js:121`, `tools/shared/toolLaunchSSoT.js:138`).
24+
- Label is `Open <tool>` at `samples/index.render.js:104`.
25+
- Launch uses SSoT resolver at `samples/index.render.js:92` -> `tools/shared/toolLaunchSSoT.js:62`.
26+
- Resolved target path format is `tools/<tool>/index.html`:
27+
- `sampleLaunch.href = /tools/Sprite%20Editor/index.html?...`
28+
- External launch memory clear remains intact via:
29+
- `samples/index.render.js:539`
30+
- `tools/shared/toolLaunchSSoT.js:121`
31+
- `tools/shared/toolLaunchSSoT.js:138`
2832
- Missing/invalid context fails visibly:
29-
- `sampleMissingContext { href: '', error: 'Tool "sprite-editor" launch is missing sampleId.' }`
30-
- `sampleMissingTarget { href: '', error: 'Tool "not-a-real-tool" is not available in launch SSoT.' }`
31-
- No default/fallback route chosen in sample launch resolver path.
33+
- `sampleMissingContext => href: ''`
34+
- `sampleMissingTarget => href: ''`
35+
- No fallback/default route selection in sample launch resolver path.
3236

33-
## Games Validation
37+
## 2. Games Validation
3438

3539
Result: PASS
3640

37-
- Action label remains `Open with Workspace Manager` in `games/index.render.js:263`.
38-
- Game launch resolves through SSoT resolver in `games/index.render.js:148` and `tools/shared/toolLaunchSSoT.js:95`.
39-
- Target path resolves to `tools/Workspace Manager/index.html` via SSoT data (`tools/shared/toolLaunchSSoTData.js:67`).
40-
- External launch memory clear remains in use through `launchWithExternalToolWorkspaceReset` (`games/index.render.js:419`, `tools/shared/toolLaunchSSoT.js:121`, `tools/shared/toolLaunchSSoT.js:138`).
41+
- Label is `Open with Workspace Manager` at `games/index.render.js:263`.
42+
- Launch uses SSoT resolver at `games/index.render.js:148` -> `tools/shared/toolLaunchSSoT.js:95`.
43+
- Resolved target path format is `tools/Workspace Manager/index.html`:
44+
- `gameLaunch.href = /tools/Workspace%20Manager/index.html?gameId=2001&mount=game`
45+
- External launch memory clear remains intact via:
46+
- `games/index.render.js:419`
47+
- `tools/shared/toolLaunchSSoT.js:121`
48+
- `tools/shared/toolLaunchSSoT.js:138`
4149
- Missing/invalid context fails visibly:
42-
- invalid source/type returns no href in `gameInvalidContext`.
43-
- missing game metadata href yields visible `Workspace launch error` text (`games/index.render.js:268`, `games/index.render.js:334`).
44-
- No default/fallback route chosen in game launch resolver path.
50+
- `gameInvalidContext => href: ''`
51+
- visible UI error path: `Workspace launch error` in `games/index.render.js:268`
52+
- No fallback/default route selection in game launch resolver path.
4553

46-
## Workspace Manager UAT Validation
54+
## 3. Workspace Manager UAT
4755

4856
Result: FAIL
4957

50-
Validated path:
58+
Validated route path:
5159

5260
`games/index.html -> Open with Workspace Manager -> /tools/Workspace%20Manager/index.html?gameId=2001&mount=game`
5361

54-
Observed/pass evidence:
62+
Pass evidence:
63+
64+
- Route resolves correctly from SSoT (`gameLaunch` output).
65+
- Memory clear occurs before navigation (`assignCalls` output after clear).
66+
- Explicit context load exists in Workspace Manager:
67+
- `writeToolHostSharedContext(...)` at `tools/Workspace Manager/main.js:381`
68+
- `hostMode: "game"` / `gameId: gameEntry.id` at `tools/Workspace Manager/main.js:386-387`
69+
70+
Fail evidence (fallback/default behavior still present):
71+
72+
- First-item default selection remains:
73+
- `tools/Workspace Manager/main.js:270` -> `return toolIds[0] || "";`
74+
- `tools/Workspace Manager/main.js:463`
75+
- `tools/Workspace Manager/main.js:475`
76+
- Legacy compatibility query fallback remains:
77+
- `tools/Workspace Manager/main.js:153` (`searchParams.get("gameId") || searchParams.get("game")`)
78+
- `tools/Workspace Manager/main.js:284` (`url.searchParams.get("game") || url.searchParams.get("gameId")`)
5579

56-
- Route is correct from SSoT (`gameLaunch` output).
57-
- Memory clear is executed before navigation (`assignCalls` output after clear).
58-
- Explicit context load logic exists (`writeToolHostSharedContext` with `hostMode: "game"`, `gameId`) in `tools/Workspace Manager/main.js:381-388`.
80+
## 4. Codex Rules Recheck (Summary)
5981

60-
Blocking evidence (fallback/default residue still present in this touched flow file):
82+
- no alias variables: PASS
83+
- no pass-through variables: PASS
84+
- no duplicate launch state: PASS
85+
- no duplicated launch paths: PASS
86+
- no silent redirects: PASS
87+
- no stale memory reuse: PASS
88+
- no label-text/DOM-order guessing: PASS
89+
- no fallback/default behavior in Workspace Manager gate path: FAIL
6190

62-
- Default first-item selection remains in Workspace Manager:
63-
- `tools/Workspace Manager/main.js:270` (`return toolIds[0] || "";`)
64-
- `tools/Workspace Manager/main.js:463` and `tools/Workspace Manager/main.js:475` (tool select fallback to `toolIds[0]`).
65-
- Legacy compatibility branch remains for query fallback:
66-
- `tools/Workspace Manager/main.js:153` (`gameId || game`)
67-
- `tools/Workspace Manager/main.js:284` (`searchParams.get("game") || searchParams.get("gameId")`).
91+
## Gate Result
6892

69-
These branches violate the gate requirement that validated launch flow should not depend on default/fallback behavior.
93+
Recovery gate cannot be locked in this run.
7094

71-
## Gate Outcome
95+
Next required BUILD_PR:
7296

73-
- Workspace Manager UAT requirement is not fully satisfied.
74-
- Recovery gate cannot be locked in this PR.
75-
- Next required repair PR: `BUILD_PR_LEVEL_20_13_REMOVE_WORKSPACE_MANAGER_DEFAULT_AND_QUERY_FALLBACKS`.
97+
`BUILD_PR_LEVEL_20_13_REMOVE_WORKSPACE_MANAGER_DEFAULT_AND_QUERY_FALLBACKS`
7698

77-
## Validation Commands Run
99+
## Validation Commands Executed
78100

79101
- `node --check tools/shared/toolLaunchSSoTData.js`
80102
- `node --check tools/shared/toolLaunchSSoT.js`
81103
- `node --check samples/index.render.js`
82104
- `node --check games/index.render.js`
83105
- `node --check tools/Workspace Manager/main.js`
84-
- module validation scripts for launch ids, route resolution, error behavior, and memory-clear behavior
106+
- module scripts validating launch resolution, error behavior, and memory-clear behavior

0 commit comments

Comments
 (0)