Skip to content

Commit c36aa49

Browse files
committed
test(census): ledger valueDomain and the used-codes field read (#27188)
The form-field channel census records two new reads by name: the form's used-codes hand-off reads the entry's `field` stash and `valueDomain`, and the currency-code widget reads `valueDomain` off its carrier. `valueDomain` is object-field metadata (ADR-0144 D2) the code field takes from the object, so it is ledgered as runtime-only rather than declared on the form face. Claude-Session: https://claude.ai/code/session_01Utp6CXtadYa5QXb2PbXPev Co-authored-by: Claude <noreply@anthropic.com>
1 parent 66a421c commit c36aa49

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎ui/examples/schema-catalog/test/form-field-channel-census-12130.test.tsx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ interface LedgerRow {
281281
const LOOKUP = 'entry@fields/src/widgets/LookupField.tsx';
282282
const USER = 'entry@fields/src/widgets/UserField.tsx';
283283
const CURRENCY = 'entry@i18n/src/currency.ts';
284+
const USED_CODES = 'entry@components/src/renderers/form/usedCurrencyCodes.ts';
284285

285286
/**
286287
* Every key the channel reads that `FormFieldSchema` does not declare, with its
@@ -310,14 +311,21 @@ const LEDGER: Readonly<Record<string, LedgerRow>> = {
310311
},
311312
// ── runtime-only, by an existing ruling ─────────────────────────────────
312313
field: {
313-
readers: ['entry@components/src/renderers/form/form.tsx', 'entry@core/src/validation/server-owned-value.ts', LOOKUP, USER],
314+
readers: [
315+
'entry@components/src/renderers/form/form.tsx', USED_CODES, 'entry@core/src/validation/server-owned-value.ts', LOOKUP, USER,
316+
],
314317
why: 'RUNTIME-ONLY (objectui#6609) — the resolved object-field metadata stash; in the authored vocabulary the same '
315318
+ 'key names an object field (objectui#3090).',
316319
},
317320
mobile_fullscreen: {
318321
readers: ['entry@fields/src/widgets/RichTextField.tsx'],
319322
why: 'RUNTIME-ONLY (objectui#3245) — stamped by `ObjectForm` from `ObjectFormSchema.mobile.fullscreenLongText`.',
320323
},
324+
valueDomain: {
325+
readers: [USED_CODES, 'entry@fields/src/widgets/CurrencyCodeField.tsx'],
326+
why: 'RUNTIME-ONLY (objectstack#27188) — object-field metadata (the spec\'s `FieldSchema.valueDomain`, ADR-0144 D2) read '
327+
+ 'off the resolved `field` stash: a record-currency code field takes its domain from the object, not from the form.',
328+
},
321329
currency: {
322330
readers: [CURRENCY],
323331
why: 'RUNTIME-ONLY (objectui#11070 round 13) — the spec\'s `FieldSchema` refuses it; `currencyConfig` is the declared spelling.',

0 commit comments

Comments
 (0)