Skip to content

Enforce character update version authority - #197

Merged
adrev merged 1 commit into
mainfrom
codex/character-update-version-contract
Aug 5, 2026
Merged

Enforce character update version authority#197
adrev merged 1 commit into
mainfrom
codex/character-update-version-contract

Conversation

@adrev

@adrev adrev commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • require optimistic versions for the shared character-update contract and reject versionless legacy socket writes with authoritative conflict state
  • guard offline REST sheet writes by characters.version, return the committed row, and return HTTP 409 plus latest state on conflicts
  • align lobby/offline sheet and spell-slot persistence with the same contract, restoring latest state after conflicts and refusing edits before version hydration
  • correct the unused API helper from unsupported PATCH to the guarded PUT route
  • add socket, REST, and client regressions for guarded success, stale/missing versions, and conflict restoration

Verification

  • npm test (145 files, 1791 tests)
  • npm run lint
  • npm run build
  • npm audit --audit-level=high (0 vulnerabilities)
  • git diff --check

@coderabbitai

coderabbitai Bot commented Aug 5, 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: 22 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: 5fcabb64-d38a-4417-a2c0-efbe62ed5183

📥 Commits

Reviewing files that changed from the base of the PR and between e7ad0d7 and a598cde.

📒 Files selected for processing (9)
  • client/src/services/api.ts
  • client/src/socket/emitters-offline.test.ts
  • client/src/socket/emitters.ts
  • server/src/__tests__/auth-boundaries.test.ts
  • server/src/__tests__/character-update-versioning.test.ts
  • server/src/routes/characters.ts
  • server/src/socket/characterEvents.ts
  • server/src/utils/validation.ts
  • shared/src/types/socket-events.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 merged commit aa4be2d into main Aug 5, 2026
2 checks passed
@adrev
adrev deleted the codex/character-update-version-contract branch August 5, 2026 14:21
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