Skip to content

feat(templates): qualify bounded backlight and dark-environment defaults - #416

Merged
jonit-dev merged 18 commits into
developfrom
feat/prd-345-backlight-defaults
Oct 5, 2026
Merged

jonit-dev merged 18 commits into
developfrom
feat/prd-345-backlight-defaults

Conversation

@jonit-dev

@jonit-dev jonit-dev commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Generated subjects retain a restrained key-colored edge under backlighting, and dark scene environments receive a measured directional fill. Defaults now live in twelve actual template source trees, with live material enrollment and owned cleanup. Bright photographed environments suppress the extra fill; template-specific overrides preserve authored lights and palettes.

Tracker G09 (row 13), PRD-345. Hardware desktop WebGPU high tier qualifies; native, mobile, software and WebGL retain original materials. Custom materials stay original. This is source-first template behavior; automatic bare-engine material treatment is not implemented.

Real before / after

All twelve full pairs use matched source scenes, fixed tick-60 cameras/state, cooked assets, 1280×720, 4× MSAA and NVIDIA Turing hardware WebGPU. Root and an independent reviewer inspected all 24 frames. The default openings are deliberately subtle; the controlled backlight/black-environment fixtures below isolate the visible improvement.

Full, unscaled racing / puzzle / sailing comparisons

Racing preserves the original dark road/shadows after fixing shared light-matrix writes during rendering. Puzzle keeps its original authored lighting with added gains zero; sailing's bright sky suppresses added fill. All twelve full pairs and provenance. Presentation-time flag/smoke phases and a small tower HUD hover variation are disclosed, not claimed as lighting improvements.

Controlled effect Disabled Enabled
Backlit edge Rim off Rim on
Dark environment, no sun Fill black Fill enabled

Six intended red/green fixture arms qualify: edge p99 53 versus 7 with rim disabled; body 2 versus 0. Black-fill and omitted-marker controls fail their exact intended assertions. Failed software-harness and rejected racing attempts remain retained.

Verification and measured costs

  • Affected CPU suite: 65 files / 1011 tests pass; root typecheck and lint pass. Dynamic/lifecycle/read-only matrix tests pass, including restoration, shared ownership, recycling and tier changes.
  • Current runtime source: 80/80 fresh Chromium launches, 40 per arm in ABBA order. Ready p95 2649.7→2831.0 ms (+181.3 ms, 6.84%); median 2560.3→2760.0 ms. Fresh process/context/page/HTTP cache; OS and GPU driver caches uncontrolled. No shader-cold or compile-complete claim.
  • Actual GPU timestamp windows: dark 11.0467→11.7467 ms (+0.700 ms, 6.34%). Backlit negative delta is noise, not a speedup. Only 23 asynchronous samples per arm across three 60-frame windows, one serial run.
  • Owned native host and V8/QuickJS prerequisites build; actual native unit tests pass 1531 with 62 skipped. Matched native opening images preserve original appearance: candidate lighting disabled, zero conversions, unknown radiance. Native antialias stage dropped (build:Image is not defined); network diagnostics waived because native has no observer. This does not qualify enabled native appearance.
  • All thirteen clean generated projects boot. Original gameplay suites: 11 pass, shooter fails p95 52 ms > unchanged 33 ms (352 samples), snow fails 34 ms > 33 ms (223 samples). Quiet shooter controls complete: six original runs pass (per-run p95 mean 29.23 ms, range 28.1–30.2), six current runs fail (mean 48.17 ms, range 44.7–51.8). This is a whole-candidate regression under the matched setup; individual cause remains unproven. Snow originals pass 1/6 (mean 33.83 ms), current pass 5/6 (mean 29.72 ms); current is not reliably under the threshold. Historical durable-TMPDIR runs held private namespace leases with manual own-job serialization; shared global GPU exclusion was not established. Future timing uses an explicit outer shared lease.
  • Normal root suite reached package tests but failed two packed-consumer fixture path checks under symlinked durable TMPDIR; canonical-root correction retains all identity assertions and all seven consumer tests pass after independent review. Full root rerun remains pending; unit phase was not reached. A second normal root attempt exposed an owned capture lease leak on SIGTERM; the narrow local signal repair passes 226 CPU tests and real forced/unforced cleanup gates. A separate pre-existing borrowed remote-page cancellation edge remains open.
  • Evidence caps and 2574 relative documentation links pass. Source hashes, full raw reports, startup samples and failed attempts are retained in the PRD.

Remaining acceptance

