Skip to content

compat: add Integrated Dynamics + Integrated Crafting deterministic recipe integration - #51

Merged
swear01 merged 20 commits into
mainfrom
compat/issue-44-integrated-dynamics-crafting
Aug 3, 2026
Merged

compat: add Integrated Dynamics + Integrated Crafting deterministic recipe integration#51
swear01 merged 20 commits into
mainfrom
compat/issue-44-integrated-dynamics-crafting

Conversation

@swear01

@swear01 swear01 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #44.

Keeps both targets in one PR:

  • Integrated Dynamics 1.33.3 — evidence-backed Outcome A: three deterministic machine families via the public modular SDK.
  • Integrated Crafting 1.4.6 — evidence-backed Outcome C: present-mod module loads and registers zero production families (network automation / DeadBush fail-closed).

Rebased onto current origin/main (d8314fc5a3c9f5244eb6a50269b5590ef90a8ca6) after PR #62 Immersive Engineering / core typed-plan fast-path. Additive docs keep IE Outcome C + listing-local typed-plan reuse from main together with ID/IC compatibility, the three P1 corrections, and the IC registrationCount() load-once assertion. Preserved main's declarative transform pipeline and shared contract-owned runtime_artifact_transforms for both ID and IC. Descriptors own only isolated recipe-inventory digests; coexistence/unclaimed digests are matrix-report-only.

Note: issue #44 body text was mis-templated as Ender IO; title + coordinator scope are authoritative (ID + IC).

Artifacts

Field Integrated Dynamics Integrated Crafting
Version 1.33.3 1.4.6
Modrinth tG3ZKTep se5g7ewq
Maven maven.modrinth:integrated-dynamics:tG3ZKTep maven.modrinth:integrated-crafting:se5g7ewq
SHA-256 7c508ebd4048a589812562740132d39802ea0034e11a011fbfd53188b39fdba2 1c49c774bc8fa28d344592b65ae5d0082c497b21dd5250fcc2aadefedb964cec
Source tag 1.21.1-1.33.3 / b232bc068c31b7ad98e437775e15b76b98dda6f7 tag 1.21.1-1.4.6 / 352bce1cfd1d57aef79aeb17b38895aaac0cac39
Audit scanner format 17; 1,475 classes; 10 structural recipes; 18 ancestry; 2 exact coordinates scanner format 17; 80 classes; 1 structural recipe; 4 ancestry; 3 exact coordinates
Platform ancestry AE2-normalized NeoForge/Minecraft 2382ea29…eb5f (56,279,815 B) same platform jar
Companions Cyclops vEjxRv40, Common Caps c50bCinZ ID tG3ZKTep + Cyclops + Common Caps
Runtime transform shared exact-SHA remove GameTestsAspectsRefinedStorage same shared ID transform

ID Modrinth jar embeds a second [[mods]] entry (integrateddynamicscompat); Compat Kit selects --mod-id integrateddynamics while hashing full jar bytes. Fixture/matrix runtimes use the shared declarative transform output; audit SHA verification still resolves pristine Modrinth bytes.

Families

Integrated Dynamics (Outcome A)

  • Accepted: RecipeDryingBasin, RecipeMechanicalDryingBasin, RecipeMechanicalSqueezer.
  • Rejected: manual Squeezer; facades/serializers; special crafting; LP/operator/JEI/REI helpers.
  • Isolated digest: 22990962ac2a4058027e307c1f38bace89abc07336b71b1a2ac812ab0789da9b / 252 recipes.

Integrated Crafting (Outcome C)

  • Accepted: none.
  • Rejected: RecipeDeadBush (special crafting / entity mutation); network automation surfaces already covered by vanilla exact recipes.
  • Isolated digest: 3593986292d1f9d2cf093b3a9d16b0828c3410817eb57cb1d6b4b70b23719aa7.

Format-17 + #87 transform migration

Legacy format-7 audits/contracts are gone. Both modules were migrated with repository Compat Kit commands against exact jars, clean official sources, and staged ancestry. After rebasing onto #87, the ID-specific Gradle strip task was removed and both contracts declare the same target.runtime_artifact_transforms record. Full Compat Kit CLI verify must pass.

