|
| 1 | +# PR_26140_078 Samples Shared Cleanup Report |
| 2 | + |
| 3 | +## Scope |
| 4 | +- Removed sample-level pass-through utility files in `samples/shared`: |
| 5 | + - `debugConfigUtils.js` |
| 6 | + - `networkDebugUtils.js` |
| 7 | + - `numberUtils.js` |
| 8 | + - `snapshotCloneUtils.js` |
| 9 | +- Removed the sample-level `worldSystems.js` barrel. |
| 10 | +- Updated sample imports to direct canonical owners: |
| 11 | + - shared debug config from `/src/shared/debug/config.js` |
| 12 | + - shared network debug helpers from `/src/shared/debug/network.js` |
| 13 | + - shared number helpers from `/src/shared/number/numbers.js` |
| 14 | + - shared snapshot clone helper from `/src/shared/runtime/snapshotClone.js` |
| 15 | + - world system classes/functions from `samples/shared/worldSystems/*` |
| 16 | +- Updated `tests/samples/SamplesProgramCombinedPass.test.mjs` so its canonical samples/shared list no longer expects removed pass-through files. |
| 17 | +- Kept sample entry `index.js` files intact. |
| 18 | +- No sample JSON files were changed. |
| 19 | +- No schema files were changed. |
| 20 | +- No replacement pass-through files or shims were created. |
| 21 | + |
| 22 | +## Validation Notes |
| 23 | +- The first focused `SamplesProgramCombinedPass` run exposed an existing UTF-8 BOM in `samples/metadata/samples.index.metadata.json`. Sample JSON was not modified; the test reader now tolerates a leading BOM so the affected sample/shared boundary test can run. |
| 24 | + |
| 25 | +## Validation Results |
| 26 | +- PASS: targeted syntax validation for all changed existing `.js` and `.mjs` files using `node --check`. |
| 27 | +- PASS: targeted import-resolution validation confirmed import targets exist for 22 changed JS/MJS files. |
| 28 | +- PASS: `rg -n "worldSystems\.js|debugConfigUtils\.js|networkDebugUtils\.js|numberUtils\.js|snapshotCloneUtils\.js" samples tests --glob "*.js" --glob "*.mjs" --glob "*.html" --glob "*.css" --glob "!tests/results/**"` returned no active references. |
| 29 | +- PASS: `rg -n "^export .* from" samples/shared --glob "*.js"` returned no remaining samples/shared barrel-style re-exports. |
| 30 | +- PASS: `node --input-type=module -e "const m = await import('./tests/samples/SamplesProgramCombinedPass.test.mjs'); await m.run(); console.log('PASS SamplesProgramCombinedPass');"`. |
| 31 | +- PASS: `npm run test:workspace-v2` passed 59 tests. |
| 32 | +- PASS: JSON change audit found no changed `.json` files. |
| 33 | + |
| 34 | +## Full Samples Smoke Test |
| 35 | +- Skipped. This PR changes sample import plumbing and sample shared helper ownership; targeted syntax/import validation plus `SamplesProgramCombinedPass` covered the affected sample/shared paths without broadly changing sample loader behavior. |
| 36 | + |
| 37 | +## Manual Validation Notes |
| 38 | +- Confirm code search finds no active references to the removed sample shared helper names. |
| 39 | +- Confirm the phase 13 world-system samples still import their world-system components from `samples/shared/worldSystems/*`. |
| 40 | +- Confirm sample JSON remains untouched. |
0 commit comments