Repair failed mod decompilation with Vineflower #16

Closed
opened 2026-11-04 03:47:27 +01:00 by rexlManu · 7 comments
Owner

Parent: #5. Follow-up to #12.

  • Add a Gradle-accessible Vineflower repair path that preserves CFR output and binary provenance.
  • Correct mapped-name source coverage and report its limits.
  • Preserve edited staging files and report conflicts and unresolved errors.
  • Coordinator runs the repair after the initial recovery batch and reviews results.

Source recovery and selected-source validation pass. Evidence: vendor/pack-manifests/tekkit-lite/source-inventory.json and verification.json; docs/mod-source-recovery.md. Newly recovered mod compilation, bytecode agreement, and runtime integration are tracked in #18. Existing IC2 strict comparison still has 3627 matching entries and zero differences. No tests were written.

Parent: #5. Follow-up to #12. - [x] Add a Gradle-accessible Vineflower repair path that preserves CFR output and binary provenance. - [x] Correct mapped-name source coverage and report its limits. - [x] Preserve edited staging files and report conflicts and unresolved errors. - [x] Coordinator runs the repair after the initial recovery batch and reviews results. Source recovery and selected-source validation pass. Evidence: vendor/pack-manifests/tekkit-lite/source-inventory.json and verification.json; docs/mod-source-recovery.md. Newly recovered mod compilation, bytecode agreement, and runtime integration are tracked in #18. Existing IC2 strict comparison still has 3627 matching entries and zero differences. No tests were written.
Author
Owner

Implementation compiled with :tools:bytecode:compileJava. No tests, repair batch, mod builds, or game sessions were run. Wait for the first full recovery batch to finish, then run from the repository root:

JAVA_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-21.0.12+101.0.LTS JAVA21_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-21.0.12+101.0.LTS JAVA8_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-8.0.504+1 ./gradlew :tools:bytecode:repairModSources

Optional filter: -PmodRecoveryIds=codechickencore,computercraft. The full first-batch reports and work archives must still exist, even for a filter, to reconstruct the original hierarchy. It verifies package SHA-256 and nested archive bytes, then repeats remapping for candidate artifacts and compares every remapped entry before Vineflower.

Original CFR files and recovery-report.json stay unchanged. Per package, vendor/upstream-mods//repair-report.json has id, originalReport, errors, and artifacts. Each artifact records path, inputSha256, remappedSha256, remappedProvenance, coveredClasses, coverageMethod, missingSources, unresolvedErrors, selections, stagingConflicts, and, when attempted, remappedVerified, vineflowerOutput, vineflowerLog and vineflowerExit. Selections name each source, selected decompiler, SHA-256 and staging outcome. Vineflower output and log are at decompiled//vineflower/ and vineflower.log.

A selected source replaces staged CFR only when staged bytes still equal that CFR source. BuildCraft and IC2 staging is skipped. Existing Vineflower output is preserved and blocks a rerun for that artifact; review it and the report before deciding how to proceed. Missing files, failed decompiler processes, detected failure markers, original log errors, and conflicts remain unresolved and make the task fail. Coverage checks mapped outer names before SourceFile, but file existence does not prove inner classes or methods were recovered. Marker scanning and a clean Vineflower log cannot prove source correctness, compilation, or bytecode agreement. The fallback remains unexecuted and may expose further errors or warnings; inspect its output.

Implementation compiled with :tools:bytecode:compileJava. No tests, repair batch, mod builds, or game sessions were run. Wait for the first full recovery batch to finish, then run from the repository root: JAVA_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-21.0.12+101.0.LTS JAVA21_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-21.0.12+101.0.LTS JAVA8_HOME=/home/rexlmanu/.local/share/mise/installs/java/temurin-8.0.504+1 ./gradlew :tools:bytecode:repairModSources Optional filter: -PmodRecoveryIds=codechickencore,computercraft. The full first-batch reports and work archives must still exist, even for a filter, to reconstruct the original hierarchy. It verifies package SHA-256 and nested archive bytes, then repeats remapping for candidate artifacts and compares every remapped entry before Vineflower. Original CFR files and recovery-report.json stay unchanged. Per package, vendor/upstream-mods/<id>/repair-report.json has id, originalReport, errors, and artifacts. Each artifact records path, inputSha256, remappedSha256, remappedProvenance, coveredClasses, coverageMethod, missingSources, unresolvedErrors, selections, stagingConflicts, and, when attempted, remappedVerified, vineflowerOutput, vineflowerLog and vineflowerExit. Selections name each source, selected decompiler, SHA-256 and staging outcome. Vineflower output and log are at decompiled/<artifact>/vineflower/ and vineflower.log. A selected source replaces staged CFR only when staged bytes still equal that CFR source. BuildCraft and IC2 staging is skipped. Existing Vineflower output is preserved and blocks a rerun for that artifact; review it and the report before deciding how to proceed. Missing files, failed decompiler processes, detected failure markers, original log errors, and conflicts remain unresolved and make the task fail. Coverage checks mapped outer names before SourceFile, but file existence does not prove inner classes or methods were recovered. Marker scanning and a clean Vineflower log cannot prove source correctness, compilation, or bytecode agreement. The fallback remains unexecuted and may expose further errors or warnings; inspect its output.
Author
Owner

