openfut-adapter-fifa17: FIFA 17 Blaze adapter, oracle-tested
The second migration step: the layer above the codec, deciding WHAT to say
rather than how to encode it. Sits on openfut-protocol-blaze and supplies
what that crate deliberately refuses to know.
blaze/ids.rs component/command/notification tables
blaze/config.rs injectable identity + endpoints, nothing hardcoded
blaze/session.rs per-connection state
blaze/client_config.rs the fetchClientConfig tables
blaze/responses.rs 16 Blaze::* response bodies
blaze/dispatch.rs (component, command) -> Vec<Frame>
Parity is tested, not asserted. fixtures/generate.py drives the real
blaze_responder_v3b.dispatch() and records 49 request->response(s)
transactions, replayed in order against a shared session per connection so
ordering-dependent behaviour is exercised: preAuth captures the locale later
ALOC fields echo, login sets the auth code getAuthToken returns. Comparison
is byte-for-byte including frame count and order.
98 tests green across both crates; clippy clean.
MUTATION TESTED, and it found a real defect in this commit's own design.
Swapping two post-login notifications and flipping one enum inside
AccountInfo both turned the suite red as intended. Hardcoding an address in
utas_base() did NOT -- the config templating substituted raw hosts directly,
making those helpers dead code that merely looked load-bearing. The table now
templates on URL-level tokens ({utas_base}, {nucleus_base},
{pow_content_url}) so they are the single place a URL shape is defined, and
the mutation is caught.
The client config table (227-243 rows per CFID) is generated from the oracle
rather than transcribed: it is reverse-engineered data, not logic, and 400
hand-copied string literals would add a typo class no reviewer can catch. The
generator substitutes real addresses back in and diffs against the oracle for
every section before writing, so the templating is verified rather than
assumed.
Reproduces one known defect deliberately: nucleusConnect is built from BIND,
not advertise, so the live split deployment tells a client on another machine
to reach Nucleus at http://0.0.0.0:42131. Confirmed against the running
container. Reproduced because it is what the only proven-working config does;
fixing it needs live validation and is a separate change. It also implies the
Nucleus stub is not reached in the current remote flow.
Blaze carries no FUT domain state -- no coins, packs, clubs or squads on this
wire -- so Session stays a session key, locale, service name, auth code and a
flag. That boundary will need defending when UTAS is migrated.
Not wired into anything. The crate answers frames; it opens no socket and
owns no runtime. The Python backend remains the live service and the oracle,
and is unmodified (contract suite still green).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
//! FIFA 17 Blaze adapter.
|
||||
//!
|
||||
//! Sits on `openfut-protocol-blaze` (Fire2 framing + Heat2/TDF) and supplies
|
||||
//! everything the generic layer deliberately refuses to know: which component
|
||||
//! and command numbers mean what, what each response body must contain, and in
|
||||
//! what order frames leave the server.
|
||||
//!
|
||||
//! ```text
|
||||
//! FIFA 17 client
|
||||
//! │ Fire2 frames
|
||||
//! openfut-protocol-blaze generic: framing + codec
|
||||
//! │ Header + Struct
|
||||
//! blaze::Adapter THIS: FIFA 17 ids, bodies, ordering
|
||||
//! │ (future) semantic calls
|
||||
//! OpenFUT Core game-independent FUT domain
|
||||
//! ```
|
||||
//!
|
||||
//! Blaze is an auth/session/config protocol: no coins, packs, clubs or squads
|
||||
//! appear on this wire, so the adapter carries no FUT domain state and has no
|
||||
//! reason to grow into a second backend.
|
||||
|
||||
pub mod client_config;
|
||||
pub mod config;
|
||||
pub mod dispatch;
|
||||
pub mod ids;
|
||||
pub mod responses;
|
||||
pub mod session;
|
||||
|
||||
pub use config::{AdapterConfig, Endpoints, Identity};
|
||||
pub use dispatch::Adapter;
|
||||
pub use session::Session;
|
||||
Reference in New Issue
Block a user