# Insights schema changelog

## 4.13.0

- Added `component_stats`: per-player values of the component-rating sub-stats shown in the web app, one key per stat, each an array of 4 (indexed by player ID, `null` where the stat has no value for that player). Each key's description gives its unit, its component and, where pbql can express the stat, copyable pbql queries for the per-unit values and the aggregate. Rates are fractions in [0, 1]. Present for every doubles game whether or not ratings are; omitted for singles and malformed games.
- `game_data.relative_adjustments`: the description now says the models behind it are retired, so nothing writes it any more; it appears only on documents produced before the neural rating model.

## 4.12.0

_Released 2026-08-19._

- **Breaking**: removed `player_data.is_ball_machine` (until the ball-machine substitution support lands).
- `session.num_players` description no longer refers to ball machines or `is_ball_machine`.
- **Breaking**: removed `shot.quality.selection` (shot-choice quality). `shot.quality.overall` is retained but is now derived solely from `shot.quality.execution`, and its description says so.
- **Breaking**: removed `tweener` from the `shot.shot_type` enum.
- **Breaking**: removed `shot.errors.dead_dink`.
- **Breaking**: removed `shot.errors.faults.paddle_hit_net`, `shot.errors.faults.kitchen`, and `shot.errors.faults.excess_bounce`, that we currently don't detect.
- **Breaking**: `shot.errors.faults.net` and `shot.errors.faults.short` are now present only when `true`; they are omitted rather than emitted as `false`. Consumers testing for an explicit `false` must instead test for absence.
- **Breaking**: removed `shot.resulting_ball_movement.spin` (and its `dominant_class` / `magnitude` fields).
- **Breaking**: `shot.resulting_ball_movement.trajectory.start.zone` now uses a narrower inline `Court Zone` enum (`deep`, `mid`, `short`, `kitchen`) instead of referencing `/events/zone`, since a shot always starts from a court zone and never from `net` or `out`. `trajectory.end.zone` still uses
  the full `/events/zone` enum.
- `player_data.trends.ratings` has new components: `kitchen_game`, `ball_control`, `defense`, `offense`, `court_iq` and `targeting`, plus `overall`.

## 4.10.0

_Released 2026-05-02._

