Skip to content

Reconcile combat persistence after committed HP writes - #199

Merged
adrev merged 1 commit into
mainfrom
codex/combat-post-commit-reconcile
Aug 6, 2026
Merged

Reconcile combat persistence after committed HP writes#199
adrev merged 1 commit into
mainfrom
codex/combat-post-commit-reconcile

Conversation

@adrev

@adrev adrev commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What changed

  • treat a guarded character HP write as the commit point for character-backed combat actions
  • await auxiliary token-condition and combat-state persistence with Promise.allSettled
  • retry derived token, concentration, and combat-state rows once from current room state
  • keep pre-commit/version failures and characterless NPC persistence failures fail-closed
  • log permanent reconciliation failures without suppressing fanout for HP that already committed

Why

After character HP committed, a later token-condition or combat-state error previously rejected the socket action. The database HP had changed, but clients received no success fanout and appeared stale.

Validation

  • npm test on Node 24: 145 files, 1,798 tests passed
  • npm run lint on Node 24
  • npm run build on Node 24
  • npm audit --audit-level=high: 0 vulnerabilities

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@adrev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ffc31274-dcc5-49f5-bf7a-df0f518adfd1

📥 Commits

Reviewing files that changed from the base of the PR and between 3aeb82d and f6ad051.

📒 Files selected for processing (2)
  • server/src/__tests__/combat-bugfixes.test.ts
  • server/src/services/CombatService.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@adrev
adrev marked this pull request as ready for review August 6, 2026 07:50
@adrev

adrev commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@adrev
adrev merged commit d48b063 into main Aug 6, 2026
2 checks passed
@adrev
adrev deleted the codex/combat-post-commit-reconcile branch August 6, 2026 07:51
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