[81] Rested XP and offline rest-state parity#86
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 836b63d2e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review\n\nPushed review fixes in 11f09ac. Addressed logout_time=0 accrual, restoring saved logout resting flag, tavern triggers outside the teleport store gate, and rested-XP spend on victim XP grants. The rested XP cap remains next_level_xp * 1.5 / 2 because this matches /home/server/woltk-trinity-legacy/src/server/game/Entities/Player/RestMgr.cpp::SetRestBonus. |
|
QA validation checklist:
Note: this PR still needs the current-head Codex reviewer verdict before it is merge-ready. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 11f09ac8a0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Pushed b77a6cd to address the four actionable comments: rest-state sync now runs after login player setup, tavern area triggers require the authoritative trigger and position validation before setting rest, LogXPGain now sends base XP in original and rested-total XP in amount, and city rest is gated by linked-chat plus non-hostile/sanctuary area flags. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b77a6cd62b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review fixes pushed in f714328.\n\nAddressed current Codex feedback:\n- CMSG_AREA_TRIGGER now validates against AreaTrigger.db2 before tavern/teleport handling; tavern triggers no longer depend on the teleport-only store.\n- Logout-rest restore no longer synthesizes REST_FLAG_IN_TAVERN; it uses a session-local restored bit and clears on authoritative area/zone/tavern updates.\n- Resting flag UpdateObject preserves current canonical player flags and only toggles PLAYER_FLAGS_RESTING.\n- LogXPGain fields restored to C++ order: Original=xp+bonus, Amount=xp.\n- Rest bonus consumption now flushes RestInfo and persists rest state after async XP gain.\n\nValidated locally:\n- PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world area_trigger_tavern --lib\n- PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world load_resting_logout_state_restores_current_rest_flag_like_cpp --lib\n- PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world give_xp_runtime_ --lib\n- PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world update_zone_linked_chat_sets_city_rest_only_when_not_hostile_like_cpp --lib\n- PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo test -p wow-world rested_xp --lib\n- cargo fmt --all -- --check\n- git diff --check\n- PROTOC=/home/cdmonio/.local/protoc/bin/protoc cargo check -p world-server\n\n@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7143283f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Pushed
I did not change leave-packet area-trigger validation: local C++ Validation:
The rested cap remains |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e092b0ff66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Updated in 1d7517c for the current Codex review:
I intentionally kept these as-is after checking the local C++ source:
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d7517cc15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Updated in 86df215 for the latest Codex review:
Validation: @codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86df215bc6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
86df215 to
18962c3
Compare
|
Updated in
Validation after rebasing onto current
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 18962c3af4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed the latest Codex review follow-ups in 40870ed:
Validation:
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
40870ed to
5ec8a50
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4464f75cd1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2d77be5347
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Final review target: The final review series hardens executable/capture provenance, makes semantic accepted-baseline signatures collision-safe, pins the physical AreaTable FactionGroupMask mapping, normalizes zero-integer rested awards like Local current-HEAD gate: full CI-equivalent checks passed; |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closes #81
Summary
SMSG_LOG_XP_GAINlike C++, including the active realm in creature GUIDs and semantic comparison that normalizes only the nonzero runtime counter.PlayerScript::OnGiveXPdispatch at the C++ position: initial guards precede it, max-level/RAF/rest processing follow it, and a hook changing XP to zero still reachesRestMgr::GetRestBonusFor(0).world-serverandwow-test-bot.Final validation
Final HEAD:
5d5741c16d2b0086a9572f232bc0dd86a984fea1· Rust1.88.0· protoc28.3wow-data569,wow-packet706,wow-map680,wow-world2,859; all passed.capture-diff: 57 passed, including a clean committed rested-XP golden and collision tests for equal-length semantic regressions.world-server/bnet-serverchecks and builds, format, diff checks, actionlint/wrapper checks, and local Codex review: passed.5d5741c16d; all review threads resolved.Reproducible artifacts
GitHub run 29627836630 built two independent replicas, verified exact checkout provenance, required byte-identical A/B binaries, and published one verified artifact:
5d5741c16d2b0086a9572f232bc0dd86a984fea1.world-serverSHA-256:1bc782c1c4767e0e9aac3e7fb77e9384019da34edaab71fec561af99a44f3425.wow-test-botSHA-256:87ca9d97e56f30ea2146a290102400bf8b082295477a132ece40e2571c91a1d8.Only the final 32 MB verified artifact was downloaded locally; the two replica artifacts remained in GitHub.
Final live bot QA
The complete disposable workflow ran against the verified final binaries:
14.880172; resting60.000694.15274, persistent spawn54931, map530, live counter38.50, original100, reason Kill, group bonus1.0.0 -> 100; rest bonus300 -> 250.0c12999fbb155be5957f63636e5813c93f32a6624cb03bd349da3fb79130f1af.0bf8b1af06aa7f0468c299ed9339ec0ce09692eb3caac8675a1057ffa21a96bb.Capture evidence
977f4634c3a75865922537ec2c8c0d51ccee75631d8cdea3228f70c206552892.620285a90d0a36583de80bf9b72409e7960cf398b8deb08972b1bf4b2dff7233(raw capture remains gitignored).Honest boundaries
OnGiveXPcontract used by both C++ trees. The configurablexp_boost_PlayerScriptcontent (XP.Boost.Daymask/XP.Boost.Rate) remains a separate unported script/config gap.is_logout_restingonly as an offline-rate selector and do not reconstruct a tavern trigger ID/timer on login. Rust intentionally preserves that parity boundary; changing the shared legacy behavior needs a real tavern-relog capture and a dedicated defect fix.#PLAYER.12remains open for full per-Player RestMgr/Player::Update ownership, honor rest, a captured nested RestInfo wire, and remaining runtime integration.SMSG_LOGOUT_COMPLETEon instance instead of the C++ realm socket.