Repository navigation
Expand file tree
/
Copy pathpython-boundary.toml
More file actions
252 lines (203 loc) · 13.8 KB
/
Copy pathpython-boundary.toml
File metadata and controls
252 lines (203 loc) · 13.8 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
# Python that stays once Rust hosts SQLTide. Every other Python file under src/sqltide 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.
# A file is listed only once it holds nothing but that role: a runtime, shim or facade file that
# still carries planning, validation, rendering or other movable logic counts as movable until
# that logic moves to Rust.
# Native failures must surface as errors; `handled_native_errors` lists the reviewed exceptions.
remaining_lines = 0
[[stays]]
path = "adapter/classes/adapter.py"
rule = 1
note = "Rule 1: The abstract Adapter contract the runtime calls to open warehouse connections; ClickHouseAdapter implements it. No logic."
[[stays]]
path = "adapter/classes/adapter_connection.py"
rule = 1
note = "Rule 1: The AdapterConnection contract every warehouse read and write goes through (query, workflow statements, locks, catalog loads). Defaults are capability stubs and row-decoding wrappers; the SQL its render methods return is rendered natively."
[[stays]]
path = "adapter/exceptions.py"
rule = 1
note = "Rule 1: Data-only AdapterError hierarchy the ClickHouse driver connection raises and the runtime catches."
[[stays]]
path = "adapter/types.py"
rule = 1
note = "Rule 1: Data-only enums and logic-free protocols the adapter contract and the ClickHouse connection consume."
[[stays]]
path = "adapters/clickhouse/classes/clickhouse_adapter.py"
rule = 1
note = "Rule 1: Binds the native ClickHouse adapter core to the Adapter contract so the built-in adapter keeps its import path, isinstance checks and inherited defaults; no methods."
[[stays]]
path = "adapters/clickhouse/classes/clickhouse_connection.py"
rule = 1
note = "Rule 1: Binds the native ClickHouse connection core to the AdapterConnection contract consumed by the executor runtime; subclasses override its methods; no methods."
[[stays]]
path = "adapters/clickhouse/types.py"
rule = 1
note = "Rule 1: Logic-free protocols describing the clickhouse-connect client and query result the ClickHouse connection wraps."
[[stays]]
path = "auth/_helpers/password_hashing.py"
rule = 4
note = "Rule 4: glue around argon2-cffi; RustCrypto's argon2 cannot accept every hash libargon2 accepts (its output and salt length limits, a missing version field and other versions differ), so stored hashes would stop verifying. Calls PasswordHasher hash, verify and check_needs_rehash and returns plain values. Password validation and when to hash, verify or store a replacement are native."
[[stays]]
path = "auth/classes/relational_driver.py"
rule = 4
note = "Rule 4: glue around SQLAlchemy/psycopg; connection URL, libpq environment, TLS and service-file handling stay with the driver. Creates the pooled engine from the URL, opens and commits or rolls back one transaction, executes native statement text with bound parameters, returns plain rows and row counts, and classifies driver errors as integrity or other. All SQL and DDL, row mapping, sessions, tokens, auditing and role rules are native."
[[stays]]
path = "compiler/macros/_helpers/registry.py"
rule = 2
note = "Rule 2: Executes one project macro file's source as a module, locates load failures in the user traceback, and collects its public top-level functions with their def lines and docstrings. Reserved-name and collision checks and registry assembly are native (load_macro_registry)."
[[stays]]
path = "compiler/macros/models.py"
rule = 3
note = "Rule 3: MacroContext and PipelineNamingContext, the documented authored-API contexts user macros receive as ctx, stay Python frozen dataclasses so vars(), subclassing, dataclasses.fields, annotations and their signatures match the public contract; native code constructs them. The other names here are native re-exports."
[[stays]]
path = "compiler/macros/constants.py"
rule = 2
note = "Rule 2: Data-only names the user macro loader reads: the reserved macro names and the constants and enums directory names."
[[stays]]
path = "compiler/macros/main/_load_macro_file.py"
rule = 2
note = "Rule 2: Entry point the native registry loader calls to execute one user macro file and return its public macro functions."
[[stays]]
path = "compiler/macros/types.py"
rule = 2
note = "Rule 2: Data-only alias for the live user macro functions the loader holds."
[[stays]]
path = "compiler/pipeline/types.py"
rule = 1
note = "Rule 1: Data-only type aliases AdapterResource (the adapter managed source, table, materialized view and view resources) and DesiredObject (the desired Kafka table, table, materialized view and view objects) the runtime consumes; no logic."
[[stays]]
path = "compiler/planner/types.py"
rule = 1
note = "Rule 1: Data-only type aliases DesiredObject (the desired Kafka table, table, materialized view and view objects) and ActualObject (the actual Kafka table, table, materialized view and view objects) the planner runtime consumes, beside native re-exports of the planner value enums; no logic."
[[stays]]
path = "dev_server/classes/kafka_lag_collector.py"
rule = 4
note = "Rule 4: glue around kafka-python-ng; no Rust Kafka client is used yet. Opens, reuses and closes the KafkaAdminClient and KafkaConsumer pair per broker key, calls list_consumer_group_offsets, partitions_for_topic and end_offsets, and returns plain tuples. Client config, keys, consumer-group scoping, offset math, snapshots and caching are native."
[[stays]]
path = "dev_server/classes/kafka_topic_collector.py"
rule = 4
note = "Rule 4: glue around kafka-python-ng; no Rust Kafka client is used yet. Opens, reuses and closes one KafkaAdminClient per broker key and returns raw describe_topics metadata. Client config, keys, snapshots and caching are native."
[[stays]]
path = "events/__init__.py"
rule = 3
note = "Rule 3: Public sqltide.events facade that documented sensors import; re-exports only."
[[stays]]
path = "events/models.py"
rule = 3
note = "Rule 3: AuditCompleted and RunCompleted, the event classes sqltide.events re-exports, that user sensors pass to event_sensor(on=...) and receive as ctx.event, that native events_from_node_result and events_from_invocation construct, and that native dispatch matches by identity, stay Python frozen dataclasses; data only. NodeResultObservation and InvocationObservation are native re-exports."
[[stays]]
path = "events/types.py"
rule = 3
note = "Rule 3: Public AuditTransition and ObservedCommand enums and the SensorEvent alias re-exported by sqltide.events; data only."
[[stays]]
path = "executor/destruction/types.py"
rule = 1
note = "Rule 1: Logic-free protocols DestructionPlanningConnection (the read-only adapter surface destruction planning calls) and DestructionPlanStore (the reviewed single-use plan store) and the data-only type alias DestructionClock the destruction runtime consumes, beside native re-exports of the destruction value enums; no logic."
[[stays]]
path = "executor/kafka_admin/_helpers/offset_reset.py"
rule = 4
note = "Rule 4: kafka-python-ng glue: builds the admin client, deletes one consumer group and maps the library's NoError and GroupIdNotFoundError sentinels; selection, configuration and notices are native."
[[stays]]
path = "executor/kafka_admin/models.py"
rule = 1
note = "Rule 1: Data-only consumer group offset reset result the Kafka admin I/O returns."
[[stays]]
path = "executor/kafka_admin/types.py"
rule = 1
note = "Rule 1: Logic-free protocols for the kafka-python admin client and its factory, consumed by the Kafka admin I/O."
[[stays]]
path = "executor/workflow/exceptions.py"
rule = 1
note = "Rule 1: Data-only WorkflowExecutionError carrying the partial result, raised by the warehouse statement runner."
[[stays]]
path = "executor/workflow/main/_execute_observation_workflow.py"
rule = 1
note = "Rule 1: Entry into the warehouse statement runner for metadata-store observation writes."
[[stays]]
path = "executor/workflow/main/_execute_warehouse_workflow.py"
rule = 1
note = "Rule 1: The warehouse statement runner: executes each statement through the adapter connection in order, emits progress and keeps partial results on failure."
[[stays]]
path = "executor/workflow/main/execute_build_workflow.py"
rule = 1
note = "Rule 1: Entry into the warehouse statement runner for a published build workflow."
[[stays]]
path = "executor/workflow/main/target_mutation_lock.py"
rule = 1
note = "Rule 1: Acquires and releases the warehouse target mutation lock through the adapter connection around one operation."
[[stays]]
path = "executor/workflow/types.py"
rule = 1
note = "Rule 1: Logic-free statement phase and intent enums and the event emitter protocol the warehouse statement runner consumes."
[[stays]]
path = "provider/_helpers/injection.py"
rule = 2
note = "Rule 2: Inspects the signatures and annotations of user sensor functions and calls them with the context and provider instances."
[[stays]]
path = "provider/classes/container.py"
rule = 2
note = "Rule 2: Name-based access to the live user provider instances handed to user sensor code."
[[stays]]
path = "provider/classes/session.py"
rule = 2
note = "Rule 2: Calls user Provider.setup and Provider.teardown on live provider instances for each tick."
[[stays]]
path = "provider/exceptions.py"
rule = 2
note = "Rule 2: Data-only errors raised by the provider import, injection and session shims."
[[stays]]
path = "provider/main/build_provider_session.py"
rule = 2
note = "Rule 2: Instantiates user Provider subclasses into a session."
[[stays]]
path = "provider/main/invoke_with_providers.py"
rule = 2
note = "Rule 2: Entry point that calls a user sensor function with provider injection."
[[stays]]
path = "provider/models.py"
rule = 2
note = "Rule 2: Record holding a live user Provider class and its settings instance."
[[stays]]
path = "providers.py"
rule = 3
note = "Rule 3: The documented Provider base class that project providers subclass, built on pydantic-settings BaseSettings with its model config and the no-op setup and teardown hooks the rule-2 provider session calls; name() returns the native provider_name for the class, which native provider discovery reads."
[[stays]]
path = "sensors/__init__.py"
rule = 3
note = "Rule 3: Public sqltide.sensors facade that documented sensors import; re-exports only."
[[stays]]
path = "sensors/_helpers/evaluation.py"
rule = 2
note = "Rule 2: Runs one user sensor handler on a worker thread with its timeout and provider injection."
[[stays]]
path = "sensors/classes/event_sensor_context.py"
rule = 3
note = "Rule 3: EventSensorContext that user event sensors receive, re-exported by sqltide.sensors; step() delegates to the runner."
[[stays]]
path = "sensors/classes/polling_sensor_context.py"
rule = 3
note = "Rule 3: PollingSensorContext that user polling sensors receive, re-exported by sqltide.sensors; read-only properties."
[[stays]]
path = "sensors/models.py"
rule = 3
note = "Rule 3: SensorRetryPolicy, SkipReason and PollingSensorResult, which user sensors construct and return and sqltide.sensors re-exports (the rule-2 evaluation shim matches the returned SkipReason and PollingSensorResult), and EventSensorDeclaration and PollingSensorDeclaration, which the native event_sensor and polling_sensor decorators bind in place of the user function and whose __call__ forwards to it, stay Python frozen dataclasses; SensorRetryPolicy validation runs in the native validate_sensor_retry_policy. The other names here are native re-exports of the sensor runtime shapes."
[[stays]]
path = "sensors/types.py"
rule = 1
note = "Rule 1: The data-only alias SensorFunction, the live user sensor function the rule-3 EventSensorDeclaration and PollingSensorDeclaration in sensors/models.py hold and the native event_sensor and polling_sensor decorators wrap; the data-only alias SensorDeclaration, the union of those two declarations that native LoadedSensor holds; and the logic-free SensorStepStore protocol for the store the native DurableStepRunner takes, implemented by native InMemoryStepStore and RepositoryStepStore. The sensor enums here are native re-exports; no logic."
[[stays]]
path = "auth/models.py"
rule = 4
note = "Rule 4: pydantic request bodies LoginRequest, CreateUserRequest, UpdateUserRequest, PasswordResetRequest, RoleRequest and ProjectRoleRequest, which the native dev server validates with pydantic for the account routes. They hold only field declarations with Field constraints and defaults and no custom validators or model config; the other names here are native re-exports of the account shapes."
[[stays]]
path = "dev_server/models.py"
rule = 4
note = "Rule 4: pydantic request bodies ChecksRunRequest, AuditBatchRunRequest, BuildRunRequest, MessageQueryMode, MessageQueryPredicate, MessageQueryCursor, MessagesQueryRequest, MessageRecordRequest, MessageFacetsRequest, DeploymentCleanupRequest, DestructionPlanRequest, DestructionExecutionRequest, SensorStatusRequest and SensorDeadLetterActionRequest, which the native dev server routes validate with pydantic. They hold only field declarations with Field constraints and defaults, a shared MessageQueryMode() default and model_config extra=\"forbid\" on the two destruction requests, and no custom validators; the other names here are native re-exports of the dev server shapes."
[[stays]]
path = "dev_server/types.py"
rule = 1
note = "Rule 1: Logic-free protocols CompileAuthorizationGuard, the reload guard native DevServerState.reload_guarded calls, and DevServerReporter, the terminal narrator native create_dev_app, run_dev_server and BuildProcessManager call; and the data-only type aliases KafkaClientKey, used by the rule-4 Kafka topic and lag collectors, and KafkaLagOffsets, used by the lag collector. The other names here are native re-exports of the dev server value enums; no logic."