fix: require the Markdown test-tag hook and tighten the patch check #150

Merged
midas merged 4 commits from quality/138-stack into dev 2026-10-31 15:45:08 +01:00
Owner

Vier losse commits uit de kwaliteitsronde, elk apart te reviewen. #143 (patcher 2.1.0) zit hier bewust niet in: die bundle wordt geweigerd door Manager < 2.3.0, en telefoon en TV-box draaien nu 2.2.0 en 1.35.0.

Closes #140
Closes #141
Closes #142
Closes #144

Wijzigingen

  • #140 (56a0f45, fix:): ToolbarActionTagFingerprint is verplicht. Mist die, dan faalt Copy article as Markdown in plaats van dat de knop stil de Compose-testtag-crash terugbrengt. 7.52.0 is uit EDITION_TARGETS, met de 4-parametertak van SdksInitializer in Hide ads.
  • #141 (dc1d215): check-patches.sh zet de default = false-patches aan. Een opt-in patch die de versie niet declareert, wordt als Skipped: gemeld (Auto skip intro op TV 1.116.3). AGENTS.md beschrijft de dekking.
  • #142 (98797e4): --validate op de patchrun, plus een tweede run met --verify-with-sdk. Het nieuwe scripts/verify-issues.sh houdt alleen issues over in extension-code van het eigen platform en de gedeelde packages. Drie class-locator-fingerprints zijn class lookups geworden.
  • #144 (b406582): removeManifestEntries meldt namen die niet in het manifest staan, en check-patches.sh maakt daar een Failed: van.

Afwijkingen en gedragswijzigingen

  • #144 wijkt af van het issue. Er komt geen PatchException. Een ontbrekende naam is een logregel tijdens het patchen en een fout in de check. Een throw zou de hele Disable tracking- of Hide ads-patch laten vervallen op een experimentele versie, alleen omdat de app een SDK heeft verwijderd.
  • #140: op Edition 7.52.0 falen Hide ads en Copy article as Markdown nu. Experimenteel patchen van die versie werkt daarvoor dus niet meer.
  • #142: het advisory-pad van Auto skip intro faalt niet meer als de class geen passende methode heeft. Dat pad was al optioneel.
  • #142: de class check ziet alleen ontbrekende classes, geen ontbrekende methodes of velden op een bestaande class, en ook geen reflectie. Daarvoor blijft check-stubs.sh nodig, en die draait niet in CI.
  • #141: een release wacht bewust niet op de Patch check. Dat staat nu in AGENTS.md.

Getest

Lokaal in Git Bash, met Desktop 1.20.0, op deze tip:

  • buildAndroid en de extension unit tests: geslaagd.
  • check-patches.sh, exit 0 en geen class-check-issues: Tubantia 9.21.1 (19 Applied), Videoland TV 1.116.3 (4 Applied, Auto skip intro Skipped), Videoland telefoon 1.115.2 (5), NRC 5.12.24 (5).
  • Direct met --validate, geen failures of ontbrekende namen: Volkskrant en Parool 7.53.1 (13), Tubantia 9.22.0 en AD 9.21.1 (15).
  • Negatieve proeven, uitgevoerd tijdens het bouwen: gemiste toolbarActionTag, falende opt-in patch, verzonnen stub-class, verzonnen manifestnaam. Alle vier gaven de verwachte fout.

Niet getest

  • De nieuwe scripts op de Linux-runner. Ontbreken dexdump, d8 of zipalign in de image, dan stopt de check met exit 2 en een duidelijke melding. Deze PR is de eerste echte test daarvan.
  • Trouw 7.53.1 en Gelderlander 9.22.0 (geen lokale APK). De push naar dev dekt die als ze in de APK-store staan.
  • Devicetest.

Bij het mergen

  • De fix:-commit maakt op dev een pre-release.
  • CI / Patch check is nog geen required check. Kijk daar dus zelf naar voor het mergen.

🤖 Generated with Claude Code

