Skip to content

feat: supporting is_seasonal manual set to TDG, JBDA, ODPT - #1830

Open
davidgamez wants to merge 7 commits into
mainfrom
feat/is_seasonal_imports
Open

feat: supporting is_seasonal manual set to TDG, JBDA, ODPT#1830
davidgamez wants to merge 7 commits into
mainfrom
feat/is_seasonal_imports

Conversation

@davidgamez

@davidgamez davidgamez commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary:

Makes seasonal an operator-owned, tri-state field so a manual setting survives every automated import and update.

  • Operations API: replaced operational_status_action (enum including no_change) with operational_status (wip|published|unpublished) on the GTFS and GTFS-RT update requests. operational_status and seasonal are now tri-state: omit to preserve the stored value, send a value to set it. A feed GET response can be sent straight back as an update with no change detected.
  • Operations impl: operational_status is now exposed via from_orm, so it is visible to change detection. _PRESERVE_WHEN_OMITTED_FIELDS backfills omitted tri-state fields from current values to avoid phantom diffs, and the diff becomes the single write gate - the operational_status_action special case in _populate_feed_values and _update_feed is gone. to_orm only writes seasonal / operational_status when explicitly provided.
  • Importers (TDG, ODPT, JBDA): added OPERATOR_OWNED_FEED_COLUMNS = ("seasonal",). No upstream source carries a seasonality signal, so importers never assign it. TDG additionally carries seasonal across the delete/recreate path when a feed's data_type flips.
  • Seal of Reliability docs: CriterionContribution.status is redocumented as the debounced verdict; the at-risk state is now pass with in_grace_period true rather than fail.

Note: operational_status_actionoperational_status is a breaking spec change.

Expected behavior:

  • Update request omitting seasonal or operational_status → stored values unchanged, 204 (no needless materialized view refresh or web revalidation).
  • Update request sending either explicitly → value written, 200.
  • Re-running any importer over a feed manually marked seasonal → flag preserved, including a TDG data_type change.

Testing tips:

scripts/api-tests.sh --folder functions-python/operations_api

@davidgamez
davidgamez marked this pull request as ready for review September 10, 2026 15:20
@davidgamez davidgamez linked an issue Sep 10, 2026 that may be closed by this pull request
@jcpitre

jcpitre commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Out of scope for this PR, but something keeps adding blank lines to OperationsAPI.yaml:

description: >
The type of realtime entry:
* vp - vehicle positions

There's other locations in the file where blank lines are added.

@davidgamez

Copy link
Copy Markdown
Member Author

Out of scope for this PR, but something keeps adding blank lines to OperationsAPI.yaml:

description: >
The type of realtime entry:
* vp - vehicle positions

There's other locations in the file where blank lines are added.

Fixed

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.

is_seasonal: adding to TDG, JBDA, ODPT

2 participants