Report and raw paths, with literal placeholders: vendor/upstream-mods/{id}/repair-report.json, vendor/upstream-mods/{id}/decompiled/{artifact}/vineflower/, and vendor/upstream-mods/{id}/decompiled/{artifact}/vineflower.log. The original CFR output remains in decompiled/{artifact}/java/ and cfr.log.

Report and raw paths, with literal placeholders: `vendor/upstream-mods/{id}/repair-report.json`, `vendor/upstream-mods/{id}/decompiled/{artifact}/vineflower/`, and `vendor/upstream-mods/{id}/decompiled/{artifact}/vineflower.log`. The original CFR output remains in `decompiled/{artifact}/java/` and `cfr.log`.
Author
Owner

Coordinator started repairModSources for the 11 packages with CFR/source-coverage problems. Before execution I fixed mapped anonymous-class outer attribution (EnclosingMethod points to the mapped outer name), treated CFR summary.txt as diagnostic metadata when its Java failures are already listed, and made staging accept already-selected identical fallback files. Raw original reports remain intact. Generated signing/summary staging cleanup completed with zero remaining conflicts via cleanRecoveredModMetadata.

Coordinator started repairModSources for the 11 packages with CFR/source-coverage problems. Before execution I fixed mapped anonymous-class outer attribution (EnclosingMethod points to the mapped outer name), treated CFR summary.txt as diagnostic metadata when its Java failures are already listed, and made staging accept already-selected identical fallback files. Raw original reports remain intact. Generated signing/summary staging cleanup completed with zero remaining conflicts via cleanRecoveredModMetadata.
Author
Owner

Lumy #17 split recovery has source for all 248 class entries, including every version. CFR reports whole-class analysis failures for standalone obfuscated inner classes in 1.7.2 (bpk) and 1.7.10 (bps, brk, brl, brm, brn, bro). These reference-only variants are under vendor/upstream-mods/lumyskinpatch/decompiled/variants/. The 1.4.7 and shared groups have no detected CFR errors. If your fallback supports these split jars, please coordinate before touching Lumy outputs.

Lumy #17 split recovery has source for all 248 class entries, including every version. CFR reports whole-class analysis failures for standalone obfuscated inner classes in 1.7.2 (bpk) and 1.7.10 (bps, brk, brl, brm, brn, bro). These reference-only variants are under vendor/upstream-mods/lumyskinpatch/decompiled/variants/. The 1.4.7 and shared groups have no detected CFR errors. If your fallback supports these split jars, please coordinate before touching Lumy outputs.
Author
Owner

The first repair attempt exposed an integration mismatch: Lumy now has a variant recovery report rather than generic artifacts, so prepareHierarchy initially stopped before decompilation. Fixed this by reading and hash-checking its original nested jar directly for the shared hierarchy while leaving Lumy source repair to #17. The repair batch has restarted; no source errors were suppressed.

The first repair attempt exposed an integration mismatch: Lumy now has a variant recovery report rather than generic artifacts, so prepareHierarchy initially stopped before decompilation. Fixed this by reading and hash-checking its original nested jar directly for the shared hierarchy while leaving Lumy source repair to #17. The repair batch has restarted; no source errors were suppressed.
Author
Owner

The isolated CodecJOrbis repair succeeded. The fallback now decompiles only requested failed classes and their inner classes, using the full remapped archive as a library. This avoids unrelated platform enum-switch failures without selecting their broken Vineflower output. All 11 repair reports now have no unresolved errors or staging conflicts, and the staged 1.4.7 source tree has no explicit CFR failure markers. Lumy reference variants remain tracked separately in #17. No tests have been added or run.

The isolated CodecJOrbis repair succeeded. The fallback now decompiles only requested failed classes and their inner classes, using the full remapped archive as a library. This avoids unrelated platform enum-switch failures without selecting their broken Vineflower output. All 11 repair reports now have no unresolved errors or staging conflicts, and the staged 1.4.7 source tree has no explicit CFR failure markers. Lumy reference variants remain tracked separately in #17. No tests have been added or run.
Author
Owner

Source repair is complete at the source-acquisition level: the full selected-source inventory and Java 8 syntax parser both pass. Syntax-driven fallback repaired malformed unmarked CFR output; two reviewed exact-input patches restore Factorization local class naming and Rei static receiver access. Full source compilation, bytecode equivalence for new mods, and runtime integration remain in #18. Existing baseline verification is running after recovery, as requested.

Source repair is complete at the source-acquisition level: the full selected-source inventory and Java 8 syntax parser both pass. Syntax-driven fallback repaired malformed unmarked CFR output; two reviewed exact-input patches restore Factorization local class naming and Rei static receiver access. Full source compilation, bytecode equivalence for new mods, and runtime integration remain in #18. Existing baseline verification is running after recovery, as requested.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rexlManu/TekkitLite#16
No description provided.