Repository navigation
Remold v0.2.3
Remold v0.2.3 Release Notes
This release hardens the Mixin hot-swap main path, fixes a silent baseline corruption in the
entity profiler, adds L0 initializer-drift detection, and backs the result with real-environment
end-to-end probes for both Fabric 1.21.1 and Forge 1.21.1 (ModLauncher).
Highlights
-
Mixin main path is no longer silently broken by baseline re-weaving
- The external-redefine / baseline-capture channel used to feed the already-woven
classfileBuffer
back into the Mixin bridge, appending hash-mangled duplicate@Uniquefields. - Those duplicates were written into the baseline cache; the next real hot-swap was then rejected by
LayoutGateasfield(s) removed, and the edit silently stopped taking effect. - Baseline capture now uses the JVM input bytes directly and never re-weaves them.
- The external-redefine / baseline-capture channel used to feed the already-woven
-
Entity-probe toggle no longer pollutes the hot-swap baseline
DynamicProfilerAPI.toggleEntityProberetransforms loaded subclasses; for Mixin targets that went
through the same external channel and double-wove them.- The retransform now runs inside
RemoldAgent.enterInternalRetransform(exitInternalRedefinein
finally): the profiler still instruments and un-instruments, butAnnotationTransformerleaves
the class and caches untouched.
-
Real-environment end-to-end verification
- Fabric 1.21.1 (KnotServer + real
-javaagent): add a method, add a field, two no-op rounds,
and edit the Mixin class itself (MixinHotSwap) —RESULT PASS, zero[INIT-DRIFT]. - Forge 1.21.1 (ModLauncher / ForgeGradle 7): the hot-swapped class is also a real Mixin target;
@Unique/@Injectsurvive the cross-ClassLoader re-weave and InitFix patches the live instance. - Evidence and probe sources live under
tests/fabric-mixin-probe/.
- Fabric 1.21.1 (KnotServer + real
Fixed
- Mixin baseline double-weave (duplicate
@Uniquefields ->LAYOUT-REJECTon the next edit). - Entity-probe retransform corrupting the baseline cache.
redefineDynamicwithoutbytecodeCache: baseline now falls back
bytecodeCache -> fetchOriginalBytecode -> sourceBytecodeCache, and fails closed when all are missing.- No-op
redefineDynamicis now visible: the "runtime bytes equal baseline, return true but nothing
was redefined" branch logs an explicit[DYNAMIC-REDEFINE] no-opline instead of being DEBUG-gated. - Retry bookkeeping / inject-conflict false positives: per-class retry bookkeeping moved out of the
redefinecatch;injectNewClassverifies already-loaded bytes before treating aLinkageErroras success. - Source baseline rollback and raw-byte fingerprints: classes that did not actually apply roll back
sourceBytecodeCache; disk fingerprints now hash the rawFiles.readAllBytesoutput, not aligned/woven bytes. - Offset drift: inherited fields of descendants are detected; drift bindings dedup by
declaringClass#field;LayoutPredictornormalizes dot/slash class names. - L0 warning hygiene: runs only for classes that actually reached the JVM, drops the
@OnReload
recommendation, skips instance enumeration when aggregating more than five classes, and warns separately
when an inherited field has a parent@RemoldReinit. - Fabric plugin agent-arg split: split only on the platform path separator.
Added
- L0 initializer-drift detection:
InitializerDriftcompares<init>slices per existing field and
reportsINIT-DRIFTwhen a field is still present but its initializer changed. Includes an instance gate,
inherited-field wording, aggregated warnings, andINSTANCE_ENUMERATIONSdiagnostics. - Regression tests: Mixin bridge call counting (baseline capture / internal retransform must not call
the bridge, a real source redefine must), entity-probe internal-retransform context, L0 drift,
inherited offset drift,redefineDynamicno-op and fail-closed cases.
Verification
- JUnit: 446 tests, 0 skipped, 0 failures, 0 errors.
- Probes:
initFixOracle350/0,doubleBraceProbe80/0,retryBookkeepingProbe15/0,
injectConflictProbe8/0,fingerprintDiskHashProbe18/0,redefineDynamicNoBaselineProbe13/0,
pendingAlignedMultiLoaderProbe5/0,retransformBaselineProbe10/0. MixinProbeexit-code assertion: exit 0 with the fix, exit 3 against the pre-fix agent.
Full Changelog: v0.2.2...v0.2.3