Skip to content

Commit be0a564

Browse files
ci: release (#161)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5920074 commit be0a564

4 files changed

Lines changed: 28 additions & 29 deletions

File tree

.changeset/firehose-relay-desync.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/lexicon-validation-parity.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/pds/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# @getcirrus/pds
22

3+
## 0.15.0
4+
5+
### Minor Changes
6+
7+
- [#160](https://github.com/ascorbic/cirrus/pull/160) [`a492bf7`](https://github.com/ascorbic/cirrus/commit/a492bf71e6c6e9c174617a98931ec005e07abbc8) Thanks [@ascorbic](https://github.com/ascorbic)! - Lexicon validation now matches the reference PDS more closely:
8+
- `createRecord`, `putRecord`, and `applyWrites` honor the `validate` flag from the request body. `true` requires a known schema, `false` skips schema validation, `undefined` validates known schemas optimistically.
9+
- Responses include `validationStatus` (`"valid"` for known, `"unknown"` for unknown collections; omitted when `validate: false`). Per-write `validationStatus` is returned in `applyWrites` results.
10+
- The record's `$type` is filled in from `collection` when missing and rejected on mismatch.
11+
- Generic record-key shape (`isRecordKey`) is enforced for any provided rkey, regardless of `validate` flag — closes a hole where empty-string and path-traversal-style rkeys could reach the repo.
12+
- Schema-specific record keys are validated against the schema's `keySchema` for known collections (e.g. `app.bsky.feed.post` requires a TID, `app.bsky.actor.profile` requires `self`).
13+
- Legacy `{ cid, mimeType }` blob refs are rejected.
14+
- Bundled schema set broadened to include `com.atproto.lexicon.schema`, `app.bsky.actor.status`, `app.bsky.notification.declaration`, and `chat.bsky.actor.declaration`.
15+
- The Durable Object is now the authoritative rkey allocator: when the client doesn't supply an rkey, the worker validates against a candidate (so restrictive `keySchema`s still reject early) and the DO picks the final rkey against its MST state, with a small retry loop to defeat any worker-isolate clockid collisions.
16+
- Client-supplied rkey collisions return `409 RecordAlreadyExists` instead of a generic 500.
17+
- Intra-batch duplicate rkeys in `applyWrites` return `400 InvalidRequest` (distinguished from the 409 above).
18+
- Missing rkey for `applyWrites#update`/`#delete` returns `400 InvalidRequest`.
19+
- Non-boolean `validate` flag values return `400 InvalidRequest`.
20+
- Non-string `rkey` values (including `null`) return `400 InvalidRequest`.
21+
22+
### Patch Changes
23+
24+
- [#162](https://github.com/ascorbic/cirrus/pull/162) [`5920074`](https://github.com/ascorbic/cirrus/commit/5920074d3d1b12935c9e6ef014e422b3e2e503ec) Thanks [@ascorbic](https://github.com/ascorbic)! - Fix relay desync after a failed write (e.g. an image post that errors mid-flight).
25+
26+
`applyWrites` was assigning the new `Repo` to in-memory state before sequencing the firehose event. If anything threw between then and `sequenceCommit` succeeding, Cloudflare rolled back the SQLite writes but the in-memory `Repo` stayed advanced. The next successful write then emitted a firehose commit whose `since` rev the relay had never seen, and the relay marked the repo desynced — requiring a manual `requestCrawl` to recover.
27+
28+
`this.repo` is now only assigned after the sequence + broadcast succeed, and any failure in that window invalidates the in-memory cache so the next access reloads from storage.
29+
330
## 0.14.0
431

532
### Minor Changes

packages/pds/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@getcirrus/pds",
3-
"version": "0.14.0",
3+
"version": "0.15.0",
44
"description": "Cirrus – A single-user AT Protocol PDS on Cloudflare Workers",
55
"type": "module",
66
"main": "dist/index.js",

0 commit comments

Comments
 (0)