fix: Kubus 9.24.1 (renamed network models) + declare 9.24.1 tested #189
No reviewers
Labels
No labels
area/architecture
area/build-ci
area/bytecode
area/code-quality
area/docs
area/extension
area/fingerprint
area/security
area/tests
Bug report
Feature request
review
sev/low
sev/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midas/midas-patches!189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/kubus-9.24.1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #185, #184, #183, #182, #178, #177
Contains #154 and #158 (this branch is stacked on
app-update/kubus-9.23.3, which declares 9.23.2/9.23.3, merged with currentdev). Merge those first, or merge this one and close them.Root cause
Kubus 9.24.1 moved its network models from Moshi to kotlinx.serialization. The package
com.kubus.module.network.modelis gone, and R8 now renames the models (SectionResponse->jvf,AdvertisementPack->sk,ArticleDetailResponse->ov0,ArticleComponent->du0, ... in Tubantia). Every fingerprint that named one of these classes stopped matching. Most of the 15 failures were dependents of the two content-filter hooks (SectionResponse.<init>and the article component mapper). The profile menu models kept their names but moved tocom.kubusapp.feature.domain.data.settings.api.model.Fix (works on 9.21.1 to 9.24.1)
toString()literal ("SectionResponse(_sectionContent=","AdvertisementPack(_ads=","ArticleDetailResponse(components=","Properties(buttons="). That literal is identical in every version. The patch then hooks every constructor that builds the object (kubus/shared/KubusModels.kt). In 9.24.1 this is the serialization constructor(int seen, ...), so the hooks take the firstListparameter. The article component mapper takes"L".KubusModels.typeName(the simple class name of acom.kubus.moduleclass, otherwise the text oftoString()up to(, cached per class) instead ofinstanceofon the stubs.PropertiesandMetadataare found by the model type of their value.ProfileMenuPatchbuilds the Midas row by reflection, in the package of the sections it receives. The main code no longer references the Kubus stubs; the tests still use them.getSectionsis matched by class simple name. 9.24.1's url-row opener (v6g.b(String, String)) navigates withAppRoute.MijnOmgevinginstead ofWEBVIEW_URL.DeepLinkRouterActivitymoved tocom.kubusapp.deeplinkand forwards in a coroutine, so the hook goes intoonCreate/onNewIntentbefore the launch.ry0.invoke). The hook reads the view model from itsreceiverfield and returns the lambda's ownUnit. The toolbar state is built in the view model again (ArticleToolbarStateFingerprintwithout a parameter list).TrackingStarterInitializerno longer casts toFirebaseAnalytics, so only theHashSet.addis matched.docs/apps/kubus.mdhas a new 9.24.1 section.Checks
bash scripts/check-patches.sh <xapk>with the final bundle (APKPure XAPKs, signatures verified,--validate+ SDK verify):An earlier build of this branch (same model/content-filter changes, before the Markdown/Settings/deep-link fixes for 9.24.1) also gave 19/19 on AD 9.22.0, AD 9.21.1 and PZC 9.22.0.
buildAndroid(incl. contract check) and:extensions:extension:testDebugUnitTestpass, including new tests for renamed models.check-stubs.sh: Tubantia 9.22.0 OK. For 9.24.1 no stub module applies any more, as expected.Open
scripts/apk-store.sh upload.untestedVersions.🤖 Generated with Claude Code
Independent read-only review before merge: nothing blocking. The four model fingerprints and constructor hooks were checked against the 9.24.1 and 9.22.0 decompiles; all hooks catch Throwable; typeName is cached per class. Two low-severity notes for later: (1) KubusArticleExporter.flatten now looks up media/title with Object.class, so a nested value containing ', title=' could in theory be matched instead (no real collision found, cannot crash); (2) the new unit tests cover the filters on renamed models but not buildMarkdown/flatten on them, nor a throwing toString(). Not device-tested.