Skip to content

Merge pull request #215 from neomjs/dev - #216

Merged
tobiu merged 1 commit into
devfrom
master
Jan 2, 2020
Merged

tobiu merged 1 commit into
devfrom
master

Conversation

@tobiu

@tobiu tobiu commented Jan 2, 2020

Copy link
Copy Markdown
Collaborator

v1.0.26

@tobiu
tobiu merged commit cf63125 into dev Jan 2, 2020

@neo-gemini-julia neo-gemini-julia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review Summary

Status: Approved

🪜 Strategic-Fit Decision

Per §9 Strategic-Fit Step-Back:

  • Decision: Approve
  • Rationale: Merge-safe and bounded. The PR introduces a closed material declaration (material.extras.neoStageRadiance.radianceScale in [1, 64]) and fragment-shader reconstruction path (uRadianceScale) that preserves above-unity solar-disc sky radiance through sRGB8 PNG transport and bypasses dielectric direct/IBL reflection on the sky dome while keeping diagnostic views (uDebugView 1–3), categorical IDs, IBL cubemaps, and non-sky materials unchanged.

Peer-Review Opening: Clean, well-bounded implementation of #215 that directly resolves the sky-dome sRGB8 clamping and dielectric specular contamination identified in #93#issuecomment-6257466138. Every contract row, CPU admission rule, and Canvas-worker invariance check is verified at exact head 251757f0c97b7f86d1865a69f9423deaf58cc2de.


🧭 Patch-Blind Premise Snapshot

  • Inputs Read Before Patch: neomjs/neo-stage#215, neomjs/neo-stage#93#issuecomment-6257466138 and #93#issuecomment-6271677245, learn/agentos/decisions/0001-the-engine-contract.md, resources/avatars/PROFILE.md, and origin/dev (aa4ba7de5229321a28e260a662828005721ae7cc) source for src/asset/GlbParser.mjs, src/gl/AvatarScene.mjs, src/gl/avatarShaders.mjs, and scripts/bake-beach-place.mjs.
  • Expected Solution Shape: A closed material.extras.neoStageRadiance validator in GlbParser.mjs (radianceScale finite in [1, 64], OPAQUE only, mutually exclusive with neoStageEye/neoStageSkin/neoStageHair, requiring non-zero emissive input), per-material uRadianceScale uniform reset in AvatarScene.material() (0 on ordinary materials and floor draws), a fragment branch in avatarShaders.mjs placed after uDebugView 1–3 and before uHair and dielectric lighting that reconstructs radiance * uRadianceScale into displayColor(toneMap(...)), and one-pass peak normalization in bakeSkyRadiance (scripts/bake-beach-place.mjs). It must not alter environment.{diffuse,specular,brdf} cubemap generation or introduce a new WebGL extension or external dependency.
  • Patch Verdict: Matches the expected shape across all 19 files at 251757f0c97b7f86d1865a69f9423deaf58cc2de. Binary inspection of resources/places/beach/beach.glb (52d122c49ae2d543d1bfd78df6bef67d9568afba04e9e73ef1235ce5f643f0ac) against aa4ba7de (68e46e72...) confirmed that out of 29 bufferViews, only bufferView[24] (the sky PNG) changed while environment.diffuse, environment.specular, and environment.brdf remain byte-identical.
  • Premise Coherence: Coheres with verify-before-assert and friction->gold: the 8-bit PNG clamping and dielectric f0 = vec3(0.04) sky contamination surfaced during #93 optical verification are resolved via an inspectable, contract-tested engine material primitive (neoStageRadiance) with explicit dark-region quantization measurement (numerical.json).

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: Resolves #215
  • Related Graph Nodes: neomjs/neo-stage#93, neomjs/neo-stage#202, neomjs/neo-stage#209, neomjs/neo-stage#210
  • Origin Session ID: 28bfbdc1-3d2b-4b29-bfb3-5267a07ad2cb

🔬 Depth Floor

  • Challenge: Normalizing the linear sky lattice by radianceScale = 7.45223323490626 before piecewise sRGB8 encoding compresses the darkest-decile sky values ([0.18, 0.30] linear) into [0.024, 0.040] normalized linear (~1.95e-3 MAE vs 8.52e-4 unscaled in test/playwright/visual/evidence/radiance/numerical.json). For the bright daylight beach sky (minimum channel 0.172), the 12.92× linear toe of sRGB8 keeps quantization well below 1 display code step, but future twilight or night-sky places with higher peak-to-zenith dynamic range (radianceScale near 64 and dark regions < 0.02 linear) would experience visible banding in 8-bit PNG transport and should be watched when #93 / #202 expand sky conditions.

Rhetorical-Drift Audit (per guide §7.4):

  • PR description: framing matches what the diff substantiates (no overshoot)
  • Anchor & Echo summaries: precise codebase terminology, no metaphor or source-code snapshot anchor (ticket/PR/lane/AC/cycle/line number) that overshoots durable intent
  • [RETROSPECTIVE] tag: accurately characterizes what shipped (no inflation of architectural significance)
  • Linked anchors: cited tickets/PRs actually establish the claimed pattern (no borrowed authority)

Findings: Pass — PR prose and test/playwright/visual/evidence/radiance/README.md explicitly bound the scope to sky-dome highlight preservation and light-independence without claiming final coastal realism or dynamic atmosphere coupling.


🧠 Graph Ingestion Notes

  • [RETROSPECTIVE]: Storing a bounded scalar multiplier (material.extras.neoStageRadiance.radianceScale in [1, 64]) alongside a peak-normalized sRGB8 emissive texture lets GlbParser and AvatarScene preserve HDR sky-dome highlights (7.4522x solar disc) and bypass surface BRDF shading inside a single-pass WebGL2 forward renderer without introducing float textures or external glTF extensions.

N/A Audits — 📡 🔗

N/A across listed dimensions: Stage renderer/asset PR does not touch OpenAPI tool descriptions (📡) or Agent OS skill/substrate conventions (🔗).


🎯 Close-Target Audit

  • Close-targets identified: #215 (Resolves #215)
  • For each #N: confirmed not epic-labeled (#215 is labeled ai, enhancement and linked under parent #93)

Findings: Pass


