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
Filing unassigned — recording, not claiming. Found while re-verifying #6263 (per-option default on the form-view face); this is a different surface and is out of scope for that card's PR (#6886).
The observation
packages/components/src/renderers/basic/metadata-viewer.tsx:109 declares its own local shape for a select option:
It is used at line 144 to read an object definition'sfield.options off the (untyped) metadata context, and at line 148 to pick a state machine's initial state via options.find((o) =greater-than o.default). That reader is correct and the key it reads is the ruled-enforce object-field face (objectstack#7246 / PR #7388) — ⛔ nothing here suggests changing the behaviour.
What is worth recording is the shape declaration, not the behaviour. This repo has been closing exactly this defect class for several cards running — one contract, several hand-written descriptions, each only ever checked against itself:
This declaration is in the same class and was not part of any of those sweeps: four of the spec's five SelectOption keys, visibleWhen absent, no Omit naming the narrowing, no comment saying it is deliberate.
The renderer's behaviour is right today: it reads default off an object definition, which is where the key is enforced.
scripts/check-spec-symbol-derivation.mjs reports 2 declared deliberate copies, 18 unbacked claims in 5 packages and this declaration is not among the flagged claims — it carries no alignment claim comment at all, so the gate has nothing to match on. That is the gap: the gate can only see copies that say they are copies.
So the cost is drift risk, not a live defect: if the spec's option shape moves, this copy goes on compiling and silently answers an older question.
Candidate directions (not a recommendation — this needs triage, not a fix from me)
Derive it — Omit-with-named-narrowings from @objectstack/spec/data's SelectOption, the sanctioned form in this repo, which is what form-spec.ts now does one package over.
Leave it and add the alignment-claim comment the derivation gate looks for, so it becomes a declared deliberate copy rather than an invisible one.
Ask whether the gate should notice un-claimed structural copies at all — the class it currently catches is "claims alignment but is not backed", and this one is the neighbouring class, "is a copy and says nothing".
⛔ Out of scope for anyone picking this up: the object-field face's per-option default is ruled enforce (objectstack#7246, maintainer override recorded verbatim as "enforce.", implemented by PR #7388), and the alias table (isDefault / selected) is likewise untouchable. This card is about where a shape is declared, not about what any surface honours.
Filing unassigned — recording, not claiming. Found while re-verifying #6263 (per-option
defaulton the form-view face); this is a different surface and is out of scope for that card's PR (#6886).The observation
packages/components/src/renderers/basic/metadata-viewer.tsx:109declares its own local shape for a select option:It is used at line 144 to read an object definition's
field.optionsoff the (untyped) metadata context, and at line 148 to pick a state machine's initial state viaoptions.find((o) =greater-than o.default). That reader is correct and the key it reads is the ruled-enforceobject-field face (objectstack#7246 / PR #7388) — ⛔ nothing here suggests changing the behaviour.What is worth recording is the shape declaration, not the behaviour. This repo has been closing exactly this defect class for several cards running — one contract, several hand-written descriptions, each only ever checked against itself:
FormFieldSpec没有声明dependsOn,但两个 widget 都读它 —— 类型化的 form spec 写不出这两个 widget 的必备配置 #5040 / [finding] A THIRD inline copy of the form-field authoring contract lives in apps/console FormPage.tsx — objectui#5040 converged only the app-shell two #5542 convergedFormFieldSpec(the widget-side copy declareddependsOn, the authoring-side copy did not);FormSectionSpec/FormViewSpec, which had drifted in both directions between app-shell andapps/console;visibleWhenwritten in a*.form.tsis silently inert — the metadata-admin renderer never reads it #6247 / PR Honour per-optionvisibleWhenin the metadata-admin renderer #6618 converged the last hand-written element type in that file —FormFieldSpec.options— after a key dropped by silence turned out to be how a legally-authored per-optionvisibleWhencame to parse clean and render inert.This declaration is in the same class and was not part of any of those sweeps: four of the spec's five
SelectOptionkeys,visibleWhenabsent, noOmitnaming the narrowing, no comment saying it is deliberate.Why it is only a
findingand not a bugMeasured, so the grading is not a guess:
useMetadataItemasany— so unlike A per-optionvisibleWhenwritten in a*.form.tsis silently inert — the metadata-admin renderer never reads it #6247 there is no author who can be told "this parsed clean" and then be ignored.defaultoff an object definition, which is where the key is enforced.scripts/check-spec-symbol-derivation.mjsreports2 declared deliberate copies, 18 unbacked claims in 5 packagesand this declaration is not among the flagged claims — it carries no alignment claim comment at all, so the gate has nothing to match on. That is the gap: the gate can only see copies that say they are copies.So the cost is drift risk, not a live defect: if the spec's option shape moves, this copy goes on compiling and silently answers an older question.
Candidate directions (not a recommendation — this needs triage, not a fix from me)
Omit-with-named-narrowings from@objectstack/spec/data'sSelectOption, the sanctioned form in this repo, which is whatform-spec.tsnow does one package over.⛔ Out of scope for anyone picking this up: the object-field face's per-option
defaultis ruledenforce(objectstack#7246, maintainer override recorded verbatim as "enforce.", implemented by PR #7388), and the alias table (isDefault/selected) is likewise untouchable. This card is about where a shape is declared, not about what any surface honours.