Skip to content

Release diff: master → previous_release - #12

Closed
Th0rgal wants to merge 2 commits into
previous_releasefrom
master
Closed

Release diff: master → previous_release#12
Th0rgal wants to merge 2 commits into
previous_releasefrom
master

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Dec 20, 2025

Copy link
Copy Markdown
Member

Automated PR. The 'previous_release' branch is force-updated on every push to master to point at the commit before the push, so this PR always represents the current release diff.


Note

Introduces a new in-game recording flow and streamlines release artifacts.

  • Bukkit: Remove dev mode (BukkitDevModeManager, BukkitDevModeCommand) and old BukkitLinkCommand; add RecordingManager and BukkitMainCommand exposing /aac record (start/stop/status) and dashboard status. Auto-stop recordings on player quit and on plugin disable. Initialize RecordingManager with service.getConfig() and service.getServerId() in AsyncAnticheatBukkitPlugin.
  • plugin.yml: Drop aacdev command and asyncanticheat.dev permission; enhance aac command; add asyncanticheat.record permission.
  • Core: Register a Gson Optional TypeAdapter and expose AsyncAnticheatService#getServerId().
  • CI (release.yml): Copy versioned JAR to a stable build/libs/async-anticheat.jar and attach both versioned and stable JARs to releases.

Written by Cursor Bugbot for commit acfbd97. This will update automatically on new commits. Configure here.

Upload both versioned JAR and async-anticheat.jar for easy linking
- Replace BukkitDevModeManager with RecordingManager
- Add BukkitMainCommand for /aac record <player> <type> [label]
- POST recordings to /observations API endpoint
- Auto-stop recordings on player disconnect
- Tab completion for cheat types and online players
@Th0rgal
Th0rgal deleted the branch previous_release December 23, 2025 11:48
@Th0rgal Th0rgal closed this Dec 23, 2025
}
}
executor.shutdown();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Recordings may be lost during server shutdown

The stopAll() method queues recording submissions to the executor and then calls shutdown() without awaitTermination(). Since the executor uses a daemon thread (line 40: t.setDaemon(true)), the JVM may exit before the HTTP requests complete during server shutdown, causing recordings to be lost. Daemon threads are terminated when all non-daemon threads finish, so there's no guarantee the recording submissions complete before the process exits.

Fix in Cursor Fix in Web

}
// Read as string for simplicity
return Optional.of(in.nextString());
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

OptionalTypeAdapter read method incompatible with write output

The OptionalTypeAdapter.read() method always calls in.nextString() even though write() can output Numbers and Booleans via out.value(n) and out.value(b). If an Optional containing a Number or Boolean is serialized and later deserialized, nextString() will throw an IllegalStateException since the JSON token type won't match. While no deserialization currently uses this adapter, this creates an asymmetric read/write contract that will fail if Optional deserialization is added later.

Fix in Cursor Fix in Web

label,
Instant.now()
);
activeRecordings.put(targetId, recording);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Race condition in startRecording check-then-act pattern

The startRecording method uses a non-atomic check-then-act pattern on a ConcurrentHashMap. It calls containsKey() on line 69 and then put() on line 82, which creates a race window where two concurrent calls for the same target could both pass the check and both insert recordings, with the second overwriting the first. Both callers would receive success, but only one recording would be tracked. The atomic putIfAbsent method would eliminate this race.

Fix in Cursor Fix in Web

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.

1 participant