Tests and exact local results (head b9a778386f4159bfaca32c9a5d599399e3ce36a6)

Gate Result
Focused load-once static OK
Compat Kit CLI verify (ID + staged ancestry) 12/12 passed
Compat Kit CLI verify (IC + staged ancestry) 12/12 passed
runIntegratedDynamicsGameTestServer All 10 required tests passed
runIntegratedCraftingGameTestServer All 4 required tests passed
runCompatibilityMatrixGameTestServer (exclusive 4-slot) All 3 required tests passed — coexistence 21,347 (6f5ef3a5…c460); unclaimed 1,589 (6680f6c7…c11d); craftable prepare 49.481 ms; interaction p95 15.753 ms; first open 3.901 ms; first/switch p95 1.036 / 0.620 ms; per-menu 116,989 B; shared index 4,134,776 B
./gradlew build BUILD SUCCESSFUL
./gradlew runData BUILD SUCCESSFUL; written 0
Full python3 -m unittest discover scripts 610 OK
git diff --check clean

Docs

  • docs/integrated-dynamics-compatibility.md, docs/integrated-crafting-compatibility.md
  • docs/notes.md, docs/structure.md

Outcome

  • Integrated Dynamics: A
  • Integrated Crafting: C

Remaining risks

  • Mechanical FE depends on live BlockMechanical*Config.consumptionRate (default 80).
  • Manual Squeezer and chance recipes stay unsupported by design.
  • NeoForge classloads every @GameTestHolder before namespace filtering; fixture/matrix use the shared exact-SHA transform that removes only GameTestsAspectsRefinedStorage.
  • Matrix prepare timing is host-load sensitive under parallel heavy-Gradle workers; latest exclusive quiet rerun after IE typed-plan main passed at 49.481 ms (still under the fixed 50 ms gate).
  • Representative fixture versions are CI evidence only, not player-facing exact pins.
  • GitHub CI and manually triggered latest-head Codex review are pending.

Test plan

  • Format-17 audit/contract + full Compat Kit CLI verify for both targets
  • ID (10) / IC (4) authoritative GameTests
  • Artifact/transform wiring + matrix + build + runData + Python 610 + diff check
  • Rebase onto d8314fc preserving IE typed-plan / ID-IC / 9 MiB gate
  • GitHub CI green on b9a778386f4159bfaca32c9a5d599399e3ce36a6
  • Manually triggered GitHub Codex review clean on latest head

@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 adds compatibility support for Integrated Dynamics and Integrated Crafting, including new compatibility modules, contracts, audits, documentation, and GameTest fixtures. To handle Integrated Dynamics' multi-mod jar, the Compat Kit is updated with a --mod-id option, and a build task is added to strip an embedded Refined Storage GameTest class to avoid classloading issues. Feedback on the changes points out that calling .distinct() on a stream of ItemStack in IntegrateddynamicsCompat.java is ineffective because ItemStack does not implement value-based equality, and should be removed.