📑 Contract Completeness Audit

  • Originating ticket (or parent epic) contains a Contract Ledger matrix (neomjs/neo-stage#215 has a 3-row Contract Ledger covering src/asset/GlbParser.mjs, src/gl/AvatarScene.mjs + src/gl/avatarShaders.mjs, and scripts/bake-beach-place.mjs + resources/places/beach/*)
  • Implemented PR diff matches the Contract Ledger exactly (no drift)

Findings: Pass — verified all 3 rows against src/asset/GlbParser.mjs:241, 265-280, src/gl/AvatarScene.mjs:16, 646, src/gl/avatarShaders.mjs:125, 322-327, scripts/bake-beach-place.mjs:187-206, 243, 345-348, 371-372, and resources/places/beach/beach.provenance.json.


🪜 Evidence Audit

  • PR body contains an Evidence: declaration line (Evidence: L3 local Canvas-worker rendering and lifecycle controls, plus CPU admission/authoring checks → L3 required and met for this leaf. Residual: final coastal appearance and dynamic water/atmosphere integration; Residual-Owner: #93.)
  • Achieved evidence ≥ close-target required evidence, OR residuals are explicitly listed in the PR's ## Residual / Post-Merge Validation section
  • If residuals exist: close-target issue body has the residuals annotated as [L<N>-deferred — operator handoff needed] (N/A — all #215 leaf ACs are met at L3; broader coastal/water composition remains owned by open parent #93 and #202)
  • Two-ceiling distinction: PR body distinguishes "shipped at L because sandbox ceiling" from "shipped at L because author didn't probe further"
  • Evidence-class collapse check: review language does NOT promote L1/L2 evidence to L3/L4 framing without explicit sandbox-ceiling caveat
  • Deployment causality: any external/runtime receipt used as a merge gate is reachable from this exact unmerged head through a verified branch-artifact route; otherwise it is Post-Merge Validation and failure creates a new ticket

Findings: Pass — all 16 SHA-256 and byte-length bindings in test/playwright/visual/evidence/radiance/worker.json and numerical.json were verified against exact head 251757f0c97b7f86d1865a69f9423deaf58cc2de.


🧪 Test-Evidence & Location Audit

  • Execution evidence: exact-head required CI N/A (both GitHub Actions workflows in neomjs/neo-stage remain disabled_manually under operator freeze) + author per-surface non-CI receipt present and current-head-appropriate (540 passed, 1 skipped unit, 7 passed Place.spec.mjs E2E, 104 run / 16 skipped authoring, check:contract, check:provenance, and check:sheets)
  • Reviewer falsifier: executed 251757f0:src/asset/GlbParser.mjs against 251757f0:resources/places/beach/beach.glb (admitted material 2 with radianceScale: 7.45223323490626, rejected radianceScale: 64.01 with RADIANCE_DECLARATION), verified all 29 bufferViews and IBL arrays between origin/dev and 251757f0, and verified all 16 SHA-256 digests in worker.json and numerical.json (16/16 matched)
  • Test location: pass for added/moved tests (test/playwright/unit/asset/GlbParser.spec.mjs, test/playwright/unit/avatar/AvatarScene.spec.mjs, test/playwright/unit/avatar/SkyRadiance.spec.mjs, and test/playwright/e2e/Place.spec.mjs)

Findings: Pass


📋 Required Actions

No required actions — eligible for human merge.


📊 Evaluation Metrics

Verdict weights: 30% premise / right thing, 30% architecture + placement, 30% diff correctness, 10% AC/audit sanity. These are importance-to-verdict weights, not effort budgets.

  • [ARCH_ALIGNMENT]: 100 - owner: src/asset/GlbParser.mjs + src/gl/AvatarScene.mjs + src/gl/avatarShaders.mjs + scripts/bake-beach-place.mjs · primitive: neoStageRadiance (uRadianceScale) · retired: clamped [0,1] sRGB8 sky bake + dielectric BRDF shading on sky material | kept: standard glTF [0,1] emissiveFactor validation, uDebugView 1-3 diagnostics, categorical ID pass, and pre-convolved IBL cubemaps. Checked and cleared uniform leakage across ordinary/floor draws (AvatarScene.mjs:646), debug-view ordering (avatarShaders.mjs:320-327), and extension/factor validation boundaries (GlbParser.mjs:241-280).
  • [CONTENT_COMPLETENESS]: 98 - 2 deducted because bakeSkyRadiance in scripts/bake-beach-place.mjs:187 has a concise single-line JSDoc without @param/@returns tags, though the module and PROFILE.md / 0001-the-engine-contract.md documentation are thorough.
  • [EXECUTION_QUALITY]: 100 - Checked and cleared single-pass lattice evaluation in bakeSkyRadiance (SkyRadiance.spec.mjs counts 1024 * 512 evaluations), WebGL context loss/restore invariance, draw-order invariance, and positive/negative lighting controls (direct-off and ibl-off in Place.spec.mjs).
  • [PRODUCTIVITY]: 100 - All 5 acceptance criteria of #215 are satisfied with reproducible CPU, Canvas-worker, and provenance receipts.
  • [IMPACT]: 85 - Eliminates sky-dome highlight clipping (7.4522x solar peak preserved) and dielectric specular contamination in Stage outdoor places while keeping the forward shader and glTF parser contracts small.
  • [COMPLEXITY]: 65 - Spans GLB admission validation, WebGL2 uniform/fragment shader branching, sky-bake normalization, binary asset regeneration, and multi-arm Canvas-worker invariance tests across 19 files.
  • [EFFORT_PROFILE]: Architectural Pillar - Establishes Stage's bounded HDR emissive-radiance material contract (neoStageRadiance) across parser, renderer, shader, and asset baker.

Great work, @neo-gpt-emmy — ready for @tobiu human merge.

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.

2 participants