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 59ddc82
Browse filesBrowse the repository at this point in the historyBrowse files
Mirrors the TS reference (d841552) for the Python port.
Decision #5 (closed-value-set conformance gate): emit allowedValues into the
Python registry manifest so closed enums are byte-gated cross-port. Rule:
allowedValues is emitted ONLY when the attr declares a non-empty closed set;
the key is OMITTED for open / format-validated attrs (@Currency, @Locale,
@Cardinality). Key order per attr: name, valueType, isArray, required,
allowedValues?, description, rules?/example?/whenToUse?. registry_manifest's
_to_manifest_attr now reads AttrSchema.allowed_values (already carried on the
schema for every closed enum) and inserts it before description.
@dbColumnType previously registered with NO allowed_values; it now carries the
closed set (uuid | jsonb | timestamp_with_tz) on _DB_COLUMN_TYPE_SCHEMA PURELY so
it surfaces in the manifest. Its real constraint is the (subtype × value) pairing
in _validate_db_column_type, so it is EXEMPT from the generic flat allowed_values
membership Check 3 in validation_passes — avoiding the double ERR_BAD_ATTR_VALUE
that would break the single-error tests (matches the TS reference exactly).
Decision #4 (finish the @dbColumnType slim): the dead uuid_array/text_array
constants + value-set + pairing-map entries were already removed in the Phase 1
commit (0a70d32); this finishes it by updating the embedded spec_metamodel/db.json
dbColumnType description prose to list only uuid | jsonb | timestamp_with_tz and
their pairings + add the allowedValues array (byte-identical to the repo-root
spec/metamodel/db.json, satisfying the FR-033 embed gate).
Python registry-conformance byte-matches the canonical
fixtures/registry-conformance/expected-registry.json. All value-sets verified
against the canonical target list (no mismatches).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GF9xLEQZaPus5Y6opk398n
Copy file name to clipboardExpand all lines: server/python/src/metaobjects/spec_metamodel/db.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
"children": [
8
8
{ "type": "attr", "subType": "string", "name": "column", "min": 0, "max": 1, "description": "Physical column name for this field on an rdb source. Defaults to the field name via columnNamingStrategy." },
9
9
{ "type": "attr", "subType": "boolean", "name": "db.indexed", "min": 0, "max": 1, "description": "When true, suppress the @filterable-without-index Loader warning (the field is indexed by other means)." },
10
-
{ "type": "attr", "subType": "string", "name": "dbColumnType", "min": 0, "max": 1, "description": "Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb | timestamp_with_tz | uuid_array | text_array, each legal only on a specific logical field subtype (uuid/jsonb/uuid_array/text_array on field.string, timestamp_with_tz on field.timestamp). uuid_array/text_array emit native SQL arrays (uuid[]/text[]). The logical field type and its native binding are unchanged." }
10
+
{ "type": "attr", "subType": "string", "name": "dbColumnType", "min": 0, "max": 1, "allowedValues": ["uuid", "jsonb", "timestamp_with_tz"], "description": "Physical DB column-type override (ADR-0013 escape hatch). Legal values are uuid | jsonb | timestamp_with_tz, each legal only on a specific logical field subtype (uuid/jsonb on field.string, timestamp_with_tz on field.timestamp). The logical field type and its native binding are unchanged. Native SQL arrays (uuid[]/text[]) are NOT declared here — they are derived from a field subtype + isArray (ADR-0036 Wave 1)." }
0 commit comments