Skip to content

Commit bef10ce

Browse files
tmoostingclaude
andcommitted
Docstrings: onlyworlds.com's wrong-PIN limit as it stands since 2026-11-21
Ten different wrong PINs on one key or account within fifteen minutes refuse every PIN there; the same wrong PIN never counts twice. No behaviour changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 43c5457 commit bef10ce

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The package version runs on its own semver; the schema it is generated from is `
44

55
## Unreleased
66

7+
- Docstrings describe onlyworlds.com's wrong-PIN limit as it stands since 2026-11-21: ten different wrong PINs on one key or account within fifteen minutes refuse every PIN there, and the same wrong PIN never counts twice. No behaviour changes: a `429` `rate_limited` is still never retried and still stops `push`.
8+
79
## 0.139.1 (2026-11-21)
810

911
- **`push` goes on past a refusal about one element.** A world's Charter and the elements it names now change only by the owner and co-builders (`403` `keeper_only`); a contributor's push that met one of them stopped every later patch, as it does for a refused key. `keeper_only`, `review_by_another` and `not_reader` now join `not_author`: that patch is failed and the run goes on. Any other `403`, and one whose code is new, still stops the run (`push.ELEMENT_403`).

‎src/onlyworlds/http.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
writes refuse one before sending, and strip any other ``known_of``;
1313
- lists are ``{data, has_more, next_cursor}``, continued with ``?cursor=``;
1414
- ``Idempotency-Key`` on POST and ``/bulk`` replays the first successful answer for 24 h;
15-
- 429 carries ``Retry-After``; on v2 its only 429 is ``rate_limited``, the failed-PIN
16-
throttle (10 failures lock the key for 15 minutes); under load keel answers 503 ``server_busy`` with
15+
- 429 carries ``Retry-After``: ``rate_limited`` is the wrong-PIN limit (ten different wrong PINs on
16+
one key or account within fifteen minutes refuse every PIN there, the right one included, for up
17+
to 900 seconds; the same wrong PIN never counts twice), ``too_many_requests`` the request budget,
18+
``quota_exceeded`` a daily cap; under load keel answers 503 ``server_busy`` with
1719
``Retry-After: 5`` (2026-09-28).
1820
1921
One difference from the TypeScript SDK, on purpose: this client retries 429, 5xx and
@@ -252,8 +254,9 @@ class RetryPolicy:
252254
Idempotency-Key is still running, which is what a retry after a timeout meets: the
253255
retry, same key and body, replays its answer once the first has finished.
254256
255-
Never a 429 with code ``rate_limited``: keel sends it for a wrong PIN, and each retry is
256-
one more failure toward locking the key. keel's 500 is an unhandled exception, almost
257+
Never a 429 with code ``rate_limited``: keel sends it once ten different wrong PINs have
258+
been tried on the key or account, and it refuses every PIN there, the right one included,
259+
for up to fifteen minutes, so a retry inside the run only waits. keel's 500 is an unhandled exception, almost
257260
always the same on every try, so it gets one retry, not the full budget.
258261
259262
Waits ``Retry-After`` when the server sends a valid one (whole seconds or an HTTP

‎src/onlyworlds/push.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
4848
A generic link's two halves (Pin's ``element_type`` / ``element_id``) go together when
4949
either changed: keel refuses a write that sets one half. The run stops at the first
50-
answer that refuses the key itself (``stops_run``): a wrong PIN repeated across a push
51-
locks the key for every tool that uses it.
50+
answer that refuses the key itself (``stops_run``): every later patch would get the same
51+
answer, and a key or account at keel's wrong-PIN limit refuses every tool that uses it.
5252
5353
A 202 is a patch held as a proposal (the world takes this AI seat's writes as
5454
proposals): the element did not change, so it is neither pushed nor failed. It is counted in

‎tests/test_push.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def pin(eid: str, et: str) -> dict[str, Any]:
247247
],
248248
)
249249
def test_a_refused_key_stops_the_run(tmp_path: Path, make_client: MakeClient, status: int, code: str) -> None:
250-
"""A wrong PIN on every patch would lock the key (10 failures, 15 minutes) for every tool that uses it."""
250+
"""A refused key refuses every later patch too: the run stops at the first."""
251251
chars = [wire_char(f"c0000000-0000-7000-8000-00000000000{i}", "A") for i in range(5)]
252252
edited = [{**c, "name": "B"} for c in chars]
253253
base, edit = folders(tmp_path, {"character": chars}, {"character": edited})

0 commit comments

Comments
 (0)