Skip to content

Use aircraft typecode to refine military flight typing#34

Closed
koala73 wants to merge 1 commit into
mainfrom
codex/update-determineaircraftinfo-and-enrichflightswithwingbits
Closed

Use aircraft typecode to refine military flight typing#34
koala73 wants to merge 1 commit into
mainfrom
codex/update-determineaircraftinfo-and-enrichflightswithwingbits

Conversation

@koala73

@koala73 koala73 commented Jan 27, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Improve aircraft classification when callsign and hex/range checks are inconclusive by consulting ICAO typecodes.
  • Ensure Wingbits enrichment can map reported typecode values to known military types and increase confidence when appropriate.

Description

  • Import and use identifyByAircraftType from src/config/military and extend determineAircraftInfo to accept an optional typeCode parameter and consult identifyByAircraftType as a fallback.
  • During Wingbits enrichment (enrichFlightsWithWingbits), examine analysis.typecode or details.typecode, map it via identifyByAircraftType, set flight.aircraftType when matched, and upgrade confidence from low to medium where applicable.
  • Keep identifyByAircraftType as the single source of truth for mapping typecodes to MILITARY_AIRCRAFT_TYPES.

Testing

  • No automated tests were executed as part of this change.

Codex Task

@vercel

vercel Bot commented Jan 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
worldmonitor Ready Ready Preview, Comment Jan 27, 2026 5:20am
worldmonitor-startup Ready Ready Preview, Comment Jan 27, 2026 5:20am
worldmonitor-test Ready Ready Preview, Comment Jan 27, 2026 5:20am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9a023cafe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +392 to +396
const aircraftType = analysis.typecode || details.typecode;
if (aircraftType) {
const typeMatch = identifyByAircraftType(aircraftType);
if (typeMatch) {
enrichedFlight.aircraftType = typeMatch.type;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid overwriting high-confidence types with generic typecodes

The new typecode logic applies unconditionally and replaces whatever aircraftType was already derived from callsign/hex. This can degrade accuracy when a callsign already identified a more specific role (e.g., NCHO/MC‑130 yields special_ops via callsign, but Wingbits typecode C130 maps to transport and will overwrite it). That’s a regression because the change was intended as a fallback; consider only applying this mapping when the existing type is unknown or confidence is low.

Useful? React with 👍 / 👎.

koala73 added a commit that referenced this pull request Jan 27, 2026
- PR #33: Disambiguate NAVY callsign by origin country (US vs UK)
- PR #34: Use typecode fallback in determineAircraftInfo + Wingbits
  enrichment (guarded: only when type is still 'unknown')
- PR #35: Persist typeCode in enriched data (skip the broken
  pre-filter removal and false-positive regex from original PR)

Closes #33, #34, #35
@koala73

koala73 commented Jan 27, 2026

Copy link
Copy Markdown
Owner Author

Cherry-picked typecode fallback into main (commit 283d05a). Fixed: added guard to only set type when still 'unknown' to avoid overwriting higher-confidence matches.

@koala73 koala73 closed this Jan 27, 2026
@koala73
koala73 deleted the codex/update-determineaircraftinfo-and-enrichflightswithwingbits branch February 15, 2026 08:04
@SebastienMelki SebastienMelki added the area: military Military flights, vessel tracking label Feb 17, 2026
facusturla pushed a commit to facusturla/worldmonitor that referenced this pull request Feb 27, 2026
…with fixes

- PR koala73#33: Disambiguate NAVY callsign by origin country (US vs UK)
- PR koala73#34: Use typecode fallback in determineAircraftInfo + Wingbits
  enrichment (guarded: only when type is still 'unknown')
- PR koala73#35: Persist typeCode in enriched data (skip the broken
  pre-filter removal and false-positive regex from original PR)

Closes koala73#33, koala73#34, koala73#35
scorphx pushed a commit to scorphx/sauron that referenced this pull request Apr 6, 2026
- koala73#34: Remove isProUser() guard from setupAuthWidget(). New users now
  see the sign-in button and can create accounts. The guard was
  intentionally deferred; removing it is the stated end-state.

Close stale todos whose fixes already landed in prior PRs:
- koala73#10: inferEntityClassFromName word-boundary regex (already in code)
- koala73#11: entity key collision fix using candidateStateId (already in code)
- koala73#12: priorWorldState threading to writeSimulationPackage (already in code)
- koala73#13: sanitizeForPrompt on simulation builder strings (already in code)
- koala73#14: allForecastIdSet Set-based lookup (already in code)
- koala73#35: algorithms:['RS256'] in jwtVerify (already in auth-session.ts)
- koala73#41: frameworkHash in deduct-situation cache key (already in code)
- koala73#42: isCallerPremium server-side premium gate (already in code)
- koala73#43: SSRF — ALLOWED_AGENTSKILLS_HOSTS + redirect:manual (already fixed)
- koala73#44: sanitizeForPrompt on systemAppend before LLM (already in code)
- koala73#45: systemAppend included in getCacheKey (already in code)
- koala73#49: shippingStress/diseaseOutbreaks/socialVelocity in BOOTSTRAP_KEYS

https://claude.ai/code/session_015fz1MvRuBJGYbgHubGEabA
SebastienMelki added a commit that referenced this pull request Apr 15, 2026
The setupAuthWidget() call was gated behind isProUser(), which created
a deadlock: new users without legacy API keys could never see the
Sign In button and thus could never authenticate. Removes the guard
in both the main app and the pro landing page pricing section.

Closes #34

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
koala73 pushed a commit that referenced this pull request Apr 17, 2026
…#3115)

The setupAuthWidget() call was gated behind isProUser(), which created
a deadlock: new users without legacy API keys could never see the
Sign In button and thus could never authenticate. Removes the guard
in both the main app and the pro landing page pricing section.

Closes #34

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: military Military flights, vessel tracking codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants