Skip to content

feat(sync): add ListBackend and its contract suite - #81

Merged
noctuum merged 1 commit into
mainfrom
feat/list-backend-contract
Oct 15, 2026
Merged

noctuum merged 1 commit into
mainfrom
feat/list-backend-contract

Conversation

@noctuum

@noctuum noctuum commented Oct 15, 2026

Copy link
Copy Markdown
Member

ListBackend reads an account's list and the entry for one work, and writes where the account stands on a work, adding the work to the list where it is not on it. A write is benshi_core::list::Write: status, progress and rewatches. It carries no score, so the list keeps the account's own. Every call carries the backend's deadline.

  • benshi_sync::Error has six variants: Timeout, Unreachable, Wait, Refused, NoWork and Unreadable. A message is a reason and names no backend.
  • benshi_sync::memory::Memory keeps a list and the works off it, and fails in any of five ways on request.
  • tests/contract holds the suite, in the shape of the PlayerWatcher suite. Memory passes it, and contract_rejects.rs has a backend for each clause that breaks that clause alone.

cargo test --workspace passes, 868 tests. The suite runs on a paused clock, so a deadline of 15 s costs no real time.

A write carries no score, so the list keeps the account's own.
@noctuum
noctuum merged commit 027a1f6 into main Oct 15, 2026
1 check passed
@noctuum
noctuum deleted the feat/list-backend-contract branch October 15, 2026 00:59
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