docs(viewer): add viewer/README.md for serve.py, synthetic terrain, and CDN pinning #2424

Open
github-bot wants to merge 1 commit from github-bot/gh-2424 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-27 03:17 UTC · original
ubiquitarianism:docs/viewer-readme → main · +88 −0 · 1 files · 1 commits · open

Claimed in the coordination issue as: DOC-VIEWER-README (#1608)

What and why

  • Add viewer/README.md documenting viewer/serve.py (--port 0, 127.0.0.1 loopback binding, Host and safe_world_path guards), synthetic terrain fallback, Three.js 0.160.0 jsDelivr sha384 SRI pinning in viewer/index.html, and the offline Python + Node.js viewer test commands.

Tested

  • python -I tests/test_viewer_serve.py (39 OK), python -I tests/test_viewer_cdn_integrity.py (10/10 OK), node --test tests/test_viewer_streaming.cjs (57/57 OK), node --test tests/test_viewer_studio.cjs (12/12 OK).
  • All tests/test_docs_*.py + tests/test_text_write_line_endings.py: OK.
  • python -I scripts/check_no_game_data.py viewer/README.md: exit 0.

GPUs tested: n/a

AI-assisted: yes (Antigravity gemini-4-neon)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a — not a translator rule)
**@⁠Andretuta** on GitHub · 2026-11-27 03:17 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2424) `ubiquitarianism:docs/viewer-readme` → `main` · +88 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: DOC-VIEWER-README (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why - Add `viewer/README.md` documenting `viewer/serve.py` (`--port 0`, `127.0.0.1` loopback binding, `Host` and `safe_world_path` guards), synthetic terrain fallback, Three.js `0.160.0` jsDelivr `sha384` SRI pinning in `viewer/index.html`, and the offline Python + Node.js viewer test commands. ### Tested - `python -I tests/test_viewer_serve.py` (39 OK), `python -I tests/test_viewer_cdn_integrity.py` (10/10 OK), `node --test tests/test_viewer_streaming.cjs` (57/57 OK), `node --test tests/test_viewer_studio.cjs` (12/12 OK). - All `tests/test_docs_*.py` + `tests/test_text_write_line_endings.py`: OK. - `python -I scripts/check_no_game_data.py viewer/README.md`: exit 0. GPUs tested: n/a AI-assisted: yes (Antigravity gemini-4-neon) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. *(n/a — not a translator rule)*
Document viewer/serve.py flags and loopback/path security guards, synthetic terrain
fallback, Three.js 0.160.0 jsDelivr SRI pinning, and offline viewer test commands.

AI-assisted: Antigravity gemini-4-neon.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:19:59 +00:00
Author
Owner

@⁠tiguan26 on GitHub · 2026-11-27 06:02 UTC · original · approved these changes

Approving. Merged onto current main together with the other doc PRs of this batch: no conflicts, and the doc validators (tests/ -k doc: 95 passed, 207 subtests) pass. Checked the facts against main: serve.py defaults to 127.0.0.1:8765, accepts --port 0-65535, sets allow_reuse_address only off Windows, sends Cache-Control: no-store and maps .glb to model/gltf-binary, and refuses foreign Host headers with 403; index.html has WORLD_MANIFEST_TIMEOUT_MS = 10_000, the test terrain is size = 256, n = 24, and all Three.js URLs are [email protected]. Every file and test the README names exists. A useful page.

**@⁠tiguan26** on GitHub · 2026-11-27 06:02 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2424#pullrequestreview-6084148989) · **approved these changes** Approving. Merged onto current main together with the other doc PRs of this batch: no conflicts, and the doc validators (`tests/` -k doc: 95 passed, 207 subtests) pass. Checked the facts against main: `serve.py` defaults to 127.0.0.1:8765, accepts `--port` 0-65535, sets `allow_reuse_address` only off Windows, sends `Cache-Control: no-store` and maps `.glb` to `model/gltf-binary`, and refuses foreign `Host` headers with 403; `index.html` has `WORLD_MANIFEST_TIMEOUT_MS = 10_000`, the test terrain is `size = 256, n = 24`, and all Three.js URLs are `[email protected]`. Every file and test the README names exists. A useful page.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2424/head:github-bot/gh-2424'
git switch 'github-bot/gh-2424'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2424'
git switch 'github-bot/gh-2424'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2424'
git switch 'github-bot/gh-2424'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2424'
git switch 'main'
git merge --squash 'github-bot/gh-2424'
git switch 'main'
git merge --ff-only 'github-bot/gh-2424'
git switch 'main'
git merge 'github-bot/gh-2424'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.