Repository navigation
v0.2.7 · Mixin 热更与对齐子系统收口
v0.2.7 Release Notes
Status: released 2026-11-11 (v0.2.7, GitHub release published; tag 0852506).
Previous release: v0.2.6 (2159d21).
Highlights
- A Mixin-generated anonymous class may never change its member schema in place. The generated
Target$Anonymous$<uuid>class carries its captured variables as synthetic fields, so a changed
capture list changes the field table and the<init>descriptors. On a JBR-21 DCEVM host that is
not a local edit:redefineClassesmakes the VM re-lay-out instances and rewrites unrelated heaps.
Measured on a real client ([观测]): one such redefine wiped
LootContextPredicate.combinedConditionon 230 of 244 instances
([HEAPWATCH-DIFF] null{before=0 after=230 newlyNull=230}, both channelsagree=1220 conflict=0),
and it did so even when the synthetic class had zero instances on the heap
(live{raw=0 reachable=0}) — so the trigger is "member schema differs", not "an old instance exists".
The gate therefore refuses any schema change (fieldTableChanged, computed from the live class's
reflection table includingisStatic/isSynthetic) and reports it asgateRejected. Body-only edits
keep the fast in-place path. - The synthetic class and its host target now fail or commit together. Refusing the synthetic class
while still redefining the target is a split state: the target would call a<init>the VM never got,
and the next tick throwsNoSuchMethodError. A newBytecodeTransformerBridge.Abortsignal carries
"do not redefine this class in this round" through the bridge chain:applyTransformerBridges
rethrows it,redefineDynamicreturns failure without callingredefineClasses, and the batch
path drops the class. Neither the newly woven bytes nor the un-woven source bytes are ever handed to
the VM (the first keeps the split state, the second washes out the mixin hooks). The log now says
was NOT redefined … metrics: …instead of blaming the layout gate. - Same-session self-healing, and one refusal per candidate. A refused candidate is remembered by the
hash of the bytes that would have been installed — never by the target class's own source bytes,
which do not change when a mixin is edited (that mistake locked a session permanently: restoring the
capture list still read "stays aborted"). Repeating the identical candidate is suppressed without
double-counting; changing the capture structure is evaluated again and refused again; restoring the
capture list to match the live class clears the record and the body edit goes through.BLOCKEDis
cleared per round, so a session recovers without a restart. - Reload structure contracts broken open.
@Mixin(priority)(afinalfield inside aTreeSet),
@Mixin(targets)(in-place metadata migration across four indexes with snapshot rollback instead of
detach + re-register, which now tripsMixinTargetAlreadyLoadedException) andinterfaces(two-way
alignment; superclass changes still rejected, interface add/remove allowed on JBR/DCEVM) no longer
require a restart. - New mixins admitted at runtime, from wherever the IDE puts them. A four-level byte-source chain
(registered memory → every watch directory → batch cache → host provider) plus aMixinBytecodeOverlay
that also swaps eachMixinConfig's start-up-captured service, plus apendingUnresolvedMixinsrelay
(TTL + retry budget) for "mixins.jsonsaved first,.classcompiled seconds later". A pure-IDEA
out/production/classeslayout now hot-swaps without a second output directory and without a restart. - Access levels only ever move up.
AccessAlignaligns a re-woven product against the JVM's loaded
bytes (public/protectedmust not narrow, strippedACC_FINALmust stay stripped) behind a
fail-closed[ACCESS-GATE]self-check, andreadOriginalBytesreplays the loader's pre-Mixin
transforms (PackageAccessFixer,AccessWidener,AccessTransformer). Before this, one hot-swap of
MobEntity.isInAttackRangesent 112 members back toprotectedand the VM answered
VerifyError: Bad access to protected data→InternalError. - A Mixin subsystem documentation set.
docs/mixin/01..08now mirrorsdocs/topology/: invariants
and classloader authority, admission and the bytecode overlay, the re-weave pipeline and member
alignment (including why baseline synthetic methods and@Uniquefields may only be tombstoned, never
deleted), the three reload structure contracts, the synthetic-class single exit, end-to-end
walkthroughs, runtime gates and the two-channel heap sentinel, and the decision/evidence ledger.
Fixes
- Read-through
NullPointerExceptionbetweenredefineClassesandInitFix: closed on the internal
batch path by the two-phase redefine (stage A = new structure + old bodies, then instance patches, then
stage C = new bodies).-Dremold.agent.two_phase=falserestores the single-phase behaviour. - Mixin handler's first anonymous class:
Error loading class: Outer$1 (ClassNotFoundException)followed
byinnerClass is null— the new bytes are offered to Mixin's own provider beforereloadMixin, and
the upstream negativeClassInfocache entries are evicted. - Body-only edit of an already-loaded generated inner class: used to end in a silent
[DYNAMIC-REDEFINE] no-opwhile the old body kept running; the synthetic class is now redefined in
place and the trailing targetno-opline is explained in the log. NoSuchMethodError: <Target>$Anonymous$<hash>.<init>(…)on a retarget round trip: the tombstone stub
and field policy keeps baseline synthetic members in place, andClassInfo.cacheis re-anchored to
MixinInfo.getClassInfo()after every reload/registration sotransformSingleDescriptorkeeps
remappingthis$0.NoClassDefFoundError: LoadedTargetSuppressorunder a plugin/core version skew: the suppressor now
crosses the core boundary as plain JDKFunction/Consumermethod references.- Same-shape anonymous-class ambiguity: decided by body-structure similarity, then by a whole-group
zero-live-instance fallback; the orphan warning names the holder fields (proven by assignment flow, or
listed as supertype/interface candidates) and the@RemoldReinitescape hatch. - A field whose initializer allocates a Mixin-generated anonymous class was refused
(Nest scan incomplete/cannot determine protected status of constructor); synthetic bytes can now
be registered inBytecodeSources, and the diagnostic names the weaving-generated class. - A mixin name removed from
*.mixins.jsoncould be silently re-registered when its class file was
rewritten; the removal now holds until the name is re-added (Forge/NeoForge included, via
ModLauncherClassTrackerSpoofinside theprepare()window). - Batch stall watchdog: previously covered only the debounce batch; now arms through a scoped
enter/exitAPI covering the manualtriggerHotswap()entry andretransformLoadedas well. - Gradle plugin: agent JVM arguments were injected only into the loader
clientcontainer, so
./gradlew runServerand the gametest runs started without-javaagent; all run containers now get
the same arguments, and auto-deploy wiresrunServer. - Release tooling: JitPack publications published the bare version while the packaged shims and both
templates request…:v<version>; publications now use thev-prefixed version and the real account
casing (com.github.I-Hope1.Remold).
Added
api:BytecodeTransformerBridge.Abort(the "abandon this class for this round" signal),
HotswapBatchReport/HotswapBatchListener.afterInternalBatchReport(),HotswapPlugin.isHostReady().core:BytecodeSources,BatchReportScope,BatchWatchdog,StartupGate,ClassCopySelector,
AccessAlign,MixinMemberAlign,HeapFieldWatch,ReflectionCacheManagerSPIs.plugin-mixin:MixinBytecodeOverlay,MixinNewMixinBytes,MixinClassByteSources,
MixinClassBaseline(premain(loader, dotName)recorder),MixinInnerClassHotSwapsingle exit,
SyntheticAbortLedger,MixinSyntheticSchemaschema views,MixinRetarget,MixinReloadPolicy.docs/mixin/01..08plusdocs/topology/04/07/08additions (Tier 3.5 body-token disambiguation,
Tier 4.5 whole-group zero-scan pairing,findHoldingFieldsholder naming).:tests:verifyTestCountbaseline raised to 718 (from 405) — the guard fails the build when a run
silently loses cases or starts skipping.
Verification
- JUnit: 718 tests, 0 skipped, 0 failures (
./gradlew :tests:test; the CITest Matrixleg reports
the sameJUnit 测试数 = 718, skipped = 0; release window 2026-11-11), plus:tests:initFixOracle
ALL ASSERTIONS PASSED. - CI (run
43026871337):Test Matrix (javac 8/11/17/21/25),Test on DCEVM (JBR 21),
P0.5 Probe (JBR 21)and(JBR 17), and the native-library build all green. - Gate / ledger suites:
MixinSyntheticGateTest8,MixinSyntheticLivenessTest4,
MixinSyntheticRetryAndFlagsTest4,MixinSyntheticSchemaTest4,MixinHotSwapWiringTest3,
BridgeAbortTransactionTest2. - Mutation checks in this cycle's campaign ledger: schema-gate ordering, candidate-signature suppression,
apply()accounting, flag comparison and host abort — each turned the named case red and was restored
(mut-20261111101423-6dd7,mut-20261111103512-cd37,mut-20261111040924-1e27). One mutant
("suppression never fires") is an equivalent mutant: the gate already refuses unconditionally, so
the ledger only changes the log wording. MixinSyntheticGateProbeon JBR-21 (-XX:+AllowEnhancedClassRedefinition):
RESULT PASS cases=4 pass=4 skip(non-jbr)=0 enhanced=true— P1 body-only redefine keeps the live
instance's field values and swaps the body (desc=v2:7:payload), P2 shrink refused, P3 enhanced-shrink
negative control, P4alive{raw=1}refused, P4breachable=0still refused with the class untouched.- Real client, one session, no restart (
[观测]): refusal path A1–A5 —fieldTableChangedand
gateRejected1→2→3→4→5(one per round),executed=0, hostwas NOT redefinedwithmetrics:,
newlyNull=0;Adupre-sending the identical bytes adds0/0. Self-healing path B1–B5 —
executed 1→2→3→4→5withredefined in place; metrics:every round,fieldTableChanged/
gateRejectedunchanged,v1-restored…v5-restoredall taking effect at runtime, 25 cuts
nullCount=0 / newlyNull=0, both channelsagree=6100 conflict=0 unavailable=0, zero crashes.
Known limits / manual acceptance
<Target>$Anonymous$<hash>still cannot change its capture list in place. Restore the capture
list, keep it stable (@RemoldReinit, or move the state into a lambda), or restart. The value-type
histogram of the 230 wiped fields is[观测](230 named record values vs 14 surviving hidden-class
lambda values); the underlyingModifyInstancesmechanism and the classloader/branch attribution stay
[推断].- Fact ③ is closed as "not pursued", not as solved. In
db74eeca 3-arg<init>existed and the VM
still threwNoSuchMethodError; no further work is planned on it. - P2 is an unvalidated
[假设]. Naming a new synthetic class byschemaHash(load it with
defineClass, then only body-redefine the host) is pre-registered with the criterion "new class loaded- host body-only redefine →
newlyNull=0"; not implemented, not measured.
- host body-only redefine →
- F6 four-way split (append / shrink / type-change / unchanged) is still partial. The
52830a0logs
only supportexecuted=12/12,skipped: not observed(the skip line was DEBUG-gated),rejected=0;
the newloaded=/fresh=/flagslines allow the split on the next real-machine run. - The captured
LivingEntitybyte pair is manual-only.MixinMemberAlignTest's captured regression
is a hand-run entry point (manualCapturedLivingEntityBaselineRestore) because those two ~140 KB
client classes are intentionally not in the repository andverifyTestCounthard-fails on skips. AnonClassAligner's Tier 4 layout gate still only "does not pair"; the host keeps redefining. The
mixin synthetic path is stricter on purpose (the host aborts with it). Do not extrapolate one to the
other.- Real client GUI acceptance of the toast/batch report remains manual; container probes cover dedicated
servers only.
Artifacts
remold-agent.jar— md57778f4ae0ad4b06de886d22e36315985remold-plugin-mixin-0.2.7.jar— md551b965ea3dfd50bf8392e4043c304a2a