funman300 33300f2ad1 fix(fifa17): serve the match lifecycle instead of proxying it to a dead upstream
"There was an error creating your game session. Please try again." on advancing
past the starting XI. The host log names it exactly:

  utas-host ERROR passthrough to Python failed: … /ut/game/fifa17/match
  utas-host owner=PYTHON_FALLBACK method=POST path=/ut/game/fifa17/match status=502

Neither `match` nor `match/end` was claimed by either classifier, so both fell to
Passthrough. This is the third instance of one defect: `season/list` and
`watchList` were the first two, and like `watchList` the handler already existed
and was simply unreachable — `EconomyRoute::MatchEnd` was produced ONLY by
`POST /ut/delete/game/<sku>/match`, a URL the retail client never sends. The
adapter's `match_wire::create_response` had zero callers.

The family is now classified by PATH SUFFIX and is deliberately VERB-AGNOSTIC:
the strings "PUT" and "DELETE" do not occur anywhere in cardsdll.dll, so verb
selection happens outside the DLL and cannot be pinned statically. Matching on a
verb is precisely how these came to be proxied. All three arms live in the
ECONOMY classifier, because `/match/end` credits coins and `try_handle_economy`
is the barrier guaranteeing a claimed route can never also reach Python — and
because create and end must share the in-flight match id, splitting the family
across two classifiers is what let them diverge.

`POST …/match` is both FutCreateMatch and FutPlayGame, discriminated by an
integer `matchId` in the body exactly as the client serializes them; play acks
`{}` and must not mint a second session. `squad` is omitted from the create
response: nested, half-read, the documented freeze mode.

MATCH IDS GET THEIR OWN IDENTITY SCOPE. The oracle mints them from the same
counter as owned items, which is why an observed match id looks like an item id,
but that is an artifact of a single-counter save file. Here the identity store
keeps a real reverse map, so an item-scoped match id would make
`owned_id_for_wire` resolve a match to a bogus owned card and corrupt quick-sell
and move. A new `(game, "match")` scope costs one constant — the store is
already generic over the pair — and an integration assertion now pins that a
match id never appears in the owned-item reverse map.

ECONOMY: `/match/end` is NOT a new authority. It renders Core's single
exactly-once `complete_match` transaction, the same one the legacy
`/matches/result` path was closed in favour of earlier today, and it still omits
`expire_loans`/`advance_season` so FIFA 17 keeps its own seasons and loans.

THE LATENT BUG THIS EXPOSED, which would have been a silent permanent
under-credit the moment the route became reachable: the per-match identity fell
back to a hash of the request body. Every abandoned match sends a BYTE-IDENTICAL
body (`matchReportId:0`, empty items/matchData/telemetry, flags 0), so all of
them collapsed onto one identity and Core's UNIQUE(profile_id, match_identity)
would refuse every DNF after the first — `applied=false`, nothing awarded, no
error. The identity is now the id minted at create, which is unique per match by
construction; the fingerprint remains only as a floor for an end with no create.
It also removes a durable dependency on `DefaultHasher`, which has no
cross-version stability guarantee yet was being persisted.

One bug of my own, caught by driving the real dispatch rather than the handler:
taking the in-flight id on end looked tidy but sent a REPLAYED `/match/end` down
the fingerprint path — a different identity — so Core paid a second time
(measured: a second +75 for one abandoned match). The id is now read and held,
so a replay reuses one identity and the next create overwrites it.

Verified end to end on the restored club: create → ready → play → end returns the
reversed reward shape (`boostConis` included, `bidTokens`/`qualifiedChampionEventId`
never emitted), a DNF credits once, two replays credit zero, and a second match
with a byte-identical body credits again. Host 115 lib + 36 host_test + 7
economy_integration + concurrency/differential/failure, adapter 217 + 25, all green.

Note for the record: a DNF pays Core's COINS_LOSS (75), not the oracle's 100.
Nothing on the wire settles the number — the client renders whatever we send, and
the oracle's own comment says its values were never reversed — so the declared
Rust authority's table wins rather than being bent to match Python.
2026-08-21 18:00:28 +00:00

OpenFUT

⚠️ Status — see docs/PROJECT_STATE.md (canonical). The working, actively-developed target is FIFA 17, not FIFA 23. Everything below this banner describes the superseded FIFA 23 bridge lineage and is kept for historical context.

Run the server (canonical): cd fifa17-recon/docker/fifa17-python && docker compose up -d — see fifa17-recon/FUT-RUNBOOK.md. openfut-core is the shared offline backend (still used by the FIFA 17 path); openfut-bridge is the retired FIFA 23 integration.

Offline Ultimate Team — like SPT, but for FIFA 23.

OpenFUT replaces EA's retired FUT servers with a fully offline, single-player backend. You own FIFA 23 legitimately. You just want to keep playing after EA shut down the servers.


Repositories

Repo Purpose
openfut-core Game-independent offline FUT backend
openfut-bridge FIFA 23 integration layer + reverse-engineering proxy

Architecture

FIFA 23 client
      │
      ▼
┌─────────────────┐
│  openfut-bridge │  ← intercepts FUT traffic, maps routes, logs unknown
└────────┬────────┘
         │
         ▼
┌─────────────────┐
│  openfut-core   │  ← offline FUT backend: profiles, packs, squads, SBCs
└─────────────────┘
         │
         ▼
   SQLite database

Core is game-independent. It speaks a clean REST API and knows nothing about FIFA 23 internals.

Bridge is FIFA-specific. It speaks FIFA 23's wire protocol and translates it into Core API calls. Bridge is where all reverse engineering work happens.


Current Status

Feature Status
Local profiles + clubs Working
Coin system Working
Pack generator Working
Card collection Working
Squad builder Working
Objectives engine Working
SBC engine Working
Match rewards Working
NPC transfer market Working
Statistics Working
FIFA 23 integration 🔴 Reverse engineering in progress
Chemistry calculation 🟡 In progress
Full Draft mode 🟡 In progress
Squad Battles AI generator 🟡 In progress
Objectives claim flow 🟡 In progress

Running

# Start the offline backend
cd openfut-core
cargo run

# Start the proxy (for traffic capture / FIFA integration)
cd openfut-bridge
cargo run

Core listens on http://127.0.0.1:8080 by default. Bridge listens on http://127.0.0.1:8443 by default.


Design Principles

  • Offline-first. No EA account required. No internet connection needed.
  • Single-player only. This is not a multiplayer server emulator.
  • Data-driven. All cards, packs, SBCs, and objectives are JSON files. Everything is moddable.
  • Clean architecture. Core has zero knowledge of FIFA 23. Bridge has zero game logic.
  • No copyrighted assets. No real player images, no EA trademarks in data files.

Disclaimer

This project is not affiliated with EA Sports. You must own FIFA 23 legitimately to use this software. This project does not bypass any ownership verification and is intended only to restore offline playability of a game whose online services have been retired.

S
Description
No description provided
Readme 25 MiB
Languages
Python 54.8%
Rust 41.2%
Shell 3.3%
Lua 0.3%
PowerShell 0.2%
Other 0.1%