docs.dev

Architecture and Lifecycle

The root launcher module — module map, startup sequence, classloading, the bytecode pipeline, events, threading, readiness, shutdown, and Gradle ownership.

Covers the root launcher module (src/main/java/dev/n3u): module map, startup sequence, classloading, patching, generated resources, events, threading, readiness, shutdown, and ownership between the Gradle modules. Accepted rationale lives in docs/development/DECISIONS.md in the repository; the injection DSL itself is documented in Injection DSL; build/validation workflows in docs/development/GITHUB.md. Every claim cites a current source path or symbol; anything not source-backed is labeled inference or an open question. Live runtime behavior is not asserted from source inspection (docs/development/FOUNDATION.md keeps live startup a separate gate). Source of truth: docs/development/architecture.md in the n3Client repository.

1. Module map

From settings.gradle.kts (only these four includes; the root project is N3Client):

ModuleRoleCompile-time dependenciesRuns where
root (build.gradle.kts)Launcher/host: bootstrap, classloading, injection, patching, packaging:base-api (implementation), pinned upstream runtime (guava/guice/logback versions derived from the pinned manifest by getRuneLiteArtifacts, build.gradle.kts:165), ASM, gson, jbsdiffThe client JVM. Main-Class: dev.n3u.N3Client (build.gradle.kts jar and shadowJar manifests)
base-apiShared contracts: dev.n3u.api N-interfaces, events, services, reflective host handles (dev.n3u.model), ClientPaths/Static/N3ClientOptions, logging; also exceptions, headless, packetsNo project dependencies (verified: base-api/build.gradle.kts has no project(...) references); guice is compileOnly; vendored upstream net.runelite.api snapshot lives hereLoaded into the client (embedded as api.jarData) and reused by manager
apiHigher-level services: dev.n3u.api.{entities,game,handlers,loadouts,threaded,widgets}, plus dev.n3u.{data,queries,services,ui,util}:base-api (compileOnly), net.runelite:client (compileOnly, api/build.gradle.kts)Embedded as api.jarData, loaded through RLClassLoader
pluginsSix bundled plugins (authgen, bankvaluer, breakhandler, codeeval, multiclientutils, profiles):api, :base-api, net.runelite:client (all compileOnly, plugins/build.gradle.kts)Embedded as plugins.jarData, injected into RuneLite's core plugin list (runelite/Install.java:24)
managerStandalone desktop application, separate entrypoint dev.n3u.manager.ui.ManagerApp:base-api only (manager/build.gradle.kts)Its own JVM/fat jar (scripts/run-manager.bat / run-manager.sh); never embedded in the client runtime. Owned by the Manager guide

Vendored upstream code: base-api/src/main/java/net/runelite/api (plus annotations, clan, gameval, widgets subpackages — DBTableID lives under gameval/) is refreshed only by :base-api:syncRuneliteApi (base-api/build.gradle.kts:86), which downloads selected files from runelite/runelite at ref runelite-parent-<runeliteVersion> (runeliteVersion = 1.13.6, build.gradle.kts:12). Attribution: THIRD_PARTY_NOTICES.md in the repository. Per AGENTS.md, review overwritten local sources after each refresh.

Root-module package map

PackagePurposeKey symbols
dev.n3uEntrypoint onlyN3Client
dev.n3u.bootstrap (+ beans)Pinned-artifact bootstrapRLUpdater, Properties, GradleUtils, JdkVersionUtil; beans Bootstrap, Artifact, Diff, Platform, Update
dev.n3u.classloaderClient classloadingRLClassLoader, ProxyClassBuilder, ProxyClassProvider
dev.n3u.clientStartup orchestrationMain, Versioning
dev.n3u.injector (+ annotations, pipeline, types, util, util/expreditor)Dev-time bytecode injectionInjector (gamepack), RLInjector (RuneLite), OSGlobalMixin, RLGlobalMixin; DSL reference: Injection DSL
dev.n3u.mixins26 active gamepack mixins (27 files — NDeviceIDMixin.java is fully commented out) attaching the N* API surface to game classesInjection DSL, Mixin catalogs
dev.n3u.rlmixins18 RuneLite-host mixinsInjection DSL, Mixin catalogs (rlmixins)
dev.n3u.modelLoaded-artifact model and bytecode condition enumsLibs, Artifact, ConditionType
dev.n3u.patchBinary patch generation/applicationPatchGenerator, PatchApplier, BytecodePatcher, PatchInputs, PatternBuilder
dev.n3u.runelite (+ jvm)Host integration and JVM parametersInstall, ClientUIUpdater, ShellTheme, ClassByte; JvmParams, HardwareAccelerationMode, OS
dev.n3u.util (+ asm, dto)Launch/classpath/mapping/ASM helpersMappingProvider, SignerMapper, PackageUtil, ArtifactReader, JarDumper, JVMLauncher, HashUtil, BytecodeBuilder, ClassNodeUtil, GamepackClassWriter, InsnUtil; DTOs JClass/JField/JMethod
src/main/resourcesRuntime resourcessee section 4
src/foundationFixtureExternal-plugin acceptance fixture (built by foundationFixtureJar, build.gradle.kts:366)—

2. Entrypoint and startup sequence

Two stages, both required to pass the -safeLaunch gate.

Stage 0 — dev.n3u.N3Client (N3Client.java:9). If -safeLaunch is absent, main relaunches dev.n3u.client.Main in a fresh JVM via JVMLauncher.launchInNewJVM with a classpath that prepends this jar's code source (buildFullClasspath, N3Client.java:26), then System.exit(0). Any exception becomes IllegalStateException("n3Client startup failed"). Accepted basis: D02/D08 (retained native startup, dev.n3u identity).

