Repository navigation
feat(types)!: the object-calendar element's calendar container follows the @objectstack/spec 17.7.0 slot by reference (objectui#6152, round 9) - #11980
Conversation
…tstack/spec 17.7.0 slot by reference ObjectCalendarBlockConfigSchema is now the object-calendar row's own calendar member (ComponentPropsMap['object-calendar'].calendar, unwrapped), extended only by the two by-name alias refusals. The .partial() and .passthrough() go: a key outside the five (calendar.defaultView, a misspelling) and a block without startDateField are refused, by the slot's own verdict. The derived TypeScript type closes the same way. Pins: the slot measured on the installed spec, member identity, verdict equality over a set of inputs, both directions through every door, the TS face, and a corpus census that every authored container parses. Docs and the plugin-calendar README stop calling the container open. Claude-Session: https://claude.ai/code/session_01DBZ9bntPZ7VKyQNtJeNsgw Co-authored-by: Claude <noreply@anthropic.com>
…inputs The new object-calendar container census walks the authored trees and reads markdown from them, so the ledger records it as a markdown-tree reader; an edit to those documents now triggers the test. Claude-Session: https://claude.ai/code/session_01DBZ9bntPZ7VKyQNtJeNsgw Co-authored-by: Claude <noreply@anthropic.com>
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewServed-tier: PR objectui#11980, round 9 of card objectui#6152 (draft, not ready, no auto-merge, first line ① Derived judgmentsZod accept sets (
Published TypeScript face (
Test and tooling (no published face):
Prose faces (the seat's to judge, per the contract-review reference; read here only for consistency with the diff): the File surface against the claim 6061068534: ② Semver level
③ Boundary flagsDev-declared deviations (report 6062742416), each answered:
Out-of-scope findings, judged:
Noted, not flagged:
Escalations: none. No maintainer decision is needed for this head to land. Implemented-by: VERDICT: PASS Generated by Claude Code |
Part of #6152 (round 9). Round 10 (
ObjectGridSchema.defaultFilters, and the gantt / map flatfilter) is still to come, so #6152 remains open.Clause-②: no
What changed
ObjectCalendarBlockConfigSchemainpackages/types/src/zod/objectql.zod.tsis theobject-calendarelement's owncalendarcontainer. It is now theobject-calendarrow's own member, taken by reference:ObjectCalendarPropsSchema.shape.calendar.unwrap(), extended only by objectui#8355's two by-name alias refusals (dateField,endField). The following are gone:.partial()and.passthrough();allDayFieldrestatement. The slot's own member has the same accept set.The TypeScript face derives from this mirror through
ObjectCalendarBlockConfig, so it is now closed in the same way. It has no index signature, andstartDateFieldis required.Narrowed (a published door). The changeset ships
@object-ui/typesasminorand states the break:unrecognized_keys. That coverscalendar.defaultViewand misspellings.startDateFieldis now refused atcalendar.startDateField.The installed slot refuses both, and nothing read either one.
getCalendarConfigreturns the block whole, and the events pass reads only the five members. So an extra key was dropped unread, and a block with no start binding mounted a calendar that placed no events.Docblocks rewritten:
ObjectCalendarBlockConfigSchemadocblock. The paragraph that said "⛔.passthrough()is kept" is gone;ObjectCalendarSchema.calendarnote inpackages/types/src/objectql.ts. It no longer says "the container stays.passthrough()";.describe().Mechanism assumptions, measured
Measured on the installed
@objectstack/spec17.7.0. The pin file re-reads all of this on every run:packages/types/src/__tests__/object-calendar-container-by-reference-6152.test.ts.["optional","object"], and the catchall isnever, so the object is strict.startDateField(required), plusendDateField,titleField,colorFieldandallDayField.CalendarConfigSchemaobject. Each member, though, is the same object asCalendarConfigSchema's, and the error map is the same. So the two give identical issues on every input probed.CalendarConfigSchema. Today the verdict is the same either way. The row is the contract this element is judged by, so if the spec ever gives the element its own block, this follows it without an edit.unrecognized_keys. objectui answersinvalid_typeat the alias's own path, with the named remedy.defaultView. The row declares it flat, which is whereObjectCalendarreads it. So the narrowing refusescalendar.defaultView. No authored container writes it (census below), so this is the first branch of H2. Nothing was declared that the renderer would not honour.startDateField. No document needed a correction, and no pair is runtime-only.Corpus census
The instrument. A TypeScript-AST census was run once, at this head, over every tracked file that carries the literal
object-calendar: 121 files at the base, plus this PR's test file and changeset. As a control, the same text search findsobject-gridin 397 files. The census finds each element whosetypeisobject-calendarand reads its owncalendarcontainer, orproperties.calendar. It resolves a bare identifier to aconstin the same source, then parses the container against the installed slot.The same instrument is kept as a pin over the authored trees:
examples/, which holds the schema catalog;content/,skills/,docs/andapps/;It re-derives the census on every run. It fails loudly on any container it cannot judge, and it has a firing control.
calendardefaultViewObjectCalendarreads the flatdefaultView)dateField/endFieldstartDateFieldgetCalendarConfigreturns the block whole, so nothing is placedcontent/docs/plugins/plugin-calendar.mdx(12 containers, one of them through aconst) andpackages/plugin-calendar/README.md(2)ObjectCalendarevents passZero elements found, each with a control:
examples/and the schema catalog: zeroobject-calendarelements. The same search findsobject-gridin 5 files there.skills/: zero. The same search findsobject-gridin 3 files.apps/consolenon-test source: zero element containers.register-plugins.tsonly registers the type.docs/: zero.objectstack corpus (read-only,
origin/main):object-calendarappears only in the 17.6 and 17.7 release notes.Test fixtures (not corpus, classified separately):
dateField,endField,defaultView,zzqxNoSuchField) fall into two groups. Some sit on the list VIEW's calendar block, a different contract that this round does not touch. The rest are this round's own refusal pins.Tests (heads
15019c511andaaba24a2c; the second only adds the ledger entry inscripts/markdown-test-inputs.mjs)Union, under
os-verify-lock, on head15019c511:pnpm exec vitest run --maxWorkers=2 packages/types/ packages/plugin-calendar/ packages/plugin-list/ packages/plugin-view/ apps/console/src/__tests__/registry-inputs-spec-parity.test.ts:Test Files 607 passed (607),Tests 12311 passed | 95 skipped (12406).scripts/__tests__/: one red on that head.markdown-test-inputs.test.tsflagged the new census as an unadjudicated markdown reader.aaba24a2cregisters it.aaba24a2c,scripts/__tests__/plus the new pin:Test Files 180 passed | 2 skipped (182),Tests 5508 passed | 2 skipped (5510).The new pin alone:
Tests 56 passed (56).type-check, run against the rebuilt@object-ui/typesdist afterturbo run build --filter='@object-ui/console^...'(34/34 tasks):types,core,plugin-calendar,plugin-dashboard,plugin-timeline,plugin-tree,plugin-list,plugin-view,app-shellandconsole;Done;ObjectCalendarSchema, plus the view producers and the app shells;typesrunstsconfig.test.json, so the pin's@ts-expect-errordirectives are live.Gates, all exit 0:
pnpm check:doc-snippets(784 of 784 blocks judged, 0 failed)check:doc-examples,check:skill-examples,check:readme-exportscheck:doc-types,check:doc-fences,check:doc-example-ids,check:doc-example-readers,check:docs-route-closurecheck:spec-symbolscheck:component-surface-parity(report-only, noobject-calendarrow)check:changeset-claims,check:pending-changeset-literalscheck:new-line-citations(0 new)check:control-bytesnode scripts/check-changeset-presence.mjs,node scripts/check-changeset-no-major.mjsnode scripts/markdown-test-inputs.mjs --auditThe doc gates ran after their own
--build-filterclosure (35/35 turbo tasks).ESLint over the four changed code files: 0 errors. All 32 warnings are pre-existing
no-explicit-anyinobjectql.ts/objectql.zod.ts.Ablations
Each ablation is one-shot and runs through
ablation-replace.mjs. In each one, the mutation is proven on disk, then restored to theHEADblob with an emptygit diff HEAD.A. The container set back to
.partial().passthrough(). The new pin goes 19 red / 37 green. The red rows are:defaultView, misspelling, unknown key, and alias without start;defaultView/ missing-start rows on the element mirror, the tolerant face andsafeValidateSchema;calendar-date-alias-refusal-8355andplugin-calendar'scalendarUnionReads-8651stay green, because they pin the aliases and the node level. The direction was red, as predicted.B. A consumer literal the closed type refuses, injected into
plugin-calendar'sObjectCalendar.tsx:calendar: { startDateField, defaultView }.tsc --noEmitreportserror TS2353: Object literal may only specify known properties, and 'defaultView' does not exist, against the rebuilt dist's closed type. That proves consumers read the narrowed.d.ts. The control leg is the same injection with onlystartDateField, and it compiles (exit 0).ablation-replacerefused it (anchor count moved 1 -> 1) before running anything. It was re-run with a replacement the anchor no longer matches.Scope and deviations
Files beyond the claim's literal list, each one forced by this change:
content/docs/plugins/plugin-calendar.mdx. Its CalendarConfig section said two things that are now false: that the container "keeps.passthrough()... any other key you write inside it still parses", and that the spec does not judge the slot. The paragraph is rewritten, and the section'scalendar-doc-key-set-8830pins are still green.packages/plugin-calendar/README.md, which is outsidesrc/**. A fence comment said thecalendarblock "is open ... a misspelt key there still compiles clean". It is rewritten.scripts/markdown-test-inputs.mjs. The new census reads markdown, andmarkdown-test-inputs.test.tswas red until its ledger entry was added.startDateFieldbecomes required inside the block. That is the slot's own verdict, followed by reference. The dispatch named keys only. The census reads zero authored blocks without it.Left alone:
packages/plugin-calendar/src/**. H2 needed no reader there.ListView.tsx.Acceptance notes (observations, not filed)
KanbanConfig,CalendarConfig,GalleryConfigandTimelineConfigstay.partial()+.passthrough(). The installed spec'sListViewSchemablocks are all strict: catchallnever, measured on 17.7.0 for kanban, calendar, gallery, timeline, gantt, map, chart and tree. This is a different contract, and out of this round as dispatched. No carrier.StrictAnyComponentSchemarefused an unknown key inside the element's container before this round: ablation A left its unknown-key anddefaultViewrows green. The tolerant face andsafeValidateSchemadid not.ObjectCalendar.tsx. TheObjectCalendarConfigdocblock still says two things: thatallDayFieldis "NOT a spec key", and that the view-level mirror "keeps.passthrough()explicitly for this". It has been stale since 17.5.0. This round did not make it false, andplugin-calendar/src/**is outside the round. No carrier.Size
7 files, +610 / −103 against
d7e9e9ab. Not governed:node scripts/check-governed-queue-guard.mjs --testover the 7 paths prints "NOT GOVERNED".Implemented in session
https://claude.ai/code/session_01DBZ9bntPZ7VKyQNtJeNsgw(os-dev,domain:spec @ objectuiseat 1).Generated by Claude Code