Skip to content

Add client action local admission errors#115

Merged
ogyrec-o merged 1 commit into
mainfrom
api/client-action-local-admission-errors
May 25, 2026
Merged

Add client action local admission errors#115
ogyrec-o merged 1 commit into
mainfrom
api/client-action-local-admission-errors

Conversation

@ogyrec-o

Copy link
Copy Markdown
Member

Summary

Adds explicit local client-action admission error variants.

These variants let the engine reject rapid/conflicting owner prediction requests before they become pending network commands, without abusing TooManyPending or stringly-typed Other errors.

New local admission variants:

  • LocalPredictionNoop
  • LocalPredictionConflict
  • LocalPredictionBacklog { pending, limit }

These are local/engine-side submit errors, not server ClientActionRejectReasons.

Why

freven-engine#348 needs bounded local admission for rapid mixed break/place prediction. The engine should be able to distinguish:

  • hard pending queue exhaustion
  • predicted edits that would not change the presented/effective client world
  • predicted edits that conflict with already in-flight owner prediction
  • interactive predicted-edit backlog pressure

ClientActionSubmitError is already #[non_exhaustive], so adding variants preserves the intended SDK evolution boundary.

Validation

  • cargo +stable fmt --all
  • cargo +stable fmt --all -- --check
  • cargo +stable test --locked --workspace
  • cargo +stable clippy --locked --workspace --all-targets -- -D warnings
  • git --no-pager diff --check

Related:

  • freven-engine#348

@ogyrec-o ogyrec-o self-assigned this May 25, 2026
@ogyrec-o ogyrec-o merged commit 5e13f8d into main May 25, 2026
1 check passed
@ogyrec-o ogyrec-o deleted the api/client-action-local-admission-errors branch May 25, 2026 10:13
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