Stage 1 — dev.n3u.client.Main (Main.java:53), in order:

  1. Static initializer (Main.java:37-46): create ClientPaths.CACHE, redirect java.io.tmpdir into it, set n3client.logs, select n3client-logback.xml as the logback config (src/main/resources/n3client-logback.xml: console appender + 10 MB/30-day rolling file appender into ${n3client.logs}).
  2. LogFileManager.initialize() (base-api/.../logging/LogFileManager.java) tees stdout/stderr into daily log files and registers a JVM shutdown hook to flush and restore the streams (LogFileManager.java:62; the codebase's other hook is the hot-swapper's, section 5).
  3. Parse N3ClientOptions (base-api/src/main/java/dev/n3u/N3ClientOptions.java). Flags: rsdump, noPlugins, incognito, safeLaunch, min (implies noPlugins+noMusic), noMusic, proxy, launcherCom (port), disableMouseHook, legacyLogin, jagexLogin, runInjector, targetBootstrap, world, autoEnterGame. Without an audio device, _checkAudio forces noMusic (skipped while -Dn3client.generatePatches=true, Main.java:58). Missing -safeLaunch aborts with IllegalStateException("Use the n3Client entrypoint or -safeLaunch") (Main.java:61-63) — the gate is re-checked here so bypassing stage 0 fails fast.
  4. Early option effects (Main.java:64-84): ProxyManager.process, AutoLogin.setCredentials (legacy or Jagex login; arguments only, never persisted here), forced.runelite.version system property from targetBootstrap, WorldSetter.setWorld.
  5. Create ClientPaths.REPOSITORY and CACHE; set n3client.cacheHome (consumed by the gamepack user.home rewrite, injector/OSGlobalMixin.patch).
  6. JvmParams.set() (runelite/jvm/JvmParams.java:10): hardware-acceleration params from HardwareAccelerationMode.defaultMode(OS.getOs()), macOS appearance property, runelite.launcher.version — all as system properties.
  7. RLUpdater.run() (bootstrap/RLUpdater.java:41): parse the pinned manifest src/main/resources/dev/n3u/bootstrap/pinned-bootstrap.json (43 artifacts, each with name/path/hash/size and optional per-release client diffs entries). If targetBootstrap was given it must equal the manifest version or startup aborts (IOException("Unsupported RuneLite version: ..."), RLUpdater.java:70). Every platform-matching artifact is checked for existence and SHA-256 (HashUtil.computeSha256). On any mismatch the whole repository directory is deleted and every artifact re-downloaded and re-verified; a second mismatch aborts startup (RLUpdater.java:96-136). The remote launcher-properties fetch (bootstrap/Properties.fetch) is currently bypassed — run() builds a local map with only runelite.launcher.version (RLUpdater.java:43).
  8. loadArtifacts() (Main.java:122): every repository jar whose file name does not contain guice, javax, guava, logback-core, logback-classic, or slf4j-api (substring filter, Main.java:126-134) becomes a classpath URL. ArtifactReader.read (util/ArtifactReader.java:16) splits classes into Libs buckets by package: net.runelite.* → runelite, gamepack jar → gamepack, everything else → other; signed entries record certificates and their jar URL for later reuse. Failure: IllegalStateException("Unable to load pinned client artifacts").
  9. SignerMapper.map() scans for cert-checked classes; those classes are later loaded from their original signed jars, not from modified bytecode.
  10. loadClassLoader() (Main.java:150): two RLClassLoader instances over the same URLs — CLASSLOADER (the runtime loader) and CTX_CLASSLOADER (the ClassWriter class-lookup context used by ClassNodeUtil.toBytes when computing frames, util/asm/ClassNodeUtil.java toBytes). When not running from a shaded jar, UIManager.put("ClassLoader", CLASSLOADER); the thread-context loader is set; Static.set(CLASSLOADER, "CLASSLOADER") (first write wins, Static.set).
  11. Bytecode phase, exactly one of:
    • Injector mode — -runInjector or -Dn3client.generatePatches=true: PatchGenerator.enableCapture() → Injector.patch() (gamepack) → RLInjector.patch() (RuneLite) → PatchGenerator.writePatchesZip(n3client.patchOutput) (Main.java:93-103). Used by the generateClientPatches build task and IDE development.
    • Patch mode (production): PatchApplier.applyPatches() (Main.java:105). With -Dn3client.generatePatches=true the process writes branding assets into the patch output and exits without launching (Main.java:107-111).
  12. MappingProvider.getMappings().clear() — obfuscated-name mappings are only needed during injection; the static loader notes it "will fail in release builds" if mappings.json is absent (util/MappingProvider.java static block).
  13. Readiness: with -launcherCom <port>, LauncherCom.sendReadySignal(port, "Done") opens a TCP socket to localhost and prints Done (base-api/.../util/LauncherCom.java:8); failure is ignored ("launcher may have already exited").
  14. CLASSLOADER.launch(args) (classloader/RLClassLoader.java:64): reflectively invokes net.runelite.client.RuneLite.main with --disable-telemetry appended.
  15. Install.install() (runelite/Install.java:37): reads the Guice binding for net.runelite.api.Client out of RuneLite's injector and stores it via Static.set(..., "RL_CLIENT") — the point where Static.getClient() becomes usable.
  16. Logger.norm("N3Client started. - Did you know... ") (Main.java:119).

Failure and recovery summary

Startup is fail-fast: every step above throws and aborts. The only self-healing path is the bootstrap re-download; patch application verifies before, during, and after (section 4). No retry loops exist elsewhere; there is no fallback to unpatched bytecode. One exception inside RuneLite startup: built-in plugin injection is best-effort — Install.injectBuiltInPlugins swallows any exception with a stack trace (runelite/Install.java:31-34), leaving plugins silently absent, while a missing plugins.jarData resource reaches System.exit(1) from inside RuneLite startup (Install.java:44-47).

3. Classloading model

RLClassLoader extends URLClassLoader with Main.class.getClassLoader() as parent (classloader/RLClassLoader.java:29). Its constructor extracts the embedded api.jarData resource to a temp file in the cache and adds it as a URL (RLClassLoader.java:31); plugins.jarData is extracted lazily by Install.getBuiltIns (runelite/Install.java:53 reads the resource, :55 writes the cache temp file) when core plugins load — invoked from the injected PluginManagerMixin.loadCorePlugins bytecode (rlmixins/PluginManagerMixin.java:166), not during Install.install() (§2 step 15).

