This plan defines a class-by-class execution strategy for narrowing Rust/IPND output against CFR on external_jars/guava-33.5.0-jre.jar.
Use the current report as the queue source:
tmp/compare-guava-33.5.0-jre-quality/reports/per_class_enriched.tsv308 normalized matches, 0 fallbacks, 0 notes (pinned to git SHA: <FILL_IN_SHA>)normalized_diff_lines ascendingnormalized_match=1; if exact equality is blocked by CFR-only comments or known harmless metadata drift, document the exception under the schema below and reduce the raw diff as far as practicalThis changes the working strategy from "largest family first" to "lowest-diff class first," so each small class becomes a fast closed loop and repeated fixes can compound upward.
Generate the working queue with:
awk -F '\t' 'NR>1 && $2=="both" && $5=="0" {print $7 "\t" $1 "\t" $8}' \
tmp/compare-guava-33.5.0-jre-quality/reports/per_class_enriched.tsv | sort -n
Regenerate this queue after every merged fix, not only at tranche boundaries. A single general fix (e.g. modifier ordering) can close many classes across all tranches at once; serial investigation against a stale queue wastes effort. Cost is one awk | sort — negligible.
Before implementing anything, do a triage pass over the current tranche and record each class's delta classification in:
tmp/compare-guava-33.5.0-jre-quality/reports/triage.tsv
Columns: class_fqn, normalized_diff_lines, family, notes.
family is one of:
decl-order — declaration ordermodifier-header — modifier/header layoutsynthetic-anon — synthetic anonymous renderinggeneric-type — generic/type renderingnested-helper — nested/helper renderingcontrol-flow — control-flow shapecfr-comment — CFR-only comment/metadatamixed — multiple of the aboveunknown — needs deeper lookThis surfaces the dominant family in the low-diff tranche and may justify reordering within a tranche to batch by family — one general fix can then close N classes simultaneously instead of investigating them serially.
Start with the first low-diff tranche, in this exact order. Confirm this list is exhaustive for normalized_diff_lines <= 10 against the current report; if it is a sample, regenerate from the queue command and replace this list.
com.google.common.io.FileWriteModecom.google.common.io.RecursiveDeleteOptioncom.google.common.collect.ClassToInstanceMapcom.google.common.util.concurrent.ListenerCallQueue$Eventcom.google.common.base.FinalizableReferenceQueue$FinalizerLoadercom.google.common.base.Splitter$Strategycom.google.common.base.Suppliers$SupplierFunctioncom.google.common.cache.CacheBuilderSpec$ValueParsercom.google.common.cache.LocalCache$EntryFactory$5com.google.common.collect.MapMaker$Dummycom.google.common.collect.MapMakerInternalMap$StrongValueEntrycom.google.common.collect.Sets$PowerSet$1com.google.common.collect.SingletonImmutableSet(Count: 13. Update this number if the tranche is regenerated.)
For each class:
tmp/compare-guava-33.5.0-jre-quality/{cfr-classwise,ipnd}/....triage.tsv.To prevent rabbit holes:
Record skipped classes in:
tmp/compare-guava-33.5.0-jre-quality/reports/skipped.tsv
Columns: class_fqn, normalized_diff_lines, family, reason, date.
Skipped classes are revisited after later general fixes land — they often close for free.
normalized_diff_lines <= 1011..2021..4041..80Regenerate the queue after every merged fix and continue from the new lowest-diff non-match. Tranche boundaries are reporting checkpoints, not gating barriers.
Run the full Guava parity gate after each material fix or small batch:
IPND_REUSE_CFR=1 bash scripts/run_source_cfr_parity.sh external_jars/guava-33.5.0-jre.jar
IPND_REUSE_CFR=1 reuses the previously captured CFR output to skip re-decompilation. Set it to 0 whenever a fix touches CFR-output ingestion (parser, normalizer, or anything that consumes CFR text), since stale CFR outputs would mask both improvements and regressions.
normalized_matchfamily_counts.tsvsum(raw_diff_lines) across the 308 already-matching classes — must not increaseThe last two guard against "fix" commits that hold normalized_match flat while inflating raw diffs on currently-clean classes.
<= 10 normalized-diff classes are normalized matches or explicitly recorded in skipped.tsv with a documented reasonnormalized_match > 308sum(raw_diff_lines) across previously-matching classesRun the secondary corpus after tranche 1, not only at the end:
IPND_REUSE_CFR=1 bash scripts/run_source_cfr_parity.sh external_jars/commons-lang3-3.14.0.jar
Rationale: a fix that helps Guava but regresses commons-lang3 should be caught after 13 classes, not after 80+. Track the same metrics; require no regression on commons-lang3 to advance to the next tranche.
"Accepted CFR-only artifact" must be concrete or it drifts into "mentioned somewhere in a commit message." Maintain:
tmp/compare-guava-33.5.0-jre-quality/reports/accepted_cfr_artifacts.md
Each entry uses this schema:
### <class FQN>
- Date: YYYY-MM-DD
- Family: <one of the family labels>
- Category: <e.g. CFR-only comment, CFR ternary preference, CFR cast-style preference>
- Diff snippet:
```diff
<minimal CFR-vs-IPND diff that remains>
Entries without a revisit trigger are not acceptable.
## Public API / Interface Changes
No public API changes are planned.
Expected implementation areas are internal only:
- source/declaration rendering
- anonymous and synthetic helper reconstruction
- generic/type reconstruction
- body rewrite canonicalization when needed by a low-diff class
## Assumptions
- "CRF" in the request means CFR.
- The current Guava report is authoritative for a given tranche; **a fresh full rerun is mandatory at tranche boundaries**, and recommended after every merged fix. The queue must not be consumed against a stale report across a tranche boundary.
- The preferred strategy is class-by-class closure from smallest normalized diff upward, even if a larger class has more total impact — but within a tranche, batching by `family` is allowed and encouraged when it lets one general fix close several classes at once.
- "Identical or really close" means normalized equality first, raw equality where practical, and documented exceptions only for CFR-specific non-semantic output, recorded under the schema above.
- Tests for emitter changes live at the IR/emitter level. Golden-file tests keyed on specific Guava classes are not a substitute and are explicitly disallowed.