fix(Label_H1_ATIS): populate sequence_number from captured seq group - #505
fix(Label_H1_ATIS): populate sequence_number from captured seq group#505fuleinist wants to merge 1 commit into
Conversation
The regex captures a 2-digit sequence number in group 1 but the value was never passed through to ResultFormatter.sequenceNumber(). This meant raw.sequence_number was always undefined, preventing downstream dedup of repeated ATIS deliveries. Closes airframesio#504
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesATIS sequence number
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟢 Ready to approve
The change correctly wires the already-captured sequence number into the existing formatter API and adds a targeted test assertion to prevent regression.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR fixes Label_H1_ATIS.decode() to actually propagate the 2-digit ATIS sequence number captured by the regex into the decoded result, enabling downstream deduplication via raw.sequence_number.
Changes:
- Populate
decodeResult.raw.sequence_number(and the corresponding formatted item) by callingResultFormatter.sequenceNumber(...)with the capturedseq. - Extend the KSFO ATIS subscription test to assert the expected
raw.sequence_numbervalue.
File summaries
| File | Description |
|---|---|
| lib/plugins/Label_H1_ATIS.ts | Passes the captured ATIS sequence group through ResultFormatter.sequenceNumber so raw.sequence_number is set. |
| lib/plugins/Label_H1_ATIS.test.ts | Adds an assertion to verify the KSFO sample decodes raw.sequence_number as expected. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Summary
Closes #504.
The regex in Label_H1_ATIS.decode() captures a 2-digit sequence number in group 1 but the value was never passed through to ResultFormatter.sequenceNumber(). This meant
aw.sequence_number was always undefined, preventing downstream dedup of repeated ATIS deliveries.
Changes
aw.sequence_number === 95 on the KSFO test case
Test
s expect(decodeResult.raw.sequence_number).toBe(95);All existing tests pass.
Summary by CodeRabbit