Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge remote-tracking branch 'origin/main' into fix/test-isolation

Nguyen Xuan An4c184b52fb6e
diff --cc CHANGELOG.md
index b008df5a,2397b3d6..b1db3d30
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -2,7 -2,8 +2,9 @@@
## Unreleased
+- Make every test file pass on its own, and check it in CI (issue #172). `node --test tests/agent-bake.test.js` failed 16 of 19 because `npm test` preloaded every on-demand module into each test process, so 28 files only passed through that preload. The loading path agents use was fine (`tests/agent-scene-on-demand.test.js` runs it in clean processes). Each of those files now imports `tests/support/load-agent-scene-modules.mjs` itself, `npm test` no longer preloads, and `npm run test:isolated` (`scripts/test-each-file.mjs`) runs each file in its own process, 4 at a time at below-normal priority, rerunning a failure alone once so a busy machine does not count. It runs in the `Test` workflow.
+ - Tell an agent when its scene is a closed room with no bake (issue #163). `scene_inspect` now returns a `closed-room-without-bake` diagnostic when 90 percent or more of 48 rays from the middle of the scene hit a front face, and names `bake`; measured against Cycles a closed room goes from 0.1430 and 0.1436 (`dark-shaft`, `temple-hall`) to 0.0609 and 0.0560 once baked. No frame cost and no schema change; agent scene entry grows 884 bytes gzip. `bakeSkyVisibility` in `light-bake` writes only the occlusion map (0.1021 and 0.0856 in under a second) and is not applied automatically. **A closed room without a bake now shows a warning in `scene_inspect`.**
+ - Clean up docs, media and scripts. Remove stale logs, six unreferenced PNG previews (about 6.1 MB) with their render sidecars, the OpenAI skill metadata and ten scripts that aimed at harness pages that no longer exist. Update the roadmap, the mesh and verification docs and the contributing guide, point the links to unshipped docs at GitHub, and add `npm run check:links`, `smoke:modeling`, `smoke:material-maps` and `benchmark:mesh-query`.
- The GitHub repository is `anxuanng/67.js`, public since 2026-11-02. Links and `repository.url` point there, which npm provenance needs to match.
- Follow 3 bounces by default in a light bake, up from 2 (part of issue #159, which stays open). Baked rooms scored worse after the sky visibility change (`lit-interior` 0.1444 to 0.1915, `brick-room` 0.1515 to 0.2048 against Cycles) because the occlusion map removed the world light that had been filling the light a 2 bounce path cuts off. With 3 bounces they score 0.1341 and 0.1412, `dark-shaft` 0.0609 and `temple-hall` 0.0560. A bake takes about 1.3 to 1.9 times as long (`temple-hall` 39 to 75 s); pass `bounces: 2` for the old light and time. Recipe presets are unchanged.
- Remove the streaks in baked dark scenes and the speckle in the fog's glow (part of issue #159, which stays open). A bake unwrapped each shared geometry once at unit size, so a 2 x 32 x 180 m wall got texels 90 times longer than wide (carpet 2,867 times), which drew as streaks fanning from the vanishing point; it now unwraps each part at its world size and smooths the gathered light and sky visibility over neighbouring texels of the same surface. The glow reads the frame's mip chain instead of 24 jittered single pixels. `bench/reference/noise.py` measures what FLIP misses (high frequency energy in dark regions and around the door): `temple-hall` baked 0.448 to 0.182 and its glow ring 1.826 to 0.990 (Cycles 0.158 and 1.053), `dark-shaft` baked 0.318 to 0.150; whole frame scores against Cycles stay within 0.006 and `temple-hall` baked goes from 0.0716 to 0.0578. A baked part's report `skyVisibility` now weighs texels by area, and baked thin parts get more texels (`brick-room` 28,576 to 98,848). Core grows 92 bytes gzip and a frame with fog costs about 0.5 ms more on a shared machine. **Baked scenes with long or thin parts look smoother and lightmaps are larger.**
diff --cc CONTRIBUTING.md
index 90c840f3,44457508..645f1559
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@@ -34,9 -35,9 +35,9 @@@ Run `npm run smoke` or the `smoke:*` sc
A change to skinning, glTF loading, poses or IK also needs `npm run smoke:character`, which takes a real character through the MCP server. Run `npm run prepare:release` first.
Screenshots and other output go to `artifacts/`, which Git ignores.
-Every pull request runs `npm audit`, `npm run size`, `npm test`, `prepare:release`, `smoke:package` and `smoke:mcp-package` in the `Test` workflow. `smoke:mcp-package` draws through the MCP server on SwiftShader in Chrome. `bench/size/README.md` says what to do when a size budget fails.
+Every pull request runs `npm audit`, `npm run size`, `npm test`, `npm run test:isolated` (each test file in its own process), `prepare:release`, `smoke:package` and `smoke:mcp-package` in the `Test` workflow. `smoke:mcp-package` draws through the MCP server on SwiftShader in Chrome. `bench/size/README.md` says what to do when a size budget fails.
- GitHub offers no branch protection on this private repository, so a red check can not block a merge by itself. Merge a pull request only when the `test` and `GitGuardian Security Checks` checks both pass. The person or agent who merges is responsible for this.
+ Branch protection on `main` requires the `test` check to pass before a merge. Merge a pull request only when `GitGuardian Security Checks` also passes.
These checks need a GPU or a person's eyes, so they do not run on a pull request. The author runs each one that applies: