esi / esi-issues

Issue tracking and feature requests for ESI
https://esi.evetech.net/
209 stars 23 forks source link

/fw/systems does not properly report "captured" state #1206

Open IcyMidnight opened 4 years ago

IcyMidnight commented 4 years ago

Bug

Today the Kurniainen system (id 30003089) was captured in faction warfare at 23:18 server time.

AIUI the API should report the system status as "captured", but is instead reporting "contested" with 0 victory points. Normally 0 victory points should report "uncontested".

Request

GET /latest/fw/systems/?datasource=tranquility HTTP/2
Host: esi.evetech.net

Response

Status Code

200

Headers

HTTP/2 200
date: Wed, 27 May 2020 08:39:34 GMT
content-type: application/json; charset=UTF-8
content-length: 27578
access-control-allow-credentials: true
access-control-allow-headers: Content-Type,Authorization,If-None-Match,X-User-Agent
access-control-allow-methods: GET,HEAD,OPTIONS
access-control-allow-origin: *
access-control-expose-headers: Content-Type,Warning,ETag,X-Pages,X-ESI-Error-Limit-Remain,X-ESI-Error-Limit-Reset
access-control-max-age: 600
allow: GET,HEAD,OPTIONS
cache-control: public
etag: "36a0d10c89a73d50f9fb3e7e33c1cb50296288b7d68150006b199d2a"
expires: Wed, 27 May 2020 08:57:20 GMT
last-modified: Wed, 27 May 2020 08:27:20 GMT
strict-transport-security: max-age=31536000
vary: Accept-Encoding
x-esi-error-limit-remain: 100
x-esi-error-limit-reset: 26
x-esi-request-id: 568dfeb0-fda8-4661-8fc0-d9107cc55259

Body

...
  {
    "contested": "contested",
    "occupier_faction_id": 500003,
    "owner_faction_id": 500003,
    "solar_system_id": 30003089,
    "victory_points": 0,
    "victory_points_threshold": 3000
  },
...

Expected

...
  {
    "contested": "captured",
    "occupier_faction_id": 500003,
    "owner_faction_id": 500003,
    "solar_system_id": 30003089,
    "victory_points": 0,
    "victory_points_threshold": 3000
  },
...

Checklist

Check all boxes that apply to this issue:

IcyMidnight commented 4 years ago

I went digging a bit more. https://evemaps.dotlan.net/system/Sirekur/stats

  {
    "contested": "contested",
    "occupier_faction_id": 500002,
    "owner_faction_id": 500002,
    "solar_system_id": 30002092,
    "victory_points": 0,
    "victory_points_threshold": 3000
  },

This is a system that was contested up a bit and brought back stable. I was hoping I could detected "captured" status with "contested": "contested" and "victory_points": 0 but no dice.

gitAskur commented 3 years ago

This could very well be by design, but I've created an internal issue to confirm that or fix things.

IcyMidnight commented 3 years ago

This could very well be by design

That seems quite unlikely to me. My familiarity of this topic is a little rusty since I opened this issue, but last I checked I had never seen the "captured" status reported which is suspicious as it is listed as a valid value in the API.

Additionally, if you're paying attention to the API you can easily detect this capturing event as any system that goes from near the threshold (lets say > 2500 VP out of 3000) to 0 in one API refresh will always have been captured as the mechanics do not allow for the possibility of driving anywhere near 2500 VP per hour.

In-game this information is available to anyone in the war zone, so it's not like setting the captured status lets anyone avoid scouting as no in-system characters are required.

gitAskur commented 3 years ago

Having a connected desktop client in the system you want to get a live feed from is not quite the same as having a live feed from all the systems in all of New Eden, so this could be a decision by game design. We are going to look into it though, and fix this if appropriate :)

IcyMidnight commented 1 year ago

The new FW update has me looking at my FW tool again. It seems like we've reduced the contested options even further. From a few peeps at the API it seems like all we get is if victory_points == 0 "uncontested" else "contested", which doesn't seem very useful.

Maybe it's time to drop the concept, or replace it with the frontline/command ops/rearguard status instead? In the meantime I'm wandering the FW map to calculate those statuses.