Arc Editor Backup structure

Hi Matt,

I’ve been having some problems affecting some days when importing from the Arc Editor backup. I’m currently using 1.0 (37).

Here’s an explanation from GPT-5.3-Codex. Claude Opus 5.4 went down a deep rabbit hole and never returned trying to fix this one!


I’ve found a backup consistency issue in Arc Editor sample exports that is causing missed GPS data in downstream importers.

For backup ID 26DD32A8-63E3-422E-92CB-C3321569E72B, timeline items for 2016-01-02 import correctly, but the GPS samples for that day are not in the expected week file. Specifically:

  • 2016-01-02 samples are present in 2015-W01.json.gz

  • That file’s sample dates run from 2015-12-28 to 2016-01-03

  • Importers that select sample files by week-key filename (e.g. 2015-W53 / 2016-W01) can miss the correct file and attach zero GPS samples to activities

So the underlying GPS exists, but filename-based week selection fails because file naming and contained date ranges are not consistently aligned.

Could you confirm the intended naming contract for YYYY-Www.json.gz and whether this historical mismatch is expected?
If possible, a robust fix on Arc Editor side would be either:

  1. Ensure filename week keys always match contained sample date ranges, or

  2. Include a manifest with min/max date per sample file so importers can select files by actual date coverage.

This would prevent data-loss behavior in consumers and avoid expensive broad file scanning fallbacks.


The fallback has been implemented and testing is underway.

”The GPS sample fallback scan is now complete for both import paths. The approach:

  • Primary load uses week-key matching (unchanged, fast)

  • Fallback activates only for items that got zero samples — probes skipped files by date range, loads matching samples, and caches the dayKey → weekFileKey mapping so subsequent imports skip the probe

  • Memory-efficient — only loads one fallback file at a time per affected day, doesn’t bulk-load adjacent years”

Regards
Gordon

1 Like

Hi Matt,

The fallback update is up! Arc Reader, Build 02.166. Fortunately, there were only 4 days affected out of a total of 4,478 days!

:magnifying_glass_tilted_left: GPS fallback scan resolved 4 day(s) with mislabeled sample files

1 Like

Curious! Looking into it now on my side. Oh can also point Claude/Codex to the most likely offending file too:

Hah. And Claude’s already found it after reading your forum posts:

Found it. The bug is on line 552:

let year = calendar.component(.year, from: currentWeekStart)

This uses .year (calendar year) instead of .yearForWeekOfYear (ISO week-numbering year). Near year boundaries,
these differ. For example, 2015-12-28 is a Monday that starts ISO week 2016-W01, but .year returns 2015, so
the file gets named 2015-W01.json.gz instead of 2016-W01.json.gz.

That’s exactly Gordon’s bug — his 2016-01-02 samples ended up in 2015-W01.json.gz because the week started on
2015-12-28.

The fix is one line: .year → .yearForWeekOfYear on line 552.

K, fixed now. Will be in next build :+1:t3:

1 Like