fix(fifa17): a dangling manager ref must not refuse the squad save
Every real squad save was failing with 400 unresolved_wire_ids. Reproduced on staging with the repo's own seeder, which sends the captured retail body: route=squad-replace status=400 outcome=unresolved_wire_ids detail=[[100000427]] FIFA 17 always sends a manager ref, and on a real profile it does not resolve to an owned instance. scripts/sold-staging-seed-squad.py already recorded why: production's own squad points at instance 100000427, which is absent from production's /club/staff (1975 items spanning 100000001..100004826), and the client accepts that squad back unchanged -- so the client never validates the manager against the club, and the pre-0023 server accepted it. Making the manager ownership-backed (d37a9d5/25f4ad1) turned that ref into a hard refusal, which took out the primary FUT write path: no squad save means no squad, which means the client will not enter the FUT hub at all. A manager ref is not a squad slot. An unresolvable PLAYER slot must still refuse the save -- committing it would silently drop an owned card from the club. An unresolvable MANAGER ref just means there is no ownership-backed manager, which is exactly the state before migration 0023: the save commits, the assignment is cleared as a full replacement should, and the id is reported on ProposedSquad::unresolved_manager_wire_id so the host can log what it could not map instead of letting it vanish. A ref that DOES resolve is still assigned and still authorized against the club. Verified end to end on staging: the seeder now answers {"id": 0} with 11 occupied slots, the host logs `manager_ref_unresolved=100000427 (saved with no manager assignment)`, and the projected squad carries `manager: []`.
This commit is contained in:
@@ -2131,6 +2131,17 @@ pub fn handle_put_squad(body: &[u8], deps: &SquadDeps<'_>) -> (WireResponse, Squ
|
||||
);
|
||||
}
|
||||
}
|
||||
// FIFA always sends a manager ref, and on a real profile it does not resolve
|
||||
// to an owned instance (production's own save points at 100000427, absent
|
||||
// from its /club/staff). That is not an error: the save commits with NO
|
||||
// ownership-backed manager. Logged so a ref we cannot map stays visible
|
||||
// instead of vanishing.
|
||||
if let Some(wire) = build.canonical.unresolved_manager_wire_id {
|
||||
eprintln!(
|
||||
"utas-host owner=RUST route=squad-replace manager_ref_unresolved={wire} \
|
||||
(saved with no manager assignment)"
|
||||
);
|
||||
}
|
||||
// Commit canonical + extension atomically. No Python fallback on failure.
|
||||
let req = CoreReplaceRequest {
|
||||
name: build.canonical.name.clone(),
|
||||
|
||||
Reference in New Issue
Block a user