Comment on lines +374 to +380
private static List<ItemStack> representatives(Ingredient ingredient) {
return Arrays.stream(ingredient.getItems())
.filter(stack -> !stack.isEmpty())
.map(stack -> stack.copyWithCount(1))
.distinct()
.toList();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Calling .distinct() on a stream of ItemStack is ineffective because ItemStack does not implement value-based equals and hashCode. Since copyWithCount(1) creates a new ItemStack instance for each element, reference-equality comparison will never match, making .distinct() redundant.

Since itemKeys already correctly deduplicates the items by mapping them to StorageResourceKey (which implements value-based equality) and calling .distinct(), we can safely remove the redundant .distinct() call here to improve clarity and avoid misleading code.

    private static List<ItemStack> representatives(Ingredient ingredient) {
        return Arrays.stream(ingredient.getItems())
                .filter(stack -> !stack.isEmpty())
                .map(stack -> stack.copyWithCount(1))
                .toList();
    }

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Validated as false positive for Integrated Dynamics production behavior (no production change).

  • Factually correct: NeoForge 1.21.1 ItemStack has no value equals/hashCode, so .distinct() after copyWithCount(1) is identity-only.
  • Callers of representatives are only exact(...) (non-empty) and consumed(...)itemKeys(...), which maps to StorageResourceKey.item(...) then .distinct() under value equality. TypedRecipeInput also rejects duplicate alternatives.
  • Deterministic consume-any uniqueness is therefore already enforced by StorageResourceKey distinct, not by the ItemStack stream distinct.
  • Removing the redundant .distinct() would be clarity-only and would not change craft plans. Farmers Delight-style ItemStackKey value dedupe is needed only when a module indexes remainders by stack identity; ID does not.

Evidence recorded in docs/notes.md on head 18453eb195697d603d3c3b9a0f06dd4232998cd2.

swear01 added a commit that referenced this pull request Aug 1, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01

swear01 commented Aug 1, 2026

Copy link
Copy Markdown
Owner Author

Continuation: Gemini ItemStack.distinct() finding

Verdict: false positive for Integrated Dynamics production behavior — no production code change.

Check Result
Gemini claim (identity-only ItemStack.distinct) Correct observation
Observable ID craft-plan uniqueness Already via itemKeysStorageResourceKey.distinct
Production change None
Docs docs/notes.md records the evidence
runIntegratedDynamicsGameTestServer 8/8
runIntegratedCraftingGameTestServer 4/4
Python unit tests 409 OK
git diff --check clean

New head: 18453eb195697d603d3c3b9a0f06dd4232998cd2. No review bot triggered.

swear01 added a commit that referenced this pull request Aug 2, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 18453eb to a5c2f30 Compare August 2, 2026 07:10
@swear01

swear01 commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto current origin/main (31647ec / #76 declarative Compat Kit isolation) for manual review.

Head: a5c2f3066536ad18b69c8044f2a56be7662bae69

Evidence

  • runIntegratedDynamicsGameTestServer: All 8 required tests passed
  • runIntegratedCraftingGameTestServer: All 4 required tests passed
  • build: SUCCESS
  • runCompatibilityMatrixGameTestServer: All 3 required tests passed (13035 recipes; ID digest 60d46b76…/287; Create coexistence digest updated to d251882b…/1653 because ID loads Create cross-mod recipes; IC 35939862…/3)
  • runData: SUCCESS (no resource drift)
  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover scripts: 539 tests OK
  • git diff --check: clean
  • stageAe2CompatAuditAncestry: SUCCESS (needed for local AE2 dogfood Python tests)

Notes

  • Preserved ID strip-RS-GameTest runtime jar wiring + --mod-id multi-mod scan support on Compat Kit v2.
  • Matrix prepare gate is contention-sensitive under parallel heavy-Gradle workers; exclusive-slot rerun passed.
  • Committed audits remain scanner_format 7 (same as Theurgy on main); format-16 migrate/verify is follow-up, not blocking GameTest gates.

No merge / no review-bot trigger from this update.

swear01 added a commit that referenced this pull request Aug 2, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from a5c2f30 to 629b33c Compare August 2, 2026 10:46
@swear01

swear01 commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Rebase evidence (post-#73/#70/#69/#61/#58)

Head: 34eb2a32ea5da98616febd6bac2cd2de298618d5
Base: 61aaf32f4faa263d8c3c6c6281f5ad81adc2e8b7 (origin/main, Railcraft #58)

Rebased through Advanced AE, Create Aquatic Ambitions, Draconic Evolution, Productive Bees, and Railcraft. Conflict resolutions kept both sides (main fail-closed modules + ID/IC). Remeasured coexistence digests under the full matrix:

  • Create 3145d574… / 1655
  • Integrated Dynamics 8b83aaa5… / 289
  • Productive Bees 2ecbaab4… / 622

Local verification (heavy_gradle / exclusive matrix slots)

  • runIntegratedDynamicsGameTestServer — 8/8
  • runIntegratedCraftingGameTestServer — 4/4
  • runCompatibilityMatrixGameTestServer — 3/3 @ 14,712 recipes
    prepare 21.631 ms · shared index 9,309,328 B · per-menu 114,943 B
  • runData — no resource drift
  • python3 -m unittest discover scripts — 544 OK
  • git diff --check — clean

No merge / no review-bot trigger.

swear01 added a commit that referenced this pull request Aug 2, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 629b33c to 34eb2a3 Compare August 2, 2026 11:05
swear01 added a commit that referenced this pull request Aug 2, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 34eb2a3 to 7086f8d Compare August 2, 2026 17:47
@swear01

swear01 commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Rebase evidence (post-#78 isolation + Oritech #47)

Head: 7086f8dc12fb76a08de3cfc9e775e7ee8151b4ef
Base: 60544ec973ed704743f9e759eb8470371a56f83a (origin/main)

Conflict policy kept main’s isolation architecture and this PR’s ID/IC module surface. Peer coexistence digests were not restored into descriptors. ID isolated digest is now 22990962…da9b / 252; IC remains 35939862…9aa7. Fixtures assert via IsolatedRecipeInventoryEvidence.

Local gates (heavy_gradle where applicable)

  • Artifact verify ID/IC — SUCCESS
  • runIntegratedDynamicsGameTestServer — 8/8
  • runIntegratedCraftingGameTestServer — 4/4
  • runCompatFixtureGameTestServers — SUCCESS
  • runCompatibilityMatrixGameTestServer — 3/3 @ 16,138 recipes (prepare 28.085 ms; shared 9,413,032 B)
  • ./gradlew build — SUCCESS
  • ./gradlew runData — no resource drift
  • Python discover — 557 OK
  • git diff --check — clean
  • Compat Kit CLI verify — fail-closed on format-7 missing source_recipe_data_sha256 (documented follow-up)

Gemini ItemStack.distinct() remains closed as FP. No review-bot trigger from this update.

swear01 added a commit that referenced this pull request Aug 3, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 7086f8d to 03a11de Compare August 3, 2026 03:36
swear01 added a commit that referenced this pull request Aug 3, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 03a11de to 9e93919 Compare August 3, 2026 03:43
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e93919c94

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +277 to +279
boolean hasItem = item.isPresent() && exact(item.get());
boolean hasFluid = fluid.isPresent() && exact(fluid.get());
return hasItem || hasFluid;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject invalid optional drying inputs

When a datapack supplies a valid fluid input together with a non-simple item ingredient, this hasItem || hasFluid check accepts the recipe even though the item input failed validation. dryingPlan nevertheless passes that ingredient's representative stacks to consumeAny, which can craft against an approximation of custom matching semantics—or throw if the ingredient has no representatives—instead of failing closed. Require every present input to be exact in addition to requiring at least one input.

Useful? React with 👍 / 👎.

Comment on lines +282 to +285
private static boolean exactDryingOutput(RecipeDryingBasin recipe) {
Optional<ItemStack> item = dryingItemOutput(recipe);
Optional<FluidStack> fluid = recipe.getOutputFluid().filter(IntegrateddynamicsCompat::exact);
return item.isPresent() || fluid.isPresent();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject derived item outputs even when fluid is valid

When a drying recipe has an ItemStackFromIngredient output plus a valid fluid output, dryingItemOutput deliberately filters out the derived item, but this OR still marks the recipe supported. The resulting plan commits the craft with only the fluid output, silently dropping an output that the real machine would produce; reject the recipe whenever a present item output is not an exact left-side ItemStack.

Useful? React with 👍 / 👎.

Comment thread build.gradle Outdated
Comment on lines +1094 to +1098
if (entry.name == integratedDynamicsRsGameTestClass) {
dropped = true
zin.closeEntry()
entry = zin.nextEntry
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Run fixtures against the exact audited jar

The Integrated Dynamics fixture and compatibility-matrix runtimes are wired to the jar produced here after this class is deleted, while the SHA verifier checks a separate pristine artifact. Consequently, these release gates never load the exact third-party jar players receive and cannot detect registration or classpath conflicts involving the removed holder; use the raw SHA-verified Maven bytes and resolve the missing test dependency without mutating them. The repository explicitly requires third-party Maven artifacts to remain raw exact bytes.

AGENTS.md reference: AGENTS.md:L176-L176

Useful? React with 👍 / 👎.

Comment on lines +41 to +42
var holder = helper.getLevel().getRecipeManager().byKey(recipeId).orElse(null);
if (holder != null && CraftingTerminalMenu.supportsRecipeHolder(holder)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Make the DeadBush assertion execute against a real recipe

The committed representative artifact inventory contains only three minecraft:crafting_shaped recipes and no integratedcrafting:special/minecraft_dead_bush, so this lookup returns empty and the conditional lets the GameTest pass without ever calling supportsRecipeHolder. This test is nevertheless used as the contract's DeadBush/remainder verification evidence; load or construct a real RecipeDeadBush holder so the required present-mod gate performs the claimed behavior assertion.

AGENTS.md reference: AGENTS.md:L173-L173

Useful? React with 👍 / 👎.

Comment on lines +76 to +77
recipeFamilies.register(mechanicalDryingBasin.getPath(), () ->
RecipeFamilyFactories.deterministicResources(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Track live energy rates with dynamic recipe families

When either Integrated Dynamics mechanical consumption rate changes after a recipe has first been listed, deterministicResources retains the old per-recipe plan and final contract, so previews and commits can continue charging the previous FE amount and shared Craftable results have no dynamic token that invalidates them. Both mechanical registrations read mutable loaded config from their plan functions, so they need dynamicDeterministicResources with the corresponding complete config token, as used elsewhere for reloadable server rates.

Useful? React with 👍 / 👎.

Comment on lines +344 to +345
if (energyPerTick == 0) {
return OptionalLong.of(0L);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject zero-energy mechanical recipes

When either mechanical machine's loaded consumptionRate is zero, this helper returns a present zero value, so both mechanical eligibility predicates accept the recipe and their plans omit the FE input entirely. That turns the accepted mechanical families into free crafts even though the reviewed contract and active compatibility documentation require a finite positive FE total and say non-positive totals fail closed; reserve zero for the manual Drying Basin path and reject it for mechanical families.

Useful? React with 👍 / 👎.

swear01 added a commit that referenced this pull request Aug 3, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 9e93919 to 791b4f3 Compare August 3, 2026 08:53
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 791b4f3c86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +179 to +182
if (!craft(context, SQUEEZER_RECIPE)
|| context.core().getResourceAmount(
StorageResourceKey.neoforgeEnergy())
!= Long.MAX_VALUE - expectedSqueezerEnergy(15)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Exercise an actual overflow in the overflow gate

The contract cites this method as its checked_overflow_atomic evidence, but starting with Long.MAX_VALUE energy and subtracting the finite recipe cost is valid arithmetic, and the assertion explicitly requires the craft to succeed. An unchecked-overflow regression would therefore remain undetected; provoke an overflowing addition or destination write and assert that every input, energy, output, and station-work value remains unchanged.

AGENTS.md reference: AGENTS.md:L176-L176

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 2d0fe0d. The fixture now fills the existing Menril Resin fluid destination to Long.MAX_VALUE, attempts the Mechanical Squeezer craft, requires rejection, and asserts the input item, item output, fluid amount, finite FE, and station work all remain unchanged. Added a focused static regression first (RED for the missing real-overflow test), then verified it GREEN; runIntegratedDynamicsGameTestServer passed 8/8, the full Python suite passed 597/597, and git diff --check is clean.

swear01 added a commit that referenced this pull request Aug 3, 2026
PR #51 review note: ItemStack stream distinct is identity-only, but ID
consume-any uniqueness already comes from StorageResourceKey.distinct.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 2d0fe0d to b62c0cc Compare August 3, 2026 09:18
swear01 and others added 15 commits August 4, 2026 00:05
Remove glued conflict leftovers from create digest JSON and docs, restore
main CAA/AA notes body with ID lead paragraphs, and keep Create digest at
main's CAA baseline pending full-matrix remeasure.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Restore the truncated matrix fixture, assert isolated recipe digests in
ID/IC GameTests, and pin the measured Integrated Dynamics inventory SHA.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rebase onto current main requires format-17 evidence and passing Compat Kit
verify; migrate both modules from exact Modrinth jars, clean sources, and
full ancestry rather than accepting format-7 fail-closed verify.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Document scanner format 17 identities, Outcome A/C, and that full Compat Kit
verify must pass; remove the obsolete follow-up claim for failing verify.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rebase onto #87 requires shared exact-SHA transforms instead of the
Integrated Dynamics-specific strip task; both contracts now declare the
same GameTestHolder removal for fixture and matrix runtimes.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Capture exclusive-matrix coexistence digests and the declarative runtime
transform migration after rebasing onto exact fixture transforms.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Declared ItemStackFromIngredient drying outputs must fail closed even when
an exact fluid is also present, so Auto Storage never promotes fluid-only
plans by treating an unmodelable item as absent.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Zero-family Integrated Crafting present_target_load_once must assert the
compat module registered exactly once, not only ModList plus empty registries.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Preserve Immersive Engineering/core Craftable fast-path evidence alongside
Integrated Dynamics/Crafting gates after rebasing onto d8314fc.

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the dead ITEM.get null check and require auto_storage namespace plus
integratedcrafting path prefix on the IC unsafe-registry GameTest.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reject present non-exact drying inputs even when the other input is exact, and
omit Mechanical Squeezer FE when the loaded cost is zero so plans stay valid.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 force-pushed the compat/issue-44-integrated-dynamics-crafting branch from 09064d3 to 6775b69 Compare August 3, 2026 16:06
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6775b69. Configure here.

@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 compatibility support for Integrated Dynamics and Integrated Crafting. It registers three deterministic recipe families for Integrated Dynamics (Drying Basin, Mechanical Drying Basin, and Mechanical Squeezer) with localized station labels and atomic transaction contracts. Integrated Crafting is integrated as a fail-closed module contributing zero production recipe families. The PR includes comprehensive documentation, JSON audits, contracts, isolated test fixtures, GameTests, and static regression tests to ensure robust, fail-closed behavior. There are no review comments provided, and I have no additional feedback to offer as the implementation is thorough and well-tested.

Unfiltered AE2 terraformersmc re-registration made Gradle probe Flywheel
there; a 502 from that host failed unrelated Create/CEI resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

/gemini review

@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 adds compatibility support for Integrated Dynamics and Integrated Crafting. It introduces new compatibility modules, station descriptors, localized language keys, and comprehensive integration GameTests to verify deterministic recipe handling (such as Drying Basin and Mechanical Squeezer) while ensuring non-deterministic or unsafe recipes remain fail-closed. The review feedback points out a redundant .distinct() call on an ItemStack stream in IntegrateddynamicsCompat.java that can be safely removed to improve code clarity.

Comment on lines +402 to +408
private static List<ItemStack> representatives(Ingredient ingredient) {
return Arrays.stream(ingredient.getItems())
.filter(stack -> !stack.isEmpty())
.map(stack -> stack.copyWithCount(1))
.distinct()
.toList();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The .distinct() call on the ItemStack stream is redundant and ineffective. In Minecraft/NeoForge, ItemStack does not override equals() or hashCode(), meaning it defaults to reference identity (==). Since stack.copyWithCount(1) is called right before .distinct(), every element in the stream is a newly instantiated ItemStack object, making reference-based deduplication a no-op. To avoid confusion and improve clarity, consider removing the redundant .distinct() call.

    private static List<ItemStack> representatives(Ingredient ingredient) {
        return Arrays.stream(ingredient.getItems())
                .filter(stack -> !stack.isEmpty())
                .map(stack -> stack.copyWithCount(1))
                .toList();
    }

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Controller classification: non-actionable / false positive for ID production behavior (same finding class as #51 (comment)).

ItemStack has no value equals/hashCode on this baseline, so stream .distinct() is identity-only. Callers map through StorageResourceKey.item(...).distinct() under value equality; removing this call is clarity-only and does not change craft plans. No production change.

swear01 added a commit that referenced this pull request Aug 3, 2026
Drop cherry-pick conflict spill of PR #51 history from notes.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01

swear01 commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

bugbot run

@cursor cursor 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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5743405. Configure here.

@swear01
swear01 merged commit 1fad17c into main Aug 3, 2026
2 checks passed
swear01 added a commit that referenced this pull request Aug 3, 2026
Drop cherry-pick conflict spill of PR #51 history from notes.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
swear01 added a commit that referenced this pull request Aug 3, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
@swear01
swear01 deleted the compat/issue-44-integrated-dynamics-crafting branch August 4, 2026 10:12
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.

[Compatibility] Integrated Dynamics + Integrated Crafting deterministic recipe integration

1 participant