Repository navigation
Data lake: named queries over synthetic datasets, refused before they run - #19
Merged
Merged
Conversation
… run query_datalake takes only a query name from the `datalake` catalog in policy.yaml (demo/datalake.py holds the synthetic datasets). Unknown queries, queries the role may not run, and queries whose result could not be sent on (model limit, or Jev's while the AI check is on) are refused before they run, with one neutral reason. A result's class comes from the query the gateway let through; a missing or different label withholds it. Lower-class views exist only as declared transformations (sector counts for the deal team, small groups dropped). tests/test_datalake.py; decisions.md D7. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Replaces #18 (closed when its base branch was deleted after #16 merged). The first demo from the plan: named queries, unauthorised datasets rejected before execution, labels verified before release, unknown classes blocked, neutral denials, lower-class views only through an explicit transformation.
What
query_datalaketakes only a query name fromdatalake.queriesinpolicy/policy.yaml. Synthetic datasets live indemo/datalake.py:fx_reference(public),client_positions(P2),deal_pipeline(DP30).access.datalakecontrol refuses a call before it runs if the query is unknown, the role may not run it, or its result could not be sent on (above the model's limit, or above Jev's while the AI check is on). Every refusal has the same reason, so it reveals nothing about which datasets exist, their class or who may see them.pipeline_by_sectorgives the deal team counts per sector (groups under 3 dropped) asinternal, never the deals. The public side gets no pipeline view at all, because even a count of pending deals is MNPI to them.query_datalakeis added to the onboarding demo tools and to the onboarding_analyst and mna_banker roles.Tests
tests/test_datalake.py(14 tests): refusals before execution, identical neutral reasons, the derived view leaks no deal and no small group, label mismatch / missing label / swapped query in history are withheld, live grant, bad catalog keeps the last good policy. Without the engine change 10 of 14 fail (the other 4 test the policy file and the demo lake). All committed tests pass.🤖 Generated with Claude Code