feat(catalog): separate generated production and local test authority
The launcher previously defaulted to fixtures and production generation used the source database directly. Generate a separate database and manifest set from package directories, validating staged output with the application loader before installation. Keep strict selection by default, with independent opt-ins for missing games and package version overrides in the copied database. Share database filtering and staging with the fixture publisher, and include source metadata and generation modes in the publication cache. Make normal runs consume existing production authority. Add an explicit local test recipe with separate resources, app settings, and a compiled startup game directory. Build-time gates exclude local authority from production and require Tauri development mode. Document the generation and launch workflows. Clear generated catalog copies before Tauri copies the selected resource tree so mode switches and reduced catalogs cannot retain stale manifests. Watch the copied files to repair deletion and preserve prior output mtimes only when the bytes are unchanged, allowing subsequent builds to become fresh. Test Plan: - `just fmt` -- passed. - `just clippy` -- passed with warnings denied. - `just test` -- workspace tests passed using fixture authority. - `just frontend-test` -- 94 passed. - `python3 -m unittest discover -s tools -p 'test_catalog_source_cache.py'` -- 4 passed. - `git diff --cached --check` -- passed. - Interactive GUI launches and production bundles were not exercised.
This commit is contained in:
1 parent
ab0c95b80f
commit
6b65a66465
21 files changed
+1777
-273
No files matched your search
@@ -408,14 +408,19 @@ Most scans become O(number of game dirs), with full recursion only when needed.
|
||||
|
||||
## Catalog publication and packaging
|
||||
|
||||
- `lanspread-catalog-publisher` generates production manifests and their
|
||||
complete compact identity index beside the canonical packages, independently
|
||||
rebuilds/verifies each selected artifact, and uses a durable corpus marker so
|
||||
an interrupted body/index publication fails closed. Incremental generation
|
||||
requires an existing exact indexed corpus and atomically republishes the full
|
||||
index after the selected bodies. After it owns the marker, it freshly
|
||||
validates every unselected body/index pair before deriving that mixed index;
|
||||
no pre-marker snapshot can roll another completed publication backward.
|
||||
- `lanspread-production-catalog` creates a production `game.db`, manifests, and
|
||||
complete compact identity index in staging, validates that authority with the
|
||||
application loader, and atomically replaces the generated catalog directory.
|
||||
Its default selection requires every game and exact version from the
|
||||
checked-in source database. Independent explicit modes may omit missing
|
||||
package directories or accept package versions that differ by updating the
|
||||
copied database. The generated manifests and database still form one exact
|
||||
set, and the source database is never modified.
|
||||
- `lanspread-catalog-publisher` incrementally regenerates selected manifests in
|
||||
an existing exact indexed corpus. After it owns the durable publication
|
||||
marker, it freshly validates every unselected body/index pair before deriving
|
||||
and atomically publishing the complete mixed index; no pre-marker snapshot can
|
||||
roll another completed publication backward.
|
||||
- `lanspread-fixture-catalog` is a separate test-only generator. It derives
|
||||
reduced peer-CLI `game.db` files and manifests from explicitly selected
|
||||
fixtures; those outputs are development and acceptance-test authority only.
|
||||
@@ -423,10 +428,17 @@ Most scans become O(number of game dirs), with full recursion only when needed.
|
||||
and `LANSPREAD_USE_FIXTURE_CATALOG=1`. Every other build mode defaults to the
|
||||
production resource map, and the custom production profile cannot be
|
||||
downgraded to fixtures.
|
||||
- Production packaging requires the complete production `game.db`/manifest
|
||||
corpus to pass `check --all`. The canonical production packages and their 186
|
||||
generated manifests are not present in this checkout, so that gate remains
|
||||
intentionally blocked; fixture success is not production completion.
|
||||
- `just run` uses the existing production catalog. `just run-local GAMES_DIR`
|
||||
creates a separate cached catalog from the supplied files, allowing missing
|
||||
packages and package versions that differ from the metadata database. Local
|
||||
builds require a distinct compile-time opt-in and resource map, are rejected
|
||||
by the production profile and bundled builds, and use separate app settings.
|
||||
Their startup game directory is compiled in; production embeds no override.
|
||||
- Production packaging requires the exact generated production
|
||||
`game.db`/manifest corpus to pass `check --all`. The external production
|
||||
packages and generated authority are not present in this checkout, so that
|
||||
gate remains intentionally blocked; fixture success is not production
|
||||
completion.
|
||||
|
||||
## Fault tolerance rules
|
||||
|
||||
|
||||
Reference in new issue
Block a user