loadClass resolution order (RLClassLoader.java:86):

  1. Already-loaded classes.
  2. SignerMapper.shouldIgnore(name) → load the class from its original signed jar (loadClassFromSignedJar), building a CodeSource with the jar's certificates; if signers cannot be restored, throw. Modified bytecode is never used for these classes.
  3. Generated proxy classes from ProxyClassProvider.PROXY_CLASSES — currently a single runtime-built class net.runelite.proxies.PluginPanelProxy (superclass net.runelite.client.ui.PluginPanel, constructors ()V and (Z)V, classloader/ProxyClassBuilder.java).
  4. Gamepack bytes by name (Main.LIBS.gamepackByName) — any name, so obfuscated game classes resolve here.
  5. Anything not under net.runelite. with no bytes → parent loader.
  6. RuneLite/other bytes from Libs.classByName.
  7. defineClass after a 0xCAFEBABE magic check (loadArtifactClass); a define failure prints the error and calls System.exit(0) (RLClassLoader.java:183) — the classloader treats malformed injected bytecode as unrecoverable.
  8. Fall through to the parent loader if nothing matched.

Protection domains map classes back to their original jar URL and certificates from Libs.getClassCerts()/getUrls() (makeProtectionDomainFor). addResource/getResourceAsStream serve in-memory byte arrays ahead of jar resources. Public surfaces: Main.CLASSLOADER / Main.CTX_CLASSLOADER statics and Static.getClientClassLoader(). lookupClass(name, bytes) is an internal define fallback whose only caller is RLClassLoader.loadClass(String, byte[]) (RLClassLoader.java:197); the hot-swap plugin loader is a separate dev.n3u.services.hotswapper.PluginClassLoader constructed over Static.getClassLoader() (api/.../services/hotswapper/PluginReloader.java:55).

