Skip to content

Add docs/INVESTIGATING.md for diagnosing baseline entries - #43

Merged
fornewid merged 1 commit into
mainfrom
docs/investigating-guide
Apr 26, 2026
Merged

Add docs/INVESTIGATING.md for diagnosing baseline entries#43
fornewid merged 1 commit into
mainfrom
docs/investigating-guide

Conversation

@fornewid

Copy link
Copy Markdown
Owner

Summary

Adds docs/INVESTIGATING.md — a step-by-step playbook for diagnosing each # conflict and # override entry that survives in the baseline. With skipContentIdenticalDuplicates = true (default since 0.0.5), the file only contains entries that genuinely need triage; the missing piece was the procedural knowledge for what to do with each one.

The guide implements the 6-step workflow proposed in #42 (read coordinates → locate AARs → extract & diff → trace deps → map runtime usage → classify) and adds:

  • A scan-type → AAR-path mapping table (resources / assets / nativeLibs / classes / valuesResources), including the nine-patch case where the baseline strips .9 from the key but the file inside the AAR keeps it.
  • A note on valuesResources — entries cannot be diffed by zip extraction because AAR packagers merge values into combined XML; uses aapt2 dump resources instead.
  • A 10-line Python zipfile snippet to extract and SHA-256 two AARs side-by-side.
  • A 5-row classification matrix mapping symptoms to recommended actions.

Pointers added so the doc is discoverable:

  • README.md — new "Investigating duplicates" section between Baseline Files and Requirements.
  • CLAUDE.md — new "Investigating Baseline Output" section so AI agents acting on baseline diffs reach the playbook directly.

Closes #42

Test plan

Docs-only change; nothing to run. Manual verification:

  • Path-resolution table cross-checked against ResourceScanner.kt, AssetScanner.kt, NativeLibScanner.kt, ClassScanner.kt, ValuesResourceScanner.kt — all <key, file> mappings match the scanners' actual key derivation.
  • Relative links (docs/INVESTIGATING.md../README.md, ../CLAUDE.md, setup-guide.md.txt; README → docs/INVESTIGATING.md) resolve correctly under GitHub's renderer.

Capture the procedural knowledge needed to act on `# conflict` and
`# override` entries — locating AARs in the Gradle cache, mapping the
baseline key back to a path inside the artifact (with a per-scan
table including the nine-patch and classes-jar gotchas), diffing
bytes, tracing the dependency graph via `dependencyInsight`, mapping
to runtime usage, and classifying vendor-intentional layering vs real
risk.

Also link the guide from README (between Baseline Files and
Requirements) and from CLAUDE.md so AI agents acting on baseline
output have a canonical playbook instead of re-deriving the workflow
each time.

Closes #42
@fornewid
fornewid merged commit 90b4853 into main Apr 26, 2026
1 check passed
@fornewid
fornewid deleted the docs/investigating-guide branch April 26, 2026 11:31

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive investigation guide in docs/INVESTIGATING.md to help users diagnose and classify #conflict and #override entries in Highlander baselines, with corresponding updates to README.md and CLAUDE.md. A review comment identifies that the provided Python script for diffing files does not account for nested JARs in the classes scan, which would lead to errors, and suggests a clarification in the code comments.

Comment thread docs/INVESTIGATING.md
"<absolute path to first AAR>",
"<absolute path to second AAR>",
]
inner = "res/layout/exo_player_view.xml" # adjust per entry

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Python script provided below does not handle nested ZIP files. For the classes scan type, the target .class file is located inside classes.jar, which is itself a member of the AAR. Using a class path as the inner variable will result in a KeyError. It is recommended to clarify that for classes, users should either diff the entire classes.jar or use a more complex script to extract from the nested JAR.

Suggested change
inner = "res/layout/exo_player_view.xml" # adjust per entry
inner = "res/layout/exo_player_view.xml" # adjust per entry (e.g. "classes.jar" for classes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add docs/INVESTIGATING.md guide for diagnosing conflict and override entries

1 participant