Skip to content

[finding] ComponentInput.defaultValue?: any (packages/types/src/base.ts:550) is why the marked plugin example in skills/objectui must carry a bare any — tighten the contract to unknown and the baseline row retires with the guide #7493

Description

@os-litant

Filed by the skills lane seat (session session_01LraLgQVGq8egUwfYZpbYt1) from the #7463 flight (PR #7490, report comment 5523867580, out-of-scope finding 3). Unassigned, bare, for triage; landing surface packages/types (a published contract) plus one line in governed skills/objectui/guides/plugin-development.md and one row in KNOWN_BARE_ANY_EXAMPLES in scripts/check-skill-examples.mjs.

Measured by the flight at PR #7490's head 2df07b7

  • packages/types/src/base.ts:550defaultValue?: any; in the exported ComponentInput interface.
  • skills/objectui/guides/plugin-development.md:92 — the marked example restates it as defaultValue: any. The bare-any assertion PR feat(scripts): assert no bare any in a marked skill example, and scan .claude/skills too #7490 adds finds it, and it is declared verbatim as the baseline row skills/objectui/guides/plugin-development.md:92 property defaultValue — the one row of four whose guide is faithful prose rather than rot. Fixing the guide alone would make it lie about the contract it restates, which is why the flight left it declared instead of unmarking it.

Second site, same class (added 11:2xZ from the #7494 flight, PR #7496 report 5524854506, finding 2)

  • packages/core/src/validation/schema-validator.ts:459schema: any, the first parameter of the exported validateSchema. The testing guide's Pattern 3 fence now passes {} with no cast at all (PR fix(skills): teach the honest test-double idiom in testing.md, retiring its three bare-any rows #7496) precisely because the parameter is any: the guide is honest, the contract is wide. The honest fix is unknown with the narrowing done inside the validator, never in the guide restating it. Fold both sites into one PR or split by package — the dev's call, stated in the PR body.

Scope

  1. Tighten defaultValue?: any to defaultValue?: unknown, or to the narrowest union the readers actually accept. Measure the read side first: the manifest serializer and every registry or renderer consumer of defaultValue ([finding] ComponentInput's inputType/min/max/step/placeholder have no reader — the manifest serializer forwards six keys and none of them #5905 records that several ComponentInput keys have no reader at all, so "who reads it" is the fact to settle at source, not assume). Contract-first: a declared type that erases checking is exactly the class the new assertion exists to catch.
  2. Update the guide line to the new type and delete the baseline row in the same PR. The gate reports the row as STALE the moment the guide stops carrying the bare any, so leaving the row is a red, not an option.
  3. A consumer that breaks under unknown is either a real narrowing site (add the narrowing there) or evidence the field is written and never read (say so; that is [finding] ComponentInput's inputType/min/max/step/placeholder have no reader — the manifest serializer forwards six keys and none of them #5905's class).
  4. Same treatment for validateSchema(schema: any): unknown at the boundary, narrowing inside; the Pattern 3 fence needs no change (it already passes a plain {}).

Size S. Fixes this card. Mixed surface: packages/types and packages/core owe changesets by their own gates; the guide line is governed skills/objectui/** (draft PR, human merge).

Verified

Refs: #7463 · PR #7490 · #7494 · PR #7496 · #5905 · #4631.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:specobjectui spec stream: fix lands on packages/types, schema corpus or spec pin coupling — spec lanefindingneeds-user-decisionpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions