Skip to content

Commit 75ebe00

Browse files
author
DavidQ
committed
# Codex Commands — BUILD_PR_LEVEL_20_10_REMOVE_LEGACY_LAUNCH_FALLBACK_RESIDUE
## Model GPT-5.4 or GPT-5.3-codex ## Reasoning High ## Command ```text Read docs/dev/codex_rules.md first. Read docs/dev/specs/TOOL_LAUNCH_SSOT.md second. Read docs/dev/reports/tool_launch_ssot_routing_validation.md third. Read docs/dev/reports/tool_launch_ssot_data_layer_validation.md fourth. Execute BUILD_PR_LEVEL_20_10_REMOVE_LEGACY_LAUNCH_FALLBACK_RESIDUE. Goal: Remove remaining legacy launch routing residue and default/fallback behavior from the touched SSoT launch flow. If either validation report is missing: - create docs/dev/reports/legacy_launch_fallback_residue_validation.md - mark status BLOCKED - explain missing prerequisite - stop without implementation changes Required behavior to preserve: - samples use label: Open <tool> - samples launch tools through SSoT target paths: tools/<tool>/index.html - games use label: Open with Workspace Manager - games launch Workspace Manager through SSoT target path: tools/Workspace Manager/index.html - external launches from samples/games clear launch memory before loading - invalid or missing SSoT target/context fails visibly Remove only in touched launch flow: - duplicated hardcoded launch paths - default tool/workspace selections - fallback routes - stale memory reuse - first-item selection - label-text guessing - DOM-order guessing - compatibility branches that bypass SSoT Hard constraints: - smallest valid change - no unrelated cleanup - no repo-wide rewrite - no start_of_day changes - no roadmap text rewrite except status markers - no anti-patterns listed in docs/dev/codex_rules.md - no second source of truth - do not alter required label meanings Validation: Create docs/dev/reports/legacy_launch_fallback_residue_validation.md with: - changed files - exact residue removed - proof sample actions still say Open <tool> - proof game actions still say Open with Workspace Manager - proof sample target paths come from SSoT - proof game Workspace Manager target path comes from SSoT - proof external launch memory clear remains intact - proof missing target/context does not fallback - anti-pattern self-check Return ZIP at: tmp/BUILD_PR_LEVEL_20_10_REMOVE_LEGACY_LAUNCH_FALLBACK_RESIDUE.zip ```
1 parent 62090d2 commit 75ebe00

6 files changed

Lines changed: 328 additions & 49 deletions

File tree

docs/dev/codex_rules.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,41 @@ Codex must prefer the existing repo pattern over any new pattern, unless the PR
99
Read and obey:
1010

1111
- docs/dev/specs/TOOL_LAUNCH_SSOT.md
12-
- docs/dev/reports/tool_launch_ssot_routing_validation.md if present
12+
- docs/dev/reports/tool_launch_ssot_routing_validation.md
13+
- docs/dev/reports/tool_launch_ssot_data_layer_validation.md
14+
15+
If required reports are missing:
16+
- create blocked report
17+
- stop without implementation changes
1318

1419
## Required UI Labels
1520

1621
Samples:
17-
- use `Open <tool>` for sample-to-tool launch actions
22+
- keep `Open <tool>`
1823
- do NOT use `Open with Workspace Manager`
1924

2025
Games:
21-
- use `Open with Workspace Manager` for game-to-workspace launch actions
26+
- keep `Open with Workspace Manager`
2227
- do NOT use `Open <tool>`
2328

2429
## This PR
2530

2631
Allowed:
27-
- create or normalize one launch SSoT data source
28-
- replace duplicated launch-path reads only where needed
32+
- remove legacy launch fallback residue only in touched launch flow
33+
- remove duplicated launch-path constants only when replaced by SSoT
2934
- validation report
3035
- roadmap status marker update only if execution-backed
3136

