Skip to content

Fix GPX export namespace and timestamp handling with real-file tests - #1124

Merged
adulau merged 2 commits into
mainfrom
fix/gpx-export-regressions
Nov 13, 2026
Merged

adulau merged 2 commits into
mainfrom
fix/gpx-export-regressions

Conversation

@adulau

@adulau adulau commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Preserve source namespace bindings when combining GPX documents, including prefixes used only in extension text or xsi:type values and prefixes rebound differently in separate source files. Generated element prefixes remain independent of source bindings, without changing ElementTree's global namespace registry. Also reject malformed timezone offsets and offsets outside XML Schema's ±14:00 range, normalize valid 24:00:00 timestamps consistently across Python versions, and count only structural GPX points toward the resource limit.

Includes the complete uploaded tests/fixtures/gpx/Morning_Walk.gpx (197,419 bytes, 606 track points). Regression tests check byte-for-byte attachment recovery with all linked geolocations, every point's coordinates/elevation/time, Garmin extension preservation in combined output, and export of all 606 geolocations as waypoints. Additional tests cover QName namespace scope, conflicting/rebound prefixes, timezone boundaries and vendor elements whose names collide with GPX point names.

This follows #1123, which was merged before the fixture and review fixes could be included. It addresses Codex's namespace review finding on that PR and applies the timestamp and structural-point corrections found on the companion importer (#1122).

Validation:

  • 105 exporter tests; 236 tests passed including the CEF and STIX exporter regression tests.
  • Black, isort, flake8 and whitespace checks passed.
  • Actual import/export of Morning Walk recovers the original bytes exactly.
  • Standalone waypoint and combined-track output validate against the official GPX 1.1 XSD and successfully re-import.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T07:41:52.610522Z 2f36879 Manual request
🔒 Security Review ✅ Completed 2026-11-13T07:40:18.825534Z 95536ab PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

adulau commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

@codex review

Please review the latest head 2f36879, including the additional 24:00:00 normalization correction found by the importer re-review. The prior namespace/timestamp/fixture commit received no code-review findings. All 236 exporter and nearby regression checks pass; the Morning Walk fixture still round-trips exactly.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 2f3687923e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@adulau
adulau merged commit 65b4b71 into main Nov 13, 2026
7 checks passed
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