Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .changeset/feed-prune-skip-idle-ticks.md

This file was deleted.

24 changes: 0 additions & 24 deletions .changeset/fts-nsid-keyed-collections.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/persist-cursor-before-identity-refresh.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/single-jetstream-no-cursor-rollback.md

This file was deleted.

43 changes: 43 additions & 0 deletions packages/contrail-appview/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# @atmo-dev/contrail-appview

## 0.12.1

### Patch Changes

- 833a659: Stop running the `feed_items` prune sweep on every ingest tick.

A feed only exceeds its cap right after a feed-mutating record, so the per-tick sweep was a no-op on the vast majority of ticks yet still issued a cutoff `DELETE` per actor (~98% of all D1 queries on one deployment). It now sweeps only when a feed-mutating collection was ingested, plus a recovery pass that becomes due ~6h after the previous one completed and then laps one slice per tick — including on idle persistent streams and the `notifyOfUpdate` path. New `getFeedMutatingNsids(config)` derives the gating set. See `docs/04-feeds.md` for sweep timing (and why the full-pass cadence is interval + lap time, not a hard 6h) and the fan-out promptness trade-off.

- 74a2d3d: Make NSID-keyed collections work through normal ingestion, not just FTS.

When a collection is keyed directly by its NSID (no short alias, `collection`
field omitted), the value defaulted to `undefined` everywhere it was read. The
records insert and FTS sync were patched via `resolveCollectionKey`, but the
real ingestion entry points still skipped these collections: `getCollectionNsids`
/ `getDiscoverableNsids` / `getDependentNsids` produced `undefined` NSIDs (so
Jetstream never subscribed and backfill never ran), `shortNameForNsid` returned
undefined (so `notify` rejected the URI as "collection not tracked"), and
`validateConfig` rejected the config outright (missing `collection`, dotted key
failing short-name validation).

`CollectionConfig.collection` is now optional. `resolveConfig` normalizes an
omitted `collection` to the map key, `validateConfig` accepts NSID-keyed entries,
and every collection-list / lookup helper resolves the NSID as `collection ?? key`
so the behavior is correct on both raw and resolved configs.
</content>

- 9e01ada: Persist the jetstream ingest cursor before the identity-refresh tail in `runIngestCycle`.

`saveCursor` previously ran after `refreshStaleIdentities`, whose per-DID network calls can run long. If the ingest isolate was aborted (e.g. a scheduled-invocation deadline) before the save, the cursor never advanced and the next cycle re-drained the same jetstream window indefinitely. Records are durably applied before this point, so the cursor is now saved first; identity refresh is idempotent and staleness-driven, so deferring it past the save is safe.

- 9894787: Stop re-ingesting the last 10s on every cron cycle for single-instance jetstream configs.

`@atcute/jetstream` rolls the cursor back 10s on the first connect when given an array `url`, to absorb clock skew across a pool of interchangeable instances. Contrail's cron ingestion rebuilds the subscription every cycle, so for a single-instance config that once-per-session rollback fired every cycle and redundantly re-delivered the last 10s of events. A new `jetstreamUrlOption` helper hands a one-element config to `@atcute` as a string (one fixed instance, no skew, no rollback) while leaving real multi-instance pools as an array so their cross-instance rollback is preserved. Applied at both subscription construction sites (cron `ingestEvents` and the persistent daemon).

