sparkengine-assets-import-and-package-integrity

Diagnose SparkEngine asset loading, SparkPak archive integrity, and VFS path-containment issues.

31|3|Updated Jul 26, 2025
One-click install
npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-assets-import-and-package-integrity-krilliac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sparkengine-assets-import-and-package-integrity
Source: https://github.com/Krilliac/SparkEngine/tree/main/.claude/skills/sparkengine-assets-import-and-package-integrity
Command: npx skills add https://github.com/Krilliac/SparkEngine --skill sparkengine-assets-import-and-package-integrity-krilliac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It helps engineers debug SparkEngine asset ingestion failures — meshes or textures that won't load, malformed FBX/EXR files crashing decoders, corrupt .spk archives, path-traversal rejections, and package smoke-test failures — while distinguishing implemented, tested, and merely candidate capabilities. ## Core Features & Use Cases - Importer and decoder hardening guidance: Documents the bounds-checked FBX binary reader, EXR input limits, and how to add regression tests against the real importer classes. - SparkPak (.spk) archive runbook: Explains the v1 format contract, reader corruption defenses, writer symlink refusal, FNV-1a collision sharp edges, and startup auto-mount behavior. - VFS path containment and caches: Covers the single traversal-check enforcement point, mount priorities, the in-process LRU AssetCache versus the daemon DDC-analog cache, and which load paths actually use them. - Use Case: A package smoke test fails in the release workflow — use this runbook to collect pak_status and assetvalidate console evidence, identify whether the failure is in the reader defenses or the two divergent GamePackagers, and route any readiness claim through the G04/RDY-020/ASSET-220 ledger. ## Quick Start Ask the assistant to diagnose why a mesh fails to load from a mounted .spk archive in SparkEngine and what console evidence to collect.

Frequently Asked Questions about sparkengine-assets-import-and-package-integrity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a mesh or texture that won't load in SparkEngine?

Start with the AssetPipeline::LoadAsset path, which reads the OS filesystem directly and consults the in-process LRU AssetCache. Collect console output from pak_status and assetvalidate.dir, and reproduce with ImportFromMemory using the captured bytes for a deterministic test.

How does the SparkPak .spk archive format work?

SparkPak is an MPQ-inspired binary format with a 32-byte header, raw data blobs, and a deflate/zstd-compressed TOC at the end of file. Lookups use a 64-bit FNV-1a hash of the virtual path, and the reader caps TOC size, file count, and per-entry sizes to reject corrupt archives.

Does SparkEngine load game assets from pak archives?

Not currently. The engine auto-mounts .spk files from the Data directory at startup, but AssetPipeline reads the OS filesystem directly and bypasses the VFS, so pak-only content is invisible to the load path. Wiring AssetPipeline through VirtualFileSystem is an open design task.

Why does the VFS reject my asset path in SparkEngine?

LocalFileProvider::ResolvePath rejects any path containing '..' or a leading slash, logging a traversal or absolute-path rejection. This check only protects VFS consumers; AssetPipeline and script loaders using raw paths bypass it entirely.

What is the difference between the AssetCache and the daemon asset cache?

The in-process AssetCache is an LRU over loaded Asset objects on the real load path. The daemon asset cache is an out-of-process (path, platform)-keyed blob store in SparkDaemon, currently Phase 3a cache operations only and not consulted by any load path.

When should I not use this asset integrity runbook?

Use other skills for RHI/render-graph/shader work, CMake or CPack build breakage, save-file format migrations, and test registration mechanics. Promoting any packaging readiness claim belongs to the change-control and release-readiness skill with same-SHA evidence.