Skip to content

Commit 7eb2ecf

Browse files
committed
test(client): ledger the nested-relation pin's producer reads in the census
The rest pin packages/rest/src/analytics-nested-relation-filter.test.ts calls the real AnalyticsService (the cube read) five times, to compare its answer for a nested-relation filter with the engine's. Those are producer reads, not SDK callers: one NOT_SDK ledger row, with the service-receiver count and the NOT_SDK total moved from 1 to 6, and the two-file set asserted. Claude-Session: https://claude.ai/code/session_01XY5uCwTjZj7884yYtyur4H Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1fdaff7 commit 7eb2ecf

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

‎packages/client/src/envelope-caller-census.test.ts‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,12 @@ const LEDGER: readonly LedgerRow[] = [
473473
method: 'analytics.query', receiver: 'service', count: 1, verdict: 'NOT_SDK',
474474
why: 'the real AnalyticsService, called to assert the SDK value equals what the producer returned',
475475
},
476+
// ── the nested-relation pin in `@objectstack/rest`: producer reads only ──
477+
{
478+
file: 'packages/rest/src/analytics-nested-relation-filter.test.ts',
479+
method: 'analytics.query', receiver: 'service', count: 5, verdict: 'NOT_SDK',
480+
why: 'the real AnalyticsService (the cube read), called to compare its answer for the nested-relation filter with the engine\'s',
481+
},
476482
{
477483
file: 'packages/client/src/analytics-automation-json-erasure.test.ts',
478484
method: 'analytics.meta', receiver: 'sdk', count: 2, verdict: 'PAYLOAD_DEPENDENT',
@@ -670,8 +676,11 @@ describe('#13079 §2 — positive controls on the matcher itself', () => {
670676
// method, so a literal-embedded site lands HERE first, as a phantom
671677
// producer call. That makes this the assertion most likely to break
672678
// for a reason that has nothing to do with receivers.
673-
expect(service.length, literalNote()).toBe(1);
674-
expect(service[0]?.file).toBe('packages/client/src/analytics-automation-json-erasure.test.ts');
679+
expect(service.length, literalNote()).toBe(6);
680+
expect([...new Set(service.map((s) => s.file))].sort()).toEqual([
681+
'packages/client/src/analytics-automation-json-erasure.test.ts',
682+
'packages/rest/src/analytics-nested-relation-filter.test.ts',
683+
]);
675684
});
676685
});
677686

@@ -716,10 +725,10 @@ describe('#13079 §3 — every call site is classified', () => {
716725
expect(production, literalNote()).toEqual([]);
717726
});
718727

719-
it('records the split: 18 payload pins, 10 result-insensitive, 1 not-SDK', () => {
728+
it('records the split: 18 payload pins, 10 result-insensitive, 6 not-SDK', () => {
720729
expect(verdictTotal('PAYLOAD_DEPENDENT')).toBe(18);
721730
expect(verdictTotal('RESULT_INSENSITIVE')).toBe(10);
722-
expect(verdictTotal('NOT_SDK')).toBe(1);
731+
expect(verdictTotal('NOT_SDK')).toBe(6);
723732
// The three above are LEDGER sums and cannot move on a census reading;
724733
// this one is census-derived, so it carries the note. [#13874]
725734
expect(sdkSites.length, literalNote()).toBe(28);

0 commit comments

Comments
 (0)