Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions docs_build/dev/BUILD_PR.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# PR_26177_005-shared-text-foundation
# PR_26177_006-shared-time-foundation

## Purpose

Add a small shared text foundation.
Add a small shared time foundation.

## Source Of Truth

This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_005-shared-text-foundation`.
This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_006-shared-time-foundation`.

## Stack

- Base branch: `PR_26177_004-shared-color-foundation`
- Base branch: `PR_26177_005-shared-text-foundation`

## Exact Scope

- Add `src/shared/text/` foundation.
- Include safe string helpers such as slugify, casing, truncate, escapeHtml, and normalizeWhitespace.
- Add targeted tests for the shared text area.
- No copy rewrites outside tests/docs.
- Add `src/shared/time/` foundation.
- Include duration formatting, timestamp helpers, debounce/throttle/sleep helpers where safe for shared runtime.
- Add targeted tests for the shared time area.
- No scheduler/runtime behavior changes.
- Create required Codex reports under `docs_build/dev/reports/`.
- Create repo-structured delta ZIP under `tmp/`.

## Exact Targets

- `docs_build/dev/PLAN_PR.md`
- `docs_build/dev/BUILD_PR.md`
- `src/shared/text/text.js`
- `tests/shared/TextFoundation.test.mjs`
- `docs_build/dev/reports/PR_26177_005-shared-text-foundation.md`
- `docs_build/dev/reports/PR_26177_005-shared-text-foundation_branch-validation.md`
- `docs_build/dev/reports/PR_26177_005-shared-text-foundation_requirement-checklist.md`
- `docs_build/dev/reports/PR_26177_005-shared-text-foundation_validation-lane.md`
- `docs_build/dev/reports/PR_26177_005-shared-text-foundation_manual-validation-notes.md`
- `src/shared/time/time.js`
- `tests/shared/TimeFoundation.test.mjs`
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation.md`
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_branch-validation.md`
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_requirement-checklist.md`
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_validation-lane.md`
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_manual-validation-notes.md`
- `docs_build/dev/reports/codex_review.diff`
- `docs_build/dev/reports/codex_changed_files.txt`

## Out Of Scope

- No copy rewrites outside tests/docs.
- No scheduler/runtime behavior changes.
- No browser-owned product data.
- No runtime UI changes.
- No browser storage changes.
Expand All @@ -51,9 +51,9 @@ This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth f
Run exactly:

```powershell
node ./scripts/run-node-test-files.mjs tests/shared/TextFoundation.test.mjs
node --check src/shared/text/text.js
node --check tests/shared/TextFoundation.test.mjs
node ./scripts/run-node-test-files.mjs tests/shared/TimeFoundation.test.mjs
node --check src/shared/time/time.js
node --check tests/shared/TimeFoundation.test.mjs
git diff --check
```

Expand All @@ -62,5 +62,5 @@ git diff --check
Create repo-structured delta ZIP:

```text
tmp/PR_26177_005-shared-text-foundation_delta.zip
tmp/PR_26177_006-shared-time-foundation_delta.zip
```
16 changes: 8 additions & 8 deletions docs_build/dev/PLAN_PR.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# PLAN_PR: PR_26177_005-shared-text-foundation
# PLAN_PR: PR_26177_006-shared-time-foundation

## Purpose

Add a small shared text foundation.
Add a small shared time foundation.

## Scope

- Add `src/shared/text/` foundation.
- Include safe string helpers for whitespace normalization, slug/casing, truncation, and HTML escaping.
- Add `src/shared/time/` foundation.
- Include duration formatting, timestamp helpers, sleep, debounce, and throttle helpers.
- Add targeted tests.
- No copy rewrites outside tests/docs.
- No scheduler/runtime behavior changes.
- No browser-owned product data.
- No runtime UI changes.
- No unrelated cleanup.

## Implementation Plan

1. Add `src/shared/text/text.js`.
2. Add `tests/shared/TextFoundation.test.mjs`.
3. Validate safe string helpers.
1. Add `src/shared/time/time.js`.
2. Add `tests/shared/TimeFoundation.test.mjs`.
3. Validate duration, timestamp, sleep, debounce, and throttle helpers.
4. Produce required Codex reports and repo-structured ZIP.
24 changes: 24 additions & 0 deletions docs_build/dev/reports/PR_26177_006-shared-time-foundation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# PR_26177_006-shared-time-foundation

Date: 2026-06-26
Scope: Shared time foundation
Status: PASS

## Summary

- Added `src/shared/time/time.js`.
- Added duration formatting, timestamp, sleep, debounce, and throttle helpers.
- Added targeted tests in `tests/shared/TimeFoundation.test.mjs`.
- No scheduler/runtime behavior, runtime UI, browser product-data ownership, API/database, legacy SQLite file, `start_of_day`, or unrelated cleanup changes were made.

## Validation

- PASS: `node ./scripts/run-node-test-files.mjs tests/shared/HashFoundation.test.mjs tests/shared/NoiseFoundation.test.mjs tests/shared/GeometryFoundation.test.mjs tests/shared/ColorFoundation.test.mjs tests/shared/TextFoundation.test.mjs tests/shared/TimeFoundation.test.mjs`.
- PASS: `node --check src/shared/time/time.js`.
- PASS: `node --check tests/shared/TimeFoundation.test.mjs`.
- PASS: `git diff --check -- . ':!.vscode/settings.json'`.
- PASS: Normal targeted validation output did not include the Game Journey legacy SQLite metrics warning.

## Artifact

- `tmp/PR_26177_006-shared-time-foundation_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# PR_26177_006-shared-time-foundation Branch Validation

