Skip to content

fix(geo3d): preserve Blob inputs and confine archive resources - #338

Closed
wybaby168 wants to merge 10 commits into
mainfrom
fix/geo3d-input-resource-boundaries
Closed

wybaby168 wants to merge 10 commits into
mainfrom
fix/geo3d-input-resource-boundaries

Conversation

@wybaby168

@wybaby168 wybaby168 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Continue feat(geo3d): add opt-in Giro3D renderer with advanced API and self-hosted assets v3 #336 with its original authorship and explicit opt-in Geo3D entry.
  • Preserve the original Blob through the public viewer API, including slice-only local COPC reads. Cancel metadata probes and dispose sessions that arrive after their owner aborts, including local stream/buffer paths and asynchronous initial-fit completion.
  • Reject legacy B3DM/I3DM/CMPT payloads inside 3TZ until their nested resource loaders can be confined. Validate both extensions and actual bytes; retain supported GLB/glTF/PNTS resources and dispose owned archive URLs. Confine the enabled structural-metadata plugin’s schemaUri to owned archive Blob URLs.
  • Bound CityJSON CRS, GeoTIFF ASCII metadata and GLB JSON padding scans. The same adversarial inputs that occupied the parser for about 2 seconds complete in under 2 milliseconds after the fix; regression workers terminate a parser that exceeds its CPU budget.
  • Return constant, plain-text errors from fixture HTTP servers without disclosing request paths or exception stacks. Build the public Vue host dependency closure during focused validation so a fresh checkout does not depend on a prior root build.
  • Align security manifests, workspace overrides and lockfile with the separately reviewed fix in fix(deps): align security pins with the installed dependency graph #337. Document supported archive boundaries and add real browser/cold-consumer regressions.

Related issue

Closes #324. Continues #336; includes the dependency consistency patch from #337. No merge or npm release is requested.

Change classification

  • User-visible UI or rendering change
  • Non-visual change
  • File-format or renderer behavior
  • Public API, package, Worker, WASM, or deployment-path change

Verification

Check Result
pnpm install --frozen-lockfile Pass
pnpm build, pnpm type-check, pnpm test Pass, complete final rerun
Geo3D standard checks Pass: 114 checks, including adversarial metadata worker regressions
pnpm exec vitest run --reporter=dot Pass: 34 files, 298 tests; 1 existing unrelated skip
pnpm --filter @file-viewer/renderer-3d verify:geo3d-browser Pass: real Giro3D/Workers; 15 dataset and 10 concurrent/cancellation cases in both workspace and physically installed consumers; 3 additional public Vue/headless host cases; 16 negative HTTP cases and 16 real glTF/GLB schema-plugin cases across workspace and installed consumers
Remaining Public CI commands, including Rust, cold React/Vue/CLI/Angular consumers and browser checks Pass locally: all 25 additional Public CI steps, following the seven complete build/type/test/browser/docs/governance checks
pnpm verify:renderer-sanitization Pass, including Chromium/Firefox/WebKit RTF/DOC/CSP checks
pnpm site:build, pnpm verify:github-governance, pnpm verify:dicom-license-ledger Pass
pnpm audit --registry=https://registry.npmjs.org --audit-level low Pass: zero non-ignored advisories; existing Vue 2 EOL exception retained
bash .github/scripts/run-gitleaks.sh Pass: 964 commits scanned, no leaks

On this Mac, Firefox initially failed before opening a page because it could not access its app-data directory. The final three-browser run used the same isolated Firefox binary with a separate test app-data name. No user browser profile or system permission was changed. The initial audit attempt against npmmirror lacked an audit endpoint; the final audit used the official registry.

Sample / fixture evidence

  • Repository fixtures: Geo3D test files.
  • Public API Blob input, local stream/buffer cancellation, probe failure and asynchronous initial-fit abort/unload/replacement regressions: test/geo3d-integration-lifecycle.spec.ts.
  • Real I3DM external-fetch rejection, supported owned texture and archive-byte boundaries: test/geo3d-archive-boundaries.spec.ts.
  • Enabled native metadata plugin: scripts/verify-geo3d-archive-browser.mjs reproduces an outside schema request before the fix, checks its rejection afterward and parses local schemas in glTF and GLB in Chromium/WebKit, both workspace and cold consumer.
  • Metadata CPU regressions: scripts/geo3d-metadata.test.mjs and the compiled parser in a real Node Worker.
  • Fixture server error-boundary browser regressions: scripts/geo3d-fixture-http.mjs. The original response reflected paths and markup; local reproduction did not observe script execution.
  • Real HTTP probe replacement/unmount and headless cancellation: packages/renderers/3d/scripts/verify-geo3d-host-browser.mjs.
  • Installed consumer runs the compiled package without source/build scripts, verifies its complete physical module graph and checks NodeNext/Bundler declarations.

Visual evidence

Local COPC Blob rendered through the public headless API:

Local COPC Blob

Risk and compatibility

  • Affected packages/formats: core source lifecycle and opt-in renderer-3d/geo3d; 3TZ/archive support.
  • Compatibility or migration risk: Plain File and Blob inputs retain identity. External aborts stop real probes and suppress stale readiness. The feature remains optional, with self-hosted decoder assets.
  • B3DM/I3DM/CMPT inside 3TZ are now explicitly unsupported; direct remote 3D Tiles retains its documented dataset-relative behavior. Inline model/tile data URLs are rejected; data URLs in supported glTF buffers/images follow the documented boundary.
  • Consumers do not inherit workspace overrides. The upstream Mermaid/KaTeX consumer gap described in fix(deps): align security pins with the installed dependency graph #337 remains documented; this PR does not claim every consumer graph is advisory-free.
  • Rollback: revert the fix commit; preserve upstream attribution and avoid releasing unsupported archive claims.

Checklist

  • I added or updated focused automated coverage, or explained why it is not needed.
  • I updated user-facing documentation or release notes when behavior or API changed, or marked them not applicable.
  • I verified offline/private-deployment paths when changing Worker, WASM, fonts, vendor assets, or URLs.
  • I did not commit secrets, customer files, private samples, generated caches, or unrelated changes.

Independent verification update — 2026-10-07

Current head: e39234ea26057ffbaa0a15959ea76d17bdbfdf2d.

  • Fresh hosted validation exposed a 1 ms wall-clock expiry race in the stale raster-cache regression fixture. Commit 5e62027cf5382274c26f971ca089dfcdded41421 makes expiry explicit, retains ownership assertions, and preserves the strict final disposal assertion. A controlled-clock baseline fails before the fix; the corrected fixture passes even with an hour of simulated insertion delay, while removing actual cleanup still fails.
  • The separate dependency commit updates only the Sharp 0.35.5 override/lock closure and installed-Next runtime assertion. Next remains 16.3.6; no production Geo3D behavior or compatibility floor changes in these two commits.
  • The exact candidate passed complete independent Linux build/type/docs checks on 2026-10-06. On 2026-10-07 unchanged bytes passed frozen consistency, official audit, governance, 16 routing tests, 114 focused regressions, 22 contract/10 texture checks and the complete root suite (298 passed, one optional-fixture skip). Controlled-clock and missing-cleanup negative controls were rerun.
  • Workspace audit has zero nonignored advisories with the existing Vue 2 low exception retained. Consumer-policy/release boundaries elsewhere in this description remain.
  • Fresh exact-head Public CI, Security, and focused Geo3D validation completed successfully on 2026-10-07. The previously failing raster-cache fixture passed; source and installed browser datasets each passed 15 cases and their concurrency suites each passed 10 cases, with no unrun concurrency cases. XML and 19 strict fixture checks also passed.
  • Hosted browser results supplement the independent cloud shell checks; the cloud shell's own browser gates remain blocked by its execution prerequisites. The documented cold-consumer audit limits still apply. No merge or npm publication has occurred.

p4535992 and others added 5 commits October 5, 2026 13:59
Keep the workspace override, five direct production manifests and the installed
DOMPurify runtime on 3.4.16. Reproduce the stale override in PRs 333 and 334 and
add an installed-version contract to prevent a manifest-only security update.

Refresh the lockfile for current devalue, fast-uri, brace-expansion, KaTeX,
source-map-js, compression and static docs Next security fixes. Regenerate the
DICOM license ledger from the exact installed closure without adding audit
exceptions.
Comment thread packages/renderers/3d/src/geo3dCityJson.ts Fixed
Comment thread packages/renderers/3d/src/geo3dInspect.ts Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-advanced-browser.mjs Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-advanced-browser.mjs Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-concurrent.mjs Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-concurrent.mjs Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-hooks-browser-cases.mjs Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-hooks-browser-cases.mjs Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-residual-browser.mjs Fixed
Comment thread packages/renderers/3d/scripts/verify-geo3d-residual-browser.mjs Fixed
@wybaby168

Copy link
Copy Markdown
Member Author

Closing as superseded. The 3D input, resource and asset contracts have been checked against the accepted implementation in #350, #360, #361 and #364.

Verified on main c4cbee1b42ef1a7357e08c222da7451bf0ef2c31: Public CI, Security, and CodeQL all passed. The accepted replacement source was checked after landing.

@wybaby168 wybaby168 closed this Oct 11, 2026
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.

[feature]: Add an opt-in renderer for streaming-first 3D geospatial formats

3 participants