-
Notifications
You must be signed in to change notification settings - Fork 47
feat: Add support for GOFO Express (US) #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds a new courier configuration file for GOFO Express with a tracking profile for US shipments, including a 14-digit serial number regex pattern, tracking URL template, and test tracking numbers for validation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
couriers/gofo.json(1 hunks)
🔇 Additional comments (1)
couriers/gofo.json (1)
8-10: ****The regex pattern in
couriers/gofo.jsonfollows the established patterns across the codebase and is not problematic. The optional spaces in both the prefix (G\sF\sU\s*) and digit patterns ([0-9]\s*) are standard conventions used throughout all courier configuration files (amazon, canadapost, dhl, dpd, fedex, etc.). The SerialNumber capture group intentionally includes spaces, consistent with other couriers. The empty validation object{}is also a common pattern across many profiles. The test cases correctly validate expected formats. No changes are needed.Likely an incorrect or invalid review comment.
| "test_numbers": { | ||
| "valid": [ | ||
| "GFUS01011884214464", | ||
| "GFUS01011884214272" | ||
| ], | ||
| "invalid": [ | ||
| "GFUS0101188421446" | ||
| ] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify test numbers are correctly classified.
The test cases appear structurally correct (valid cases have 14 digits, invalid has 13), but confirm they represent real GOFO tracking numbers or representative samples.
🏁 Script executed:
#!/bin/bash
# Verify test numbers match the regex pattern
# Test valid numbers
echo "GFUS01011884214464" | grep -E '^\s*G\s*F\s*U\s*S\s*([0-9]\s*){14}\s*$' && echo "Valid 1: PASS" || echo "Valid 1: FAIL"
echo "GFUS01011884214272" | grep -E '^\s*G\s*F\s*U\s*S\s*([0-9]\s*){14}\s*$' && echo "Valid 2: PASS" || echo "Valid 2: FAIL"
# Test invalid number (should not match)
echo "GFUS0101188421446" | grep -E '^\s*G\s*F\s*U\s*S\s*([0-9]\s*){14}\s*$' && echo "Invalid: FAIL (matched when shouldn't)" || echo "Invalid: PASS (correctly rejected)"Length of output: 100
🌐 Web query:
GOFO tracking number format structure digits
💡 Result:
Common GOFO tracking-number patterns seen in carrier and aggregator sources:
- GF + 13 digits (example: GF5110774101040). [1][3]
- GF + 15 characters (business responses have also listed GF followed by 15 digits in some cases). [1]
- KD + 14 digits (reported by GOFO in responses). [1]
- YT or WT + 16 digits (alternative last‑mile formats). [1][5]
Notes: aggregators (ParcelPanel, 17Track, TrackingMore) also recognise GOFO and auto-detect these formats. If you share a sample tracking number I can parse or validate it. [2][4]
Test numbers do not match documented GOFO tracking number formats.
Actual GOFO tracking numbers use formats like GF + 13 digits, GF + 15 characters, KD + 14 digits, or YT/WT + 16 digits. The test numbers use "GFUS" prefix with 14 digits, which does not match any documented format. Replace with representative samples from actual GOFO documentation or use a more generic prefix (e.g., "GF") with the correct digit count.
🤖 Prompt for AI Agents
In couriers/gofo.json around lines 13 to 21 the provided test tracking numbers
use a "GFUS" prefix with 14 digits which doesn't match documented GOFO formats;
replace the examples with representative formats such as "GF" followed by 13
digits, "GF" followed by 15 alphanumeric chars, "KD" followed by 14 digits, or
"YT"/"WT" followed by 16 digits (or multiple examples covering these variants)
so the valid/invalid arrays reflect actual GOFO patterns.
Summary by CodeRabbit