You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 87ac2ef
Browse filesBrowse the repository at this point in the historyBrowse files
fix: colour plan migrations and scope output and stop progress lines merging (#837)
* fix: colour plan migrations and scope output and stop progress lines merging
Coordinate every transient spinner or status line with persistent terminal
writes through one shared coordinator, so connection, lifecycle, and
diagnostic lines clear and redraw the live line instead of landing on it.
Style plan migration and scope text with the shared colour roles, make scope
rows compact by default with a --verbose flag for full details, and fix
singular nouns in scope and janitor summaries. JSON output is unchanged.
* fix: avoid audit progress deadlock and honour --no-color in scope output
Share the transient line lock with the native progress projector so a
reporter holding it can claim a resource terminal while another worker
projects events. Pass the global --no-color flag through to scope text
rendering, and describe the hollow marker as not used by this resource.
* fix: keep concurrent sqb test progress rows intact in a terminal
Render one live row for every running test and print each group header with
its completed result under the shared coordinator lock, so concurrent starts
no longer overwrite the spinner or leave orphaned rows. Update plan colour and
janitor plural expectations to the new output.
The command is read-only and offline. It does not connect to a warehouse, require warehouse credentials, or inspect relations. It reads the compiler-owned declaration-scope index and reuses a deterministic cache when the relevant source and configuration fingerprint has not changed. Building a cold cache uses the normal compiler expansion path, which loads the configured adapter and may execute authored Python macros; a warm cache hit reconstructs scope facts without importing macro modules.
28
28
29
-
Text output is deterministic, bounded, and requires no interactive pager.
29
+
Text output is deterministic, bounded, and requires no interactive pager. In a color terminal it
30
+
uses the same color conventions as other commands; redirected output and `NO_COLOR` produce plain
31
+
text.
30
32
31
33
## Usage
32
34
@@ -90,6 +92,7 @@ These identities are for inspection. SQL authored inside the owning model contin
90
92
|`--page-size N`| Return at most `N` declarations per paged section (default: `100`). |
91
93
|`--after CURSOR`| Continue after a declaration identity returned as the previous section's next cursor. |
92
94
|`--paths MODE`| Render paths as `relative`, `compact`, or `none`. |
95
+
|`--verbose`, `-v`| Show each declaration's scope details and column, and keep empty optional sections. |
93
96
|`--json`| Write the canonical versioned JSON report instead of the text tree. |
94
97
95
98
Filters combine in a fixed order: definition path, kind, glob, then usage. `--dependency-depth`
@@ -107,11 +110,17 @@ The default text report keeps distinct facts in distinct sections:
107
110
-**Scope chain** starts with the resource's owner folder, then shows parent folders and the project
108
111
declaration roles. Its compact labels identify the access rule checked at each path.
109
112
110
-
Ordinary text rows show each declaration's qualified identity, definition location, visibility,
111
-
reason for appearing, declaration-role root, and safe type or signature metadata where useful.
112
-
`--explain` additionally shows its owning path, narrowest required placement, current consumers,
113
-
dependencies, and the consumers affected by a placement mismatch. JSON includes the complete
114
-
structured declaration report.
113
+
By default, each text row shows a usage marker, the declaration's qualified identity, and its
114
+
`file:line` definition. A one-line legend explains the markers. Empty optional sections
├─ ● constant:minimum_order_value [constant; descendant-public; inherited_ancestor; type integer; role models/commerce/constants] models/commerce/constants/limits.sql:1:1
88
-
├─ ○ enum:order_status [enum; descendant-public; inherited_ancestor; members 4; type VARCHAR; role models/commerce/enums] models/commerce/enums/status.sql:1:1
SQLBuild derives these edges from actual Python calls, including nested calls and calls reached
@@ -166,6 +168,8 @@ Explanation
166
168
Required path: models/commerce
167
169
Promotion impact: model:orders
168
170
171
+
● used by this resource ○ not used by this resource --verbose for scope details
172
+
169
173
Diagnostics (1)
170
174
ERROR S008 models/commerce/macros/orders.py: Declaration 'macro:formatted_order_total' is currently descendant-public at 'models/commerce' (models/commerce/macros/orders.py); required exact-owner-private at 'models/commerce'. Consumers: model:orders. Move it to 'models/commerce/_sqlbuild/_macros/'
171
175
Completeness: complete
@@ -181,8 +185,8 @@ cannot use it. The relevant section is:
181
185
```console
182
186
$ sqb scope model:orders --include-nearby
183
187
Nearby unavailable (2 of 2)
184
-
├─ ○ enum:finance_status [enum; descendant-public; sibling_scope; members 3; type VARCHAR; role models/finance/enums] models/finance/enums/status.sql:1:1
└─ ● enum:order_status [enum; descendant-public; expected_model through model:orders; members 4; type VARCHAR; role models/commerce/enums] models/commerce/enums/status.sql:1:1
└─ ● enum:order_status [enum; descendant-public; expected_model through model:orders; members 4; type VARCHAR; role models/commerce/enums] models/commerce/enums/status.sql:1:1
├─ ○ enum:finance_status [enum; descendant-public; inherited_ancestor; members 3; type VARCHAR; role models/finance/enums] models/finance/enums/status.sql:1:1
├─ ● constant:minimum_order_value [constant; descendant-public; inherited_ancestor; type integer; role models/commerce/constants] models/commerce/constants/limits.sql:1:1
254
-
├─ ○ enum:order_status [enum; descendant-public; inherited_ancestor; members 4; type VARCHAR; role models/commerce/enums] models/commerce/enums/status.sql:1:1
├─ ○ constant:minimum_order_value [constant; descendant-public; inherited_ancestor; type integer; role models/commerce/constants] models/commerce/constants/limits.sql:1:1
291
-
├─ ○ enum:order_status [enum; descendant-public; inherited_ancestor; members 4; type VARCHAR; role models/commerce/enums] models/commerce/enums/status.sql:1:1
0 commit comments