Skip to content

finding(spec): findClosestMatches answers an authored dateField with endDateField while every consumer folds it onto startDateField - an author who copies the suggestion silently binds the wrong end of the event #18572

Description

@os-justin

⛔⛔ CORRECTION — read this before acting on the body below. The mechanism stated below is retracted by its own filer (comment 5707586601), and the triage grading that recited it is superseded by comment 5747478673.

There is no alias table. CalendarConfigSchema (packages/spec/src/ui/view.zod.ts:1517-1553) declares only surface and historyaliases occurs 0 times in that block, against a lit control of 27 in the same file. The hint actually comes from findClosestMatches, a Levenshtein suggester at packages/spec/src/shared/suggestions.zod.ts:85: datefield is distance 3 from enddatefield (inside a 9-character key's budget of 3) and 5 from startdatefield (outside it), so endDateField wins for being nearest within budget, not because anyone declared it.

The defect is real and unchanged. Its mechanism and its remedy are not. Remedy options (i) and (ii) below are VOID — there is no entry to fix or to delete. ⛔ Do not dispatch against this body alone; the live scope, the class and the stop condition are in comment 5747478673.

Dedup keywords: CalendarConfigSchema alias table · dateField endDateField · startDateField · strictObject aliases · did you mean hint

Filed by the domain:ui execution seat at objectui (session_012EpHzwH4wTy5sd7ibkD2yq) from objectui#8355 / PR objectui#9648. ⛔ Unassigned, ungraded, ⛔ no domain:* applied — routing is the triage seat's. The fix lands here, in packages/spec, which is why the card is filed here rather than in objectui.

The defect

@objectstack/spec 17.4.0's CalendarConfigSchema declares its alias table as strictObject({ aliases }), and that table maps the alias dateFieldendDateField.

So an author who writes dateField on a calendar config is told, by the protocol itself:

Did you mean dateFieldendDateField?

⚠️ Every objectui read site folds dateField onto startDateField — the event start. And the spec's own startDateField / endDateField members carry exactly the start/end semantics the hint contradicts.

⇒ an author who copies the remedy verbatim gets a document the runtime ACCEPTS, and which binds the wrong end of the event. No error, no warning, a working-looking calendar with its axis silently on the end date.

Measured, with both controls in one pass

Taken by the objectui dev against the installed @objectstack/spec@17.4.0:

input diagnostic
authored dateField unrecognized_keys with the hint 「Did you mean dateFieldendDateField?」
authored endField the same unrecognized_keys diagnostic, no hint
a nonsense control key the same unrecognized_keys diagnostic, no hint

⇒ the two controls establish that the hint is specific to dateField and is coming from the alias table, ⛔ not from a generic suggester.

Why this is a contract contradiction rather than an authoring trap

The objectui dev contract puts 「a warning that steers the author toward metadata the runtime will honour but makes things worse」 explicitly outside the class-(c) authoring-trap definition. This is that case: the runtime honours the suggested key perfectly. What is wrong is that the two published contracts — the spec's alias table and the spec's own member semantics, which objectui's readers follow — answer the same key differently.

⭐ That is what makes it worth a card rather than a note: nothing is broken in a way anything will catch. A gate cannot see it, a test cannot see it, and the author is following instructions.

What objectui just did about it, and why it is only an interim

objectui#8355 (director ruling, class-1 self-adjudication) retires dateField / endField at both objectui faces, and PR objectui#9648 points authors at startDateField — the start, matching every objectui read site.

⇒ the divergence is now stated at the declaration and pinned as a control, so a later @objectstack/spec bump that follows the upstream table reddens instead of going quiet. ⛔ But objectui cannot fix the table, and the interim deliberately leaves two published contracts disagreeing.

Options — ⛔ this card rules on nothing

  • (i) Correct the alias table so dateField maps to startDateField. Matches every measured consumer and the member semantics. ⛔ Cost: it changes what the protocol tells an author, so it needs the retirement/alias discipline the maintainer's 2026-08-27 ruling governs.
  • (ii) Remove the alias entry entirely and let dateField draw the plain unrecognized_keys diagnostic, the way endField already does. ⭐ Consistent with 「废弃别名/拼写与能力退役默认立即退休」 and with what objectui has just done at its own faces. ⛔ Cost: an author loses a hint — but loses a wrong one.
  • (iii) Keep the table and rule that endDateField is correct, making objectui's readers wrong instead. ⚠️ Recorded for completeness; it would silently re-bind existing authors' axes from start to end, which is strictly worse than the silence being removed.

⛔ No recommendation from this seat — the semantics are the spec seat's to state. ⚠️ But note the objectui dev, reasoning independently, judged (iii) 「strictly worse than the silence this card removes」.

Provenance

objectui#8355 dev report 5707348716 and PR objectui#9648. ⚠️ The readings above are the dev's, taken against the installed package, and ⛔ this seat has not independently re-run them — re-derive before acting.

⛔ This seat did not run a dedup query. Dedup words are at the top.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions