Skip to content

Stabilize RP route status parsing in flight plan headers#441

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/bugfix-flight-plan-utils-parse-header
Draft

Stabilize RP route status parsing in flight plan headers#441
Copilot wants to merge 3 commits into
masterfrom
copilot/bugfix-flight-plan-utils-parse-header

Conversation

Copy link
Copy Markdown

Copilot AI commented May 28, 2026

FlightPlanUtils.parseHeader handled RP differently from the other route status prefixes: it set raw.route_status to 'RP' and then overwrote it with the full header. This made raw.route_status inconsistent and dropped the opportunity to parse inline route content carried in RP headers.

  • Route status normalization

    • Keep raw.route_status as the enum-like status code 'RP', consistent with RF, RI, RM, and RS.
    • Remove the branch-local overwrite with the full header string.
  • Inline route parsing

    • When an RP header contains route payload after the prefix, parse it as route content instead of storing it in route_status.
    • Align RP behavior with the existing RF branch.
  • Regression coverage

    • Add a focused unit test for parseHeader covering an RP header with embedded route data, asserting both stable route_status and parsed waypoints.
} else if (header.startsWith('RP')) {
  decodeResult.raw.route_status = 'RP';
  decodeResult.formatted.items.push({
    type: 'status',
    code: 'ROUTE_STATUS',
    label: 'Route Status',
    value: 'Route Planned',
  });
  if (header.length > 2) {
    addRoute(decodeResult, header.substring(2));
  }
}

Copilot AI changed the title [WIP] Fix RP branch overwriting route_status in parseHeader Stabilize RP route status parsing in flight plan headers May 28, 2026
Copilot AI requested a review from kevinelliott May 28, 2026 03:06
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.

Bug: flight_plan_utils.parseHeader RP branch overwrites route_status with the full header

2 participants