Skip to content

Allow Fishing ship type with buoyish name as a buoy#39

Merged
joshhvulcan merged 1 commit into
mainfrom
josh/claude/fishing-buoy-name-allow
Jun 16, 2026
Merged

Allow Fishing ship type with buoyish name as a buoy#39
joshhvulcan merged 1 commit into
mainfrom
josh/claude/fishing-buoy-name-allow

Conversation

@joshhvulcan

Copy link
Copy Markdown
Contributor

Relates to VulcanSkylight/skylight-planning#272

Motivation

The entity postprocessor raised KnownShipTypeAndBuoyName (an INVALID_ARGUMENT gRPC 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_type 30 / category 2) with a buoyish name. These valid cases were treated as data conflicts, flooding logs with errors like WIN 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

  • Add 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.
  • Other known ship types still raise KnownShipTypeAndBuoyName as before.
  • Add entity_post_processed_fishing_buoy_name_allowed counter for observability.
  • Unit tests for the helper and both the binned-type and ais_type=30 paths.

Reviewer Attention

  • postprocessor.py:157 — the guard now requires and not is_fishing_binned_ship_type; confirm the carve-out is scoped to Fishing only and non-fishing known types still raise.

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>
@joshhvulcan joshhvulcan merged commit 40539dd into main Jun 16, 2026
4 checks passed
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.

2 participants