From 161653ce5566410d6d55cdaeb30dbacd22dc3c4e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 23:10:27 +0000 Subject: [PATCH] Version Packages --- .changeset/feed-prune-skip-idle-ticks.md | 8 ---- .changeset/fts-nsid-keyed-collections.md | 24 ----------- .../persist-cursor-before-identity-refresh.md | 7 --- .../single-jetstream-no-cursor-rollback.md | 10 ----- packages/contrail-appview/CHANGELOG.md | 43 +++++++++++++++++++ packages/contrail-appview/package.json | 2 +- packages/contrail-authority/CHANGELOG.md | 9 ++++ packages/contrail-authority/package.json | 2 +- packages/contrail-base/CHANGELOG.md | 32 ++++++++++++++ packages/contrail-base/package.json | 2 +- packages/contrail-community/CHANGELOG.md | 10 +++++ packages/contrail-community/package.json | 2 +- packages/contrail-record-host/CHANGELOG.md | 27 ++++++++++++ packages/contrail-record-host/package.json | 2 +- packages/contrail/CHANGELOG.md | 13 ++++++ packages/contrail/package.json | 2 +- packages/lexicons/CHANGELOG.md | 24 +++++++++++ packages/lexicons/package.json | 2 +- packages/sync/CHANGELOG.md | 2 + packages/sync/package.json | 2 +- 20 files changed, 168 insertions(+), 57 deletions(-) delete mode 100644 .changeset/feed-prune-skip-idle-ticks.md delete mode 100644 .changeset/fts-nsid-keyed-collections.md delete mode 100644 .changeset/persist-cursor-before-identity-refresh.md delete mode 100644 .changeset/single-jetstream-no-cursor-rollback.md diff --git a/.changeset/feed-prune-skip-idle-ticks.md b/.changeset/feed-prune-skip-idle-ticks.md deleted file mode 100644 index a34e5f2..0000000 --- a/.changeset/feed-prune-skip-idle-ticks.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@atmo-dev/contrail-appview": patch -"@atmo-dev/contrail-base": patch ---- - -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. diff --git a/.changeset/fts-nsid-keyed-collections.md b/.changeset/fts-nsid-keyed-collections.md deleted file mode 100644 index 283c751..0000000 --- a/.changeset/fts-nsid-keyed-collections.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@atmo-dev/contrail-base": patch -"@atmo-dev/contrail-appview": patch -"@atmo-dev/contrail-record-host": patch -"@atmo-dev/contrail-lexicons": patch ---- - -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. - diff --git a/.changeset/persist-cursor-before-identity-refresh.md b/.changeset/persist-cursor-before-identity-refresh.md deleted file mode 100644 index 6348578..0000000 --- a/.changeset/persist-cursor-before-identity-refresh.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@atmo-dev/contrail-appview": patch ---- - -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. diff --git a/.changeset/single-jetstream-no-cursor-rollback.md b/.changeset/single-jetstream-no-cursor-rollback.md deleted file mode 100644 index d1472c5..0000000 --- a/.changeset/single-jetstream-no-cursor-rollback.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@atmo-dev/contrail-base": patch -"@atmo-dev/contrail-appview": patch ---- - -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. diff --git a/packages/contrail-appview/CHANGELOG.md b/packages/contrail-appview/CHANGELOG.md index d1c6475..2258d4b 100644 --- a/packages/contrail-appview/CHANGELOG.md +++ b/packages/contrail-appview/CHANGELOG.md @@ -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. + + +- 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 diff --git a/packages/contrail-appview/package.json b/packages/contrail-appview/package.json index 905e442..105fb9a 100644 --- a/packages/contrail-appview/package.json +++ b/packages/contrail-appview/package.json @@ -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, diff --git a/packages/contrail-authority/CHANGELOG.md b/packages/contrail-authority/CHANGELOG.md index 472952d..b22d1c6 100644 --- a/packages/contrail-authority/CHANGELOG.md +++ b/packages/contrail-authority/CHANGELOG.md @@ -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 diff --git a/packages/contrail-authority/package.json b/packages/contrail-authority/package.json index 32dee72..e9b5f7a 100644 --- a/packages/contrail-authority/package.json +++ b/packages/contrail-authority/package.json @@ -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, diff --git a/packages/contrail-base/CHANGELOG.md b/packages/contrail-base/CHANGELOG.md index b8c316e..6f563b4 100644 --- a/packages/contrail-base/CHANGELOG.md +++ b/packages/contrail-base/CHANGELOG.md @@ -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. + + +- 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 diff --git a/packages/contrail-base/package.json b/packages/contrail-base/package.json index c2ae463..2bac115 100644 --- a/packages/contrail-base/package.json +++ b/packages/contrail-base/package.json @@ -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, diff --git a/packages/contrail-community/CHANGELOG.md b/packages/contrail-community/CHANGELOG.md index 5134925..b55968d 100644 --- a/packages/contrail-community/CHANGELOG.md +++ b/packages/contrail-community/CHANGELOG.md @@ -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 diff --git a/packages/contrail-community/package.json b/packages/contrail-community/package.json index 7a57fbb..2e5e287 100644 --- a/packages/contrail-community/package.json +++ b/packages/contrail-community/package.json @@ -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, diff --git a/packages/contrail-record-host/CHANGELOG.md b/packages/contrail-record-host/CHANGELOG.md index 1d439c6..19527d0 100644 --- a/packages/contrail-record-host/CHANGELOG.md +++ b/packages/contrail-record-host/CHANGELOG.md @@ -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. + + +- Updated dependencies [833a659] +- Updated dependencies [74a2d3d] +- Updated dependencies [9894787] + - @atmo-dev/contrail-base@0.12.1 + ## 0.12.0 ### Patch Changes diff --git a/packages/contrail-record-host/package.json b/packages/contrail-record-host/package.json index db1bb77..22712c5 100644 --- a/packages/contrail-record-host/package.json +++ b/packages/contrail-record-host/package.json @@ -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, diff --git a/packages/contrail/CHANGELOG.md b/packages/contrail/CHANGELOG.md index 119c091..f1d8879 100644 --- a/packages/contrail/CHANGELOG.md +++ b/packages/contrail/CHANGELOG.md @@ -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 diff --git a/packages/contrail/package.json b/packages/contrail/package.json index f7e9fcf..f5097d3 100644 --- a/packages/contrail/package.json +++ b/packages/contrail/package.json @@ -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, diff --git a/packages/lexicons/CHANGELOG.md b/packages/lexicons/CHANGELOG.md index 58daf67..c6d5003 100644 --- a/packages/lexicons/CHANGELOG.md +++ b/packages/lexicons/CHANGELOG.md @@ -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. + + + - @atmo-dev/contrail@0.12.1 + ## 0.4.13 ### Patch Changes diff --git a/packages/lexicons/package.json b/packages/lexicons/package.json index a885acf..02bdf2c 100644 --- a/packages/lexicons/package.json +++ b/packages/lexicons/package.json @@ -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": [ diff --git a/packages/sync/CHANGELOG.md b/packages/sync/CHANGELOG.md index d7ac447..617787c 100644 --- a/packages/sync/CHANGELOG.md +++ b/packages/sync/CHANGELOG.md @@ -1,5 +1,7 @@ # @atmo-dev/contrail-sync +## 0.12.1 + ## 0.12.0 ## 0.11.0 diff --git a/packages/sync/package.json b/packages/sync/package.json index fbcc729..5631640 100644 --- a/packages/sync/package.json +++ b/packages/sync/package.json @@ -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,