Skip to content

Normalize FUEL_REM code and stringify sequence formatter values#442

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/cleanup-result-formatter-spaces-bugs
Draft

Normalize FUEL_REM code and stringify sequence formatter values#442
Copilot wants to merge 2 commits into
masterfrom
copilot/cleanup-result-formatter-spaces-bugs

Conversation

Copy link
Copy Markdown

Copilot AI commented May 28, 2026

ResultFormatter had two formatting defects: remainingFuel emitted a code with a leading space (" FUEL_REM"), and sequenceNumber / sequenceResponse emitted numeric values despite formatted.items[*].value being defined as string. This could split downstream grouping and violate formatter contract consistency.

  • Formatter output normalization

    • Removed the leading space in remainingFuel:
      • code: ' FUEL_REM'code: 'FUEL_REM'
  • Type contract consistency for formatted values

    • Updated sequence formatters to emit string values:
      • sequenceNumber: value: decodeResult.raw.sequence_number.toString()
      • sequenceResponse: value: decodeResult.raw.sequence_response.toString()
  • Focused regression coverage

    • Added assertion in Label_44_OFF.test.ts to verify Fuel Remaining uses code === 'FUEL_REM'.
    • Added assertions in Label_H1_INI.test.ts to verify SEQ / SEQ_RESP formatted values are stringified ('2', '0').
// before
code: ' FUEL_REM'
value: decodeResult.raw.sequence_number

// after
code: 'FUEL_REM'
value: decodeResult.raw.sequence_number.toString()

Copilot AI changed the title [WIP] Fix leading space and type bugs in result_formatter Normalize FUEL_REM code and stringify sequence formatter values May 28, 2026
Copilot AI requested a review from kevinelliott May 28, 2026 03:10
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.

Cleanup: result_formatter has stray leading space in code ' FUEL_REM' and number→string type bugs

2 participants