Restore exported location history - #173
Conversation
Two gaps, both invisible from inside. **Nothing said the file is agent-owned.** The header names its audience - "rules for agents working on OpenTagViewer" - and rule 10 has one table row obliging you to add a rule when a constraint would cost somebody an afternoon. Neither says the file is maintained by agents, that no human reviews it, or that keeping it current is part of the work rather than a favour. An agent picking up work here had to infer all of that, and both inferences are load-bearing: if nobody is filtering, the agent writing is the only check, and if the next agent starts from this file then anything omitted is an afternoon they pay for. That now sits directly under the title, where it is read before anything it governs, rather than in a rule two hundred lines down. **And nothing warned that the register does not travel.** @parawanderer has not read this file, nor most of docs/, most docstrings, or most commit messages. Agents wrote them. So an agent reading them cannot tell house style from its own predecessors' output, and assumes the former. That showed up this week. A review of #173 was drafted in this file's voice - argued, at length, with the reasoning as the payload - and its reader was a first-time contributor who wanted three line numbers and a fix. Right register, wrong reader. The loop has nobody in it: agents write the docs, a later agent reads them as evidence of what the maintainer wants, and writes more of the same. Nothing in the repository contradicts that, because nothing in the repository is written by the maintainer. Rule 16 states the boundary. The reason it argues at length is the same reason it says not to: the length is for an agent about to undo a constraint, and a person reading a review is not that. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Thanks for listing what you ran locally, and for the edge case handling in the DAO and parser. CI is approved and green: 656 tests, 0 failures. I checked the report artifact rather than the tick; your 16 new tests ran rather than being skipped. Three findings. None were caught by CI and none could have been. 1. Peak memory during import
Ceiling is about 70,000 rows per tag-year: ~100/day from the Find My network, plus @ubrt's local sightings throttled by
No Do not replace the preload with per-row Fix: intern An index on 2. Crash on rotation, and no progress UI
Duration for ~180k rows:
30-60 s with nothing on screen. Fix, progress: Fix, rotation: disposing in Espresso coverage for the progress UI
Add a seam:
Assert the indicator appears, updates, and is gone on every path including each failure. Two traps from 3. Unexpected exceptions reported as a damaged file
} catch (RuntimeException error) {
// Commons CSV reports some malformed record shapes while its iterator advances.
throw new HistoryImportException(
HistoryImportException.Reason.INVALID_ARCHIVE,
"History CSV structure is invalid",
error);
}The Commons CSV case is real: it throws from inside
} else {
title = R.string.history_import_failed_title;
message = R.string.history_import_failed_message;
}This is the unknown-cause branch. It should reach
Changes:
|
Fixes #102
Summary
beacon_ididentity and exact restore metadata to Android history exportsImport behavior
(beacon_id, timestamp)Verification
./gradlew.bat testDebugUnitTest./gradlew.bat testAll./gradlew.bat testAllOnDevice(0 failures, 22 intentional skips)python scripts/add_strings.py --checkThe full suites above passed before the final rebase. After rebasing onto current
main, string completeness and diff checks pass; a local JVM rerun could not start because this session no longer has an Android SDK path configured.