bricksentry 0.1.12__tar.gz → 0.1.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bricksentry-0.1.12 → bricksentry-0.1.14}/CHANGELOG.md +15 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/PKG-INFO +31 -4
- {bricksentry-0.1.12 → bricksentry-0.1.14}/README.md +30 -3
- bricksentry-0.1.14/examples/databricks/bricksentry_hr_walkthrough.ipynb +552 -0
- bricksentry-0.1.14/examples/databricks/bricksentry_hr_walkthrough.py +413 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/pyproject.toml +1 -1
- {bricksentry-0.1.12 → bricksentry-0.1.14}/scripts/build_notebook.py +1 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/__init__.py +1 -1
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/assess.py +18 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/backends/base.py +12 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/backends/databricks_backend.py +28 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/cli.py +61 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/config.py +9 -2
- bricksentry-0.1.14/src/bricksentry/history.py +183 -0
- bricksentry-0.1.14/src/bricksentry/job.py +184 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/lineage.py +10 -1
- bricksentry-0.1.14/templates/job-check/README.md +13 -0
- bricksentry-0.1.14/templates/job-check/template/{{.project_name}}/src/bricksentry_check.py +7 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_0112.py +15 -2
- bricksentry-0.1.14/tests/test_0114.py +357 -0
- bricksentry-0.1.14/tests/test_hr_notebook.py +188 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/.gitignore +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/CONTRIBUTING.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/LICENSE +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/SECURITY.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/action.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/deploy/databricks-app/README.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/databricks/bricksentry.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/databricks/bricksentry_check_my_table.ipynb +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/databricks/bricksentry_check_my_table.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/databricks/bricksentry_quickstart.ipynb +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/databricks/bricksentry_quickstart.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/databricks/github-workflow.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/databricks/policy.yml +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/examples/demo/agent_loop_demo.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/packages/bricksentry-mcp/LICENSE +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/packages/bricksentry-mcp/README.md +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/packages/bricksentry-mcp/src/bricksentry_mcp/__init__.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/__main__.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/agent_tools.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/backends/__init__.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/backends/duckdb_backend.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/changes.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/demo.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/diff.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/explain.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/github.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/mcp_server.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/measures.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/models.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/notify.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/policy.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/policy_templates.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/preview.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/py.typed +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/src/bricksentry/report.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/conftest.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_0110.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_018.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_019.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_assess_policy.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_check_notebook.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_databricks_and_uc.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_demo.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_diff.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_notebook.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_notify_templates.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_preview_agents.py +0 -0
- {bricksentry-0.1.12 → bricksentry-0.1.14}/tests/test_sample_guard_and_store.py +0 -0
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.14 (2026-11-11)
|
|
4
|
+
|
|
5
|
+
Zero-friction adoption: check every pipeline run without changing the pipeline.
|
|
6
|
+
|
|
7
|
+
- **`bricksentry check-last-change <table>`** checks a change that already landed, from the table's Delta history. It finds the newest data change (WRITE, MERGE, UPDATE, DELETE, COPY INTO, ...; OPTIMIZE and VACUUM are skipped), compares the version before with the version after (two shallow clones in `sandbox_schema`, dropped afterwards), runs lineage and policy, sends the alert, and prints the `RESTORE` that undoes it. `--version N` checks a specific version; `--since TIME` checks everything after that time as one change, e.g. all a job run wrote. Keys come from config, `--key`, or the table's `PRIMARY KEY`. Python: `Sentry.check_change(table)`.
|
|
8
|
+
- **Asset Bundle template** in `templates/job-check`: `databricks bundle init https://github.com/bricksentry/bricksentry --template-dir templates/job-check` creates a serverless job with a table update trigger that checks every change to up to 10 tables, alerts on Slack (webhook read from a secret scope) and fails the run at the verdict you choose. Its README shows how to add the check as a task inside an existing job so a `block` stops the downstream tasks.
|
|
9
|
+
- **`python -m bricksentry.job`**: the job-task entry point used by the template. Takes the table list the trigger provides, a Slack or Teams webhook from a secret scope, and a link back to the run for the alert.
|
|
10
|
+
- Fix: in `bricksentry.yml`, `notify: {on: block}` was ignored, because YAML reads an unquoted `on` key as `true`. It is now read correctly (quoting it was the workaround).
|
|
11
|
+
|
|
12
|
+
## 0.1.13 (2026-11-11)
|
|
13
|
+
|
|
14
|
+
From the first live test of column lineage on Databricks (the 0.1.12 column features were verified against real `system.access.column_lineage` and column tags):
|
|
15
|
+
|
|
16
|
+
- Fix: column-level results listed columns of tables that had since been dropped, because lineage history keeps them. They are now left out, the same way the table-level blast radius does it. When existence can't be checked (no access to `information_schema`), they are kept, so missing privileges never hide anything.
|
|
17
|
+
|
|
3
18
|
## 0.1.12 (2026-11-11)
|
|
4
19
|
|
|
5
20
|
- **Column-level signals.** After the diff, bricksentry knows which columns a change touched (changed values, new NULLs, dropped or retyped). It reads their Unity Catalog tags from `information_schema.column_tags`, and follows `system.access.column_lineage` from those columns only, up to `lineage.column_depth` hops (default 2), to the downstream columns they feed. Assessments, summaries and the pull-request report show the changed columns, their tags and the column impact.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: bricksentry
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.14
|
|
4
4
|
Summary: Change-safety for Databricks pipelines and the AI agents that edit them: data diffs, Unity Catalog blast radius, policy verdicts and rollback plans.
|
|
5
5
|
Project-URL: Homepage, https://bricksentry.org
|
|
6
6
|
Project-URL: Documentation, https://bricksentry.org/docs
|
|
@@ -83,6 +83,32 @@ Point the [check-my-table notebook](examples/databricks/bricksentry_check_my_tab
|
|
|
83
83
|
|
|
84
84
|
If it shows you something, please [share what it found](https://github.com/bricksentry/bricksentry/issues/new?template=it_caught_this.yml) (no table names needed). Real results decide what gets built next.
|
|
85
85
|
|
|
86
|
+
### Check every pipeline run automatically (Asset Bundle, 5 minutes)
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
databricks bundle init https://github.com/bricksentry/bricksentry --template-dir templates/job-check
|
|
90
|
+
cd bricksentry_check && databricks bundle deploy -t prod
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Answer a few prompts (tables to watch, SQL warehouse, scratch schema, policy, optional Slack webhook secret). You get a serverless job with a **table update trigger**: whenever a watched table changes, it checks the change, sends the alert and logs the `RESTORE` that undoes it. To stop downstream tasks when a change is bad, add the same check as a task inside your pipeline job, right after the write (the generated README shows the YAML): with `--since {{job.start_time.iso_datetime}}` it checks everything the run wrote, and a `block` verdict fails the task so the tasks after it don't run.
|
|
94
|
+
|
|
95
|
+
From the command line, the same check is one command:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bricksentry check-last-change main.sales.orders # newest data change vs the version before
|
|
99
|
+
bricksentry check-last-change main.sales.orders --version 42 # a specific version
|
|
100
|
+
bricksentry check-last-change main.sales.orders --since 2026-11-11T09:00:00Z --fail-on needs_human
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Keys come from `bricksentry.yml`, `--key`, or the table's `PRIMARY KEY` constraint. OPTIMIZE and VACUUM commits are skipped because they don't change data.
|
|
104
|
+
|
|
105
|
+
### Every feature on an HR pipeline
|
|
106
|
+
|
|
107
|
+
> **HR walkthrough notebook:** Workspace → Import → URL →
|
|
108
|
+
> `https://raw.githubusercontent.com/bricksentry/bricksentry/main/examples/databricks/bricksentry_hr_walkthrough.py`
|
|
109
|
+
|
|
110
|
+
The [HR walkthrough](examples/databricks/bricksentry_hr_walkthrough.py) builds a 200,000-row employee table (tagged pii) feeding a certified pay summary, then shows everything bricksentry does on it: table and column blast radius, two pull requests (one risky, one broken), every rule, an agent's write previewed on a clone with dangerous SQL refused, the PR report, column-level policies, sampling that can't hide a duplicate, lineage from config, alerts and the MCP tools. It removes everything it created at the end. First run on a live workspace by Genie, an AI agent in Databricks, in November 2026.
|
|
111
|
+
|
|
86
112
|
### Guided tour on demo data
|
|
87
113
|
|
|
88
114
|
> **Databricks quickstart notebook:** in your workspace, go to **Workspace → Import → URL** and paste
|
|
@@ -185,6 +211,7 @@ bricksentry diff main.sales.orders main.sales_pr_42.orders
|
|
|
185
211
|
bricksentry preview main.sales.orders --sql "MERGE INTO {{target}} t USING updates u ON t.order_id = u.order_id WHEN MATCHED THEN UPDATE SET *"
|
|
186
212
|
bricksentry assess --from-git origin/main --pr 42 --format markdown --fail-on needs_human
|
|
187
213
|
bricksentry rollback main.sales.orders
|
|
214
|
+
bricksentry check-last-change main.sales.orders # the change a pipeline already made
|
|
188
215
|
```
|
|
189
216
|
|
|
190
217
|
Exit codes: `0` below `--fail-on`, `1` at or above it, `2` for configuration errors.
|
|
@@ -216,7 +243,7 @@ Check out with `fetch-depth: 0` and give the job `pull-requests: write` permissi
|
|
|
216
243
|
Or use the bundled GitHub Action, which also writes the report to the job summary:
|
|
217
244
|
|
|
218
245
|
```yaml
|
|
219
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
246
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
220
247
|
with:
|
|
221
248
|
config: bricksentry.yml
|
|
222
249
|
fail-on: needs_human
|
|
@@ -241,7 +268,7 @@ jobs:
|
|
|
241
268
|
fetch-depth: 0
|
|
242
269
|
# Build this PR's version of your pipeline into a per-PR schema first,
|
|
243
270
|
# for example: databricks bundle deploy -t ci && databricks bundle run -t ci
|
|
244
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
271
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
245
272
|
with:
|
|
246
273
|
config: bricksentry.yml
|
|
247
274
|
fail-on: needs_human
|
|
@@ -393,7 +420,7 @@ All conditions in a `when` must hold. The most severe matching rule sets the ver
|
|
|
393
420
|
- `CAN USE` on a SQL warehouse.
|
|
394
421
|
- `SELECT` on the tables you assess and their candidates.
|
|
395
422
|
- `SELECT` on `system.access.table_lineage` (and `system.access.column_lineage` for column-level impact), plus `system.information_schema` for owners, table tags and column tags. Without lineage access bricksentry still diffs, and adds a `lineage-unavailable` warning (blast radius unknown) instead of guessing.
|
|
396
|
-
- `CREATE TABLE` on `sandbox_schema`, for `preview_write`.
|
|
423
|
+
- `CREATE TABLE` on `sandbox_schema`, for `preview_write` and `check-last-change`. `check-last-change` also needs the table's Delta history (versions not yet removed by `VACUUM`).
|
|
397
424
|
|
|
398
425
|
## Known limits (v0.1.x)
|
|
399
426
|
|
|
@@ -36,6 +36,32 @@ Point the [check-my-table notebook](examples/databricks/bricksentry_check_my_tab
|
|
|
36
36
|
|
|
37
37
|
If it shows you something, please [share what it found](https://github.com/bricksentry/bricksentry/issues/new?template=it_caught_this.yml) (no table names needed). Real results decide what gets built next.
|
|
38
38
|
|
|
39
|
+
### Check every pipeline run automatically (Asset Bundle, 5 minutes)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
databricks bundle init https://github.com/bricksentry/bricksentry --template-dir templates/job-check
|
|
43
|
+
cd bricksentry_check && databricks bundle deploy -t prod
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Answer a few prompts (tables to watch, SQL warehouse, scratch schema, policy, optional Slack webhook secret). You get a serverless job with a **table update trigger**: whenever a watched table changes, it checks the change, sends the alert and logs the `RESTORE` that undoes it. To stop downstream tasks when a change is bad, add the same check as a task inside your pipeline job, right after the write (the generated README shows the YAML): with `--since {{job.start_time.iso_datetime}}` it checks everything the run wrote, and a `block` verdict fails the task so the tasks after it don't run.
|
|
47
|
+
|
|
48
|
+
From the command line, the same check is one command:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
bricksentry check-last-change main.sales.orders # newest data change vs the version before
|
|
52
|
+
bricksentry check-last-change main.sales.orders --version 42 # a specific version
|
|
53
|
+
bricksentry check-last-change main.sales.orders --since 2026-11-11T09:00:00Z --fail-on needs_human
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Keys come from `bricksentry.yml`, `--key`, or the table's `PRIMARY KEY` constraint. OPTIMIZE and VACUUM commits are skipped because they don't change data.
|
|
57
|
+
|
|
58
|
+
### Every feature on an HR pipeline
|
|
59
|
+
|
|
60
|
+
> **HR walkthrough notebook:** Workspace → Import → URL →
|
|
61
|
+
> `https://raw.githubusercontent.com/bricksentry/bricksentry/main/examples/databricks/bricksentry_hr_walkthrough.py`
|
|
62
|
+
|
|
63
|
+
The [HR walkthrough](examples/databricks/bricksentry_hr_walkthrough.py) builds a 200,000-row employee table (tagged pii) feeding a certified pay summary, then shows everything bricksentry does on it: table and column blast radius, two pull requests (one risky, one broken), every rule, an agent's write previewed on a clone with dangerous SQL refused, the PR report, column-level policies, sampling that can't hide a duplicate, lineage from config, alerts and the MCP tools. It removes everything it created at the end. First run on a live workspace by Genie, an AI agent in Databricks, in November 2026.
|
|
64
|
+
|
|
39
65
|
### Guided tour on demo data
|
|
40
66
|
|
|
41
67
|
> **Databricks quickstart notebook:** in your workspace, go to **Workspace → Import → URL** and paste
|
|
@@ -138,6 +164,7 @@ bricksentry diff main.sales.orders main.sales_pr_42.orders
|
|
|
138
164
|
bricksentry preview main.sales.orders --sql "MERGE INTO {{target}} t USING updates u ON t.order_id = u.order_id WHEN MATCHED THEN UPDATE SET *"
|
|
139
165
|
bricksentry assess --from-git origin/main --pr 42 --format markdown --fail-on needs_human
|
|
140
166
|
bricksentry rollback main.sales.orders
|
|
167
|
+
bricksentry check-last-change main.sales.orders # the change a pipeline already made
|
|
141
168
|
```
|
|
142
169
|
|
|
143
170
|
Exit codes: `0` below `--fail-on`, `1` at or above it, `2` for configuration errors.
|
|
@@ -169,7 +196,7 @@ Check out with `fetch-depth: 0` and give the job `pull-requests: write` permissi
|
|
|
169
196
|
Or use the bundled GitHub Action, which also writes the report to the job summary:
|
|
170
197
|
|
|
171
198
|
```yaml
|
|
172
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
199
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
173
200
|
with:
|
|
174
201
|
config: bricksentry.yml
|
|
175
202
|
fail-on: needs_human
|
|
@@ -194,7 +221,7 @@ jobs:
|
|
|
194
221
|
fetch-depth: 0
|
|
195
222
|
# Build this PR's version of your pipeline into a per-PR schema first,
|
|
196
223
|
# for example: databricks bundle deploy -t ci && databricks bundle run -t ci
|
|
197
|
-
- uses: bricksentry/bricksentry@v0.1.
|
|
224
|
+
- uses: bricksentry/bricksentry@v0.1.13
|
|
198
225
|
with:
|
|
199
226
|
config: bricksentry.yml
|
|
200
227
|
fail-on: needs_human
|
|
@@ -346,7 +373,7 @@ All conditions in a `when` must hold. The most severe matching rule sets the ver
|
|
|
346
373
|
- `CAN USE` on a SQL warehouse.
|
|
347
374
|
- `SELECT` on the tables you assess and their candidates.
|
|
348
375
|
- `SELECT` on `system.access.table_lineage` (and `system.access.column_lineage` for column-level impact), plus `system.information_schema` for owners, table tags and column tags. Without lineage access bricksentry still diffs, and adds a `lineage-unavailable` warning (blast radius unknown) instead of guessing.
|
|
349
|
-
- `CREATE TABLE` on `sandbox_schema`, for `preview_write`.
|
|
376
|
+
- `CREATE TABLE` on `sandbox_schema`, for `preview_write` and `check-last-change`. `check-last-change` also needs the table's Delta history (versions not yet removed by `VACUUM`).
|
|
350
377
|
|
|
351
378
|
## Known limits (v0.1.x)
|
|
352
379
|
|