chore: version packages - #208
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@haverstack/adapter-api@0.13.0
Minor Changes
#207
7db6eafThanks @cuibonobo! - Relationship associations carry a discriminatedtargetinstead of a barerecordIdA relationship's target now names which identifier space its value belongs to:
{ scope: 'record', recordId, stackUrl? }for a Record here or in another stack,{ scope: 'entity', entityId }for a DID, and{ scope: 'external', ns, id }foranything outside the stack — an ATProto post, an ActivityPub actor, an email address,
a URL. Core expresses the reference and never dereferences it, so no protocol is
privileged.
The
entityarm closes a gap in the identity model rather than only enabling externalreferences: group rosters stored member DIDs in a field typed
RecordId, and thepermission path compared the two as plain strings. A roster entry carrying a
recordtarget now confers nothing, even when its value equals a member's DID.
RecordFilter.relatedTomoves with it. It names a label, a target, or both, and eachis a pattern: a bare
labelmatches every target under it, and an external target withno
idmatches a whole namespace. Arecordtarget with nostackUrlmatches onlylocal targets — absence names this stack rather than acting as a wildcard. Label-only
and namespace-wide queries were not expressible before. "Carries any relationship at
all" is deliberately not expressible, in line with
tagsandhasAttachment, whichhave no match-any form either.
Reference-creation gating now applies only to a relationship naming a Record in this
stack; the other arms name nothing core can resolve, so there is no access for the
gate to protect. The SQLite association table gains
related_scope,related_nsandrelated_stackcolumns, all part of the primary key — so two copies of one record ontwo networks are two associations rather than a silent no-op. Existing stack files
predate those columns and must be recreated.
Over the wire, the relationship filter's scope is implied by which parameters appear
(
relatedTo/relatedToStack,relatedToEntity, orrelatedToNs/relatedToId), anda request mixing scopes is rejected with 400. At least one is always present, so the
filter cannot encode to an empty query string and widen the query it meant to narrow.
A target names exactly one thing, exactly one way, and both halves are enforced at
runtime rather than only by the type — a target reaching a server in a request body,
or a filter decoded from query parameters, is a plain object the type never saw. A
scopeoutside the three, or an empty string where a target names something, isrejected with
StackValidationError; arelatedTonaming neither a label nor a targetis rejected with
StackQueryErrorinstead of matching every Record carrying arelationship. This stack is named by omitting
stackUrl, never by sending an emptyone: storage, association identity and the filter all read absent and empty as this
stack, and reference-creation gating now reads them that way too, so both spellings of
a local Record require read access to it.
Patch Changes
7db6eaf]:@haverstack/adapter-local@0.13.0
Minor Changes
@haverstack/blob-adapter-disk,@haverstack/core,@haverstack/record-adapter-sqlite.Patch Changes
d69e53b,7db6eaf]:@haverstack/blob-adapter-disk@0.12.0
Minor Changes
@haverstack/core.Patch Changes
7db6eaf]:@haverstack/commons@0.6.0
Minor Changes
@haverstack/core.Patch Changes
7db6eaf]:@haverstack/conformance-fixtures@0.7.0
Minor Changes
#207
7db6eafThanks @cuibonobo! - Relationship associations carry a discriminatedtargetinstead of a barerecordIdA relationship's target now names which identifier space its value belongs to:
{ scope: 'record', recordId, stackUrl? }for a Record here or in another stack,{ scope: 'entity', entityId }for a DID, and{ scope: 'external', ns, id }foranything outside the stack — an ATProto post, an ActivityPub actor, an email address,
a URL. Core expresses the reference and never dereferences it, so no protocol is
privileged.
The
entityarm closes a gap in the identity model rather than only enabling externalreferences: group rosters stored member DIDs in a field typed
RecordId, and thepermission path compared the two as plain strings. A roster entry carrying a
recordtarget now confers nothing, even when its value equals a member's DID.
RecordFilter.relatedTomoves with it. It names a label, a target, or both, and eachis a pattern: a bare
labelmatches every target under it, and an external target withno
idmatches a whole namespace. Arecordtarget with nostackUrlmatches onlylocal targets — absence names this stack rather than acting as a wildcard. Label-only
and namespace-wide queries were not expressible before. "Carries any relationship at
all" is deliberately not expressible, in line with
tagsandhasAttachment, whichhave no match-any form either.
Reference-creation gating now applies only to a relationship naming a Record in this
stack; the other arms name nothing core can resolve, so there is no access for the
gate to protect. The SQLite association table gains
related_scope,related_nsandrelated_stackcolumns, all part of the primary key — so two copies of one record ontwo networks are two associations rather than a silent no-op. Existing stack files
predate those columns and must be recreated.
Over the wire, the relationship filter's scope is implied by which parameters appear
(
relatedTo/relatedToStack,relatedToEntity, orrelatedToNs/relatedToId), anda request mixing scopes is rejected with 400. At least one is always present, so the
filter cannot encode to an empty query string and widen the query it meant to narrow.
A target names exactly one thing, exactly one way, and both halves are enforced at
runtime rather than only by the type — a target reaching a server in a request body,
or a filter decoded from query parameters, is a plain object the type never saw. A
scopeoutside the three, or an empty string where a target names something, isrejected with
StackValidationError; arelatedTonaming neither a label nor a targetis rejected with
StackQueryErrorinstead of matching every Record carrying arelationship. This stack is named by omitting
stackUrl, never by sending an emptyone: storage, association identity and the filter all read absent and empty as this
stack, and reference-creation gating now reads them that way too, so both spellings of
a local Record require read access to it.
Patch Changes
@haverstack/core@0.14.0
Minor Changes
#207
7db6eafThanks @cuibonobo! - Relationship associations carry a discriminatedtargetinstead of a barerecordIdA relationship's target now names which identifier space its value belongs to:
{ scope: 'record', recordId, stackUrl? }for a Record here or in another stack,{ scope: 'entity', entityId }for a DID, and{ scope: 'external', ns, id }foranything outside the stack — an ATProto post, an ActivityPub actor, an email address,
a URL. Core expresses the reference and never dereferences it, so no protocol is
privileged.
The
entityarm closes a gap in the identity model rather than only enabling externalreferences: group rosters stored member DIDs in a field typed
RecordId, and thepermission path compared the two as plain strings. A roster entry carrying a
recordtarget now confers nothing, even when its value equals a member's DID.
RecordFilter.relatedTomoves with it. It names a label, a target, or both, and eachis a pattern: a bare
labelmatches every target under it, and an external target withno
idmatches a whole namespace. Arecordtarget with nostackUrlmatches onlylocal targets — absence names this stack rather than acting as a wildcard. Label-only
and namespace-wide queries were not expressible before. "Carries any relationship at
all" is deliberately not expressible, in line with
tagsandhasAttachment, whichhave no match-any form either.
Reference-creation gating now applies only to a relationship naming a Record in this
stack; the other arms name nothing core can resolve, so there is no access for the
gate to protect. The SQLite association table gains
related_scope,related_nsandrelated_stackcolumns, all part of the primary key — so two copies of one record ontwo networks are two associations rather than a silent no-op. Existing stack files
predate those columns and must be recreated.
Over the wire, the relationship filter's scope is implied by which parameters appear
(
relatedTo/relatedToStack,relatedToEntity, orrelatedToNs/relatedToId), anda request mixing scopes is rejected with 400. At least one is always present, so the
filter cannot encode to an empty query string and widen the query it meant to narrow.
A target names exactly one thing, exactly one way, and both halves are enforced at
runtime rather than only by the type — a target reaching a server in a request body,
or a filter decoded from query parameters, is a plain object the type never saw. A
scopeoutside the three, or an empty string where a target names something, isrejected with
StackValidationError; arelatedTonaming neither a label nor a targetis rejected with
StackQueryErrorinstead of matching every Record carrying arelationship. This stack is named by omitting
stackUrl, never by sending an emptyone: storage, association identity and the filter all read absent and empty as this
stack, and reference-creation gating now reads them that way too, so both spellings of
a local Record require read access to it.
@haverstack/record-adapter-sqlite@0.6.0
Minor Changes
#207
7db6eafThanks @cuibonobo! - Relationship associations carry a discriminatedtargetinstead of a barerecordIdA relationship's target now names which identifier space its value belongs to:
{ scope: 'record', recordId, stackUrl? }for a Record here or in another stack,{ scope: 'entity', entityId }for a DID, and{ scope: 'external', ns, id }foranything outside the stack — an ATProto post, an ActivityPub actor, an email address,
a URL. Core expresses the reference and never dereferences it, so no protocol is
privileged.
The
entityarm closes a gap in the identity model rather than only enabling externalreferences: group rosters stored member DIDs in a field typed
RecordId, and thepermission path compared the two as plain strings. A roster entry carrying a
recordtarget now confers nothing, even when its value equals a member's DID.
RecordFilter.relatedTomoves with it. It names a label, a target, or both, and eachis a pattern: a bare
labelmatches every target under it, and an external target withno
idmatches a whole namespace. Arecordtarget with nostackUrlmatches onlylocal targets — absence names this stack rather than acting as a wildcard. Label-only
and namespace-wide queries were not expressible before. "Carries any relationship at
all" is deliberately not expressible, in line with
tagsandhasAttachment, whichhave no match-any form either.
Reference-creation gating now applies only to a relationship naming a Record in this
stack; the other arms name nothing core can resolve, so there is no access for the
gate to protect. The SQLite association table gains
related_scope,related_nsandrelated_stackcolumns, all part of the primary key — so two copies of one record ontwo networks are two associations rather than a silent no-op. Existing stack files
predate those columns and must be recreated.
Over the wire, the relationship filter's scope is implied by which parameters appear
(
relatedTo/relatedToStack,relatedToEntity, orrelatedToNs/relatedToId), anda request mixing scopes is rejected with 400. At least one is always present, so the
filter cannot encode to an empty query string and widen the query it meant to narrow.
A target names exactly one thing, exactly one way, and both halves are enforced at
runtime rather than only by the type — a target reaching a server in a request body,
or a filter decoded from query parameters, is a plain object the type never saw. A
scopeoutside the three, or an empty string where a target names something, isrejected with
StackValidationError; arelatedTonaming neither a label nor a targetis rejected with
StackQueryErrorinstead of matching every Record carrying arelationship. This stack is named by omitting
stackUrl, never by sending an emptyone: storage, association identity and the filter all read absent and empty as this
stack, and reference-creation gating now reads them that way too, so both spellings of
a local Record require read access to it.
Patch Changes
#207
d69e53bThanks @cuibonobo! - Association query filters read through their indexestags,hasAttachment,attachmentFileIdandrelatedTowere correlatedEXISTSsubqueries, which make SQLite scan every record and probe the associationprimary key for each. Phrased as semi-joins, the planner drives from the association
side instead — reading the matching rows through
idx_assoc_kind_label,idx_assoc_kind_file_id,idx_file_refs_file_idoridx_assoc_related, then lookingup those records. The cost of an association filter becomes proportional to how many
records match it rather than to how many the stack holds, so the gain grows with
selectivity: the more precisely you ask, the more you save.
Measured on 20k records with 4k associations, none of the four now needs a full table
scan.
attachmentFileIdbenefits most, at 8.8ms to 0.14ms, because SQLite resolvesits two-sided condition as a multi-index OR across both indexes rather than scanning
once and probing twice.
Results are unchanged; this is the same set of records, found a different way.
Updated dependencies [
7db6eaf]:@haverstack/wire-types@0.13.0
Minor Changes
@haverstack/core.Patch Changes
7db6eaf]: