Repository navigation
Fix eight bugs the new tests found, and order the first import usefully - #129
Merged
Merged
Conversation
Every one of these was found by writing a test for behaviour that was assumed to work, rather than by looking for bugs. All are user-visible. **History threw away reports it already had.** getReportsForDay merged the local database with Apple's answer only for days *older* than a week, on the reasoning that Apple stops serving history beyond seven days. Inside the week it took the remote answer alone. Apple returning nothing for a window is ordinary - reports age out, and a narrow key window covers less than the day asked for - so a tag the map had located minutes earlier showed an empty history, and stepping back a day and returning made it reappear. It now merges for every day; combineAndSort already de-duplicates. **Navigate-to was dead on every Android 11+ device.** It named com.google.android.apps.maps explicitly, and package visibility hides a package the manifest has not declared - so resolveActivity returned null with or without Google Maps installed, and the button logged and did nothing. The manifest now declares the geo: intent, no package is named, and a phone with no maps application is told so instead of nothing happening. **The iCloud screen could not be left.** Back was swallowed whenever the loading step was up, which is right for an unlock in flight against Apple and wrong for everything else - and PythonLock serialises the iCloud flow behind the location fetch, which a first import holds for minutes. It also said "Looking for a device that can unlock it" before knowing whether a device was needed at all, which for an already-linked account it never is. **Settings crashed on a session with no account details**, chaining through getAccount().getInfo(). That is the screen with the sign-out button on it, so it is exactly where somebody with a broken session needs to get to. **The app's own escrow record was offered as something to unlock with.** Joining the trust circle registers this app as a device, and the picker then asked for the screen-lock passcode of a device with no screen and no lock. Filtered on APP_IDENTITY.serial rather than a literal, so there is still one source of truth for the identity. **Menu actions were offered with nothing selected**, read the empty selection and returned - a tappable item that did nothing and said nothing. Also: Export Logs and its two toasts are translated (they sat untranslated in a menu of translated items; the debug_* field labels stay English so a pasted bug report is readable), the permanent warning triangles are gone from rows whose text already says the same thing, and the Information page shows the themed app mark instead of a large empty middle. **And the first import is ordered by what the export knows.** ScanOrder used to shuffle every never-scanned tag, on the reasoning that nothing is known about them. Nothing is known about their *scans*; the bundle knows when macOS last observed each one, and that predicts what the first fetch costs - a recent record is a request or two, an old one is a walk through tens of thousands of key indices. It matters most exactly where the app is slowest, because a first import gives every tag the full seven-day window. Tags with no alignment record go last and stay shuffled among themselves, so none is permanently the one that never gets reached. Co-Authored-By: Claude Opus 5 <[email protected]>
Around sixty tests, and the fixtures without which most of them could not exist. Every bug in the commit before this was found by writing one of these. **Screens that had no tests at all.** HistoryViewActivity had none - it takes its Apple session from PythonAppleService.getInstance(), a singleton only the map sets up, so nothing could launch it without launching the map first, and nothing did. InformationActivity had none either. **AMapWithTagsOnIt** is the fixture behind seven of these. Reaching a drawn map takes eight steps - a stored session, the Python double, a substituted provider, a geocoder, beacons with usable accessory_json, locations to draw them at, an Anisette mode recorded so the upgrade dialog does not open over the screen, and RefreshPolicy.resetShared() so the startup fetch is not skipped. A copy of that which forgets the last step passes for a year, because the fetch it meant to observe never ran. **Three fakes for what the managed device cannot provide.** FakeMapView draws the recorded markers so a screenshot shows something, captioned as a fake so nobody mistakes one for evidence about a real place. FakeGeocoder answers lookups the aosp-atd image cannot: it has no geocoding backend, and the app's fallback for "no address" is to print coordinates, so a missing geocoder was indistinguishable from an honest answer. AddressLookup is an interface rather than a Geocoder subclass because Geocoder is final. **apple_test_double** gained the ranged fetch path. getReports generates the day's keys itself rather than asking for a location, so a double without keys_between made every history fetch look like a genuinely empty day - the shape of the bug that path exists to fix, arriving from the test double. **CoordinateConverterTest runs on the JVM** and is the only coverage the AMap path has: both real providers need a device this project cannot provision, so everything else runs against the fake. The conversion is the one piece that is pure arithmetic, and a wrong one puts every pin a few hundred metres out for every user in mainland China, silently. **espresso-contrib excludes protobuf-lite**, and without that it breaks tests it has nothing to do with. It pulls protobuf-lite 3.0.1, which predates the method Cronet calls while deciding whether to use the HTTP engine - so anything building a CronetEngine dies with NoSuchMethodError, which in this app is the Anisette server tester that SettingsActivity constructs. Adding the dependency stopped every Settings test running, with a failure naming protobuf and Chromium and nothing about the test. Also a stub activity in the debug manifest that claims to open geo: links, so the navigate-to path can be tested at all - aosp-atd ships no maps application, and that activity is visible to the app only because of the geo: <queries> entry, so deleting the entry turns the test red. Co-Authored-By: Claude Opus 5 <[email protected]>
AGENTS.md said `testDebugUnitTest` was "close to meaningless: there is exactly one JVM test and it asserts 2 + 2 == 4". There are now 118 of them and they run in about ten seconds - refresh policy, scan order, marker focus, the long-fetch banner, passcode parsing, the CSV and zip writers, coordinate conversion. That is the fast loop, and worth running constantly. The real caveat stands and is kept: every screen, every repository and the whole Python bridge are instrumented, so a green JVM run still says nothing about them. CONTRIBUTING gains the same count, plus the three Java-side fakes and the fixture in the test table - rule 10, which asks that anything listing things rather than describing them gets updated in the same change. It also notes that CoordinateConverterTest is the only AMap coverage that exists and why, so nobody mistakes the fake for the provider. Co-Authored-By: Claude Opus 5 <[email protected]>
wanderdev0
temporarily deployed
to
Android Build
August 21, 2026 20:04 — with
GitHub Actions
Inactive
wanderdev0
had a problem deploying
to
Android Build
August 21, 2026 20:04 — with
GitHub Actions
Failure
wanderdev0
temporarily deployed
to
Android Build
August 21, 2026 20:23 — with
GitHub Actions
Inactive
wanderdev0
added a commit
that referenced
this pull request
Aug 22, 2026
…ailed" A run on #129 died part-way: 362 of 543 tests, then "Instrumentation run failed due to Process crashed". It was reported as two failing tests, and those two names were whichever happened to be in flight - arbitrary, nothing to do with the cause, and treated as clues for a while before the count was noticed. The other 181 never ran, which the summary does not mention at all. Two changes, both diagnostic. Neither tries to fix the crash: it did not reproduce locally across a full 548-test run, and a change guessing at emulator memory or sharding would be a fix with no evidence behind it. **The logcat is kept.** The job already uploaded reports/androidTests/, which is HTML summaries - useful for reading an assertion, useless for a process that died. The logcat lives in outputs/androidTest-results/ and was being discarded, so a CI-only crash could be seen and never explained. It costs nothing on a green run. **And the completed count is checked.** The last "Tests N/M completed" line carries both numbers; if N is short of M the step fails saying so, rather than leaving a reader to work out that a two-failure summary was really a suite that stopped. Verified against the real logs from both runs of #129 - the aborted one and the one that finished. Note the check is deliberately lenient where it cannot be sure: no counts in the log means it defers to Gradle rather than inventing a verdict. Co-Authored-By: Claude Opus 5 <[email protected]>
saamdotexe
pushed a commit
to saamdotexe/OpenTagViewer
that referenced
this pull request
Oct 22, 2026
…d-coverage Fix eight bugs the new tests found, and order the first import usefully
saamdotexe
pushed a commit
to saamdotexe/OpenTagViewer
that referenced
this pull request
Oct 22, 2026
…ailed" A run on wanderdev0#129 died part-way: 362 of 543 tests, then "Instrumentation run failed due to Process crashed". It was reported as two failing tests, and those two names were whichever happened to be in flight - arbitrary, nothing to do with the cause, and treated as clues for a while before the count was noticed. The other 181 never ran, which the summary does not mention at all. Two changes, both diagnostic. Neither tries to fix the crash: it did not reproduce locally across a full 548-test run, and a change guessing at emulator memory or sharding would be a fix with no evidence behind it. **The logcat is kept.** The job already uploaded reports/androidTests/, which is HTML summaries - useful for reading an assertion, useless for a process that died. The logcat lives in outputs/androidTest-results/ and was being discarded, so a CI-only crash could be seen and never explained. It costs nothing on a green run. **And the completed count is checked.** The last "Tests N/M completed" line carries both numbers; if N is short of M the step fails saying so, rather than leaving a reader to work out that a two-failure summary was really a suite that stopped. Verified against the real logs from both runs of wanderdev0#129 - the aborted one and the one that finished. Note the check is deliberately lenient where it cannot be sure: no counts in the log means it defers to Gradle rather than inventing a verdict. Co-Authored-By: Claude Opus 5 <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Eight user-visible bugs, one performance change, and the coverage that found them.
Every bug here was found by writing a test for behaviour that was assumed to work, not by
looking for bugs. That is the argument for the second commit being as large as it is.
The fixes
getReportsForDaymerged the local database with Apple's answer only for days older than a week. Inside the week it took the remote answer alone — and Apple returning nothing for a window is ordinary, so a tag the map had located minutes earlier showed an empty history. Stepping back a day and returning made it reappear, which is how @parawanderer originally reported itcom.google.android.apps.maps, and package visibility hides a package the manifest has not declared — soresolveActivityreturned null with or without Google Maps installed, and the button silently loggedPythonLockserialises that screen behind the location fetch, which a first import holds for minutes. It also claimed to be "looking for a device that can unlock it" before knowing whether one was needed, which for a linked account it never isgetAccount().getInfo(). That is the screen with the sign-out button on itExport Logsuntranslateddebug_*field labels stay English deliberately, so a pasted bug report stays readablePlus: the Information page shows the themed app mark rather than a large empty middle.
First import, ordered by what the export already knows
ScanOrdershuffled every never-scanned tag, reasoning that nothing is known about them. Nothingis known about their scans — but the bundle records when macOS last observed each one, and that
predicts what the first fetch costs: a recent record is a request or two, an old one is a walk
through tens of thousands of key indices.
It matters most exactly where the app is slowest, since a first import gives every tag the full
seven-day window. Tags with no alignment record go last and stay shuffled among themselves, so
none is permanently the one that never gets reached.
Coverage
Roughly sixty tests. Two screens had none at all:
HistoryViewActivity(its Apple sessioncomes from a singleton only the map sets up, so nothing could launch it) and
InformationActivity.AMapWithTagsOnIt— the fixture behind seven of these, so the eight-step arrangement to reach adrawn map exists once rather than seven times
FakeMapView,FakeGeocoder,AddressLookup— for what the managed device cannot provide.aosp-atdhas no geocoding backend, and the app's fallback for "no address" is to printcoordinates, so a missing geocoder was indistinguishable from an honest answer
CoordinateConverterTest— JVM, and the only coverage the AMap path has (see The real map providers have no tests, and adding one is an advertised extension point #127)espresso-contribexcludesprotobuf-lite, which otherwise breaks every Cronet-touching testwith a failure naming protobuf and Chromium and nothing about the test
Full suite: 543 tests, 9m 31s, green. Up from 493.
Not in this PR
versionCode/versionNameare still3/1.0.5🤖 Written by Claude Code