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
**Inferred domain:** Attribute-Based Access Control (ABAC) policies on Unity Catalog securables — create/get/list/update/delete row-filter and column-mask policies.
6
-
**Total weird names flagged:**26
6
+
**Total weird names flagged:**13
7
7
8
8
## Summary
9
9
| Severity | Count |
10
10
| --- | --- |
11
-
| High |5|
12
-
| Medium |12|
13
-
| Low |5|
11
+
| High |3|
12
+
| Medium |2|
13
+
| Low |4|
14
14
| Observation | 4 |
15
15
16
16
## High severity
@@ -27,143 +27,65 @@
27
27
-**Suggested name:** Keep the name but type it `SecurableType`.
28
28
-**Rationale:** Same field name with two different types across four request DTOs forces callers to remember which one is loose. This is almost certainly a generator bug worth flagging upstream.
-**Why weird:**`fullname` is one un-camelCased word. Should be `fullName` to match field-naming conventions used everywhere else in the same model (`functionName`, `pageToken`, etc.).
32
-
-**Category:** 3 (acronym/casing inconsistency — `name` is one word and should follow camelCase, so `Fullname` is wrong).
-**Rationale:** Internal consistency. JS/TS convention treats `fullName` as two words; the Go SDK collapses `Fullname` but TS shouldn't blindly inherit that.
35
-
36
-
### 4. `MatchColumn` — `src/v1/model.ts:130`
30
+
### 3. `MatchColumn` — `src/v1/model.ts:130`
37
31
-**Why weird:** Reads as a verb (`MatchColumn`) — could be a method or a type. The field that uses it is plural (`matchColumns: MatchColumn[]`), which then reads as "match columns are an array of `MatchColumn`", and a `MatchColumn` is actually a "column matcher / condition + alias pair".
38
32
-**Category:** 6 (misleading verb-as-noun), 9 (singular noun whose meaning is unclear).
39
33
-**Suggested name:**`ColumnMatcher` or `ColumnMatchCondition`.
40
34
-**Rationale:** Type names should be nouns; the verb form misleads. `ColumnMatcher` makes `matchColumns: ColumnMatcher[]` clearly read as "the matchers".
41
35
42
-
### 5. `forSecurableType` / `onSecurableType` field prefixes — `src/v1/model.ts:145,170`
43
-
-**Why weird:** Two different prefixes for related concepts on the same struct: `on_securable_type` and `for_securable_type`. The `on`/`for` split (carrier vs. target securable) is subtle and easily confused. Field names alone do not communicate which is which.
44
-
-**Category:** 1 (vague — the preposition does the disambiguation), 6 (misleading without docs).
45
-
-**Suggested name:** Rename `forSecurableType` to `appliesToSecurableType` (or similar) and `onSecurableType` to `definedOnSecurableType` to make the distinction explicit.
46
-
-**Rationale:** A user reading the type should not have to consult the JSDoc to tell `for` from `on`. These names sit beside each other and look interchangeable.
-**Why weird:** Enum value pinned by a comment that says it isn't a real securable yet: "TODO: [UC-2980] Staging tables aren't full-fleged securables yet." Internal TODOs in generated SDK enums leak abstraction.
52
40
-**Category:** 18 (questionable enum value).
53
41
-**Suggested name:** Remove until it actually is a securable, or mark `@experimental`.
54
42
-**Rationale:** Public SDK enums shouldn't contain TODO-tagged speculative values.
-**Rationale:**`using` on its own carries no semantic load; readers must consult the doc to find out it's "additional positional args". Also appears on `RowFilterOptions` (model.ts:227) with the same problem.
-**Why weird:** Preposition-prefixed field name (`onColumn`) that just identifies the masked column. Inconsistent with `functionName` (also on the same type, no preposition).
64
-
-**Category:** 1 (vague), 17 (inconsistency).
65
-
-**Suggested name:**`maskedColumnAlias` or `targetColumnAlias`.
66
-
-**Rationale:** Names should describe what the field *is*, not its prepositional relationship.
67
-
68
-
### 9. `FunctionArgument.arg` discriminator field — `src/v1/model.ts:76`
69
-
-**Why weird:**`FunctionArgument` has a field `arg` (one of two variants). Type name and field name are near-duplicates; the field name is also an abbreviation of the type.
-**Suggested name:** Rename the field to `value` or `kind`.
72
-
-**Rationale:**`functionArgument.arg.$case === 'alias'` reads weirdly; the field name repeats an abbreviation of the type name.
73
-
74
-
### 10. `policyInfo` field on `CreatePolicyRequest` / `UpdatePolicyRequest` — `src/v1/model.ts:59,246`
75
-
-**Why weird:** Field named after the entity's awkward type (`policyInfo: PolicyInfo`). If `PolicyInfo` is renamed to `Policy`, this becomes `policy: Policy` which is much cleaner.
-**Why weird:** Same as above — fields named `onSecurableType` of type `SecurableType` and `forSecurableType` of type `SecurableType`.
88
-
-**Category:** 20 (type-suffix tautology).
89
-
-**Suggested name:** Drop `Type` from the field once renaming (`onSecurable: SecurableType`, `forSecurable: SecurableType`) — though it conflicts with finding #5. Better to combine the two renames (`definedOnSecurable: SecurableType`, `appliesToSecurable: SecurableType`).
90
-
-**Rationale:** Reduces tautology and clarifies semantics at once.
91
-
92
-
### 13. Inconsistent rename style for `*Options` types — `src/v1/model.ts:36,215`
44
+
### 5. Inconsistent rename style for `*Options` types — `src/v1/model.ts:36,215`
93
45
-**Why weird:**`ColumnMaskOptions` and `RowFilterOptions` — two near-identical types describing variants of policy options. Each is a discriminator member; the `Options` suffix is redundant given the discriminator already says "this is the X options".
94
46
-**Category:** 8 (redundant suffix), 12 (duplicate concept across similar types).
95
47
-**Suggested name:** Either keep current names but acknowledge as boilerplate, or rename to `RowFilter`, `ColumnMask` (the `$case` discriminator already disambiguates).
96
48
-**Rationale:** Generator artefact; flagging because near-identical types is the moment to ask whether the API surface should collapse.
97
49
98
-
### 14. `whenCondition` field — `src/v1/model.ts:172`
99
-
-**Why weird:**`when` prefix is a SQL keyword; the field is a free-form condition expression. Just `condition` would suffice given the field already lives on `PolicyInfo`.
-**Suggested name:**`condition` or `conditionExpression`.
102
-
-**Rationale:**`when_condition` is wire-only; the TS name can drop the redundant `when_`.
103
-
104
-
### 15. `toPrincipals` / `exceptPrincipals` field names — `src/v1/model.ts:162,164`
105
-
-**Why weird:** Preposition-prefixed names mirror SQL `TO`/`EXCEPT` syntax (this is an ABAC-on-UC policy, the API mimics SQL `GRANT ... TO ... EXCEPT ...`). For programmatic SDK consumers, `principals` and `excludedPrincipals` would read more naturally.
106
-
-**Category:** 1 (vague), 14 (Go/SQL-style names not idiomatic for TS).
107
-
-**Suggested name:**`appliedPrincipals` / `excludedPrincipals` (or `principals` and `excludePrincipals`).
108
-
-**Rationale:** Consumers who don't know the SQL syntax will misread `to_principals` as "principal list to apply to" and miss that `except_principals` is the complement.
-**Why weird:** A `MatchColumn` has a field called `condition` (matched column condition expression) and an `alias`. The condition could equally well be called `expression`; "condition" implies boolean, but it's actually a column-selector expression evaluated to a column.
112
-
-**Category:** 6 (misleading).
113
-
-**Suggested name:**`columnExpression` or `selector`.
114
-
-**Rationale:** Domain reading: "match columns where condition = X" suggests filtering rows; here it actually selects which columns the policy applies to. Easy to misread.
115
-
116
-
### 17. `PolicyInfo.id` — `src/v1/model.ts:139`
117
-
-**Why weird:** Bare `id` field on `PolicyInfo` alongside `name`, `onSecurableFullname`, etc. — multiple identifier-like fields; bare `id` is underspecified.
118
-
-**Category:** 19 (underspecified id when multiple ids exist).
119
-
-**Suggested name:**`policyId`.
120
-
-**Rationale:** Disambiguates from securable identifiers in the same struct.
-**Why weird:** Doc says "Optional description of the policy" but the field is named `comment`. SQL stores DDL comments, sure, but a TS-facing field that the JSDoc calls a description should be `description`.
126
-
-**Category:** 6 (misleading — doc says description, name says comment).
127
-
-**Suggested name:**`description`.
128
-
-**Rationale:** Match the doc and avoid the SQL-DDL leak.
-**Why weird:**`Segment` is a generic CS term. Comment explains it's the User-Agent identity segment; without the comment the constant name doesn't communicate that.
132
54
-**Category:** 1 (vague), 15 (generic field name).
133
55
-**Suggested name:**`USER_AGENT_PACKAGE` or `PKG_USER_AGENT_SEGMENT`.
134
56
-**Rationale:** Minor; only one place in the file but flagged for consistency review across the SDK.
-**Why weird:** Function is exported but not used in this package (no caller in `client.ts`). Dead-looking surface area.
138
60
-**Category:** Observation / 11 (unused public helper).
139
61
-**Suggested name:** Either remove the export (if it's an unused generator default), or document why it ships per-package.
140
62
-**Rationale:** Not a name-quality issue per se, but flagged because each generated package will carry this and grep for unused exports across all packages will turn it up.
141
63
142
-
### 21. `readAll` — `src/v1/utils.ts:40`
64
+
### 8. `readAll` — `src/v1/utils.ts:40`
143
65
-**Why weird:** Function reads an entire response body stream into a buffer. Name is fine but generic; collides cognitively with `Array.prototype` or stream utilities.
-**Why weird:** Two functions with nearly identical names handling very different layers (retry/rate-limit wrapper vs raw HTTP send + logging). Easy to confuse at call site.
-**Rationale:** Names should differ in more than the `Http` infix.
153
75
154
76
## Observations
155
77
156
-
### 23. Wire/TS divergence is heavy
78
+
### 10. Wire/TS divergence is heavy
157
79
The model file is ~497 lines for ~9 user-facing types; >half is marshal/unmarshal/FieldMaskSchema scaffolding. Not a naming problem, but the audit surfaces just how much generator boilerplate dominates each package — worth raising at the SDK-design level.
158
80
159
-
### 24. Action-verb conventions in `Client`
81
+
### 11. Action-verb conventions in `Client`
160
82
The client uses `Create`/`Get`/`List`/`Update`/`Delete` consistently. No mixed `Fetch`/`Retrieve`/`Read`. This is good. (Listed as observation per rule 17 since the audit asked us to flag inconsistencies; here we explicitly note consistency.)
161
83
162
-
### 25. Acronym casing for `Http` / `Url` / `Id` in `utils.ts` / `client.ts`
84
+
### 12. Acronym casing for `Http` / `Url` / `Id` in `utils.ts` / `client.ts`
163
85
The codebase uses `Http` (`HttpClient`, `HttpRequest`, `executeHttpCall`) and `URLSearchParams` (Web standard) and `url` (lowercase) and `userAgent`. Mixing `Http` (PascalCase capital-then-lower) with the imported `URLSearchParams` (ALLCAPS) is inconsistent — common across JS ecosystem and probably not worth changing, but worth noting.
164
86
-**Category:** 3 (acronym casing).
165
87
166
-
### 26. `abac` abbreviation only appears in package name
88
+
### 13. `abac` abbreviation only appears in package name
167
89
The package directory is `abacpolicies` but neither type, field, comment, nor enum mentions `abac`. The package name acts as a domain keyword the SDK is otherwise silent about. May confuse users searching by acronym.
168
90
-**Category:** 5 (cryptic abbreviation in package name).
169
91
@@ -180,14 +102,3 @@ The package directory is `abacpolicies` but neither type, field, comment, nor en
180
102
-`src/v1/client.ts` (250 lines): read fully.
181
103
-`src/v1/utils.ts` (150 lines): read fully.
182
104
-`src/v1/index.ts` (20 lines): read fully.
183
-
184
-
## Fixed
185
-
-#2`DeletePolicy` (originally cited at `src/v1/model.ts:72`): Fixed in regeneration on 2026-05-20 — renamed to `DeletePolicyRequest`; siblings `CreatePolicyRequest`, `GetPolicyRequest`, `ListPoliciesRequest`, `UpdatePolicyRequest` also gained the `Request` suffix.
186
-
-#1 (partial — Deny/Grant values) `PolicyType.POLICY_TYPE_DENY` / `POLICY_TYPE_GRANT` (originally cited at `src/v1/model.ts:7-14`): Fixed in regeneration on 2026-05-20 — Deny and Grant enum values removed.
187
-
-#6`FunctionArgExpression` (originally cited at `src/v1/model.ts:98`): Fixed in regeneration on 2026-05-20 — type removed entirely.
188
-
-#7`useSessionIdentity` field (originally cited at `src/v1/model.ts:292`): Fixed in regeneration on 2026-05-20 — field removed from `PolicyInfo`.
189
-
-#14`FunctionArgExpression.expr` (originally cited at `src/v1/model.ts:99`): Fixed in regeneration on 2026-05-20 — type removed.
190
-
-#15`TagIntrospectionExpression.expr` (originally cited at `src/v1/model.ts:313`): Fixed in regeneration on 2026-05-20 — type removed.
191
-
-#16`ColumnTagValueExtraction` / `TagValueExtraction` (originally cited at `src/v1/model.ts:60,328`): Fixed in regeneration on 2026-05-20 — both types removed.
192
-
-#20 (partial) `DenyOptions` / `GrantOptions` (originally cited at `src/v1/model.ts:84,142`): Fixed in regeneration on 2026-05-20 — both types removed; only `ColumnMaskOptions` and `RowFilterOptions` remain, but the `Options`-suffix issue still applies (now finding #14).
193
-
-#21`ListPolicies` request type (originally cited at `src/v1/model.ts:152`): Fixed in regeneration on 2026-05-20 — renamed to `ListPoliciesRequest`.
0 commit comments