[PR #5891] [MERGED] Anticheat prediction: a log line says the tick's keys, where it ended and the replay's velocity #6543

Closed
opened 2026-11-03 06:22:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5891
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/prediction-log-where


📝 Commits (1)

  • 787a59f Anticheat prediction: a log line says the tick's keys, where it ended and the replay's velocity

📊 Changes

2 files changed (+41 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/lan/prediction.rs (+37 -3)
📝 docs/anticheat.md (+4 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Refs #5879.

Water is two thirds of what honest players are flagged for on the official server. Those flags don't reproduce with a real Horizon client in a pool, a current or a bubble column (tools/anticheat_e2e.py --check prediction-water, #5873). The log line doesn't say where they happen, so the blocks around them are unknown. This adds what's needed to find a flag again and play it where it happened.

A prediction line's worst tick now also says:

  • the tick's keys;
  • where the client said it ended (x, y, z);
  • the replay's velocity at the end of the tick, before an excuse brings it to the client's.
... (1 tick; off +0.000 +0.173 -0.001, moved 0.281, air water sprinting, keys forward jump sprint, at 12.30 63.00 -5.50, velocity +0.000 +0.041 -0.250)

anticheat.log is the server owner's file, and the console's alerts are unchanged. docs/anticheat.md describes the new fields.

Per-move cost: three fields copied into Played per tick played (the line is only formatted on a flag).

Tests

  • a_played_tick_tells_its_offset_and_state checks the new format. The 16 other replay tests pass.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at db42d4441, 9 min 49 s)

Check Result
Scope ✅ 2 files, +41 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 515 passed (2 min 39 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 7 s)
tests: horizon-client ✅ 1674 passed (5 min 7 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 34 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 22 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5891 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/prediction-log-where` --- ### 📝 Commits (1) - [`787a59f`](https://github.com/horizon-rust/horizon/commit/787a59fd85ac061e9505a09a34a171a6011dde89) Anticheat prediction: a log line says the tick's keys, where it ended and the replay's velocity ### 📊 Changes **2 files changed** (+41 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/lan/prediction.rs` (+37 -3) 📝 `docs/anticheat.md` (+4 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Refs #5879. Water is two thirds of what honest players are flagged for on the official server. Those flags don't reproduce with a real Horizon client in a pool, a current or a bubble column (`tools/anticheat_e2e.py --check prediction-water`, #5873). The log line doesn't say where they happen, so the blocks around them are unknown. This adds what's needed to find a flag again and play it where it happened. A prediction line's worst tick now also says: - the tick's keys; - where the client said it ended (x, y, z); - the replay's velocity at the end of the tick, before an excuse brings it to the client's. ``` ... (1 tick; off +0.000 +0.173 -0.001, moved 0.281, air water sprinting, keys forward jump sprint, at 12.30 63.00 -5.50, velocity +0.000 +0.041 -0.250) ``` `anticheat.log` is the server owner's file, and the console's alerts are unchanged. `docs/anticheat.md` describes the new fields. Per-move cost: three fields copied into `Played` per tick played (the line is only formatted on a flag). ## Tests - `a_played_tick_tells_its_offset_and_state` checks the new format. The 16 other replay tests pass. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at db42d4441, 9 min 49 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +41 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 515 passed (2 min 39 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 7 s) | | tests: horizon-client | ✅ 1674 passed (5 min 7 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 34 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 22 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:22:40 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6543
No description provided.