Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09e6827b39 | ||
|
|
567c66303b | ||
|
|
ec8a6eb7df |
No files matched your search
@@ -1,9 +1,11 @@
|
|||||||
# purpur-carry agent entrypoint
|
# purpur-carry agent entrypoint
|
||||||
|
|
||||||
The canonical stories, engineering guidance, and **all process documents** are in the private [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/index.md).
|
Canonical engineering guidance and technical/process documents are in the private [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/index.md).
|
||||||
|
|
||||||
Before work, read the sibling `../somc-okf/index.md`, `../somc-okf/processes/index.md`, `../somc-okf/projects/purpur-carry/index.md`, `engineering.md` in that project section, and relevant `../somc-okf/user-stories/purpur-carry/` stories. Also follow the parent workspace `AGENTS.md` when present.
|
Stories, acceptance criteria, status and evidence belong in [Kaneo Social Minecraft](https://cloud.kaneo.app/dmg/SM), with subjects `[purpur-carry] Descriptive title` (no `US-###` or `FS-*` prefix). Use the configured authenticated `kaneo` MCP server per [Kaneo access and migration](https://git.garvis.dev/dmg/somc-okf/src/branch/main/processes/development.md#kaneo-access-and-migration); report unavailable access rather than creating local story copies. OpenProject is read-only history.
|
||||||
|
|
||||||
|
Before work, read the sibling `../somc-okf/index.md`, `../somc-okf/processes/index.md`, `../somc-okf/projects/purpur-carry/index.md`, `engineering.md` in that project section, and relevant Kaneo tickets with subject prefix `[purpur-carry]`. Also follow the parent workspace `AGENTS.md` when present.
|
||||||
|
|
||||||
For standalone checkouts, start at the [project page](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/purpur-carry/index.md) and [shared process](https://git.garvis.dev/dmg/somc-okf/src/branch/main/processes/development.md). Obtain wiki access before feature work; do not recreate a local knowledge bundle. Source builds do not require private wiki access.
|
For standalone checkouts, start at the [project page](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/purpur-carry/index.md) and [shared process](https://git.garvis.dev/dmg/somc-okf/src/branch/main/processes/development.md). Obtain wiki access before feature work; do not recreate a local knowledge bundle. Source builds do not require private wiki access.
|
||||||
|
|
||||||
Development follows the [development cycle](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/development-cycle.md): approved stories, failing tests, passing implementation, verification, then source/wiki commit and push. GitOps changes are committed locally **without pushing**; only [Do release](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/do-release.md) authorizes a reviewed GitOps push.
|
Follow the full [development process](https://git.garvis.dev/dmg/somc-okf/src/branch/main/processes/development.md) and [development cycle](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/development-cycle.md) for approvals, test-first/full-suite verification, required Gitea PR checks/reviews and merge, and merged-tree verification before ticket completion. Never push source `main` directly. GitOps changes are committed locally **without pushing**; only [Do release](https://git.garvis.dev/dmg/somc-okf/src/branch/main/runbooks/do-release.md) authorizes a reviewed GitOps push.
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
# Purpur Carry
|
# Purpur Carry
|
||||||
|
|
||||||
Purpur Carry is a Purpur 26.2 plugin for native animal and Villager carrying on SoMC. The approved behavior is specified in the [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/purpur-carry/index.md).
|
Purpur Carry is a Purpur 26.3 plugin for native animal and Villager carrying on SoMC. The approved behavior is specified in the [SoMC OKF wiki](https://git.garvis.dev/dmg/somc-okf/src/branch/main/projects/purpur-carry/index.md).
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Purpur 26.2 build 2618
|
- Purpur 26.3 build 2651
|
||||||
- Java 25 or newer
|
- Java 25 or newer
|
||||||
- Node.js 20 or newer for release-tool verification
|
- Node.js 20 or newer for release-tool verification
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -26,9 +26,9 @@ tasks.withType<JavaCompile>().configureEach {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("org.purpurmc.purpur:purpur-api:26.2.build.2618-stable")
|
compileOnly("org.purpurmc.purpur:purpur-api:26.3.build.2651-stable")
|
||||||
|
|
||||||
testImplementation("org.purpurmc.purpur:purpur-api:26.2.build.2618-stable")
|
testImplementation("org.purpurmc.purpur:purpur-api:26.3.build.2651-stable")
|
||||||
testImplementation(platform("org.junit:junit-bom:5.13.4"))
|
testImplementation(platform("org.junit:junit-bom:5.13.4"))
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||||
testImplementation("org.mockito:mockito-core:5.18.0")
|
testImplementation("org.mockito:mockito-core:5.18.0")
|
||||||
@@ -55,20 +55,20 @@ tasks.check { dependsOn(releaseToolCheck) }
|
|||||||
// Exercise actual Purpur event dispatch and command registration without starting a server.
|
// Exercise actual Purpur event dispatch and command registration without starting a server.
|
||||||
val carryRuntime = layout.buildDirectory.dir("carry-runtime")
|
val carryRuntime = layout.buildDirectory.dir("carry-runtime")
|
||||||
val downloadCarryRuntime = tasks.register("downloadCarryRuntime") {
|
val downloadCarryRuntime = tasks.register("downloadCarryRuntime") {
|
||||||
val launcher = carryRuntime.map { it.file("purpur-26.2-2618.jar") }
|
val launcher = carryRuntime.map { it.file("purpur-26.3-2651.jar") }
|
||||||
outputs.file(launcher)
|
outputs.file(launcher)
|
||||||
doLast {
|
doLast {
|
||||||
val file = launcher.get().asFile
|
val file = launcher.get().asFile
|
||||||
file.parentFile.mkdirs()
|
file.parentFile.mkdirs()
|
||||||
val connection = URI("https://api.purpurmc.org/v2/purpur/26.2/2618/download")
|
val connection = URI("https://api.purpurmc.org/v2/purpur/26.3/2651/download")
|
||||||
.toURL().openConnection()
|
.toURL().openConnection()
|
||||||
connection.connectTimeout = 30_000
|
connection.connectTimeout = 30_000
|
||||||
connection.readTimeout = 120_000
|
connection.readTimeout = 120_000
|
||||||
val bytes = connection.getInputStream().use { it.readBytes() }
|
val bytes = connection.getInputStream().use { it.readBytes() }
|
||||||
val digest = MessageDigest.getInstance("SHA-256").digest(bytes)
|
val digest = MessageDigest.getInstance("SHA-256").digest(bytes)
|
||||||
.joinToString("") { "%02x".format(it) }
|
.joinToString("") { "%02x".format(it) }
|
||||||
check(digest == "4a32d046a118804d89ca74ba89b798c98f6d8d1f310c18077ac573597049de31") {
|
check(digest == "0677c1febecfbc2e5b0a7f76abd647b70a1f38d3cbdf3dd6a82e401b4262a598") {
|
||||||
"Purpur 2618 checksum mismatch"
|
"Purpur 2651 checksum mismatch"
|
||||||
}
|
}
|
||||||
file.writeBytes(bytes)
|
file.writeBytes(bytes)
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ val downloadCarryRuntime = tasks.register("downloadCarryRuntime") {
|
|||||||
val prepareCarryRuntime = tasks.register<JavaExec>("prepareCarryRuntime") {
|
val prepareCarryRuntime = tasks.register<JavaExec>("prepareCarryRuntime") {
|
||||||
dependsOn(downloadCarryRuntime)
|
dependsOn(downloadCarryRuntime)
|
||||||
javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(25) }
|
javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(25) }
|
||||||
classpath = files(carryRuntime.map { it.file("purpur-26.2-2618.jar") })
|
classpath = files(carryRuntime.map { it.file("purpur-26.3-2651.jar") })
|
||||||
mainClass = "io.papermc.paperclip.Main"
|
mainClass = "io.papermc.paperclip.Main"
|
||||||
jvmArgs("-Dpaperclip.patchonly=true")
|
jvmArgs("-Dpaperclip.patchonly=true")
|
||||||
workingDir(carryRuntime)
|
workingDir(carryRuntime)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ import org.junit.jupiter.api.BeforeAll;
|
|||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
/** Actual Purpur 2618 listener discovery and event dispatch with entity boundaries doubled. */
|
/** Actual Purpur 2651 listener discovery and event dispatch with entity boundaries doubled. */
|
||||||
class NativeCarryRoutingTest {
|
class NativeCarryRoutingTest {
|
||||||
private static Server previousServer;
|
private static Server previousServer;
|
||||||
private PluginManager events;
|
private PluginManager events;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
|||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.jar.JarFile;
|
import java.util.jar.JarFile;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
@@ -48,9 +49,18 @@ final class PurpurCarryDistributionTest {
|
|||||||
input.readUnsignedShort();
|
input.readUnsignedShort();
|
||||||
assertEquals(69, input.readUnsignedShort());
|
assertEquals(69, input.readUnsignedShort());
|
||||||
}
|
}
|
||||||
|
List<String> forbiddenPrefixes = List.of(
|
||||||
|
"com/comphenix/protocol/",
|
||||||
|
"com/destroystokyo/paper/",
|
||||||
|
"io/papermc/",
|
||||||
|
"net/minecraft/",
|
||||||
|
"org/bukkit/",
|
||||||
|
"org/purpurmc/",
|
||||||
|
"org/spigotmc/",
|
||||||
|
"mockito-extensions/"
|
||||||
|
);
|
||||||
assertFalse(jar.stream().anyMatch(entry ->
|
assertFalse(jar.stream().anyMatch(entry ->
|
||||||
entry.getName().startsWith("org/bukkit/")
|
forbiddenPrefixes.stream().anyMatch(entry.getName()::startsWith)
|
||||||
|| entry.getName().startsWith("org/purpurmc/")
|
|
||||||
|| entry.getName().endsWith("Test.class")));
|
|| entry.getName().endsWith("Test.class")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,8 +72,16 @@ final class PurpurCarryDistributionTest {
|
|||||||
|
|
||||||
assertTrue(build.contains("nativeCarryTest"));
|
assertTrue(build.contains("nativeCarryTest"));
|
||||||
assertTrue(build.contains("tasks.check { dependsOn(nativeCarryTest) }"));
|
assertTrue(build.contains("tasks.check { dependsOn(nativeCarryTest) }"));
|
||||||
|
assertTrue(build.contains("purpur-api:26.3.build.2651-stable"));
|
||||||
|
assertTrue(build.contains("purpur-26.3-2651.jar"));
|
||||||
|
assertTrue(build.contains("https://api.purpurmc.org/v2/purpur/26.3/2651/download"));
|
||||||
assertTrue(build.contains(
|
assertTrue(build.contains(
|
||||||
"4a32d046a118804d89ca74ba89b798c98f6d8d1f310c18077ac573597049de31"));
|
"0677c1febecfbc2e5b0a7f76abd647b70a1f38d3cbdf3dd6a82e401b4262a598"));
|
||||||
|
assertFalse(build.contains("26.2"));
|
||||||
|
assertFalse(build.contains("2618"));
|
||||||
|
assertTrue(readme.contains("Purpur 26.3 build 2651"));
|
||||||
|
assertFalse(readme.contains("Purpur 26.2"));
|
||||||
|
assertFalse(readme.contains("2618"));
|
||||||
assertTrue(readme.contains("checksum-pinned Purpur event/command suite"));
|
assertTrue(readme.contains("checksum-pinned Purpur event/command suite"));
|
||||||
assertTrue(readme.contains("patch-only mode"));
|
assertTrue(readme.contains("patch-only mode"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user