docs(plugin-calendar): shrink UNGATED_DOCS by one — the calendar README's 10 blocks compile (#5174 batch 13) - #7929
Merged
Conversation
…ME's 10 blocks compile `packages/plugin-calendar/README.md` leaves the `check-doc-snippet-types` ledger. All 10 of its ts/tsx blocks now compile --strict against the built `dist/*.d.ts`; no FRAGMENT_MARKER was written and no entry was added. Three blocks were repaired at the document, never by weakening the gate: - The authored-surface listing was a bare brace-wrapped block using `?:` optional-property notation inside a ```typescript fence — not expression syntax, so it could not parse at all (TS1109 x14). It is now a `type` alias, which keeps the `?:` markers a reader needs, plus two assignments that hold the listing to `CalendarViewSchema` in both directions. An earlier draft rewrote it as an annotated VALUE literal; that form compiles but destroys the optionality notation that `readme-calendar-view-schema.test.ts` reads, turning that pin red with 12 false "README says required" claims. The pin is a working guard and is left untouched. - `data: [...]` — a literal ellipsis standing in for "your records" — is not an expression either (TS1109 x1). It is now an empty array with a comment. - The two host-only handlers took their parameters implicitly `any` (TS7006 x2) because their object literal had no annotation. The annotation now supplies `CalendarEvent` and `CalendarViewMode` from the shipped schema. The ledger reason for this entry was stale in both halves and is reported in the PR rather than reproduced: 15 parse diagnostics reproduce, not 9, and the two remaining diagnostics are implicit-any, not undefined-name. A limit is published rather than left to be discovered: `CalendarViewSchema` extends `BaseSchema`, whose `[key: string]: any` means the compiler checks every key's TYPE and no key's SPELLING. A note in the README says so. Part of #5174 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013uAaxiwgYDybsTNV9xwa1M
…ated-docs-batch13
The note added above states the limit; this points at the card that owns it. Part of #5174 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013uAaxiwgYDybsTNV9xwa1M
Contributor
✅ 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
|
baozhoutao
marked this pull request as ready for review
September 6, 2026 03:38
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5174 — batch 13 of the
check-doc-snippet-typesungated-docs ledger burn-down.packages/plugin-calendar/README.mdleavesUNGATED_DOCS. All 10 of its ts/tsx blocks now compile--strictagainst the builtdist/*.d.ts. ZeroFRAGMENT_MARKERs written, zero entries added — the ledger hunk is0additions /2deletions and the whole diff is exactly two files.Fragments unmoved ⇒ every one of the 10 newly covered blocks earned it by compiling.
All figures are at
8fbe7b724, the final commit, after mergingorigin/maindb2c20d08(never rebased).git status --porcelainwas empty at union time and after all seven probe runs.What was wrong, measured — the ledger reason was stale in BOTH halves
The entry read "9 parse diagnostic(s) — blocks fenced
tsthat are bare object literals or elided bodies; 2 undefined-name diagnostic(s)". What reproduces at the branch point is 15 parse diagnostics, not 9, and zero undefined-name diagnostics — the two that remain are implicit-any. Reported, not reproduced.2 parse failures, 15 diagnostics, all
TS1109: Expression expected:?:optional-property notation inside a```typescriptfence.?:is not expression syntax, so it could not parse as a value at all (14 diagnostics).data: [...]— a literal ellipsis standing in for "your records"....with no operand is not an expression (1 diagnostic).1 semantic failure, 2 diagnostics:
TS7006×2 on theeventandviewparameters of the two host-only handlers — their object literal carried no annotation, so neither parameter got a contextual type.7 blocks already compiled.
⭐ The interesting part: the first repair was correct and still wrong
The listing was first rewritten as a
CalendarViewSchema-annotated value literal. It compiled, and the gate went green. It also turnedpackages/plugin-calendar/src/readme-calendar-view-schema.test.tsred with 12 false claims of the formdata: README says required, schema says optional— because that pin parses the fence's?:markers to hold the README's requiredness to the interface, and a value literal cannot carry them.That pin is a working guard, and editing it to accept a value literal would have deleted the requiredness check. So the block is now a
typealias — it keeps the?:markers a reader needs — held to the shipped type by two assignments in both directions:The pin is untouched and green (probe P7 shows the doc gate now holds optionality — the exact property that pin checks textually — by a second, independent mechanism).
CalendarViewSchema extends BaseSchema, andBaseSchemaends with[key: string]: any(packages/types/src/base.ts:467). So the annotation checks every key's type and no key's spelling. That is measured (probe P5, predicted green in writing and observed green), it is stated in a note in the README itself, and it is filed as #7927. Nothing in this PR is written as if key spelling were checked.Seven reverse-verification probes — direction predicted IN WRITING before any probe ran
Predictions were written to a file first. All seven matched. Each leg proved the mutation reached disk (injected/removed text counted,
git hash-objectshown to differ from theHEADblob — an equal or empty hash aborts the harness non-zero) and proved the restore by an emptygit diff HEADplus a blob hash equal toHEAD's. No build artifact sits between mutation and thing-under-test, so no rebuild was needed on either leg — stated rather than assumed. Every probe was run twice: once before theorigin/mainmerge and again at the merged head, with identical diagnostics.view?: CalendarViewMode→view?: 'agenda'TS2322in both assignment directions'calendar-vue'TS2322: Type '"calendar-vue"' is not assignable to type '"calendar-view"'TS7006×2 oneventandview, the exact pair the decomposition recordeddata: [...]Syntax phase: 1 block(s) failed to parse,TS1109, denominator 477 → 476titleField?:→titleFieldd?:477 of 477 judged, 0 failedevent.title→event.titelTS2551: Property 'titel' does not exist on type 'CalendarEvent'data?: any→data: any(optional → required)TS2322: Property 'data' is optional in type 'CalendarViewSchema' but required in type 'CalendarViewNode'Honest notes: P6's predicted code was "TS2339/TS2551-class" and the observed code is
TS2551(TypeScript emits 2551 when it has a near-spelling suggestion) — predicted direction was RED and the observed fact is the same one. P5 and P6 together bound exactly where this document's checking starts (types, optionality, and members of the callback payload) and stops (schema key spelling).CalendarEventis a plain interface with no index signature, which is why P6 IS caught and P5 is not.Scope guard
UNGATED_DOCSobject literal;git diff --numstatreads0 2three-dot. The ledger docblock prose is untouched and no surviving entry's reason text changed (asserted programmatically, not by eye).Fence scanningbanner to EOF is identical on both sides of this diff — sha25691450911e8…onorigin/mainand on this branch, measured over the same working tree.origin/main's copy of the gate was imported alongside this branch's and both were evaluated over the same working tree, so the covered-set delta is attributable to the ledger alone.ADDED entries: [],previously-covered docs now UNGATED: [],build filters ADDED [] REMOVED [].packages/react/README.md(batch 12),packages/auth/README.md(held by open PR chore(deps): resolve @objectstack/spec at 17.3.0 in the lockfile #7685),packages/plugin-gantt/plugin-kanban(finding(docs): three documentedinterfaceblocks are behind their shipped types — thePARTIAL_EXCERPTSledger #6214 opened with #7302),packages/plugin-chatbot(deferred).Gates
All at
8fbe7b724, exit codes captured by redirect before any pipe:check:doc-snippets0 ·check:doc-fences0 ·check:doc-types0 ·check:control-bytes0 (plus a manualgrep -naPover the C0 set on both changed files, no hits) ·check-doc-links0 ·check:readme-exports0 ·type-check:scripts0 ·check-changeset-presence0 ("No source or published contract of a released package changed in this range, so no changeset is owed" — none added) ·lint:root0,32 problems (0 errors, 32 warnings), all pre-existing and the changed gate file reportserrorCount 0 warningCount 0.Vitest from the repo root,
--maxWorkers=2, exit 0:Test Files 9 passed (9)/Tests 377 passed (377). Suite union derived bygit grep -lfor the gate's name and for the edited document, re-derived after the merge (identical set); it includes the gate's own suite andpackages/plugin-calendar/src/readme-calendar-view-schema.test.ts, the pin discussed above.check:readme-exportsfirst exited 1 with 3 findings, all "its type entry./dist/index.d.tsis not on disk — runpnpm buildfirst" forplugin-ai, none naming a file in this diff. That is the gate's own by-design precondition refusal, not a verdict. Buildingplugin-aiandplugin-treemade it a real, green measurement — and the doc gate's reading was re-taken afterwards and proved identical, so the top-up build did not move any figure here.objectui-issue-5174-b12's paths. The artifacts were restored into this worktree:dist/index.d.tswas confirmed on disk here for all 26 build-filter packages before any gate result was trusted, and the gate's own resolution control names this worktree's path.Filed for triage, not repaired in this PR
object-calendarexamples author six keys and the renderer reads none of them —objectforobjectName,startFieldforstartDateField, plusfields/ node-leveldataSource#7925 — the README's twoobject-calendarexamples author six keys and the renderer reads none of them (objectwhere it readsobjectName;startField, which failsgetCalendarConfig's:131gate sotitleField/endField/colorFieldare never reached; plusfieldsand a node-leveldataSource). Those blocks already compile, so this is not a coverage defect; repairing them is an authoring decision plus a lenient-(schema as any)-alias question under AGENTS.md §5 #0.1, and no gate in this family would verify the result.BaseSchemacloses with[key: string]: any(packages/types/src/base.ts:467), so NO annotation on any node schema can catch a misspelled metadata key — measured green by a planted probe while the type, optionality and payload-member probes all went red #7927 —BaseSchema's[key: string]: any, the structural reason probe P5 is green.Both
finding, unassigned, nodomain:*and no grade — those are triage's.Draft, not enqueued, auto-merge not enabled.
Generated by Claude Code