Skip to content

Fix xctsk export to match XCTrack spec#117

Merged
pokle merged 1 commit intomasterfrom
worktree-check-xctsk
Apr 2, 2026
Merged

Fix xctsk export to match XCTrack spec#117
pokle merged 1 commit intomasterfrom
worktree-check-xctsk

Conversation

@pokle
Copy link
Copy Markdown
Owner

@pokle pokle commented Apr 2, 2026

Summary

  • Exported .xctsk files were rejected by tools.xcontest.org/xctsk due to non-standard turnpoint types (TURNPOINT, GOAL) and empty timeGates arrays
  • Add toXctskJSON() serializer that strips internal-only types and ensures required fields per the XCTrack spec
  • Add parseXCTaskAsync() for XCTSKZ: compressed QR code format, goal.finishAltitude parsing, v2 numeric type codes, and v2 polyline radius decoding

Test plan

  • All 411 tests pass (43 xctsk-specific, 10 new)
  • bun run typecheck:all passes
  • Verified exported bells-beach task loads successfully on tools.xcontest.org (task code: fite)
  • Round-trip: parse xcontest file → toXctskJSON() → output matches original structure

🤖 Generated with Claude Code

Exported .xctsk files were rejected by tools.xcontest.org because they
contained non-standard turnpoint types ("TURNPOINT", "GOAL") and empty
timeGates arrays. The XCTrack spec only allows TAKEOFF/SSS/ESS as type
values — intermediate turnpoints omit the field, and the last TP is
implicitly the goal.

- Add toXctskJSON() serializer that produces spec-compliant v1 JSON
- Add parseXCTaskAsync() for XCTSKZ: compressed QR code format
- Add goal.finishAltitude parsing (v1 and v2)
- Fix v2 polyline decoder to extract radius (4th encoded value)
- Support v2 numeric type codes (t=2 for SSS, t=3 for ESS)
- Default timeGates to ["00:00:00Z"] when empty (xcontest requires non-empty)
- downloadTask() now uses toXctskJSON() for spec-compliant output

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

Preview Deployment
https://worktree-check-xctsk.glidecomp.pages.dev
Commit: f0438f2

@pokle pokle merged commit 143dc29 into master Apr 2, 2026
5 checks passed
@pokle pokle deleted the worktree-check-xctsk branch April 2, 2026 23:03
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.

1 participant