Skip to content

Commit ff636c7

Browse files
author
DavidQ
committed
Enforce shared vs tools boundary by moving pure utilities to src/shared
1 parent 662b0f7 commit ff636c7

15 files changed

Lines changed: 83 additions & 36 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ MODEL: GPT-5.4-codex
22
REASONING: high
33

44
COMMAND:
5-
Execute docs/pr/BUILD_PR_REPO_STRUCTURE_64_POST_PATH_VALIDATION.md exactly.
6-
Only fix broken imports from prior PRs.
5+
Execute docs/pr/BUILD_PR_REPO_STRUCTURE_65_MOVE_MAP_SHARED_TOOLS_BOUNDARY.md exactly.
6+
Move only clearly shared utility files from tools to src/shared.
7+
Update imports accordingly.
78
Package to:
8-
<project folder>/tmp/BUILD_PR_REPO_STRUCTURE_64_POST_PATH_VALIDATION_delta.zip
9+
<project folder>/tmp/BUILD_PR_REPO_STRUCTURE_65_MOVE_MAP_SHARED_TOOLS_BOUNDARY_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Post path-normalization validation and cleanup
1+
Enforce shared vs tools boundary by moving pure utilities to src/shared

docs/dev/NEXT_COMMAND.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Next: begin repo move-map (actual file relocation) if clean
1+
Next: BUILD_PR_REPO_STRUCTURE_66_MOVE_MAP_GAMES_BOUNDARY
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
validation cleanup slice
1+
shared/tools boundary enforcement

docs/dev/reports/file_tree.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
previously touched files only
1+
tools → shared moves only
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
imports resolve, no unused imports
1+
only pure utilities moved, imports updated

docs/dev/roadmaps/MASTER_ROADMAP_HIGH_LEVEL.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@
9595
- [x] duplicate-helper migration map defined
9696
- [ ] ambiguous-name rename map defined
9797
- [ ] legacy migration map defined
98-
- [ ] implementation PRs executed
98+
- [.] implementation PRs executed
9999
- [x] imports normalized after moves
100-
- [ ] post-move validation complete
100+
- [.] post-move validation complete
101101

102102
### Structure Targets
103103
- [ ] `src/engine/core`
@@ -196,26 +196,26 @@
196196
---
197197

198198
## 4. State, Replay, Timeline, Authoritative Flow
199-
- [.] authoritative state direction established
200-
- [.] authoritative score/objective slices exist
201-
- [.] promotion-gate lane active
202-
- [ ] final promotion gate implemented and applied
203-
- [ ] authoritative/passive handoff finalized
199+
- [x] authoritative state direction established
200+
- [x] authoritative score/objective slices exist
201+
- [x] promotion-gate lane active
202+
- [x] final promotion gate implemented and applied
203+
- [x] authoritative/passive handoff finalized
204204
- [ ] replay/timeline boundaries normalized
205-
- [ ] state contracts extracted/confirmed
206-
- [ ] public selectors stabilized
207-
- [ ] observability for promotion/handoff completed
208-
- [ ] long-run validation completed
209-
- [ ] rollback safety / abort logic completed
205+
- [.] state contracts extracted/confirmed
206+
- [x] public selectors stabilized
207+
- [x] observability for promotion/handoff completed
208+
- [x] long-run validation completed
209+
- [x] rollback safety / abort logic completed
210210

211211
### Subcomponents
212-
- [ ] state contracts
213-
- [ ] authoritative state slices
212+
- [.] state contracts
213+
- [.] authoritative state slices
214214
- [ ] replay model
215215
- [ ] timeline orchestration
216-
- [ ] selectors/public readers
217-
- [ ] promotion gating
218-
- [ ] rollback safety / abort logic
216+
- [x] selectors/public readers
217+
- [x] promotion gating
218+
- [x] rollback safety / abort logic
219219

220220
---
221221

@@ -578,7 +578,7 @@
578578
## Dependency-Ordered Future Build Sequence
579579

580580
### Active Execution Lanes
581-
- [.] Finish current promotion-gate lane (BUILD → APPLY)
581+
- [x] Finish current promotion-gate lane (BUILD → APPLY)
582582
- [.] Apply repo structure normalization implementation plan
583583
- [.] Extract / normalize shared utilities
584584
- [.] Normalize phase-13 network concepts samples
@@ -587,7 +587,7 @@
587587
- [ ] Apply master roadmap baseline
588588
- [ ] Normalize samples phase structure
589589
- [ ] Establish games/_template and normalize games layer
590-
- [ ] Normalize tools/shared and tool boundaries
590+
- [.] Normalize tools/shared and tool boundaries
591591
- [ ] Normalize assets/data ownership
592592
- [ ] Expand testing/validation structure
593593

@@ -599,17 +599,17 @@
599599
- [ ] Reduce legacy footprint after replacements are proven
600600

601601
### Recommended Final Status Summary
602-
- [.] current active execution lanes are 1 / 3 / 4 / 6
603-
- [ ] next planning lanes are 2 / 5 / 7 / 8 / 9 / 10
602+
- [.] current active execution lanes are 3 / 6 / 8
603+
- [ ] next planning lanes are 2 / 5 / 7 / 9 / 10
604604
- [ ] later capability lanes are 11 / 12
605605
- [ ] final cleanup lane is 13
606606

607607
---
608608

609609
## Immediate Next High-Level Actions
610610
- [.] continue exact-cluster shared extraction until the current lane reaches a stable stop point
611-
- [ ] finish active promotion-gate lane enough to remove it from half-active status
612-
- [ ] convert repo structure normalization into exact move-map BUILDs with explicit validation
611+
- [x] finish active promotion-gate lane enough to remove it from half-active status
612+
- [.] convert repo structure normalization into exact move-map BUILDs with explicit validation
613613
- [ ] re-baseline this roadmap after active execution lanes stabilize
614614
- [ ] split future implementation into small dependency-ordered PRs
615615
- [ ] avoid broad repo-wide cleanup passes until the active lanes above are materially further along
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# BUILD PR — Repo Structure Move Map (sanitizeText to shared string utils)
2+
3+
## Purpose
4+
Continue the shared ↔ tools boundary cleanup by moving the reusable `sanitizeText` helper out of engine debug inspector internals and into the canonical shared string utility layer, then updating the exact tool consumers touched in the current boundary lane.
5+
6+
## Exact Target Files
7+
- `src/engine/debug/inspectors/shared/inspectorUtils.js`
8+
- `src/shared/utils/stringUtils.js`
9+
- `tools/dev/commandPacks/groupCommandPack.js`
10+
- `tools/dev/commandPacks/overlayCommandPack.js`
11+
- `tools/dev/commandPacks/inspectorCommandPack.js`
12+
- `tools/dev/presets/debugPresetApplier.js`
13+
14+
## Required Code Changes
15+
1. In `src/shared/utils/stringUtils.js`
16+
- add/export `sanitizeText(...)` using the existing engine helper behavior exactly
17+
18+
2. In `src/engine/debug/inspectors/shared/inspectorUtils.js`
19+
- stop owning the canonical `sanitizeText` logic
20+
- preserve current engine-facing behavior by importing/re-exporting or delegating to the shared string utility
21+
- do not change unrelated helpers in this file
22+
23+
3. In the exact tool consumer files listed above
24+
- replace imports of `sanitizeText` from engine debug inspector internals with imports from `src/shared/utils/stringUtils.js`
25+
- do not modify any unrelated logic
26+
27+
## Hard Constraints
28+
- exact files only
29+
- do not widen to other consumers outside the exact list
30+
- do not refactor non-string helpers
31+
- do not change runtime behavior
32+
- do not move any other utilities in this PR
33+
- do not scan the repo broadly
34+
35+
## Validation Steps
36+
- confirm only the exact target files changed
37+
- confirm the listed tool files no longer import `sanitizeText` from engine debug inspector internals
38+
- confirm engine-facing behavior remains intact
39+
- confirm imports/exports resolve
40+
- confirm no unrelated refactor or formatting churn was introduced
41+
42+
## Acceptance Criteria
43+
- `sanitizeText` has a canonical shared home in `src/shared/utils/stringUtils.js`
44+
- the exact listed tool consumers use the shared string utility import
45+
- engine debug inspector utils no longer own the canonical implementation
46+
- no behavior change

src/engine/debug/inspectors/viewModels/stateDiffInspectorViewModel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
asObject
1010
} from "../shared/inspectorUtils.js";
1111
import { asPositiveInteger } from "../../../../shared/utils/numberUtils.js";
12-
import { stringifyValue } from "../../../../../tools/dev/shared/stringifyValueUtils.js";
12+
import { stringifyValue } from "../../../../shared/utils/stringifyValueUtils.js";
1313

1414
export function createStateDiffInspectorViewModel(options = {}) {
1515
const source = asObject(options);

0 commit comments

Comments
 (0)