Skip to content

Support flights as planned#1331

Open
BenjaminPelletier wants to merge 5 commits intointeruss:mainfrom
BenjaminPelletier:flights-as-planned
Open

Support flights as planned#1331
BenjaminPelletier wants to merge 5 commits intointeruss:mainfrom
BenjaminPelletier:flights-as-planned

Conversation

@BenjaminPelletier
Copy link
Member

This PR addresses (but does not fully resolve) #1326 by:

  1. Updating mock_uss to populate the new as_planned field in flight_planning responses after "snapping" requested start times to the current wall time (preventing users from rewriting history by saying a flight started in the past)
  2. Improving the flight_planning client to recognize as_planned in the flight_planning API response and populate a new as_planned field in the business object response
  3. Improving uss_qualifier flight_planning operations to return the FlightInfo as planned, including when it differs from what was requested
  4. Validating that the as_planned response matched what was requested (very strictly, for now) via a new injection fidelity check
  5. Using the as-planned flight info for the remainder of each test rather than assuming the flight info was exactly as requested

To accomplish 4 above, the large injection_evaluation.py tool is added. This attempts to make evaluation of as-planned flights as future-scalable as practical by performing bulk field-by-field comparisons automatically according to comparators defined per JSONPath in addition to a default comparator.

Ideally, each scenario would define what is acceptable for an as-planned flight (though hopefully they would reuse many of the same definitions -- e.g., "anything that overlaps the other flight"). However, making all these changes in one PR would be far too large. Instead, placeholder TODOs referencing the appropriate issue are added in the places where each scenario could (in the future) define what is acceptable for as-planned flights, and one "global" validation is added in flight_planning/test_steps.py:submit_flight which requires all fields in as_planned to match exactly (status quo), except start times are allowed to be adjusted forward to the wall clock.

In addition to the standard CI, I also tested as_planned validation by temporarily setting mock_uss to set start time to wall clock + 5 seconds (instead of just wall clock in this actual PR) and observing that the Injection fidelity check failed. See the diff of mock_uss/flights/planning.py on the second commit for this approach (though the timing did not correspond to exactly commit 2).

A number of small errors/basedpyright findings are resolved as discovered during development of the core feature.

@BenjaminPelletier BenjaminPelletier marked this pull request as ready for review February 11, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant