Skip to content

Commit 4b6c85f

Browse files
authored
Merge pull request #211 from ToolboxAid/PR_26177_003-shared-geometry-foundation
PR_26177_003-shared-geometry-foundation
2 parents fdf72f8 + b067c4a commit 4b6c85f

11 files changed

Lines changed: 532 additions & 336 deletions

docs_build/dev/BUILD_PR.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,47 @@
1-
# PR_26177_002-shared-noise-foundation
1+
# PR_26177_003-shared-geometry-foundation
22

33
## Purpose
44

5-
Add a small shared deterministic noise foundation.
5+
Add a small shared geometry foundation.
66

77
## Source Of Truth
88

9-
This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_002-shared-noise-foundation`.
9+
This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_003-shared-geometry-foundation`.
1010

1111
## Stack
1212

13-
- Base branch: `PR_26177_001-shared-hash-foundation`
14-
- This PR builds on PR_001 hash utilities.
13+
- Base branch: `PR_26177_002-shared-noise-foundation`
1514

1615
## Exact Scope
1716

18-
- Add `src/shared/noise/` foundation.
19-
- Build on existing `Random`/`RandomSeed` and PR_001 hash utilities.
20-
- Include deterministic Value, Perlin-style, Simplex-style, and Fractal-style helpers only where practical.
21-
- Keep API small and documented.
22-
- Add targeted tests for the shared noise area.
17+
- Add `src/shared/geometry/` foundation.
18+
- Include small reusable primitives/helpers such as vectors, rectangles, bounds, distance, clamp/intersection basics.
19+
- Add targeted tests for the shared geometry area.
20+
- No engine refactor.
2321
- Create required Codex reports under `docs_build/dev/reports/`.
2422
- Create repo-structured delta ZIP under `tmp/`.
2523

2624
## Exact Targets
2725

2826
- `docs_build/dev/PLAN_PR.md`
2927
- `docs_build/dev/BUILD_PR.md`
30-
- `src/shared/noise/noise.js`
31-
- `tests/shared/NoiseFoundation.test.mjs`
32-
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation.md`
33-
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_branch-validation.md`
34-
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_requirement-checklist.md`
35-
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_validation-lane.md`
36-
- `docs_build/dev/reports/PR_26177_002-shared-noise-foundation_manual-validation-notes.md`
28+
- `src/shared/geometry/geometry.js`
29+
- `tests/shared/GeometryFoundation.test.mjs`
30+
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation.md`
31+
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_branch-validation.md`
32+
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_requirement-checklist.md`
33+
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_validation-lane.md`
34+
- `docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_manual-validation-notes.md`
3735
- `docs_build/dev/reports/codex_review.diff`
3836
- `docs_build/dev/reports/codex_changed_files.txt`
3937

4038
## Out Of Scope
4139

40+
- No engine refactor.
4241
- No browser-owned product data.
4342
- No runtime UI changes.
4443
- No browser storage changes.
4544
- No API/database changes.
46-
- No engine refactor.
4745
- No `start_of_day` folder changes.
4846
- No unrelated cleanup.
4947
- No full samples smoke by default.
@@ -53,9 +51,9 @@ This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth f
5351
Run exactly:
5452

5553
```powershell
56-
node ./scripts/run-node-test-files.mjs tests/shared/NoiseFoundation.test.mjs tests/shared/HashFoundation.test.mjs
57-
node --check src/shared/noise/noise.js
58-
node --check tests/shared/NoiseFoundation.test.mjs
54+
node ./scripts/run-node-test-files.mjs tests/shared/GeometryFoundation.test.mjs
55+
node --check src/shared/geometry/geometry.js
56+
node --check tests/shared/GeometryFoundation.test.mjs
5957
git diff --check
6058
```
6159

@@ -64,5 +62,5 @@ git diff --check
6462
Create repo-structured delta ZIP:
6563

6664
```text
67-
tmp/PR_26177_002-shared-noise-foundation_delta.zip
65+
tmp/PR_26177_003-shared-geometry-foundation_delta.zip
6866
```

docs_build/dev/PLAN_PR.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
# PLAN_PR: PR_26177_002-shared-noise-foundation
1+
# PLAN_PR: PR_26177_003-shared-geometry-foundation
22

33
## Purpose
44

5-
Add a small shared deterministic noise foundation.
5+
Add a small shared geometry foundation.
66

77
## Scope
88

9-
- Add `src/shared/noise/` foundation.
10-
- Build on existing `RandomSeed` and PR_001 hash utilities.
11-
- Include deterministic Value, Perlin-style, Simplex-style, and Fractal-style helpers where practical.
12-
- Keep API small and documented.
9+
- Add `src/shared/geometry/` foundation.
10+
- Include reusable primitives/helpers for vectors, rectangles, bounds, distance, clamp, containment, and intersection basics.
1311
- Add targeted tests.
12+
- No engine refactor.
1413
- No browser-owned product data.
1514
- No runtime UI changes.
1615
- No unrelated cleanup.
1716

1817
## Implementation Plan
1918

20-
1. Add `src/shared/noise/noise.js`.
21-
2. Add `tests/shared/NoiseFoundation.test.mjs`.
22-
3. Validate deterministic output, seed variation, practical ranges, and permutation determinism.
19+
1. Add `src/shared/geometry/geometry.js`.
20+
2. Add `tests/shared/GeometryFoundation.test.mjs`.
21+
3. Validate vector, rectangle, bounds, distance, clamp, containment, and intersection behavior.
2322
4. Produce required Codex reports and repo-structured ZIP.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PR_26177_003-shared-geometry-foundation
2+
3+
Date: 2026-06-26
4+
Scope: Shared geometry foundation
5+
Status: PASS
6+
7+
## Summary
8+
9+
- Added `src/shared/geometry/geometry.js`.
10+
- Added small vector, rectangle, bounds, distance, clamp, containment, and intersection helpers.
11+
- Added targeted tests in `tests/shared/GeometryFoundation.test.mjs`.
12+
- No engine refactor, runtime UI, API, database, or unrelated cleanup changes were made.
13+
14+
## Validation
15+
16+
- PASS: `node ./scripts/run-node-test-files.mjs tests/shared/GeometryFoundation.test.mjs`.
17+
- PASS: `node --check src/shared/geometry/geometry.js`.
18+
- PASS: `node --check tests/shared/GeometryFoundation.test.mjs`.
19+
- PASS: `git diff --check`.
20+
21+
## Artifact
22+
23+
- `tmp/PR_26177_003-shared-geometry-foundation_delta.zip`
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PR_26177_003-shared-geometry-foundation Branch Validation
2+
3+
Status: PASS
4+
5+
- PASS: Branch `PR_26177_003-shared-geometry-foundation` was created from `PR_26177_002-shared-noise-foundation`.
6+
- PASS: Stack base was clean before branch creation.
7+
- PASS: One PR purpose only: shared geometry foundation.
8+
- PASS: No `start_of_day` files changed.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# PR_26177_003-shared-geometry-foundation Manual Validation Notes
2+
3+
Status: PASS
4+
5+
Manual review confirmed this PR only adds shared geometry primitives/helpers and targeted tests. It does not refactor engine code or change runtime UI behavior.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# PR_26177_003-shared-geometry-foundation Requirement Checklist
2+
3+
| Requirement | Status | Notes |
4+
|---|---:|---|
5+
| Add `src/shared/geometry/` foundation | PASS | Added `src/shared/geometry/geometry.js`. |
6+
| Include vector helpers | PASS | Added vector creation and vector arithmetic helpers. |
7+
| Include rectangles and bounds helpers | PASS | Added rectangle and bounds helpers. |
8+
| Include distance helper | PASS | Added `distance`. |
9+
| Include clamp/intersection basics | PASS | Added `clamp`, containment, intersection checks, and intersection rectangle. |
10+
| No engine refactor | PASS | No engine files changed. |
11+
| Add targeted tests | PASS | Added `tests/shared/GeometryFoundation.test.mjs`. |
12+
| No runtime UI changes | PASS | No UI files changed. |
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# PR_26177_003-shared-geometry-foundation Validation Lane
2+
3+
Status: PASS
4+
5+
## Commands
6+
7+
```powershell
8+
node ./scripts/run-node-test-files.mjs tests/shared/GeometryFoundation.test.mjs
9+
node --check src/shared/geometry/geometry.js
10+
node --check tests/shared/GeometryFoundation.test.mjs
11+
git diff --check
12+
```
13+
14+
## Results
15+
16+
- PASS: Targeted geometry foundation test.
17+
- PASS: Changed JS syntax checks.
18+
- PASS: `git diff --check`.
19+
20+
## Not Run
21+
22+
- Full samples smoke was not run by default.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
docs_build/dev/BUILD_PR.md
22
docs_build/dev/PLAN_PR.md
3-
docs_build/dev/reports/PR_26177_002-shared-noise-foundation.md
4-
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_branch-validation.md
5-
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_manual-validation-notes.md
6-
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_requirement-checklist.md
7-
docs_build/dev/reports/PR_26177_002-shared-noise-foundation_validation-lane.md
3+
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation.md
4+
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_branch-validation.md
5+
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_manual-validation-notes.md
6+
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_requirement-checklist.md
7+
docs_build/dev/reports/PR_26177_003-shared-geometry-foundation_validation-lane.md
88
docs_build/dev/reports/codex_changed_files.txt
99
docs_build/dev/reports/codex_review.diff
10-
src/shared/noise/noise.js
11-
tests/shared/NoiseFoundation.test.mjs
10+
src/shared/geometry/geometry.js
11+
tests/shared/GeometryFoundation.test.mjs

0 commit comments

Comments
 (0)