Draft remains partial. Shooter has a reproduced matched performance regression; snow performance and the full root rerun remain open; all failures are preserved. Historical GPU isolation limitations remain disclosed. The native fallback comparison is complete; original native gameplay visibility observations are unsupported and remain blocked. A separate compatible opening witness does not replace those gates. Rain's custom raymarched shader has authored hemisphere/flash lighting but lacks the qualified named conventions; its cloud reflection image is not a spherical environment measurement. Rain and enabled native appearance remain unqualified. No original acceptance criterion was relaxed. Draft CI skips are not green checks; no ready/100/auto-merge. Shared develop integration remains held for coordinated #397/#402 work; workbook statuses unchanged.

Native fallback comparison

Full native opening before / after; lighting disabled fallback

Matched tick 86, camera/projection, 1280×720 and NVIDIA RTX 2080 native WebGPU. Full raw starter reports, failure counts and native limitations.

@jonit-dev jonit-dev changed the title feat(playtest): qualify backlight controls with regional tone feat(starter): qualify backlight and dark-environment defaults Oct 3, 2026
@jonit-dev jonit-dev changed the title feat(starter): qualify backlight and dark-environment defaults feat(templates): qualify bounded backlight and dark-environment defaults Oct 3, 2026
The develop merge landed the conflicts but left the pre-existing reds the
branch's own full-suite rerun had never reached. Fix them on the merged
tree:

- search-path spec: anchor the ripgrep call site at its new line 163.
- temp-dir guard: owned-run-resources, orphan-infrastructure and
  run-test-suite-temp now create through test-support makeTempDir, so the
  guard stops flagging them; run-test-suite-temp also guards its parsed
  output for noUncheckedIndexedAccess.
- exposure cold-boot fixture: the merged tone observation is a union that
  may omit p99, so its structural type accepts the regional member.
- sailing-readiness spec: mock the post controller's resolved tier and
  stub the material-lighting and environment-setup modules, as sailing.spec
  already does.
- template docs: the backlight and exposure paragraphs share one block so
  the scaffolded docs stay under the 100-line instruction budget; mirrors
  regenerated and the scaffold tree hashes re-measured.
- sailing exit: drop the stray blank line between the post and
  ocean-readiness releases.

Verified: root and per-package typecheck, lint, check:docs, the scaffold
stability hash spec, and the affected unit specs all pass. The three
generated-shooter-input failures are pre-existing on develop at 15adf35
(this machine also serialises capture through another lane's lock) and the
playtest orphan sweep fails on develop too, where Vite's node compile
cache lands in the suite TMPDIR.
@jonit-dev
jonit-dev marked this pull request as ready for review October 4, 2026 17:22
@jonit-dev
jonit-dev enabled auto-merge October 4, 2026 17:22
@jonit-dev
jonit-dev added this pull request to the merge queue Oct 5, 2026
Merged via the queue into develop with commit 64aed30 Oct 5, 2026
129 of 133 checks passed
jonit-dev added a commit that referenced this pull request Oct 5, 2026
Plain merge, no rebase: the merge queue needs a current base. #416 is one
commit, 1,087 files; two of them carried cleanup edits too, so one conflict.

Resolution of packages/create-threenative/__tests__/scaffold.spec.ts:
PRD_201_PARENT_SCAFFOLD_HASHES is re-measured on the merged tree through
createProject, not taken from either side. Ten templates moved (the ten this
sweep edited, which #416 also touched); platformer, snow and starter keep
#416's values because neither side changed them. scaffold.spec.ts 66 tests
exit 0.

templates/puzzle/src/scenes/Play.ts auto-merged clean and was audited by
diff: this lane's `unwatch` deletion and #416's material-lighting wiring are
both present. All 14 of this lane's whole-file deletions are gone from the
merged tree and every file #416 added is present.

Also here: the native census table regenerated by `pnpm census` (android/
3,187 -> 1,814 is the deleted sample JS and orphan Metal shader), and the
PRD-495 record of the merge. `pnpm budgets` needed a rebuilt
packages/playtest/dist first — #416's collectRegionalTone was missing from a
stale artefact, not from merged source.

Verified on the merged tree: pnpm typecheck exit 0; pnpm lint exit 0 (0
errors); pnpm sync:agents --check exit 0; check-template-conventions green;
pnpm check:docs exit 0 (2,393 links); scripts lane 8 files / 260 tests exit
0; pnpm budgets exit 0. AC-2 stays unticked — no fresh full board over the
merged tree yet. The Windows desktop core leg stays red and is not waived.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant