Skip to content

Manifest and Asset Classification

off-cmd edited this page Sep 16, 2026 · 1 revision

Manifest and Asset Classification

Relevant source files

The following files were used as context for generating this wiki page:

The SQLite manifest serves as the absolute source of truth for the entire pipeline, recording every vanilla texture targeted for upscaling, its current state, metadata, and classification attributes. By decoupling asset discovery from execution, the manifest enables resumability, batch tracking, historical auditing across game patch deltas, and reproducible Penumbra mod packaging.

Sources: clarity/manifest.py:1-12

Manifest Schema and Row Lifecycle

The system stores all tracking state in a local SQLite database governed by clarity/manifest.py. The primary tex table maintains record rows keyed by game path, tracking dimensions, format, processing status, and tier assignments. A secondary fpsnap table records execution snapshots for patch-delta fingerprinting and audit trails.

Row lifecycles transition through states such as planned, encoded, and packed, driven by enumeration entrypoints that discover textures either generatively through game structure inspection (gen_chara, gen_icons) or externally via ResLogger pathlists (from_pathlist).

For details on the database schema, migration handling, status transitions, snapshot APIs, and generative enumeration functions, see Manifest Schema and Row Lifecycle.

graph TD
    subcode["Code Entity Space"]
    DB[""sqlite3 Database""]
    Schema[""SCHEMA (clarity/manifest.py:102)""]
    TexTable[""tex Table (path, family, part, role, status)""]
    FpsnapTable[""fpsnap Table (fpsnap)""]
    
    Schema -->|"Creates"| DB
    DB -->|"Contains"| TexTable
    DB -->|"Contains"| FpsnapTable

    Sources: clarity/manifest.py:102-117
Loading

Sources: clarity/manifest.py:102-117

Families, Roles and Classification Policy

Asset classification maps raw game installation paths into semantic family, part, and processing role categories. This classification dictates how the upscaling pipeline processes each texture—for instance, whether a texture undergoes normal map regeneration, individual channel extraction for masks, or pixel-art preservation for UI icons.

The classify() function parses incoming paths against known prefixes and suffixes, assigning a processing role (id, normal, mask, color, icon, ui, or skip) to ensure correct mathematical and neural treatment during the run loop.

For details on path prefix mapping, housing sub-categorization, role assignment rules, and classification policy invariants, see Families, Roles and Classification Policy.

graph TD
    subcode["Code Entity Space"]
    PathInput[""Game Path String""]
    ClassifyFn[""classify(path, hdr) (clarity/manifest.py:132)""]
    FamiliesConst[""FAMILIES (clarity/manifest.py:30)""]
    SuffixRole[""SUFFIX_ROLE (clarity/manifest.py:66)""]
    RoleOutput[""Role & Family Assignment""]

    PathInput --> ClassifyFn
    FamiliesConst --> ClassifyFn
    SuffixRole --> ClassifyFn
    ClassifyFn --> RoleOutput

    Sources: clarity/manifest.py:30-86, clarity/manifest.py:132-168
Loading

Sources: clarity/manifest.py:30-86, clarity/manifest.py:132-168

Clone this wiki locally