Invariants: one class identity per RLClassLoader; signed classes must keep their certificates (D05's host boundary relies on this for cert-checked game code); gamepack bytes always win over parent lookups for game classes.

4. Bytecode pipeline: injection (dev) and patches (production)

Both modes produce identical gamepack/RuneLite bytecode: injector mode transforms ASM ClassNodes directly and (optionally) records the diffs; production mode replays those recorded diffs. The DSL, transformers, and mixin catalogs are documented in Injection DSL; this section covers lifecycle only.

  • Injector mode (Injector.patch, injector/Injector.java:29): loads ~17.5k gamepack classes (full frame expansion only for mixin targets), applies interfaces + mixins, then per class applies FieldHookTransformer.instrument and OSGlobalMixin.patch, writes modified bytes back into Libs.gamepack, and an annotation-stripped copy into Libs.gamepackClean (used for -rsdump via JarDumper.dump). RLInjector.patch (injector/RLInjector.java) does the same against Libs.runelite with the dev.n3u.rlmixins package plus RLGlobalMixin (currently empty, injector/RLGlobalMixin.java).
  • Patch artifacts: PatchGenerator.writePatchesZip (patch/PatchGenerator.java:134) writes dev/n3u/patches.zip with entries gamepack/<class>.diff, runelite/<class>.diff, and metadata.properties (namespace, patch counts, per-input hashes written by PatchInputs.append). Diffs are only recorded for classes whose bytes actually changed (BytecodePatcher.isIdentical guard).
  • Patch mode (PatchApplier.applyPatches, patch/PatchApplier.java:28): streams patches.zip entry-by-entry, verifies metadata (PatchInputs.verify), verifies each input class hash before applying (PatchInputs.verifyInput), reconstructs bytes with BytecodePatcher.applyDiff (jbsdiff, io.sigpipe:jbsdiff:1.0 in build.gradle.kts), and enforces exact patch counts (verifyCounts). Failures: missing zip → IllegalStateException("Generated patches are missing"); zero-count sets → "Required native patch sets are empty"; any original-hash mismatch, extra entry, or shortfall aborts startup. This is F07's fail-fast contract (docs/development/FOUNDATION.md).
  • Build integration (build.gradle.kts): copySubmoduleJar/copySubmoduleJar2 (build.gradle.kts:77, :89) rename :api:jar → api.jarData and :plugins:jar → plugins.jarData into build/generated/embedded; generateClientPatches (build.gradle.kts:324) runs dev.n3u.client.Main -safeLaunch -runInjector headless with -Dn3client.generatePatches=true, n3client.home in build/patch-workspace, and output build/generated/patches; processResources depends on both and excludes stale source-tree copies of patches.zip, jarData, and the listed icons (build.gradle.kts:337-344). sourceSets.main adds build/generated/embedded and build/generated/patches as resource dirs (build.gradle.kts:312-315). Never hand-edit build/generated/**.

Runtime resource map (src/main/resources)

ResourceConsumer
dev/n3u/bootstrap/pinned-bootstrap.jsonRLUpdater artifact pinning; also drives build dependency versions (getRuneLiteArtifacts)
dev/n3u/injector/mappings.jsonMappingProvider (injection-time obfuscated-name resolution)
n3client-logback.xmlLogging config (selected in Main static init)
dev/n3u/client/*.pngBranding/icons; regenerated into patch output by ClientBranding.writeAssets during patch generation
dev/n3u/api.jarData, dev/n3u/plugins.jarData, dev/n3u/patches.zipGenerated only — embedded API/plugins and binary patches

Packaging

shadowJarRelease (build.gradle.kts:255) builds the release fat jar: excludes dev/n3u/injector/**, dev/n3u/mixin/**, dev/n3u/rlmixin/**, mappings.json, dev/n3u/services/pathfinder/ui/**, signature files, module-info.class, and all net/runelite/api/** constant classes except the four whitelisted gameval classes; merges Swing LookAndFeel and FileSystemProvider service files. Note the exclusion literals spell mixin/rlmixin while the actual packages are mixins/rlmixins; no automated check covers this today — check_distribution.py verifies archive contents, Main-Class, N-class presence and patch metadata, but not mixin retention (its only related reference is the obsolete-name check TDeviceIDMixin, scripts/check_distribution.py:50), which strengthens the open question below. packageRelease (build.gradle.kts:377) zips N3Client.jar (renamed shadow jar), LICENSE, THIRD_PARTY_NOTICES.md, and the platform scripts (LF-normalized for Linux/macOS). publishRelease shells out to a hard-coded local gh.exe path — a local release convenience, not a CI gate.

5. Events, threading, readiness, shutdown

Events

Owned event types live in base-api/src/main/java/dev/n3u/events: PacketReceived, PacketSent, BankCacheChanged. Delivery is RuneLite's event bus, wrapped reflectively: Static.post (base-api/.../Static.java:169) → RLEventBus.post (base-api/.../model/RLEventBus.java:20), which reflects EventBus.post(Object) and logs (does not rethrow) failures. Producers found in source: NServerPacketLoggerMixin posts PacketReceived, NPacketWriterMixin posts PacketSent, api/dev/n3u/services/BankCache posts BankCacheChanged; login-related LoginMessage/LoginResponse (dev.n3u.data) are posted by NGameEngineMixin. Consumers: packet events go two ways — they are posted to the bus via Static.post and delivered to N3ClientOptionsPanel by direct calls from the producing mixins (NPacketWriterMixin.java:90 and NServerPacketLoggerMixin.java:80 invoke N3ClientOptionsPanel.getInstance().onPacketSent(...)/onPacketReceived(...) right after Static.post); the panel handlers (N3ClientOptionsPanel.java:674, :724) carry no @Subscribe and never register on the bus. True bus consumers (@Subscribe): GameManager (LoginResponse, GameManager.java:801-802) and BankValuerPlugin (BankCacheChanged). EventBusMixin (rlmixins/EventBusMixin.java) edits EventBus.register to remove a Preconditions.checkArgument call; the edit has no shape guard — after upstream drift the @Insert becomes a generation-time stderr miss (injector/pipeline/InsertTransformer.java:71) and the checkArgument removal silently does not happen — and its motivating purpose is inference (registration validation is being loosened; exact rationale not recorded in source).

Threading model

  • Client thread: all game-state reads/writes go through Static.invoke / Static.invokeLater / Static.invoke(Supplier) / Static.invokeLater(Supplier) (Static.java:101+). Off-thread calls are routed to RuneLite's ClientThread via RLClientThread (base-api/.../model/RLClientThread.java:51), which reflects the chain RuneLite.rlInstance → clientUI → clientThreadProvider.get(); the rlInstance static field is added by RuneLiteMixin.main (rlmixins/RuneLiteMixin.java). On-thread calls run directly.
  • EDT: Swing mutation stays on the Event Dispatch Thread (ownership rule in DECISIONS). ClientUIMixin injects ClientUIUpdater.inject() into ClientUI's init lambda, so its Swing re-styling runs in ClientUI init context (inference: EDT because RuneLite initializes ClientUI on the EDT; not verified at runtime).
  • Plugin loop: NPlugin.loop() runs at the start of every game tick, is safe to sleep in, and is not thread-safe — documented in External Plugins (owning guide).
  • Workers: persistence/network work belongs on workers with explicit shutdown ownership (DECISIONS ownership model; per-service ownership is the owning service guide's topic).

Readiness

Two readiness signals exist: the launcher-com TCP "Done" (step 13 of the startup sequence, sent after bytecode preparation and before RuneLite starts) and Install.install()'s RL_CLIENT binding (the point where plugin-facing Static.getClient() works). Versioning.getLiveRuneliteVersion() (root module, client/Versioning.java:15, delegating to RuneliteConfigUtil.getRuneLiteVersion()) reports the running RuneLite version at runtime.

Shutdown

Two JVM shutdown hooks exist in the codebase: LogFileManager's flush-and-restore hook (base-api/.../logging/LogFileManager.java:62, registered at startup) and the hot-swapper's plugin-classloader cleanup hook (api/.../services/hotswapper/PluginReloader.java:36, registered inside PluginReloader.init() when the hot-swapper initializes; it cleans up all loaded PluginContexts). There is no n3Client-owned ordered shutdown sequence in source; teardown otherwise follows RuneLite's own shutdown path, which n3Client does not replace — the host mixins only neutralize the updater (UpdaterMixin.tryUpdate is an empty @MethodOverride) and the legacy cache import (RuneLiteMixin.isolateStorage empties copyJagexCache). Static.resetForRecovery() clears the cached client/RuneLite/classloader references but currently has no callers in src/ or the modules (open question below).

6. Ownership and dependency directions

Direction invariant: dependencies point toward base-api; nothing depends on the root project; the root project is the composition root that embeds api and plugins at build time (as copied resources, not Gradle dependencies).

EdgeKindEvidence
root → base-apiimplementation — the root's only project dependencybuild.gradle.kts:226
api → base-apicompileOnlyapi/build.gradle.kts dependencies
plugins → api, plugins → base-apicompileOnly (plus net.runelite:client compileOnly)plugins/build.gradle.kts
manager → base-apiimplementationmanager/build.gradle.kts
root → api, root → pluginsnot Gradle dependencies — their jars are copied into resources as api.jarData/plugins.jarDatacopySubmoduleJar/copySubmoduleJar2, build.gradle.kts:77, :89
  • base-api never imports root/api/plugins classes (verified from its build file) and has no compile-time dependency on the RuneLite client — host access is behind reflective handles (dev.n3u.model.RuneLite, Guice, RLEventBus, RLClientThread, RLClientUI, PluginManager, GameApplet).
  • api and plugins compile against the real RuneLite client (compileOnly) and the embedded jars are what ship; plugins produces its own versioned jar (plugins/build.gradle.kts, version 1.11.19.1).
  • Lifecycle ownership: the retained native injector/loader owns startup (D02, DECISIONS "Ownership model": one lifecycle owner per host); the manager is a separate process with its own guide (the Manager guide).
  • Storage ownership: ClientPaths declares the client's owned paths (n3client.home root, default %USERPROFILE%\.n3client, with runelite/, client/, logs/, repository/, cache/; base-api/.../ClientPaths.java:7-17); two other directories under that root are not ClientPaths fields — jdk/ is provisioned by the Windows launch script (JDK_DIR=%USERPROFILE%\.n3client\jdk, scripts/run-windows.bat:5), and the manager derives its data directory as ClientPaths.ROOT.resolve("manager") (manager/.../db/Database.java:16-18). The sideload directory stays at ~/.runelite/sideloaded-plugins (D15; enforced in the host by PluginManagerMixin.preserveSideloadedPlugins redirecting SIDELOADED_PLUGINS to ClientPaths.PLUGINS).

7. Accepted vs inferred rationale

Accepted (from DECISIONS — do not re-derive): D02 native injector/loader retained; D05 dual-host support with bridges confined to the legacy-host adapter; D07/D08 dev.n3u N-naming and package identity; D09 fresh data/no import; D10 no release channel for the current milestone; D15 sideload path exception; the JDK 25 build / --release 11 artifact boundary (DECISIONS "Compatibility boundaries" + docs/development/GITHUB.md).

Author-stated, not measured here (code comments — treat as claims, not receipts): memory rationale for the pre-sized gamepack map ("saves 20-30MB", Injector.java:26), selective frame expansion ("saves 200-300MB", Injector.java:45), and PatchApplier's streaming rationale (PatchApplier.java:21-23).

Inference (labeled): EventBusMixin's purpose (see Events); EDT context for ClientUIUpdater.inject(); ProxyClassProvider existing so external/plugin code can extend PluginPanel through the client classloader (single generated proxy; no written rationale); the min-mode plugin allow/disallow prefix lists in PluginManagerMixin representing an intentional core-plugin curation (behavior verified, intent not recorded).

Open questions (no source answer; tracked in the repository's issue tracker):

  • shadowJarRelease excludes dev/n3u/mixin/** and dev/n3u/rlmixin/** but the packages are dev/n3u/mixins / dev/n3u/rlmixins — confirm whether release jars are expected to retain mixin classes and either fix the literals or document the intent. Exit criterion: build-file confirmation recorded in the guide or DECISIONS, with check_distribution.py output as evidence.
  • Static.resetForRecovery() has no production caller — confirm its intended recovery flow or remove it from the contract. Exit criterion: caller identified or API removed.
  • No ordered shutdown sequence exists in source; document the intended client teardown contract (what must flush before JVM exit beyond LogFileManager) once decided. Exit criterion: shutdown contract section backed by an implemented hook or an explicit decision that RuneLite's shutdown is authoritative.

8. Tests

Root-module tests (src/test/java): JdkVersionTest, StorageIsolationTest, patch/PatchInputsTest (patch metadata verification), lookup/PluginLookupTest (+ LookupSubscriber helper). PatchInputsTest covers the patch-integrity contract described in section 4; StorageIsolationTest covers the ClientPaths fresh-root contract (section 6). Test conventions and the full module test map: Development Testing.

9. Known limits

  • All bytecode-pipeline behavior above is asserted from source inspection; the foundation's live receipts (docs/development/FOUNDATION.md, docs/development/VALIDATION.md) predate current code, and packaged startup on the newest branding commit has not been revalidated (FOUNDATION.md records this gap).
  • RLGlobalMixin.patch is empty — the RuneLite-side "global mixin" hook exists but applies nothing (injector/RLGlobalMixin.java).
  • bootstrap/Properties/GradleUtils/JdkVersionUtil support the upstream launcher's remote version discovery; only JdkVersionUtil.calculateJreVersion() (returns java.version) has a live caller today — RLUpdater bypasses Properties.fetch (section 2, step 7).
  • BytecodePatcher.createFullPatch is a TODO stub in source (patch/BytecodePatcher.java); only jbsdiff deltas are used.
  • patch/PatternBuilder (patch/PatternBuilder.java) has no callers outside its own file — a pattern-building helper retained for future patch work (inference from absence of references; verified by a repository-wide symbol scan during the guide's authoring session).

On this page