feat(portable): MR2 Wildcard portable character vertical slice

- Enforce fail-closed backend resolution in LocalBackend::info (unknown ruleset = error).
- Implement strict three-space isolation (Wildcard != CoA != Reborn) across canonical store, host mappings, and collections.
- Isolate collection namespaces (wildcard:appearance, wildcard:vanity) and reject cross-ruleset collections in claim and import.
- Enforce Control Protocol v2 ruleset verification on TransferOffer, TransferCommit, and Claimed response.
- Route Direct Ingress and Relay Link dynamically according to realm world port (8085 for CoA, 8086 for Wildcard).
- Add runtime session attack rejection test suite (cross-ruleset session offers, checkpoints, owner acks, server IDs).
- Verify end-to-end Wildcard session lifecycle and documentation updates.
This commit is contained in:
Дмитрий committed 2026-10-22 17:24:15 +05:00
1 parent 9d135765cd
commit 5343020bed
27 files changed
+1251 -159

No files matched your search

+11 -9
View File
@@ -1,7 +1,7 @@
# Runtime portable sessions (Phase 5): design and audit
Code: core `src/server/coa/CoAPortableSession*.{h,cpp}` and `CoAPortableImport*.{h,cpp}` (branch `feat/portable-session-bridge` of the
core fork), Manager `crates/coa-core/src/portable/session/`. CoA only; Wildcard portable transfer stays disabled.
core fork), Manager `crates/coa-core/src/portable/session/`. Supports Conquest of Azeroth and Wildcard (MR2) with strict multi-ruleset isolation.
Phase 4 proved the offline model with a real client. Its one fragile rule is that the baseline `B0` must be captured *after*
the realm's own normalisation and *before* the character is played. Phase 5 makes that rule a property of the running
@@ -130,16 +130,18 @@ Messages wait in the outbox until acknowledged; redelivery is harmless (section
## 5. Messages (transport-neutral, versioned, JSON)
`protocol_version = 1`; each message is canonical JSON with unknown fields refused. Snapshots travel in the existing
snapshot envelope (zstd of canonical JSON, SHA-256 of the canonical JSON).
`protocol_version = 3` (Session Protocol Version 3; Collection Protocol Version 2); each message is canonical JSON with unknown fields refused. Snapshots travel in the existing
snapshot envelope (zstd of canonical JSON, SHA-256 of the canonical JSON). Every session message carries an explicit `ruleset` (`coa`, `wildcard`, or `reborn`):
```text
PortableSessionStarted { protocol_version, session_id, character_id, server_id, base_canonical_revision,
baseline_generation, b0: envelope, content_hash }
PortableCheckpoint { protocol_version, session_id, character_id, server_id, base_canonical_revision,
sequence, final_checkpoint, realm_snapshot: envelope, content_hash }
OwnerAck { protocol_version, session_id, sequence, outcome, canonical_revision, canonical_hash,
[final: canonical snapshot envelope] }
SessionOffer { protocol_version, ruleset, session_id, character_id, server_id,
canonical_revision, snapshot: envelope }
PortableSessionStarted { protocol_version, ruleset, session_id, character_id, server_id, base_canonical_revision,
baseline_generation, b0: envelope, content_hash, progression }
PortableCheckpoint { protocol_version, ruleset, session_id, character_id, server_id, base_canonical_revision,
sequence, final_checkpoint, realm_snapshot: envelope, content_hash, pin }
OwnerAck { protocol_version, ruleset, session_id, sequence, outcome, canonical_revision, canonical_hash,
owned_items, owned_pets, [final: canonical snapshot envelope], next_session, pin }
```
`outcome` is `applied`, `duplicate` (same sequence and hash, already applied), `stale_sequence`, `stale_session`