Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 30, 2025

This PR implements automatic redirection of former amateur radio callsigns to their current callsigns, addressing the issue where former calls like KO4JZT were showing stale data instead of the current information for that operator.

Problem

Former callsigns were displaying outdated license information as if they were still active. For example, KO4JZT would show old data instead of redirecting to or showing the same data as the operator's current vanity callsign WW0CJ.

Solution

The solution leverages the FCC's FRN (FCC Registration Number) system, which uniquely identifies each person and persists across callsign changes:

  1. Added CallRedirections data structure to track:

    • FRN → current active callsign mapping
    • Former callsign → FRN mapping for lookup
  2. Enhanced ULS processing with date-aware logic:

    • Groups callsigns by FRN during data processing
    • Uses grant date parsing to identify the most recent (current) callsign per FRN
    • Marks older callsigns as "former" for redirection
  3. Updated user interfaces to seamlessly handle redirections:

    • CLI and web interfaces automatically resolve former calls to current calls
    • Clear indication when redirection occurs (e.g., "WW0CJ (redirected from KO4JZT)")

Example Usage

# Looking up a former callsign now shows current data
$ echo "KO4JZT" | ./hamcall -m cli
{
  "callsign": "WW0CJ (redirected from KO4JZT)",
  "name": "John Doe",
  "grant": "12/31/2020",
  ...
}

Implementation Details

  • Minimal performance impact: Only processes redirections for FRNs with multiple callsigns
  • Robust date parsing: Handles MM/DD/YYYY and MM/DD/YY grant date formats
  • Backward compatible: All existing functionality preserved
  • Well tested: Comprehensive test coverage for various scenarios

Testing

  • Manual verification confirms KO4JZT properly redirects to WW0CJ
  • All existing tests continue to pass
  • New unit tests validate redirection logic under edge cases

Fixes #15.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • invalid-url-that-does-not-exist.com
    • Triggering command: /tmp/go-build681688111/b234/downloader.test -test.testlogfile=/tmp/go-build681688111/b234/testlog.txt -test.paniconexit0 -test.timeout=10m0s (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Redirect former calls to current calls Implement call redirection for former callsigns to current callsigns Jun 30, 2025
Copilot AI requested a review from pcunning June 30, 2025 18:53
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.

Redirect former calls to current calls

2 participants