The per-cycle reconnect log is now accurate for single-instance configs: a reconnect to one fixed instance no longer claims to "pick a URL at random and roll the cursor back 10s" (it can't). The warning now fires only for multi-instance pools and reports the actual `rolled_back` value; single-instance reconnects log at info level confirming no rollback.

- Updated dependencies [833a659]
- Updated dependencies [74a2d3d]
- Updated dependencies [9894787]
- @atmo-dev/contrail-base@0.12.1
- @atmo-dev/contrail-record-host@0.12.1
- @atmo-dev/contrail-authority@0.12.1

## 0.12.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contrail-appview/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail-appview",
"version": "0.12.0",
"version": "0.12.1",
"description": "Public-records appview for contrail — jetstream ingestion, backfill, query layer, feeds, labels, profiles, per-collection XRPC routes.",
"type": "module",
"sideEffects": false,
Expand Down
9 changes: 9 additions & 0 deletions packages/contrail-authority/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @atmo-dev/contrail-authority

## 0.12.1

### Patch Changes

- Updated dependencies [833a659]
- Updated dependencies [74a2d3d]
- Updated dependencies [9894787]
- @atmo-dev/contrail-base@0.12.1

## 0.12.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contrail-authority/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail-authority",
"version": "0.12.0",
"version": "0.12.1",
"description": "Default space-authority implementation for contrail — member list, invites, app policy, credential issuance. Contrail's binary-membership ACL flavor; for ladder-style access levels see @atmo-dev/contrail-community.",
"type": "module",
"sideEffects": false,
Expand Down
32 changes: 32 additions & 0 deletions packages/contrail-base/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# @atmo-dev/contrail-base

## 0.12.1

### Patch Changes

- 833a659: Stop running the `feed_items` prune sweep on every ingest tick.

A feed only exceeds its cap right after a feed-mutating record, so the per-tick sweep was a no-op on the vast majority of ticks yet still issued a cutoff `DELETE` per actor (~98% of all D1 queries on one deployment). It now sweeps only when a feed-mutating collection was ingested, plus a recovery pass that becomes due ~6h after the previous one completed and then laps one slice per tick — including on idle persistent streams and the `notifyOfUpdate` path. New `getFeedMutatingNsids(config)` derives the gating set. See `docs/04-feeds.md` for sweep timing (and why the full-pass cadence is interval + lap time, not a hard 6h) and the fan-out promptness trade-off.

- 74a2d3d: Make NSID-keyed collections work through normal ingestion, not just FTS.

When a collection is keyed directly by its NSID (no short alias, `collection`
field omitted), the value defaulted to `undefined` everywhere it was read. The
records insert and FTS sync were patched via `resolveCollectionKey`, but the
real ingestion entry points still skipped these collections: `getCollectionNsids`
/ `getDiscoverableNsids` / `getDependentNsids` produced `undefined` NSIDs (so
Jetstream never subscribed and backfill never ran), `shortNameForNsid` returned
undefined (so `notify` rejected the URI as "collection not tracked"), and
`validateConfig` rejected the config outright (missing `collection`, dotted key
failing short-name validation).

`CollectionConfig.collection` is now optional. `resolveConfig` normalizes an
omitted `collection` to the map key, `validateConfig` accepts NSID-keyed entries,
and every collection-list / lookup helper resolves the NSID as `collection ?? key`
so the behavior is correct on both raw and resolved configs.
</content>

- 9894787: Stop re-ingesting the last 10s on every cron cycle for single-instance jetstream configs.

`@atcute/jetstream` rolls the cursor back 10s on the first connect when given an array `url`, to absorb clock skew across a pool of interchangeable instances. Contrail's cron ingestion rebuilds the subscription every cycle, so for a single-instance config that once-per-session rollback fired every cycle and redundantly re-delivered the last 10s of events. A new `jetstreamUrlOption` helper hands a one-element config to `@atcute` as a string (one fixed instance, no skew, no rollback) while leaving real multi-instance pools as an array so their cross-instance rollback is preserved. Applied at both subscription construction sites (cron `ingestEvents` and the persistent daemon).

The per-cycle reconnect log is now accurate for single-instance configs: a reconnect to one fixed instance no longer claims to "pick a URL at random and roll the cursor back 10s" (it can't). The warning now fires only for multi-instance pools and reports the actual `rolled_back` value; single-instance reconnects log at info level confirming no rollback.

## 0.12.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contrail-base/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail-base",
"version": "0.12.0",
"version": "0.12.1",
"description": "Shared infrastructure for the contrail family of packages — interfaces (SpaceAuthority, RecordHost, CommunityIntegration), credential primitives, binding resolvers, realtime infra, schema scaffolding. No routes, no tables of its own.",
"type": "module",
"sideEffects": false,
Expand Down
10 changes: 10 additions & 0 deletions packages/contrail-community/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @atmo-dev/contrail-community

## 0.12.1

### Patch Changes

- Updated dependencies [833a659]
- Updated dependencies [74a2d3d]
- Updated dependencies [9894787]
- @atmo-dev/contrail-base@0.12.1
- @atmo-dev/contrail@0.12.1

## 0.12.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contrail-community/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail-community",
"version": "0.12.0",
"version": "0.12.1",
"description": "Community module for contrail — community-owned spaces with tiered access levels (member → moderator → admin), invite tokens, DID provisioning, and the access-level reconciler that keeps spaces_members in sync.",
"type": "module",
"sideEffects": false,
Expand Down
27 changes: 27 additions & 0 deletions packages/contrail-record-host/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# @atmo-dev/contrail-record-host

## 0.12.1

### Patch Changes

- 74a2d3d: Make NSID-keyed collections work through normal ingestion, not just FTS.

When a collection is keyed directly by its NSID (no short alias, `collection`
field omitted), the value defaulted to `undefined` everywhere it was read. The
records insert and FTS sync were patched via `resolveCollectionKey`, but the
real ingestion entry points still skipped these collections: `getCollectionNsids`
/ `getDiscoverableNsids` / `getDependentNsids` produced `undefined` NSIDs (so
Jetstream never subscribed and backfill never ran), `shortNameForNsid` returned
undefined (so `notify` rejected the URI as "collection not tracked"), and
`validateConfig` rejected the config outright (missing `collection`, dotted key
failing short-name validation).

`CollectionConfig.collection` is now optional. `resolveConfig` normalizes an
omitted `collection` to the map key, `validateConfig` accepts NSID-keyed entries,
and every collection-list / lookup helper resolves the NSID as `collection ?? key`
so the behavior is correct on both raw and resolved configs.
</content>

- Updated dependencies [833a659]
- Updated dependencies [74a2d3d]
- Updated dependencies [9894787]
- @atmo-dev/contrail-base@0.12.1

## 0.12.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contrail-record-host/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail-record-host",
"version": "0.12.0",
"version": "0.12.1",
"description": "Default record-host implementation for contrail — stores records and blobs for permissioned spaces, enforces local enrollment as the host's consent layer.",
"type": "module",
"sideEffects": false,
Expand Down
13 changes: 13 additions & 0 deletions packages/contrail/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# @atmo-dev/contrail

## 0.12.1

### Patch Changes

- Updated dependencies [833a659]
- Updated dependencies [74a2d3d]
- Updated dependencies [9e01ada]
- Updated dependencies [9894787]
- @atmo-dev/contrail-appview@0.12.1
- @atmo-dev/contrail-base@0.12.1
- @atmo-dev/contrail-record-host@0.12.1
- @atmo-dev/contrail-authority@0.12.1

## 0.12.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contrail/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail",
"version": "0.12.0",
"version": "0.12.1",
"description": "Index AT Protocol records with typed XRPC endpoints. Cloudflare Workers + D1, SvelteKit, Node.js.",
"type": "module",
"sideEffects": false,
Expand Down
24 changes: 24 additions & 0 deletions packages/lexicons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @atmo-dev/contrail-lexicons

## 0.4.14

### Patch Changes

- 74a2d3d: Make NSID-keyed collections work through normal ingestion, not just FTS.

When a collection is keyed directly by its NSID (no short alias, `collection`
field omitted), the value defaulted to `undefined` everywhere it was read. The
records insert and FTS sync were patched via `resolveCollectionKey`, but the
real ingestion entry points still skipped these collections: `getCollectionNsids`
/ `getDiscoverableNsids` / `getDependentNsids` produced `undefined` NSIDs (so
Jetstream never subscribed and backfill never ran), `shortNameForNsid` returned
undefined (so `notify` rejected the URI as "collection not tracked"), and
`validateConfig` rejected the config outright (missing `collection`, dotted key
failing short-name validation).

`CollectionConfig.collection` is now optional. `resolveConfig` normalizes an
omitted `collection` to the map key, `validateConfig` accepts NSID-keyed entries,
and every collection-list / lookup helper resolves the NSID as `collection ?? key`
so the behavior is correct on both raw and resolved configs.
</content>

- @atmo-dev/contrail@0.12.1

## 0.4.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/lexicons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail-lexicons",
"version": "0.4.13",
"version": "0.4.14",
"description": "Generate atproto lexicon JSON (and optionally TypeScript types via @atcute/lex-cli) from a Contrail config.",
"type": "module",
"files": [
Expand Down
2 changes: 2 additions & 0 deletions packages/sync/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @atmo-dev/contrail-sync

## 0.12.1

## 0.12.0

## 0.11.0
Expand Down
2 changes: 1 addition & 1 deletion packages/sync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@atmo-dev/contrail-sync",
"version": "0.12.0",
"version": "0.12.1",
"description": "Client-side reactive watch-store over contrail's watchRecords endpoints. SSE + WebSocket transports, optimistic updates, optional IndexedDB cache.",
"type": "module",
"sideEffects": false,
Expand Down