Skip to content

Commit 5ddea95

Browse files
committed
test(service-analytics): the request-scope observer sees a hidden cube omitted from discovery
query-dataset-request-scope.test.ts was written while nothing read public, so its observer baseline listed the public: false fixture in getMeta. With the visibility enforced, discovery omits it; the baseline and the header note now say so. The before/after equality still holds. Claude-Session: https://claude.ai/code/session_01QcAS3qiYYZNezaxZxaUdMV Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 036af03 commit 5ddea95

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎packages/services/service-analytics/src/__tests__/query-dataset-request-scope.test.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
* - The ADMITTED leg is the negative control a lazy fix loses: the request
2626
* must still be served, from ITS definition — the driver sees the request's
2727
* object, not the shared cube's.
28-
* - A `public: false` cube keeps its authored definition in the registry.
29-
* Nothing on this tree reads `public` yet, so "stays hidden from meta" is
30-
* not expressible here; what this pins is the precondition that leg needs:
31-
* the entry a visibility filter would read is still the author's.
28+
* - A `public: false` cube keeps its authored definition in the registry, and
29+
* stays hidden: `getMeta` omits it (`cube-visibility.ts`), so the observer's
30+
* discovery snapshot — taken before and after — never lists it, and the
31+
* entry the visibility filter reads is still the author's.
3232
* - CONTROL: a dataset registered at construction (`datasets`, the boot door)
3333
* still serves by name, and a request under its name leaves its compiled
3434
* scope — the definition-level `filter` the shared query applies — intact.
@@ -140,7 +140,8 @@ describe.each(STRATEGY_PATHS)('queryDataset leaves the shared registries alone
140140
it('observer baseline: the authored cube and the saved dataset serve by name, on their own objects', async () => {
141141
const h = makeService(capabilities);
142142
const { meta, driven } = await observe(h);
143-
expect(meta.map((c) => c.name).sort()).toEqual(['hidden_summary', 'open_summary', 'saved_summary']);
143+
// `hidden_summary` declares `public: false`, so discovery omits it.
144+
expect(meta.map((c) => c.name).sort()).toEqual(['open_summary', 'saved_summary']);
144145
expect(driven.map((c) => c.object)).toEqual(['open_obj', 'open_obj']);
145146
// The saved dataset's definition-level filter reaches the driver — the
146147
// compiled scope this card must leave in place.

0 commit comments

Comments
 (0)