Repository navigation
Expand file tree
/
Copy pathpython-boundary.toml
More file actions
788 lines (632 loc) · 30.7 KB
/
Copy pathpython-boundary.toml
File metadata and controls
788 lines (632 loc) · 30.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
# Python that stays once Rust hosts SQLBuild. Every other Python file under src/sqlbuild is
# migration work that moves to Rust. `remaining_lines` must equal the current count of that work:
# a PR that moves code lowers it, and adding movable Python fails the check.
# Each `[[stays]]` entry names the one rule that keeps it Python and a note with the evidence:
# 1 = executor or adapter runtime and the shapes it consumes; 2 = thin shim that invokes user
# Python; 3 = public facade (facade only); 4 = glue around a Python-only third-party library.
# Native failures must surface as errors; `handled_native_errors` lists the reviewed exceptions.
remaining_lines = 0
[[stays]]
path = "executor"
rule = 1
note = "Runs plans against warehouses; a separate later decision."
[[stays]]
path = "adapters"
rule = 1
note = "Built-in warehouse adapters that project adapters subclass and override."
[[stays]]
path = "adapter/contract"
rule = 1
note = "BaseAdapter and StrictAdapter, the documented classes project adapters subclass."
[[stays]]
path = "adapter/discovery"
rule = 2
note = "Imports project adapter modules."
[[stays]]
path = "adapter/relations"
rule = 1
note = "Relation inspection wrappers adapters call, with per-connection caches; executed-statement classification and invalidation keys are native."
[[stays]]
path = "adapter/type_system"
rule = 1
note = "Type normalisation and the public nullability rule callables adapters import and register (profile_inputs.rs recognises them by path); normalisation and the first_arg, conditional_result and safe_cast rules are native."
[[stays]]
path = "provider"
rule = 2
note = "Provider base class users subclass, and injection into user functions."
[[stays]]
path = "python_nodes"
rule = 3
note = "Public decorators and authoring shapes re-exported by assets.py, tasks.py, loaders.py, hooks.py and retries.py, run when user modules are imported; RetryPolicy and AuditCase validation, retry delays and hook-read normalization are native (validate_retry_policy, retry_delay_seconds, validate_audit_case, normalize_hook_reads)."
[[stays]]
path = "microbatches"
rule = 1
note = "Rule 1: the executor's direct-mode event store (warehouse I/O and retries), the event row codec and the event, scope and projection shapes it consumes. Coverage and replay projection, event IDs and state SQL are native (sqlbuild-state microbatches)."
[[stays]]
path = "rules"
rule = 3
note = "Public custom-rule API and test helper."
[[stays]]
path = "diagnostics/_helpers/logging.py"
rule = 4
note = "Installs SQLBuild's handlers on Python's logging and owns the diagnostics context variables; SQL digests and record field sets are native (sql_log_record, debug_event_record_fields)."
[[stays]]
path = "diagnostics/classes/diagnostic_record_redactor.py"
rule = 4
note = "Redaction entry points that Python logging handlers call per record; text, value and extra-field redaction are native."
[[stays]]
path = "diagnostics/classes/diagnostics_console_formatter.py"
rule = 4
note = "Rule 4 glue: the logging.Formatter subclass for the console stream; the line text is native (format_diagnostics_console_record) and only stdlib exception formatting stays here."
[[stays]]
path = "diagnostics/classes/dynamic_stderr_handler.py"
rule = 4
note = "A logging.Handler that follows the current sys.stderr."
[[stays]]
path = "diagnostics/classes/invocation_diagnostic_routing.py"
rule = 4
note = "Attaches and removes per-invocation logging handlers."
[[stays]]
path = "diagnostics/classes/log_record_route_filter.py"
rule = 4
note = "A logging.Filter subclass; routing and SQL redaction of the record copy are native (route_diagnostic_log_record)."
[[stays]]
path = "diagnostics/main"
rule = 1
note = "Diagnostics entry points built on Python logging: configuration, context, debug and SQL logging."
[[stays]]
path = "diagnostics/_helpers/process_resources.py"
rule = 4
note = "Samples process resources for debug logging through Python's resource module."
[[stays]]
path = "rule_engine/_helpers/host"
rule = 2
note = "Rule 2: the subprocess host that loads and runs user rule modules (custom_host, custom_evaluation, tracked_facts, module_state, custom_host_launch); host fan-out, partitioning and CPU capacity run natively."
[[stays]]
path = "rule_engine/_helpers/engine/custom_payloads.py"
rule = 2
note = "Reads user rule functions (source lines, qualified names, import closures) to describe custom rules for native selection."
[[stays]]
path = "rule_engine/_helpers/engine/_custom_catalogue.py"
rule = 2
note = "Imports the project's custom rule modules and collects their @rule functions for the native catalogue."
[[stays]]
path = "rule_engine/classes/rule_context.py"
rule = 3
note = "The context object user rules receive; finding path and position validation is native (finding_position)."
[[stays]]
path = "rule_engine/_helpers/engine/definition.py"
rule = 2
note = "The @rule decorator implementation; inspects user rule functions and their signatures."
[[stays]]
path = "rule_engine/_helpers/engine/rule_harness.py"
rule = 2
note = "Public custom-rule test harness that writes a temporary project and runs user rules over it; rule-option TOML literals are native (rule_option_toml_value)."
[[stays]]
path = "rule_engine/main/define.py"
rule = 3
note = "Public @rule decorator entry point."
[[stays]]
path = "rule_engine/main/evaluate_rule.py"
rule = 3
note = "Public custom-rule test harness entry point."
[[stays]]
path = "rule_engine/classes/audit_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/column_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/contract_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/declaration_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/graph_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/model_test_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/project_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/sql_facts.py"
rule = 3
note = "Fact view user rules read through RuleContext; the Python API over native data."
[[stays]]
path = "rule_engine/classes/project_tree.py"
rule = 3
note = "Project-tree fact view user rules read through RuleContext; the walk, path validation, file resolution and the children, descendants, glob, relative_parts and read_text queries are native (project_tree_*), and only the model lookup stays here."
[[stays]]
path = "rule_engine/classes/sql_document.py"
rule = 4
note = "Lazy Polyglot SQL document user rules read through RuleContext."
[[stays]]
path = "rule_engine/classes/fact_reads.py"
rule = 2
note = "Records the fact-view reads of one user rule evaluation."
[[stays]]
path = "runtime/observability"
rule = 1
note = "Documented observability API used throughout the executor: lifecycle emitters, dispatcher, scopes and envelope shapes. The event catalogue, envelope, diagnostic log, run bound, operation metadata, hook and producer validation and JSON freezing are native (sqlbuild-core lifecycle_events)."
[[stays]]
path = "runtime/execution_history/__init__.py"
rule = 3
note = "Package marker of the public execution history shapes below; storage, projection and validation are native (sqlbuild-state execution_history)."
[[stays]]
path = "runtime/execution_history/models.py"
rule = 3
note = "Rule 3 shapes: StoredEvent, filter, page and RunRecord dataclasses re-exported by sqlbuild.execution_history; __post_init__ delegates validation to native validate_history_* functions."
[[stays]]
path = "runtime/execution_history/types.py"
rule = 3
note = "Rule 3 shapes: EventFamily, RunStatus, cursor aliases and the storage protocols re-exported by sqlbuild.execution_history."
[[stays]]
path = "runtime/execution_history/exceptions.py"
rule = 3
note = "Rule 3 shapes: public storage errors re-exported by sqlbuild.execution_history and raised by the native backends."
[[stays]]
path = "runtime/user_code"
rule = 2
note = "Import machinery that loads project Python from current source, never from cached bytecode."
[[stays]]
path = "runtime/execution_limits"
rule = 1
note = "Deadline the executor scheduler and warehouse cursors enforce."
[[stays]]
path = "runtime/compute_logs/classes"
rule = 1
note = "Rule 1 capture shim: sys.stdout/sys.stderr tees and a logging.Handler that record Python output from user code, adapters and the executor (_dispatch_with_compute_logs.py, compile_command/reuse_attempt.rs); record retention, SQL redaction, identity and severity are native (compute_diagnostic_log_fields) and storage is native LocalFilesystemComputeLogStorage."
[[stays]]
path = "runtime/compute_logs/main"
rule = 1
note = "Rule 1 capture shim entry: installs the stream tees around the CLI command (_dispatch_with_compute_logs.py)."
[[stays]]
path = "runtime/compute_logs/_helpers"
rule = 1
note = "Rule 1 tee shim: how much of a write the wrapped Python stream accepted (text_tee.py, binary_tee.py)."
[[stays]]
path = "runtime/compute_logs/__init__.py"
rule = 3
note = "Package marker of the public compute log shapes below."
[[stays]]
path = "runtime/compute_logs/models.py"
rule = 3
note = "Rule 3 shapes: capture metadata and result dataclasses re-exported by sqlbuild.compute_logs."
[[stays]]
path = "runtime/compute_logs/types.py"
rule = 3
note = "Rule 3 shapes: ComputeLogStream and the ComputeLogStorage protocol re-exported by sqlbuild.compute_logs."
[[stays]]
path = "runtime/compute_logs/exceptions.py"
rule = 3
note = "Rule 3 shapes: public storage errors re-exported by sqlbuild.compute_logs and raised by the native storage."
[[stays]]
path = "runtime/event_exporting/__init__.py"
rule = 3
note = "Package marker of the public sink declarations below; the dispatcher, queue, accounting and command scope are native EventExporterDispatcher/EventExporterCommandScope."
[[stays]]
path = "runtime/event_exporting/main/__init__.py"
rule = 3
note = "Package marker of the public sink decorators and the user-sink invocation shims below."
[[stays]]
path = "runtime/event_exporting/main/lifecycle_event_sink.py"
rule = 3
note = "Rule 3 facade: the @lifecycle_event_sink decorator re-exported by sqlbuild.sinks, run when user sink modules are imported."
[[stays]]
path = "runtime/event_exporting/main/command_output_sink.py"
rule = 3
note = "Rule 3 facade: the @command_output_sink decorator re-exported by sqlbuild.sinks, run when user sink modules are imported."
[[stays]]
path = "runtime/event_exporting/main/get_lifecycle_event_sink_definition.py"
rule = 3
note = "Rule 3 facade: reads the decorator's definition off a user function; re-exported by sqlbuild.sinks."
[[stays]]
path = "runtime/event_exporting/main/get_command_output_sink_definition.py"
rule = 3
note = "Rule 3 facade: reads the decorator's definition off a user function; re-exported by sqlbuild.sinks."
[[stays]]
path = "runtime/event_exporting/main/_invoke_lifecycle_event_sink.py"
rule = 2
note = "Rule 2 shim: target of each lifecycle sink's long-lived daemon delivery thread; claims each queued call in a shared dict (atomic under the GIL, so the dispatcher counts a cancellation as dropped only when the call can never run), calls the user sink in order and reports how each call ended through a Python queue, so user code never runs above native frames that interpreter finalization would abort (event_exporting/workers.rs)."
[[stays]]
path = "runtime/event_exporting/main/_run_command_output_sinks.py"
rule = 2
note = "Rule 2 shim: target of each dispatcher's single command-output sink thread; waits on a Python queue and calls user sinks in order on that one thread (provider thread affinity), reporting each outcome through a Python queue, so no native frame is on that thread when finalization can end it (event_exporting/dispatcher.rs)."
[[stays]]
path = "runtime/event_exporting/main/_invoke_recall_sink.py"
rule = 2
note = "Thin shim that calls a user Recall replacement sink with its record and RecallWriter and reports whether it raised."
[[stays]]
path = "runtime/event_exporting/models.py"
rule = 3
note = "Rule 3 shape: LifecycleEventSinkDefinition re-exported by sqlbuild.sinks."
[[stays]]
path = "runtime/event_exporting/types.py"
rule = 3
note = "Rule 3 shape: LifecycleEventKind re-exported by sqlbuild.sinks."
[[stays]]
path = "runtime/event_exporting/exceptions.py"
rule = 3
note = "Rule 3 shapes: errors the public decorators raise and the native dispatcher raises."
[[stays]]
path = "runtime/event_exporting/constants.py"
rule = 3
note = "Rule 3 shapes: decorator attribute names, sink kinds and severities the public decorators and discovery read."
[[stays]]
path = "runtime/output_capture/classes"
rule = 1
note = "Rule 1 capture shim: sys.stdout/sys.stderr tees forwarding accepted writes from user code, adapters and the executor to the native OutputCaptureDispatcher."
[[stays]]
path = "runtime/output_capture/main"
rule = 1
note = "Rule 1 capture shim entry: swaps sys.stdout/sys.stderr for the tees around one CLI command (Rust cli/observability.rs)."
[[stays]]
path = "runtime/output_capture/__init__.py"
rule = 3
note = "Package marker of the public command-output shapes below."
[[stays]]
path = "runtime/output_capture/models.py"
rule = 3
note = "Rule 3 shapes: CommandOutputRecord and sink definitions re-exported by sqlbuild.sinks; validation is native validate_command_output_record."
[[stays]]
path = "runtime/output_capture/types.py"
rule = 3
note = "Rule 3 shapes: CommandOutputStream re-exported by sqlbuild.sinks, priorities and the exporter protocol."
[[stays]]
path = "runtime/output_capture/exceptions.py"
rule = 3
note = "Rule 3 shapes: CommandOutputValidationError re-exported by sqlbuild.sinks and raised by the native records."
[[stays]]
path = "runtime/output_capture/constants.py"
rule = 3
note = "Rule 3 shapes: the command-output sink parameter name and the installed producer version, no logic."
[[stays]]
path = "integrations/dagster"
rule = 4
note = "Documented orchestrator integration and rule 4 Dagster glue: overridable translator methods, translator invocation, context reads, subprocess streaming and Dagster event construction; CLI arguments, selector logs, payload and failure parsing, asset/check/selection projection of the DAG artifact and the default translator mappings (dagster_default_*) are native."
[[stays]]
path = "integrations/rivers"
rule = 4
note = "Documented orchestrator integration and rule 4 Rivers glue: translator invocation and AssetDef construction; the asset projection of the DAG artifact is native."
[[stays]]
path = "integrations/dlt"
rule = 4
note = "Loader runtime that runs inside user loaders and calls the dlt destination factories; synthetic loader record building, naming and adapter-config to destination mapping are native (dlt_destination_arguments)."
[[stays]]
path = "integrations/ingestr"
rule = 1
note = "Loader runtime that runs the ingestr subprocess inside the executor load phase; synthetic loader record building, naming, destination URIs and command lines are native."
[[stays]]
path = "integrations/dbt/_helpers/profile/load.py"
rule = 4
note = "Rule 4: PyYAML glue only; parses dbt_project.yml and profiles.yml with yaml.safe_load and reports YAMLError as DbtProfileError. Existence, mapping, field and target validation and output selection are native (dbt_interop/profile_load.rs)."
[[stays]]
path = "integrations/dbt/_helpers/profile/render.py"
rule = 4
note = "Renders the selected dbt profile output with Jinja, env_var and var as dbt does; as_bool and as_number coercions are native."
[[stays]]
path = "cli/commands/main/entrypoint/_dispatch_with_compute_logs.py"
rule = 1
note = "Captures the command's stdout, stderr and logging into the local compute log around user code."
[[stays]]
path = "cli/commands/_helpers/entry/compute_log_diagnostics.py"
rule = 1
note = "Logs compute log capture failures through Python logging during capture."
[[stays]]
path = "cli/compile_reuse/_helpers/provider_settings.py"
rule = 4
note = "Inspects user provider settings classes for the environment and files they read."
[[stays]]
path = "cli/compile_reuse/_helpers/startup_inputs.py"
rule = 2
note = "Reads the live interpreter's sys.path, site-packages, executable and prefixes that user modules import from; absolute paths, .pth discovery, ordering and stamps are native (startup_input_stamps)."
[[stays]]
path = "cli/entry/main/entry.py"
rule = 3
note = "The installed sqlbuild-python console entry point."
[[stays]]
path = "cli/entry/main/launched.py"
rule = 3
note = "The Python entry point the native sqb executable hands invocations to."
[[stays]]
path = "cli/entry/_helpers/streams.py"
rule = 3
note = "Reconfigures the Python process's standard streams for the console entry points."
[[stays]]
path = "compiler/python_nodes/_helpers/identity.py"
rule = 2
note = "Identity hashing over live user functions (source and globals)."
[[stays]]
path = "compiler/macro_bridge/_helpers/store_environment.py"
rule = 2
note = "Fingerprints the installed packages, import path and live module files that project macros import from; the macro call store cache key. The interpreter stamp it shares with compile reuse is native (interpreter_identity)."
[[stays]]
path = "rule_engine/classes/runtime_guard.py"
rule = 2
note = "Guards custom-rule execution against side effects in user rule code."
[[stays]]
path = "rule_engine/classes/module_state_monitor.py"
rule = 2
note = "Watches user rule modules for state changes between custom-rule runs."
[[stays]]
path = "compiler/compile/_helpers/render/user_macros.py"
rule = 2
note = "Loads and executes project macro modules, and builds the declaration and enum mappings user macros read."
[[stays]]
path = "compiler/macro_bridge/classes/macro_bridge.py"
rule = 2
note = "Tracks the loaded user modules macro call results depend on, and runs a render stage through the bridge."
[[stays]]
path = "compiler/python_nodes/_helpers/user_inventory.py"
rule = 2
note = "Reads loaded user node functions: identities over live functions and decorated dependency names; graph construction is native."
[[stays]]
path = "compiler/discovery/_helpers/filesystem/project_modules.py"
rule = 2
note = "Rule 2 shim: imports project Python node, hook, provider, sink and materialization modules and reads live members, signatures, provider parameter annotations and source lines; record building, provider naming and validation, settings errors, factory results and duplicate checks are native."
[[stays]]
path = "compiler/discovery/_helpers/validation/discovery.py"
rule = 2
note = "Reads decorator definitions from loaded project Python node functions."
[[stays]]
path = "compiler/discovery/main/runtime_extensions.py"
rule = 2
note = "Binds imported project providers to event exporter and sink declarations."
[[stays]]
path = "compiler/compile/_helpers/diagnostics/python_resources.py"
rule = 2
note = "Reads docstrings and source lines of loaded project Python functions and provider classes."
[[stays]]
path = "compiler/discovery/_helpers/filesystem/command_output_sinks.py"
rule = 2
note = "Inspects loaded user sink functions."
[[stays]]
path = "compiler/discovery/_helpers/filesystem/recall_sinks.py"
rule = 2
note = "Inspects loaded user sink functions for a RecallWriter parameter."
[[stays]]
path = "compiler/pipeline/_helpers/materializations.py"
rule = 2
note = "Imports user materialization modules."
[[stays]]
path = "compiler/macro_bridge/main"
rule = 2
note = "Macro bridge entry points for the running render stage that executes user macros."
[[stays]]
path = "compiler/compile/_helpers/macro_bridge/call_store.py"
rule = 2
note = "Hands the running macro bridge its user macro call store."
[[stays]]
path = "compiler/python_nodes/main/identity.py"
rule = 2
note = "Identity entry point over live user node functions."
[[stays]]
path = "compiler/python_nodes/main/_hook_identities.py"
rule = 2
note = "Builds identities of loaded user hook functions."
[[stays]]
path = "compiler/auditing/main/above.py"
rule = 3
note = "Audit bound helper project audit factories call."
[[stays]]
path = "compiler/auditing/main/below.py"
rule = 3
note = "Audit bound helper project audit factories call."
[[stays]]
path = "compiler/auditing/main/outside.py"
rule = 3
note = "Audit bound helper project audit factories call."
[[stays]]
path = "compiler/auditing/main/audit_factory.py"
rule = 3
note = "Decorator that declares project audit factories."
[[stays]]
path = "compiler/auditing/main/get_audit_factory_definition.py"
rule = 3
note = "Reads the declaration attached to a project audit factory."
[[stays]]
path = "compiler/sql_analysis/main/import_polyglot.py"
rule = 4
note = "Imports the Polyglot Python package for the Python API."
[[stays]]
path = "compiler/sql_analysis/main/import_polyglot_sql.py"
rule = 4
note = "Imports the Polyglot SQL Python package for the Python API."
[[stays]]
path = "compiler/sql_analysis/_helpers/polyglot.py"
rule = 4
note = "Wraps the Polyglot Python package with complexity guards."
[[stays]]
path = "_native_host.py"
rule = 1
note = "The one module native code imports by path: a lazy name table of the executor, adapter, user-code, third-party and facade entry points the native host table (crates/sqlbuild-python native_host) reaches."
[[stays]]
path = "assets.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (asset, get_asset_definition)."
[[stays]]
path = "audits.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "checks.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (check, get_check_definition)."
[[stays]]
path = "compute_logs.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (open_local_compute_log_storage)."
[[stays]]
path = "execution_history.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (append_and_project, canonical_event_id, canonical_event_content, project_runs, validate_page_limit)."
[[stays]]
path = "factories.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (factory, get_factory_definition)."
[[stays]]
path = "functions.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "hooks.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (hook, get_hook_definition)."
[[stays]]
path = "loaders.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "observability.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "postgres_history.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "providers.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "refs.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (model, source, seed)."
[[stays]]
path = "retries.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "recall.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "sinks.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "sqlite_history.py"
rule = 3
note = "Public facade: re-exports only."
[[stays]]
path = "tasks.py"
rule = 3
note = "Public facade: re-exports plus one-line delegating wrappers (task, get_task_definition)."
[[stays]]
path = "cost/models.py"
rule = 1
note = "Shape rule: data records only (StatementExecutionTelemetry, CostResourceContext, RunCostSummary), no logic; consumed by adapters/snowflake/classes/snowflake_adapter.py, adapters/snowflake/classes/snowflake_cursor.py, executor/build/classes/build_scheduler.py and 2 more."
[[stays]]
path = "cli/compile_reuse/models.py"
rule = 4
note = "Shape rule: data records only (CompileReuseRequest, SettingsEnvironmentInputs, SettingsInputsResult), no logic; consumed by cli/compile_reuse/_helpers/provider_settings.py, and read natively by the compile reuse check."
[[stays]]
path = "compiler/auditing/types.py"
rule = 1
note = "Shape rule: data enums and aliases only (AuditSeverity, AuditRunScope, AuditAttachmentKind, AuditEvaluationMode, ...), no logic; consumed by audits.py, compiler/auditing/main/above.py, compiler/auditing/main/below.py and 17 more."
[[stays]]
path = "compiler/python_nodes/types.py"
rule = 1
note = "Shape rule: data enums and aliases only (PythonNodeKind, PythonNodeStatus, SkipMode, PythonNodeFanInAction), no logic; consumed by assets.py, assets.pyi, executor/load/_helpers/dag_runtime.py and 16 more."
[[stays]]
path = "compiler/macro_bridge/constants.py"
rule = 2
note = "Shape rule: data constants only (ACTIVE_MACRO_BRIDGE, COMPILES_STARTED, STORE_MODULE_PATHS, MACRO_CALL_STORE_FILE_NAME, ...), no logic; consumed by compiler/macro_bridge/_helpers/store_environment.py, compiler/macro_bridge/classes/macro_bridge.py, compiler/macro_bridge/main/_claim_first_compile.py and 2 more."
[[stays]]
path = "compiler/references/models.py"
rule = 1
note = "Shape rule: data records only (RelationName, ProjectRelation, ProjectRelationIndex), no logic; consumed by executor/python_nodes/classes/runtime_relation_guard.py."
[[stays]]
path = "runtime/contracts/types.py"
rule = 1
note = "Shape rule: data enums and aliases only (ExecutionResourceKind, ConnectionElapsedCallback, NodeStartCallback), no logic; consumed by executor/build/_helpers/scheduler.py, executor/build/_helpers/source_node.py, executor/build/classes/build_scheduler.py and 15 more."
[[stays]]
path = "errors/contracts/exceptions.py"
rule = 1
note = "Shape rule: data exceptions only (SharedInputError, ExecutorInputError), no logic; consumed by executor/audit_results/_helpers/sql.py, executor/build/_helpers/external_source_loads.py, executor/build/_helpers/retention.py and 53 more."
[[stays]]
path = "compiler/fingerprints/constants.py"
rule = 1
note = "Shape rule: Python-only node type names (NODE_TYPE_HOOK, NODE_TYPE_QUERY_DIFF_ARTIFACT), no logic; table and column names are native (sqlbuild._native)."
[[stays]]
path = "diagnostics/models.py"
rule = 4
note = "Shape rule: data records only (ProcessResourceUsage, DiagnosticRoutingOptions), no logic; consumed by cli/commands/main/entrypoint/_dispatch_with_compute_logs.py, diagnostics/classes/invocation_diagnostic_routing.py, diagnostics/main/_log_process_resources.py and 3 more."
[[stays]]
path = "compiler/dag/types.py"
rule = 4
note = "Shape rule: data enums and aliases only (NodeKind), no logic; consumed by integrations/dagster/constants.py, integrations/rivers/constants.py."
[[stays]]
path = "runtime/contracts/models.py"
rule = 1
note = "Shape rule: data records only (ConnectionHooks), no logic; consumed by executor/pipeline/_helpers/scenario.py."
[[stays]]
path = "cursor_algebra/types.py"
rule = 1
note = "Shape rule: data enums and aliases only (CursorScalar, BoundSentinel, Bound), no logic; consumed by executor/load/_helpers/cursors.py, executor/load/main/_execute.py, executor/run/_helpers/materializations/microbatch.py and 2 more."
[[stays]]
path = "cost/types.py"
rule = 1
note = "Shape rule: data enums and aliases only (CostCapability, CostStatus), no logic; consumed by adapters/snowflake/classes/snowflake_adapter.py."
[[stays]]
path = "compiler/macro_bridge/models.py"
rule = 2
note = "Shape rule: data records only (ModuleSources), no logic; consumed by compiler/macro_bridge/_helpers/store_environment.py, compiler/macro_bridge/classes/macro_bridge.py."
[[stays]]
path = "integrations/dbt/exceptions.py"
rule = 4
note = "Shape rule: data exceptions only (DbtProfileError), no logic; consumed by integrations/dbt/_helpers/profile/load.py, integrations/dbt/_helpers/profile/render.py."
[[stays]]
path = "diagnostics/constants.py"
rule = 4
note = "Shape rule: the SQL_PRIVATE_RECORD_MARKER object() sentinel only, no logic; its identity marks trusted private SQL records for the native compute log handler; the record field names are native (sqlbuild._native); consumed by diagnostics/classes/invocation_diagnostic_routing.py."
[[stays]]
path = "cursor_algebra/exceptions.py"
rule = 1
note = "Shape rule: data exceptions only (CursorAlgebraError), no logic; consumed by executor/run/models.py."
[[stays]]
path = "spec/contracts/constants.py"
rule = 1
note = "Shape rule: data constants only (DEFAULT_SEED_CSV_SETTINGS), no logic; consumed by adapter contract classes."
[[stays]]
path = "cli/entry/constants.py"
rule = 3
note = "Shape rule: data constants only (NATIVE_ALLOCATOR_PURGE_DELAY_VARIABLE, NATIVE_ALLOCATOR_PURGE_DELAY_MILLISECONDS, OUTPUT_STREAM_ENCODING, OUTPUT_STREAM_ERRORS, ...), no logic; consumed by cli/entry/_helpers/streams.py, cli/entry/main/entry.py, cli/entry/main/launched.py."
[[stays]]
path = "sql_values/exceptions.py"
rule = 1
note = "Shape rule: data exceptions only (SqlValueRenderingError), no logic; consumed by adapter/contract/classes/base_adapter.py, adapter/contract/exceptions.py."
[[stays]]
path = "compiler/compile/types.py"
rule = 1
note = "Shape rule: typing protocols, enums and aliases only (CompiledProjectView, CompiledModelView, AuditInput, ...), no logic; consumed by executor/pipeline/_helpers/testing.py, executor/scenario/_helpers/local/execution.py and project audit factories that annotate AuditInput."
[[stays]]
path = "rule_engine/types.py"
rule = 3
note = "Shape rule: data protocol and aliases only (RuleContext, RuleCheck, RuleOptionValue, FactKey, CustomRulePlan), no logic; re-exported by rules/__init__.py and consumed by rule_engine/main/define.py, rule_engine/_helpers/host/custom_host.py and 4 more."
[[stays]]
path = "rule_engine/constants.py"
rule = 2
note = "Shape rule: custom-rule host and fact-name constants (CUSTOM_HOST_MAX_TRACKED_READS, CUSTOM_HOST_STARTUP_ENVIRONMENT, FACT_PROJECT_MODELS, ...) used by the Python custom-rule host, no logic; versions, launch module, shared keys and the import allowlist are native (sqlbuild._native)."
[[stays]]
path = "compiler/compile/exceptions.py"
rule = 2
note = "Shape rule: data exceptions only (MacroDeclarationLookupError, a CompileInputError that is also a KeyError, which a native error class with one parent cannot express), no logic; consumed by compiler/compile/_helpers/render/user_macros.py."
[[stays]]
path = "compiler/sql_analysis/constants.py"
rule = 4
note = "Rule 4: polyglot_sql glue only; the entry point, call-shape and option names (POLYGLOT_ANALYZE_QUERY_ENTRY_POINT, POLYGLOT_COMPLEXITY_GUARD_OPTION, POLYGLOT_MAX_FUNCTION_CALL_DEPTH, ...) that compiler/sql_analysis/_helpers/polyglot.py uses to wrap the polyglot_sql Python package."
[[stays]]
path = "compiler/compile/models.py"
rule = 3
note = "Shape rule: re-export only (MacroContext, now hosted natively), no logic; project macro modules import it from this path to annotate their ctx parameter, as tests/e2e/fixtures/waffle_shop/models/marts/_macros/time.py does."