Skip to content

Commit 7b0332d

Browse files
author
DavidQ
committed
PR_03_04_FINAL_CLEANUP_SWEEP
1 parent c384373 commit 7b0332d

5 files changed

Lines changed: 43 additions & 45 deletions

File tree

docs/dev/CODEX_COMMANDS.md

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,21 @@
1-
PR Naming Rule:
2-
ALL PRs MUST follow:
3-
PR_<SECTION>_<STEP>_<SHORT_NAME>
4-
5-
Reject any PR name that does not follow this format.
6-
71
MODEL: GPT-5.4
82
REASONING: high
93

104
COMMAND:
11-
Implement PR_03_03_SHARED_SELECTORS_CONTRACTS.
5+
Implement PR_03_04_FINAL_CLEANUP_SWEEP.
126

137
Goal:
14-
Standardize selector usage and contract boundaries onto shared state/public reader surfaces with no behavior or API changes.
15-
16-
Target areas:
17-
- src/shared/state/
18-
- public selector/read boundary surfaces
19-
20-
Focus:
21-
- getState
22-
- getSimulationState
23-
- getReplayState
24-
- getEditorState
25-
- public selector/read boundaries
26-
27-
Required steps:
28-
1. Produce docs/dev/reports/selector_usage_scan.txt for selector variants and consumers in scope.
29-
2. Produce docs/dev/reports/contract_map.txt with exact source -> standardized target mapping.
30-
3. Standardize consumers in scope onto shared selector/contract surfaces.
31-
4. Remove only obsolete duplicate selector/contract implementations within this PR scope.
32-
5. Keep changes surgical.
8+
Final cleanup of shared extraction with no behavior changes.
339

34-
Rules:
35-
- selector/contract work only
36-
- no number/string/id helper extraction
37-
- no broad cleanup
38-
- no API changes
39-
- no behavior changes
10+
Steps:
11+
1. Scan for duplicate helpers/selectors.
12+
2. Remove or consolidate safely.
13+
3. Fix imports to canonical shared locations.
4014

4115
Validation:
42-
- impacted imports resolve
43-
- duplicate selector variants in scope removed or redirected
44-
- impacted tests/smoke pass
16+
- no duplicates remain
17+
- imports resolve
18+
- tests pass
4519

4620
Return ZIP:
47-
<project folder>/tmp/PR_03_03_SHARED_SELECTORS_CONTRACTS.zip
21+
<project folder>/tmp/PR_03_04_FINAL_CLEANUP_SWEEP.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PR_03_03_SHARED_SELECTORS_CONTRACTS
1+
PR_03_04_FINAL_CLEANUP_SWEEP
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
[ ] selector_usage_scan.txt generated
2-
[ ] contract_map.txt generated
3-
[ ] selectors/contracts standardized to shared surfaces
4-
[ ] no API changes
5-
[ ] no behavior changes
6-
[ ] impacted imports resolve
7-
[ ] impacted tests/smoke pass
1+
[ ] final cleanup scan complete
2+
[ ] no duplicates remain
3+
[ ] imports resolved
4+
[ ] tests pass
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# PR_03_04_FINAL_CLEANUP_SWEEP
2+
3+
## Purpose
4+
Final cleanup sweep for shared extraction ensuring no residual duplicates or inconsistencies remain.
5+
6+
## Scope
7+
- cleanup only
8+
- no behavior changes
9+
- no API changes
10+
11+
## Tasks
12+
1. Identify any remaining duplicate helpers/selectors in shared scope.
13+
2. Remove or consolidate safely.
14+
3. Ensure imports point to canonical shared locations.
15+
16+
## Deliverables
17+
- docs/dev/reports/final_cleanup_scan.txt
18+
- docs/dev/reports/validation_checklist.txt
19+
20+
## Validation
21+
- no duplicate helpers/selectors remain in scope
22+
- all imports resolve
23+
- tests pass
24+
25+
## Output
26+
<project folder>/tmp/PR_03_04_FINAL_CLEANUP_SWEEP.zip

src/shared/utils/arrayUtils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { sanitizeText } from "/src/engine/debug/inspectors/shared/inspectorUtils.js";
1+
import { sanitizeText } from "./stringUtils.js";
22

33
export function ensureArray(value) {
44
return Array.isArray(value) ? value : [];
@@ -17,3 +17,4 @@ export function asStringArray(value) {
1717
});
1818
return Array.from(unique.values());
1919
}
20+

0 commit comments

Comments
 (0)