Document the source recovery workflow and readability checks #4

Open
opened 2026-10-16 04:54:35 +02:00 by rexlManu · 0 comments
Owner

Review the completed IC2 recovery and document a simpler process for future binary-first mod recovery.

  • Review existing tasks, reports, source samples, and verification notes.
  • Define readable maintained source as an acceptance check, alongside bytecode accuracy.
  • Document an efficient sequence for compiler setup, difference diagnosis, and verification.
  • Link the process from AGENTS.md and the mod porting guide; record the IC2 lessons.
  • Check documentation links and the final diff.

This issue covers the process review and documentation. It does not claim that all existing IC2 source has passed a readability review.

Source review and proposed rules

The user requested a source review and presentation of proposed rules before changes to project guidance. Three read-only sub-agents used T3 V2 orchestration. Six files were reviewed: TileEntityPump, EntityMiningLaser, AdvRecipe, EnergyNet, ExplosionIC2, and AabbUtil. No repository files changed and no builds ran for this review.

Findings include numbered local names in EntityMiningLaser.java:223, a vertical offset named x in TileEntityPump.java:231, misleading indentation in EnergyNet.java:397, generated labels in AdvRecipe.java:127, and undocumented geometry representations in AabbUtil.java:350. These are readability findings, not proven runtime defects.

Proposed rules:

  1. Name locals and parameters for their role. Keep conventional coordinates and simple loop indexes where clear. Preserve member identities required by the reference.
  2. Make indentation follow braces. Use consistent formatting, separate consequential exits from their conditions, and wrap arguments or conditions at logical boundaries. Preserve expression order and grouping.
  3. Give retained labels meaningful names. Make the destination of break and continue clear. Preserve the recovered jump targets.
  4. Explain non-obvious algorithms, array layouts, and changes in a variable's role with short factual comments. Confirm the meaning before documenting it.
  5. Check unusual casts, raw types, scopes, and separate assignments before removing them. Keep constructs needed for the strict match and document the verified reason. Do not require helper extraction, new temporary values, or generic conversion for style alone.
  6. Review readability for each small recovery batch before acceptance, then run the strict comparison. For IC2 require 3,627 matches and zero differences. Do not weaken the comparator or refresh fingerprints to pass cleanup.

Readability and bytecode accuracy must be separate acceptance checks for future recovery work. Existing IC2 bytecode completion does not establish a full source readability review. Applying the proposed rules to project guidance and cleaning existing source remain separate work.

Review the completed IC2 recovery and document a simpler process for future binary-first mod recovery. - [x] Review existing tasks, reports, source samples, and verification notes. - [ ] Define readable maintained source as an acceptance check, alongside bytecode accuracy. - [ ] Document an efficient sequence for compiler setup, difference diagnosis, and verification. - [ ] Link the process from AGENTS.md and the mod porting guide; record the IC2 lessons. - [ ] Check documentation links and the final diff. This issue covers the process review and documentation. It does not claim that all existing IC2 source has passed a readability review. ## Source review and proposed rules The user requested a source review and presentation of proposed rules before changes to project guidance. Three read-only sub-agents used T3 V2 orchestration. Six files were reviewed: TileEntityPump, EntityMiningLaser, AdvRecipe, EnergyNet, ExplosionIC2, and AabbUtil. No repository files changed and no builds ran for this review. Findings include numbered local names in EntityMiningLaser.java:223, a vertical offset named x in TileEntityPump.java:231, misleading indentation in EnergyNet.java:397, generated labels in AdvRecipe.java:127, and undocumented geometry representations in AabbUtil.java:350. These are readability findings, not proven runtime defects. Proposed rules: 1. Name locals and parameters for their role. Keep conventional coordinates and simple loop indexes where clear. Preserve member identities required by the reference. 2. Make indentation follow braces. Use consistent formatting, separate consequential exits from their conditions, and wrap arguments or conditions at logical boundaries. Preserve expression order and grouping. 3. Give retained labels meaningful names. Make the destination of break and continue clear. Preserve the recovered jump targets. 4. Explain non-obvious algorithms, array layouts, and changes in a variable's role with short factual comments. Confirm the meaning before documenting it. 5. Check unusual casts, raw types, scopes, and separate assignments before removing them. Keep constructs needed for the strict match and document the verified reason. Do not require helper extraction, new temporary values, or generic conversion for style alone. 6. Review readability for each small recovery batch before acceptance, then run the strict comparison. For IC2 require 3,627 matches and zero differences. Do not weaken the comparator or refresh fingerprints to pass cleanup. Readability and bytecode accuracy must be separate acceptance checks for future recovery work. Existing IC2 bytecode completion does not establish a full source readability review. Applying the proposed rules to project guidance and cleaning existing source remain separate work.
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#4
No description provided.