feat(peer)!: cut over to authenticated catalog sharing

Replace address-only trust and pushed peer state with installation identities,
SPKI-pinned QUIC, candidate-only discovery, and bounded responder-owned
protocol-8 pulls. The runtime now owns each network generation and all admitted
work through shutdown.

Add exact bundled content identities, reproducible manifest publishing,
capability-confined downloads, streaming BLAKE3 verification, quarantine and
retry, and crash-recoverable download and install transactions. Ship generated
fixture catalogs and fail closed when production manifests are absent.

The Tauri backend exposes durable sharing policy, redacted identity state, and
attempt-keyed transfer snapshots. Frontend consumption follows in the next
commit. Repository-wide test certificates and protocol-7 paths are removed.

BREAKING CHANGE: peers must use protocol 8 and exact catalog content artifacts;
protocol-7 frames and shared-certificate identities are no longer accepted.

Test Plan:
- `just test` -- passed on the completed stack (708 workspace tests)
- `just clippy` -- passed on the completed stack
- `just build` -- passed with fixture catalogs on the completed stack
- `just catalog-check-production` -- failed closed because the external
  production manifest corpus is absent
- `git diff --cached --check` -- passed
This commit is contained in:
2026-08-10 13:59:18 +02:00
parent 36c4785775
commit 60fd7ba0c2
128 changed files with 51759 additions and 10784 deletions
+97 -15
View File
@@ -4,18 +4,24 @@ export DOCKER_CONFIG := env_var_or_default("DOCKER_CONFIG", ".lanspread-peer-cli
default: run
FIXTURE_CATALOG_SOURCE := "crates/lanspread-tauri-deno-ts/src-tauri/game.db"
FIXTURE_CATALOG_ROOT := "crates/lanspread-peer-cli/catalogs"
FIXTURE_UNRAR := "crates/lanspread-tauri-deno-ts/src-tauri/binaries/unrar-x86_64-unknown-linux-gnu"
TAURI_DEV_CONFIG := '{"bundle":{"resources":{"../../lanspread-peer-cli/catalogs/default/game.db":"game.db","../../lanspread-peer-cli/catalogs/default/manifests/":"manifests/","assets/*":"assets/"}}}'
TAURI_FIXTURE_ENV := "LANSPREAD_USE_FIXTURE_CATALOG=1"
setup:
cargo install tauri-cli
cd crates/lanspread-tauri-deno-ts && deno install --frozen=true
run:
cargo tauri dev --release
run: fixture-catalogs-check
{{ TAURI_FIXTURE_ENV }} cargo tauri dev --config crates/lanspread-tauri-deno-ts/src-tauri/tauri.dev.conf.json --release
build:
cargo tauri build --no-bundle #-- --profile dev
build: fixture-catalogs-check
{{ TAURI_FIXTURE_ENV }} cargo tauri build --config crates/lanspread-tauri-deno-ts/src-tauri/tauri.dev.conf.json --no-bundle #-- --profile dev
bundle:
cargo tauri build -- --profile production
bundle: catalog-check-production
cargo tauri build --config crates/lanspread-tauri-deno-ts/src-tauri/tauri.production.conf.json -- --profile production
fmt:
cargo +nightly fmt
@@ -25,16 +31,88 @@ fmt:
just --fmt
_fix:
cargo fix --workspace --all-targets --all-features
cargo clippy --workspace --all-targets --all-features --fix
{{ TAURI_FIXTURE_ENV }} TAURI_CONFIG='{{ TAURI_DEV_CONFIG }}' cargo fix --workspace --all-targets --all-features
{{ TAURI_FIXTURE_ENV }} TAURI_CONFIG='{{ TAURI_DEV_CONFIG }}' cargo clippy --workspace --all-targets --all-features --fix
fix: _fix fmt
clippy:
cargo clippy --workspace --all-targets --all-features -- -D warnings
{{ TAURI_FIXTURE_ENV }} TAURI_CONFIG='{{ TAURI_DEV_CONFIG }}' cargo clippy --workspace --all-targets --all-features -- -D warnings
test:
cargo test --workspace --all-targets --all-features
{{ TAURI_FIXTURE_ENV }} TAURI_CONFIG='{{ TAURI_DEV_CONFIG }}' cargo test --workspace --all-targets --all-features
# Acceptance catalogs are derived only by the Rust publisher. The static
# profiles are committed artifacts; generation is an explicit maintainer task,
# while normal development and image builds run the package-free check.
fixture-catalogs:
cargo run -p lanspread-compat --bin lanspread-fixture-catalog -- \
--source-catalog-db {{ FIXTURE_CATALOG_SOURCE }} \
--output-dir {{ FIXTURE_CATALOG_ROOT }}/default \
--unrar {{ FIXTURE_UNRAR }} \
--game-root crates/lanspread-peer-cli/fixtures/fixture-alpha/alienswarm \
--game-root crates/lanspread-peer-cli/fixtures/fixture-alpha/bf1942 \
--game-root crates/lanspread-peer-cli/fixtures/fixture-alpha/ggoo \
--game-root crates/lanspread-peer-cli/fixtures/fixture-bravo/bfbc2 \
--game-root crates/lanspread-peer-cli/fixtures/fixture-bravo/cnc4 \
--game-root crates/lanspread-peer-cli/fixtures/fixture-bravo/cnctw \
--game-root crates/lanspread-peer-cli/fixtures/fixture-charlie/cod5 \
--game-root crates/lanspread-peer-cli/fixtures/fixture-charlie/cod6 \
--game-root crates/lanspread-peer-cli/fixtures/fixture-charlie/coh \
--game-root crates/lanspread-peer-cli/fixtures/fixture-persona/css
cargo run -p lanspread-compat --bin lanspread-fixture-catalog -- \
--source-catalog-db {{ FIXTURE_CATALOG_SOURCE }} \
--output-dir {{ FIXTURE_CATALOG_ROOT }}/solid \
--unrar {{ FIXTURE_UNRAR }} \
--game-root crates/lanspread-peer-cli/fixtures/fixture-solid/cnctw
cargo run -p lanspread-compat --bin lanspread-fixture-catalog -- \
--source-catalog-db {{ FIXTURE_CATALOG_SOURCE }} \
--output-dir {{ FIXTURE_CATALOG_ROOT }}/multi \
--unrar {{ FIXTURE_UNRAR }} \
--game-root crates/lanspread-peer-cli/fixtures/fixture-multi/cnctw
cargo run -p lanspread-compat --bin lanspread-fixture-catalog -- \
--source-catalog-db {{ FIXTURE_CATALOG_SOURCE }} \
--output-dir {{ FIXTURE_CATALOG_ROOT }}/unknown \
--unrar {{ FIXTURE_UNRAR }} \
--game-root crates/lanspread-peer-cli/fixtures/fixture-unknown/cod2
fixture-catalog OUTPUT GAME_ROOT:
cargo run -p lanspread-compat --bin lanspread-fixture-catalog -- \
--source-catalog-db {{ FIXTURE_CATALOG_SOURCE }} \
--output-dir "{{ OUTPUT }}" \
--unrar {{ FIXTURE_UNRAR }} \
--game-root "{{ GAME_ROOT }}"
fixture-download-only-catalog OUTPUT GAME_ID GAME_ROOT:
cargo run -p lanspread-compat --bin lanspread-fixture-catalog -- \
--source-catalog-db {{ FIXTURE_CATALOG_SOURCE }} \
--output-dir "{{ OUTPUT }}" \
--unrar {{ FIXTURE_UNRAR }} \
--game-root "{{ GAME_ROOT }}" \
--no-stream-install "{{ GAME_ID }}"
fixture-catalogs-check:
cargo run -p lanspread-compat --bin lanspread-catalog-publisher -- check \
--catalog-db {{ FIXTURE_CATALOG_ROOT }}/default/game.db --all
cargo run -p lanspread-compat --bin lanspread-catalog-publisher -- check \
--catalog-db {{ FIXTURE_CATALOG_ROOT }}/solid/game.db --all
cargo run -p lanspread-compat --bin lanspread-catalog-publisher -- check \
--catalog-db {{ FIXTURE_CATALOG_ROOT }}/multi/game.db --all
cargo run -p lanspread-compat --bin lanspread-catalog-publisher -- check \
--catalog-db {{ FIXTURE_CATALOG_ROOT }}/unknown/game.db --all
catalog-check-production:
cargo run -p lanspread-compat --bin lanspread-catalog-publisher -- check \
--catalog-db crates/lanspread-tauri-deno-ts/src-tauri/game.db --all
catalog-publisher-test:
cargo test -p lanspread-compat --all-targets --all-features
catalog-publisher-clippy:
cargo clippy -p lanspread-compat --all-targets --all-features -- -D warnings
catalog-publisher-fmt:
cargo +nightly fmt --package lanspread-compat
frontend-test:
cd crates/lanspread-tauri-deno-ts && deno test --unstable-sloppy-imports tests
@@ -45,7 +123,7 @@ clean:
peer-cli-build:
cargo build -p lanspread-peer-cli
peer-cli-image:
peer-cli-image: fixture-catalogs-check
mkdir -p "$DOCKER_CONFIG"
docker build -f crates/lanspread-peer-cli/Dockerfile -t lanspread-peer-cli:dev .
@@ -78,7 +156,8 @@ peer-cli-run NAME: peer-cli-net
--name "{{ NAME }}" \
--games-dir /games \
--state-dir /state \
--catalog-db /app/game.db
--catalog-db /app/game.db \
--manifests-dir /app/manifests
peer-cli-alpha: peer-cli-net
mkdir -p ".lanspread-peer-cli/alpha/state"
@@ -89,7 +168,8 @@ peer-cli-alpha: peer-cli-net
--name "alpha" \
--games-dir /games \
--state-dir /state \
--catalog-db /app/game.db
--catalog-db /app/game.db \
--manifests-dir /app/manifests
peer-cli-bravo: peer-cli-net
mkdir -p ".lanspread-peer-cli/bravo/state"
@@ -100,7 +180,8 @@ peer-cli-bravo: peer-cli-net
--name "bravo" \
--games-dir /games \
--state-dir /state \
--catalog-db /app/game.db
--catalog-db /app/game.db \
--manifests-dir /app/manifests
peer-cli-charlie: peer-cli-net
mkdir -p ".lanspread-peer-cli/charlie/state"
@@ -111,4 +192,5 @@ peer-cli-charlie: peer-cli-net
--name "charlie" \
--games-dir /games \
--state-dir /state \
--catalog-db /app/game.db
--catalog-db /app/game.db \
--manifests-dir /app/manifests