Allow Fishing ship type with buoyish name as a buoy#39
Merged
Conversation
A lot of fishing gear (buoys, nets, FADs) reports a Fishing AIS ship type (ais_type 30 / category 2), so a buoyish name paired with a Fishing ship type is expected rather than a data conflict. Previously the entity postprocessor raised KnownShipTypeAndBuoyName for any known ship type with a buoyish name, which flooded logs/RPC errors for these legitimate cases (e.g. WIN 6+, ais_type 30). Add an is_binned_ship_type_fishing check that exempts the Fishing category from the known-ship-type-and-buoy-name guard, letting these tracks fall through to the existing buoy classification rule. Other known ship types still raise as before. Adds an entity_post_processed_fishing_buoy_name_allowed counter for observability. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sebutaur
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to VulcanSkylight/skylight-planning#272
Motivation
The entity postprocessor raised
KnownShipTypeAndBuoyName(anINVALID_ARGUMENTgRPC error) whenever a track had a known AIS ship type and a buoyish name. But a lot of fishing gear — buoys, nets, FADs — legitimately reports a Fishing ship type (ais_type30 / category 2) with a buoyish name. These valid cases were treated as data conflicts, flooding logs with errors likeWIN 6+ (ais_type 30) ... returned INVALID_ARGUMENT. The SMEs decided Fishing-typed tracks with buoyish names should be allowed through and classified as buoys.Changes
is_binned_ship_type_fishing()and exempt the Fishing category from the known-ship-type + buoy-name guard, so those tracks fall through to the existing buoy classification rule instead of raising.KnownShipTypeAndBuoyNameas before.entity_post_processed_fishing_buoy_name_allowedcounter for observability.ais_type=30paths.Reviewer Attention
postprocessor.py:157— the guard now requiresand not is_fishing_binned_ship_type; confirm the carve-out is scoped to Fishing only and non-fishing known types still raise.