- Added `player_data.positional_performance` containing `forward_pressure` (team-level Push, [0, 1]) and `finishing_ability` (team-level Close, [0, 1]) — measures of how actively a team drove each shot toward a positional advantage and how efficiently they converted advantage into ending the rally, both independent of rally outcomes. Both teammates share the same value; team 1's value is the complement of team 0's. Omitted for singles or when too few supported rallies are available.
- Added `shot.quality.pressure` ([0, 1]) — positional pressure faced and imposed by the shot. Omitted for singles, serves, returns, or when positioning data is unavailable.
- Added `shot.shooter_positioning_score` and `shot.partner_positioning_score` ([0, 1]) — Stage 2 causal-frontier positioning quality scores at the moment of the shot. Omitted for singles, serves, returns, or when positions are outside the model's supported domain.
- Updated `shot.advantage_scale` semantics. In doubles it is now derived from a state-value model that estimates rally win probability from four-player positions (well-calibrated; ~0.3 win-prob at 0, ~0.7 at 1; teammates share, opponents are the complement). For singles, the legacy y-axis depth heuristic is preserved for ratings compatibility (server's value hardcoded to 0 on the serve, unused player slots null). Doubles scores are omitted when positions are outside the model's supported domain.
- Removed `scoring_info.likely_correct_score`. The field was obsoleted by the new FB-scoring confidence work and is no longer produced.

Documentation updates after initial release:

- Documentation: clarified `shot.is_putaway` to make it explicit that the field covers any clean rally-ending winner or strong/decisive attacker — including well-placed dink and drop winners — not only hard-hit shots.

_Note: Released 2026-05-02 (schemas commit `63b8e6c7`, DE `5b0df8c2`); the documentation-only update was published 2026-05-27 (schemas commit `8666ba02`, DE `6953c1e8`) without a version bump, and the `v4.10.0` tag was moved to that commit._

## 4.8.0

_Released 2026-02-26._

- Added `team_kitchen_arrival` to player data with team-level kitchen arrival stats (numerator/denominator counts for serving and returning roles, where both teammates had a fair opportunity to arrive at the kitchen)

## 4.7.0

_Released 2026-01-08._

- Added `stats` object for the general technical stats about each player

## 4.5.1

_Released 2025-12-22._

- New field, `advantage_scale`, with a positional 0-1 advantage score for each of the players at the time of the shot.

## 4.4.0

_Released 2025-11-12._

- New structure, `kitchen_arrival_percentage`, with a new, improved algorithm for calculating the percentage of fair-chance kitchen arrivals.

## 4.1.0

_Released 2025-09-18._

- Unforced errors and putaways are supported now

## 4.0.0

_Released 2025-08-07._

- Multi-session videos support
- Most important change is in the URL structure, now it contains the session ID: instead of /{video_id}/stats.json it is now /{video_id}/{session_id}/stats.json, where session_id is 0-based index of the session in the video. Client can iterate through sessions using the session_id until it gets 404 Not Found.

- `avatar_id` field is added to player_data, and it uses in the player avatar URL: /{video_id}/{ai_engine_url}/player{avatar_id}-[1-4].jpg are the four avatars for this player

## 3.2.0

_Released 2025-07-14._

- Replaced `ms_to_kitchen` with `kitchen_arrivals` array containing detailed kitchen line periods with `since_ms`, `until_ms`, and `ft_moved` vector data
- Added `team_stats` array to rallies with `average_ft_between_players_along_x` and `x_distance_optimality` metrics for doubles games
- Added `shooter_movement_from_last_shot` vector to track player movement between shots, using the new 2d `vector` type
- Added `player_positions` array with x/y coordinates for all players at shot timestamp
- Docs updates: dead_dink is "not supported, not planned", for the `kitchen_arrival` we specify that we consider only "rallies with at least 3 shots"

## 3.0.0

_Released 2025-06-02._

- Add ratings data structures for players' ratings and their trends

## 2.9.0

_Released 2025-05-17._

- Running score properties moved to rallies[*].scoring_info.running_score, with server_number added for doubles games
- Added start_ms and end_ms timestamps to track shot duration for shots without the resulting_ball_movement
- Updated popup error definition with more specific criteria
- Changed description of average_x_coverage_percentage to clarify it's only relevant for doubles games, made it optional
- Added corrected boolean flag to worldPosition3D to indicate post-CV corrections

## 2.7.0

_Released 2025-03-12._

- .running_score and the related properties have been moved to rallies[*].scoring_info.running_score, there's also .server_number there for the doubles games

## 2.6.0

_Released 2025-01-23._

- Rally scoring is now supported. Game data contains new attributes, `scoring` and `min_points`, that define the scoring rules for the game.
- New attribute for the rally, running_score, that computes the running score according to the scoring rules chosen.

## 2.5.0

_Released 2025-01-15._

- Exposed "Coach advice" in the Insights, an array of advice for each player, ordered by their relevance.

## 2.4.0

_Released 2024-12-03._

- Added `likely_bad` attribute to a rally to indicate that it shouldn't be used for calculating running scorie.
- In general, scoring is available now, so the scores will be reported numerically in `game_outcome`.

## 2.3.0

_Released 2024-11-20._

*Release of 2024-11-20 15:13 UTC (functional checksum `930d478af5b91cae8ed3692e6b489b21`):*

- Back to the clean version of the schema

*Release of 2024-11-20 15:00 UTC (functional checksum `5df30212fd212b8189bcd17f96e1a054`):*

- Deploy a dummy version to be able to bump the version number

_Note: Two releases were published as v2.3.0 on 2024-Nov-20 and both remain in `main` CHANGELOG.md as separate `v2.3.0` entries: first a placeholder schema with a `dummyVersion` field (schemas commit `7ca60e7d`, DE `81fb4e6b`) to move the version number, then the clean schema (schemas commit `e45e7189`, DE `19612d8e`), which is functionally identical to v2.0.2. The `v2.3.0` tag points at the clean one. Both entries are kept here, newest first._

## 2.0.2

_Released 2024-11-04._

- added `session` to indicate game vs. drill and how many participants
- added optional `is_ball_machine` in `player_data`

## 2.0.1

_Released 2024-10-24._

- New fault type: `short`, when the ball fails to cross the net and ends on the server's side.
- Errors are now enum-valued: potential vs exploited.
- Outs are simplified/normalized into a enum that avoids contradictory values.
- Descriptions of errors are updated for the upcoming simplified heuristics

## 2.0.0

_Released 2024-09-03._

- transitioned insights to more purposeful app use
- `rallies` now contains a list of `shots` instead of a list of `moments`
- renamed `game_stats` to `game_data`
- renamed `player_stats` to `player_data`
- `player_data` now contains far fewer key-value pairs

## 1.0.3

_Released 2024-09-03._

- transitioned insights to more purposeful app use
- `rallies` now contains a list of `shots` instead of a list of `moments`
- renamed `game_stats` to `game_data`
- renamed `player_stats` to `player_data`
- `player_data` now contains far fewer key-value pairs

_Note: Not in `main` CHANGELOG.md. Text taken from CHANGELOG.md at the tag commit `c67c7388`, which is not on any branch of pbv-public/insights. v1.0.3 is the same schema (functional checksum `4fb2e9d0...`) re-released 40 minutes later as v2.0.0 with the same text._

## 1.0.2

_Released 2024-07-14._

* add hands battle highlight

## 1.0.1

_Released 2024-07-07._

- removed unnecessary `shot_zones` from `player_stats`

## 1.0.0

_Released 2024-06-01._

initial release

from dev 0.0.12