- PASS: Current branch is `PR_26177_006-shared-time-foundation`.
- PASS: Current branch is the final shared-time stacked branch containing PR_26177_001 through PR_26177_006 work.
- PASS: Branch is tracking `origin/PR_26177_006-shared-time-foundation`.
- PASS: Only unrelated local change is `.vscode/settings.json`, containing developer-local Live Server configuration; it was not staged.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# PR_26177_006-shared-time-foundation Closeout Report

Date: 2026-06-26
Status: PASS

## Branch

- Current branch: `PR_26177_006-shared-time-foundation`.
- PR: #214.
- Base branch before merge: `PR_26177_005-shared-text-foundation`.

## Scope Review

- PASS: Change remains limited to shared time foundation code, targeted tests, BUILD/PLAN docs, and required reports.
- PASS: Local `.vscode/settings.json` developer setting was reviewed, left untouched, and excluded from staging.
- PASS: No `start_of_day` folders were modified.
- PASS: No legacy SQLite metrics files were removed, moved, or overwritten.

## Validation

- PASS: `node ./scripts/run-node-test-files.mjs tests/shared/HashFoundation.test.mjs tests/shared/NoiseFoundation.test.mjs tests/shared/GeometryFoundation.test.mjs tests/shared/ColorFoundation.test.mjs tests/shared/TextFoundation.test.mjs tests/shared/TimeFoundation.test.mjs`.
- PASS: `node --check src/shared/time/time.js`.
- PASS: `node --check tests/shared/TimeFoundation.test.mjs`.
- PASS: `git diff --check -- . ':!.vscode/settings.json'`.
- PASS: Normal targeted validation output did not include the Game Journey legacy SQLite metrics warning.

## ZIP

- PASS: Refreshed repo-structured ZIP exists at `tmp/PR_26177_006-shared-time-foundation_delta.zip`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PR_26177_006-shared-time-foundation Manual Validation Notes

- Reviewed `git status` before continuing.
- Reviewed `.vscode/settings.json` diff and confirmed it only adds developer-local `liveServer.settings.port` configuration.
- Left `.vscode/settings.json` untouched and excluded from staging.
- Confirmed no `start_of_day` files were modified.
- Confirmed no legacy SQLite metrics files were removed, moved, or overwritten.
- Confirmed ZIP artifact path: `tmp/PR_26177_006-shared-time-foundation_delta.zip`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PR_26177_006-shared-time-foundation Requirement Checklist

- PASS: One PR purpose only.
- PASS: Smallest valid scoped change.
- PASS: No unrelated cleanup staged or committed.
- PASS: Did not modify `start_of_day` folders.
- PASS: Did not add browser product-data ownership.
- PASS: Used ES modules consistent with repo style.
- PASS: Added `src/shared/time/` foundation.
- PASS: Included duration formatting helpers.
- PASS: Included timestamp helpers.
- PASS: Included sleep/debounce/throttle helpers safe for opt-in shared runtime use.
- PASS: No scheduler/runtime behavior changes.
- PASS: Added targeted tests for the shared time area.
- PASS: Targeted shared foundation tests for Hash, Noise, Geometry, Color, Text, and Time passed.
- PASS: Normal validation did not show the Game Journey legacy SQLite metrics warning.
- PASS: Did not remove, move, or overwrite legacy SQLite metrics files.
- PASS: Did not run full samples smoke by default.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PR_26177_006-shared-time-foundation Validation Lane

- PASS: `node ./scripts/run-node-test-files.mjs tests/shared/HashFoundation.test.mjs tests/shared/NoiseFoundation.test.mjs tests/shared/GeometryFoundation.test.mjs tests/shared/ColorFoundation.test.mjs tests/shared/TextFoundation.test.mjs tests/shared/TimeFoundation.test.mjs`.
- PASS: `node --check src/shared/time/time.js`.
- PASS: `node --check tests/shared/TimeFoundation.test.mjs`.
- PASS: `git diff --check -- . ':!.vscode/settings.json'`.
- PASS: Normal targeted validation output did not include the Game Journey legacy SQLite metrics warning.

Full samples smoke was intentionally not run because this closeout validates the shared foundation stack with targeted tests only.
15 changes: 8 additions & 7 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
docs_build/dev/BUILD_PR.md
docs_build/dev/PLAN_PR.md
docs_build/dev/reports/PR_26177_005-shared-text-foundation.md
docs_build/dev/reports/PR_26177_005-shared-text-foundation_branch-validation.md
docs_build/dev/reports/PR_26177_005-shared-text-foundation_manual-validation-notes.md
docs_build/dev/reports/PR_26177_005-shared-text-foundation_requirement-checklist.md
docs_build/dev/reports/PR_26177_005-shared-text-foundation_validation-lane.md
docs_build/dev/reports/PR_26177_006-shared-time-foundation.md
docs_build/dev/reports/PR_26177_006-shared-time-foundation_branch-validation.md
docs_build/dev/reports/PR_26177_006-shared-time-foundation_closeout.md
docs_build/dev/reports/PR_26177_006-shared-time-foundation_manual-validation-notes.md
docs_build/dev/reports/PR_26177_006-shared-time-foundation_requirement-checklist.md
docs_build/dev/reports/PR_26177_006-shared-time-foundation_validation-lane.md
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_review.diff
src/shared/text/text.js
tests/shared/TextFoundation.test.mjs
src/shared/time/time.js
tests/shared/TimeFoundation.test.mjs
Loading
Loading