Skip to content

Commit 03ec77f

Browse files
fix: tighten metadata predicate backfill
1 parent ace5ba1 commit 03ec77f

5 files changed

Lines changed: 13 additions & 6 deletions

File tree

packages/predicates/src/generated/specs/brand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ export const brand = {
88
conjugates: false,
99
category: 'Identity/Classification',
1010
status: 'proposed',
11+
examples: ['(iPhone, brand, Apple)', '(AWS, brand, Amazon Web Services)'],
1112
} as const satisfies PredicateSpec;

packages/predicates/src/generated/specs/founded.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ export const founded = {
88
conjugates: false,
99
category: 'Affiliation/Membership',
1010
status: 'proposed',
11+
inversePredicate: 'founder',
1112
} as const satisfies PredicateSpec;

packages/predicates/src/generated/specs/founder.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export const founder = {
99
conjugates: false,
1010
category: 'Affiliation/Membership',
1111
status: 'proposed',
12+
inversePredicate: 'founded',
1213
} as const satisfies PredicateSpec;

packages/predicates/src/generated/specs/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export const provider = {
77
'The subject service, software, or creative work is provided by the object person or organization',
88
marketPattern: 'attributive',
99
conjugates: false,
10-
category: 'Metadata/Linking',
10+
category: 'Authorship/Contribution',
1111
status: 'proposed',
1212
} as const satisfies PredicateSpec;

packages/predicates/src/predicates.test.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ describe('@0xintuition/predicates registry', () => {
3333
expect(getPredicatesByCategory('Identity/Classification')).toHaveLength(5);
3434
expect(getPredicatesByCategory('Social/Reputation')).toHaveLength(12);
3535
expect(getPredicatesByCategory('Curation/Containment')).toHaveLength(17);
36-
expect(getPredicatesByCategory('Authorship/Contribution')).toHaveLength(14);
37-
expect(getPredicatesByCategory('Metadata/Linking')).toHaveLength(15);
36+
expect(getPredicatesByCategory('Authorship/Contribution')).toHaveLength(15);
37+
expect(getPredicatesByCategory('Metadata/Linking')).toHaveLength(14);
3838
expect(getPredicatesByCategory('Affiliation/Membership')).toHaveLength(14);
3939
expect(getPredicatesByCategory('Domain-Specific')).toHaveLength(6);
4040
expect(getPredicatesByCategory('Sentiment/Opinion')).toHaveLength(8);
@@ -126,6 +126,12 @@ describe('@0xintuition/predicates registry', () => {
126126
const followedBy = getPredicateRecord('followedBy');
127127
expect(followedBy?.isTransitive).toBe(true);
128128
expect(followedBy?.inversePredicate).toBe('preceded by');
129+
130+
const founder = getPredicateRecord('founder');
131+
expect(founder?.inversePredicate).toBe('founded');
132+
133+
const founded = getPredicateRecord('founded');
134+
expect(founded?.inversePredicate).toBe('founder');
129135
});
130136

131137
it('includes the first metadata predicate backfill tranche', () => {
@@ -228,9 +234,7 @@ describe('@0xintuition/predicates registry', () => {
228234
expect(identityPredicates).toHaveLength(5);
229235

230236
for (const predicate of identityPredicates) {
231-
if (predicate.status === 'enshrined') {
232-
expect(predicate.examples?.length ?? 0).toBeGreaterThan(0);
233-
}
237+
expect(predicate.examples?.length ?? 0).toBeGreaterThan(0);
234238
}
235239
});
236240

0 commit comments

Comments
 (0)