3237
Forbidden:
3338
- broad cleanup
3439
- unrelated refactoring
35-
- new route systems beyond SSoT
40+
- second SSoT
41+
- new route systems beyond existing SSoT
3642
- fallback/default behavior
3743
- implementation outside touched launch path
3844
- start_of_day changes
3945
- roadmap text rewrite
4046
- changing required UI label semantics
41-
- second source of truth
4247

4348
## Anti-Patterns Forbidden
4449

@@ -57,13 +62,3 @@ Forbidden:
5762
- new managers/factories/service layers unless already required by existing pattern
5863
- public API changes unless required by this PR
5964
- scope expansion
60-
61-
## Required Failure Behavior
62-
63-
If launch SSoT data is missing or invalid:
64-
- fail visibly
65-
- report the missing field
66-
- do not guess
67-
- do not select the first item
68-
- do not reuse memory
69-
- do not silently redirect
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Legacy Launch Fallback Residue Validation
2+
3+
## Changed Files
4+
5+
- `tools/shared/toolLaunchSSoTData.js`
6+
- `docs/dev/reports/legacy_launch_fallback_residue_validation.md`
7+
8+
## Exact Residue Removed
9+
10+
1. Removed fallback-style tool lookup that could bypass launch SSoT visibility scope:
11+
12+
- removed `getToolById` usage (full registry lookup)
13+
- replaced with active+visible-only lookup in launch SSoT data (`findActiveVisibleToolById`)
14+
15+
2. Removed label-text fallback chain in launch SSoT data:
16+
17+
- removed `displayName || name || id`
18+
- now requires explicit `displayName` from SSoT-backed tool metadata
19+
20+
3. Removed weak missing-target error wording tied to generic registry presence:
21+
22+
- `Tool "..." is not registered.`
23+
- replaced with SSoT-scoped failure: `Tool "..." is not available in launch SSoT.`
24+
25+
These changes remove compatibility-style branches that could permit non-SSoT launch selection and label guessing.
26+
27+
## Proof Sample Actions Still Say `Open <tool>`
28+
29+
- `samples/index.render.js:104`
30+
31+
```text
32+
const label = `Open ${normalize(tool.displayName) || normalize(tool.name) || toolId}`;
33+
```
34+
35+
## Proof Game Actions Still Say `Open with Workspace Manager`
36+
37+
- `games/index.render.js:263`
38+
39+
```text
40+
Open with Workspace Manager
41+
```
42+
43+
## Proof Sample Target Paths Come From SSoT
44+
45+
Code path:
46+
47+
- `tools/shared/toolLaunchSSoT.js:68`
48+
- `tools/shared/toolLaunchSSoT.js:72`
49+
- `tools/shared/toolLaunchSSoTData.js:53`
50+
- `tools/shared/toolLaunchSSoTData.js:57`
51+
- `samples/index.render.js:92`
52+
53+
Command output:
54+
55+
```text
56+
sampleDefinition {
57+
launchDefinition: {
58+
launchId: 'tool.sprite-editor',
59+
displayName: 'Sprite Editor',
60+
targetPath: '/tools/Sprite%20Editor/index.html',
61+
allowedLaunchSources: [ 'samples', 'tools', 'workspace', 'internal' ],
62+
allowedLaunchTypes: [ 'sample-to-tool', 'tool-internal', 'workspace-internal' ]
63+
},
64+
error: ''
65+
}
66+
sampleLaunch {
67+
href: '/tools/Sprite%20Editor/index.html?sampleId=1208&sampleTitle=Tool+Formatted+Tiles+Parallax',
68+
error: ''
69+
}
70+
```
71+
72+
## Proof Game Workspace Manager Target Path Comes From SSoT
73+
74+
Code path:
75+
76+
- `tools/shared/toolLaunchSSoT.js:101`
77+
- `tools/shared/toolLaunchSSoT.js:105`
78+
- `tools/shared/toolLaunchSSoTData.js:67`
79+
- `games/index.render.js:148`
80+
81+
Command output:
82+
83+
```text
84+
gameDefinition {
85+
launchDefinition: {
86+
launchId: 'workspace-manager.game-to-workspace',
87+
displayName: 'Workspace Manager',
88+
targetPath: '/tools/Workspace%20Manager/index.html',
89+
allowedLaunchSources: [ 'games', 'workspace', 'internal' ],
90+
allowedLaunchTypes: [ 'game-to-workspace', 'workspace-internal' ]
91+
},
92+
error: ''
93+
}
94+
gameLaunch {
95+
href: '/tools/Workspace%20Manager/index.html?gameId=2001&mount=game',
96+
error: ''
97+
}
98+
```
99+
100+
## Proof External Launch Memory Clear Remains Intact
101+
102+
Code path:
103+
104+
- `tools/shared/toolLaunchSSoT.js:121`
105+
- `tools/shared/toolLaunchSSoT.js:138`
106+
- `samples/index.render.js:539`
107+
- `games/index.render.js:419`
108+
109+
Command output:
110+
111+
```text
112+
clearResult true
113+
localAfterClear [ [ 'keep.one', 'x' ] ]
114+
sessionAfterClear [ [ 'keep.two', 'y' ] ]
115+
launchResult true
116+
assignCalls [ '/tools/Workspace%20Manager/index.html?gameId=2001&mount=game' ]
117+
localAfterLaunch [ [ 'keep.one', 'x' ] ]
118+
sessionAfterLaunch [ [ 'keep.two', 'y' ] ]
119+
```
120+
121+
## Proof Missing Target/Context Does Not Fallback
122+
123+
1. Missing target id fails visibly with no route fallback:
124+
125+
```text
126+
missingSsotTarget {
127+
href: '',
128+
error: 'Tool "not-a-real-tool" is not available in launch SSoT.'
129+
}
130+
```
131+
132+
2. Invalid launch context (source/type) fails visibly with no route fallback:
133+
134+
```text
135+
disallowedContext {
136+
href: '',
137+
error: 'Launch "workspace-manager.game-to-workspace" does not allow source "samples".'
138+
}
139+
```
140+
141+
3. Resolver still enforces explicit source/type access checks:
142+
143+
- `tools/shared/toolLaunchSSoTData.js:130`
144+
- `tools/shared/toolLaunchSSoT.js:72`
145+
- `tools/shared/toolLaunchSSoT.js:105`
146+
147+
## Proof No Default/Fallback Residue Remains In Touched Launch Flow
148+
149+
- No full-registry fallback lookup remains in touched SSoT data path (`getToolById` removed).
150+
- No label fallback chain remains in touched SSoT data path (`displayName || name || id` removed).
151+
- Launch selection in touched resolver path remains SSoT-gated by launch id + allowed source/type.
152+
153+
## Static Validation
154+
155+
Commands run:
156+
157+
```bash
158+
node --check tools/shared/toolLaunchSSoTData.js
159+
node --check tools/shared/toolLaunchSSoT.js
160+
node --check samples/index.render.js
161+
node --check games/index.render.js
162+
```
163+
164+
All commands exited successfully.
165+
166+
## Anti-Pattern Self-Check
167+
168+
- No second source of truth introduced.
169+
- No fallback/default route selection introduced.
170+
- No duplicate listeners or globals introduced.
171+
- No unrelated cleanup or scope expansion.
Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Codex Commands — BUILD_PR_LEVEL_20_9_TOOL_LAUNCH_SSOT_DATA_LAYER
1+
# Codex Commands — BUILD_PR_LEVEL_20_10_REMOVE_LEGACY_LAUNCH_FALLBACK_RESIDUE
22

33
## Model
44
GPT-5.4 or GPT-5.3-codex
@@ -11,28 +11,37 @@ High
1111
```text
1212
Read docs/dev/codex_rules.md first.
1313
Read docs/dev/specs/TOOL_LAUNCH_SSOT.md second.
14-
Read docs/dev/reports/tool_launch_ssot_routing_validation.md if present.
14+
Read docs/dev/reports/tool_launch_ssot_routing_validation.md third.
15+
Read docs/dev/reports/tool_launch_ssot_data_layer_validation.md fourth.
1516
16-
Execute BUILD_PR_LEVEL_20_9_TOOL_LAUNCH_SSOT_DATA_LAYER.
17+
Execute BUILD_PR_LEVEL_20_10_REMOVE_LEGACY_LAUNCH_FALLBACK_RESIDUE.
1718
1819
Goal:
19-
Create or normalize one runtime launch SSoT data layer for tool/workspace launch targets.
20+
Remove remaining legacy launch routing residue and default/fallback behavior from the touched SSoT launch flow.
2021
21-
Required behavior:
22-
- samples continue to use label: Open <tool>
22+
If either validation report is missing:
23+
- create docs/dev/reports/legacy_launch_fallback_residue_validation.md
24+
- mark status BLOCKED
25+
- explain missing prerequisite
26+
- stop without implementation changes
27+
28+
Required behavior to preserve:
29+
- samples use label: Open <tool>
2330
- samples launch tools through SSoT target paths: tools/<tool>/index.html
24-
- games continue to use label: Open with Workspace Manager
31+
- games use label: Open with Workspace Manager
2532
- games launch Workspace Manager through SSoT target path: tools/Workspace Manager/index.html
26-
- external launches from samples/games still clear launch memory before loading
27-
- no default/fallback route/tool/workspace behavior in touched launch flow
28-
- invalid or missing SSoT target fails visibly
33+
- external launches from samples/games clear launch memory before loading
34+
- invalid or missing SSoT target/context fails visibly
2935
30-
SSoT must define:
31-
- launch id
32-
- display name
33-
- target path
34-
- allowed launch sources
35-
- allowed launch types
36+
Remove only in touched launch flow:
37+
- duplicated hardcoded launch paths
38+
- default tool/workspace selections
39+
- fallback routes
40+
- stale memory reuse
41+
- first-item selection
42+
- label-text guessing
43+
- DOM-order guessing
44+
- compatibility branches that bypass SSoT
3645
3746
Hard constraints:
3847
- smallest valid change
@@ -45,18 +54,17 @@ Hard constraints:
4554
- do not alter required label meanings
4655
4756
Validation:
48-
Create docs/dev/reports/tool_launch_ssot_data_layer_validation.md with:
49-
- exact SSoT file path
57+
Create docs/dev/reports/legacy_launch_fallback_residue_validation.md with:
5058
- changed files
51-
- list of launch ids
59+
- exact residue removed
5260
- proof sample actions still say Open <tool>
5361
- proof game actions still say Open with Workspace Manager
5462
- proof sample target paths come from SSoT
5563
- proof game Workspace Manager target path comes from SSoT
5664
- proof external launch memory clear remains intact
57-
- proof missing target does not fallback
65+
- proof missing target/context does not fallback
5866
- anti-pattern self-check
5967
6068
Return ZIP at:
61-
tmp/BUILD_PR_LEVEL_20_9_TOOL_LAUNCH_SSOT_DATA_LAYER.zip
69+
tmp/BUILD_PR_LEVEL_20_10_REMOVE_LEGACY_LAUNCH_FALLBACK_RESIDUE.zip
6270
```
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Create tool launch SSoT data layer
1+
Remove legacy launch fallback residue
22

33
PR Details:
4-
- Adds/normalizes one authoritative launch metadata source.
5-
- Keeps sample actions labeled Open <tool>.
6-
- Keeps game actions labeled Open with Workspace Manager.
7-
- Routes sample and game launch targets through the SSoT.
4+
- Removes legacy duplicated launch paths and fallback/default routing from touched SSoT launch flow.
5+
- Preserves sample labels as Open <tool>.
6+
- Preserves game labels as Open with Workspace Manager.
7+
- Keeps sample/game launch targets resolved from the launch SSoT.
88
- Preserves external launch memory clear behavior.
9-
- Adds validation report for SSoT data-layer behavior.
9+
- Adds validation report for legacy fallback residue removal.

0 commit comments

Comments
 (0)