Vier losse commits uit de kwaliteitsronde, elk apart te reviewen. #143 (patcher 2.1.0) zit hier bewust niet in: die bundle wordt geweigerd door Manager < 2.3.0, en telefoon en TV-box draaien nu 2.2.0 en 1.35.0. Closes #140 Closes #141 Closes #142 Closes #144 ## Wijzigingen - **#140** (`56a0f45`, `fix:`): `ToolbarActionTagFingerprint` is verplicht. Mist die, dan faalt Copy article as Markdown in plaats van dat de knop stil de Compose-testtag-crash terugbrengt. 7.52.0 is uit `EDITION_TARGETS`, met de 4-parametertak van `SdksInitializer` in Hide ads. - **#141** (`dc1d215`): `check-patches.sh` zet de `default = false`-patches aan. Een opt-in patch die de versie niet declareert, wordt als `Skipped:` gemeld (Auto skip intro op TV 1.116.3). `AGENTS.md` beschrijft de dekking. - **#142** (`98797e4`): `--validate` op de patchrun, plus een tweede run met `--verify-with-sdk`. Het nieuwe `scripts/verify-issues.sh` houdt alleen issues over in extension-code van het eigen platform en de gedeelde packages. Drie class-locator-fingerprints zijn class lookups geworden. - **#144** (`b406582`): `removeManifestEntries` meldt namen die niet in het manifest staan, en `check-patches.sh` maakt daar een `Failed:` van. ## Afwijkingen en gedragswijzigingen - **#144 wijkt af van het issue.** Er komt geen `PatchException`. Een ontbrekende naam is een logregel tijdens het patchen en een fout in de check. Een throw zou de hele Disable tracking- of Hide ads-patch laten vervallen op een experimentele versie, alleen omdat de app een SDK heeft verwijderd. - **#140:** op Edition 7.52.0 falen Hide ads en Copy article as Markdown nu. Experimenteel patchen van die versie werkt daarvoor dus niet meer. - **#142:** het advisory-pad van Auto skip intro faalt niet meer als de class geen passende methode heeft. Dat pad was al optioneel. - **#142:** de class check ziet alleen ontbrekende classes, geen ontbrekende methodes of velden op een bestaande class, en ook geen reflectie. Daarvoor blijft `check-stubs.sh` nodig, en die draait niet in CI. - **#141:** een release wacht bewust niet op de Patch check. Dat staat nu in `AGENTS.md`. ## Getest Lokaal in Git Bash, met Desktop 1.20.0, op deze tip: - `buildAndroid` en de extension unit tests: geslaagd. - `check-patches.sh`, exit 0 en geen class-check-issues: Tubantia 9.21.1 (19 Applied), Videoland TV 1.116.3 (4 Applied, Auto skip intro Skipped), Videoland telefoon 1.115.2 (5), NRC 5.12.24 (5). - Direct met `--validate`, geen failures of ontbrekende namen: Volkskrant en Parool 7.53.1 (13), Tubantia 9.22.0 en AD 9.21.1 (15). - Negatieve proeven, uitgevoerd tijdens het bouwen: gemiste `toolbarActionTag`, falende opt-in patch, verzonnen stub-class, verzonnen manifestnaam. Alle vier gaven de verwachte fout. ## Niet getest - De nieuwe scripts op de Linux-runner. Ontbreken `dexdump`, `d8` of `zipalign` in de image, dan stopt de check met exit 2 en een duidelijke melding. Deze PR is de eerste echte test daarvan. - Trouw 7.53.1 en Gelderlander 9.22.0 (geen lokale APK). De push naar `dev` dekt die als ze in de APK-store staan. - Devicetest. ## Bij het mergen - De `fix:`-commit maakt op `dev` een pre-release. - `CI / Patch check` is nog geen required check. Kijk daar dus zelf naar voor het mergen. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copy article as Markdown hooked TestTagsKt.toolbarActionTag through
methodOrNull because 7.52.0 lacks the method. The hook is not optional
(without it every article crashes on 7.53.1+), so a fingerprint miss on a
newer version left the patch 'Applied' and the update check green.

Remove 7.52.0 from EDITION_TARGETS, resolve the fingerprint with method so
a miss fails the patch, and drop the 7.52.0-only 4-parameter
SDKsInitializer.init branch of Hide ads (7.53.1 only has the ConsentProvider
variant, which is now SdksInitializerInitFingerprint).

Refs #140

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
check-patches.sh only expected the Enabled: true patches, so the seven default = false
patches (Kubus: Hide comments, Hide cross-promotion, Hide recommendations, Hide polls;
Videoland: Force HD, Auto skip intro, Log video assets) never went through the patch check.
It now reads them from list-patches, switches them on with -e and treats them like any other
patch. A default = false patch the bundle does not declare the APK's version for, while other
patches declare that version for the package, is skipped ("Skipped:"): Auto skip intro on the
Videoland Android TV build, which has no mobile player and fails there by design.

Also accept "ERROR: FAILED: <patch>", which Morphe Desktop 1.19 writes instead of
"SEVERE: FAILED:", and document the coverage, and why a release does not wait for the Patch
check, in AGENTS.md.

Refs #141

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
check-patches.sh now patches with --validate, so a fingerprint that matches
more than one method fails instead of silently taking the first. --validate
covers every way of reading a fingerprint (method, methodOrNull, classDef):
they all end in Fingerprint.matchOrNull, which throws on an ambiguous match.

Three fingerprints only located a class whose methods the patch then walks
and so matched several methods on purpose (VideoProductionInit, the Auto skip
intro SkipControlShowButton and ReplayControlShowSkipButton). They are now
direct class lookups (mutableClassDefByOrNull). One behaviour change: Auto
skip intro's advisory path no longer fails when the class has no matching
method; it is a secondary path the patch already treats as optional.

When every patch applied, a second run with --verify-with-sdk checks the
extension's references against the app. The verifier always reports issues
that are not ours (the original apps miss optional classes, the extension
holds every platform), so the new scripts/verify-issues.sh keeps only issues
in the extension code of the app's own platform and the shared packages; each
is a "Failed:" line and exit 1, a log without the report is exit 2. The
platforms come from patches/<platform>/shared/Constants.kt, so a new platform
needs no change. It does not see reflection, nor a missing method or field on
an existing class (the verifier assumes it is inherited once the hierarchy
reaches java.lang.Object), so check-stubs.sh stays needed for those; AGENTS.md
says so.

Refs #142

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chore: report manifest entries the cleanup patches do not find
All checks were successful
CI / Build (pull_request) Successful in 3m56s
CI / Patch check (pull_request) Successful in 7m19s
b4065824b2
removeManifestEntries skipped names that were not in the manifest without
a trace, so a renamed SDK provider left the tracker running while the
patch stayed "Applied". It now logs one "Missing manifest entry: <name>"
warning per missing name (permissions are always optional, other names
can be listed in the new `optional` parameter) and still never fails the
patch: the cleanup runs in resource patches that Disable tracking and
Hide ads depend on, so a PatchException would drop them on an app version
that simply no longer ships the SDK.

scripts/check-patches.sh turns each logged name into "Failed: missing
manifest entry: <name>" (exit 1), so the check is strict where patching
is lenient, like --validate. Every name the callers list is present on all
local Edition, Kubus, NRC and Videoland builds, so none is optional yet.

Refs #144

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.