Skip to content

luau-types slice 5: fixture coverage for all resource kinds #447

Description

@christopher-buss

Parent

PRD: #441
ADR: #442

What to build

Extend the type-spec fixture suite from slice 2 to cover every resource kind in the schema, both positive and negative cases. This is the slice that proves the Luau Config type actually catches what the PRD says it catches.

Required fixtures (each in packages/bedrock/tests/luau-types/fixtures/):

  • accepts-full-config.spec.luau — every resource kind populated with valid entries (game-passes, places, products, universe, environments)
  • rejects-wrong-typed-price.spec.luau@expect-error on a price assigned as a string
  • rejects-missing-required-field.spec.luau@expect-error on a game-pass entry lacking name
  • expect-game-pass-shape.spec.luautype _ = Expect<GamePassEntry, { ... }> asserting structural equality
  • expect-developer-product-shape.spec.luau — same for DeveloperProductEntry
  • expect-place-shape.spec.luau — same for PlaceEntry
  • expect-universe-shape.spec.luau — same for UniverseEntry
  • expect-env-overlay-partial.spec.luauExpect<> on the env overlay shape demonstrating partial-of-root semantics
  • accepts-redaction-overrides.spec.luau — covers the RedactedGamePassOverride / RedactedPlaceOverride / RedactedDeveloperProductOverride shapes
  • rejects-unknown-resource-kind.spec.luau@expect-error on a top-level key that isn't a known resource collection

If the Luau Config type as it stands in slice 1 is missing any field or entry type that a fixture above needs, this slice also adds those to src/luau/config.luau. The schema-scope decision (no XOR variants, no singleton directives) still holds — the additions are structural mirrors of schema.ts, not the deferred features.

Acceptance criteria

  • All fixtures listed above land and pass the Vitest harness
  • Every resource kind from packages/bedrock/src/core/schema.ts is covered by at least one positive and one negative fixture
  • Any fields added to src/luau/config.luau to support the fixtures are pure mirrors of the TS schema (no XOR encoding, no singleton directives)
  • All new code lands with 100% coverage per ADR-003
  • No Stryker disables

Blocked by

  • #442 — ADR must be Accepted first
  • #444 — slice 2 establishes the harness and fixture conventions

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpkg:bedrockScope: @bedrock-rbx/core packageready-for-agentFully specified, AFK-ready for an agent to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions