Skip to content

lint: state-machine-no-initial-states passes an initialStates list that names every option, which refuses nothing on insert (split from #35251) #35603

Open

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgUZrkMKgGrXXe8zPGq

Filing gate: (c) a residual a card's review names — carries the every-option residual of #35251 (scope note 6992730706, from the contract-review delta 6992699203 on PR #35244). #35251 keeps the update-only predicate, the three showcase lists and the negative pin (claim 7016093607); this card carries only the residual below. Split on the seat's order. ⛔ Not a claim; grade left to triage's first touch.

What happens

state-machine-no-initial-states (publish-time rule from PR #35244, packages/lint/src/validate-inert-object-declarations.ts) refuses a state_machine validation that runs on insert and declares no initialStates. An initialStates list that names every option of the state field satisfies the rule, yet it refuses nothing on insert: the declaration has no effect, the same class of inert metadata the rule exists to catch.

Seen on crm_opportunity (app-crm): its initialStates lists every option of its state field. That is honest for that app — it records deals already won or lost, and its hook and tests create them — so the example may well keep it.

Why this needs a route before dispatch

Changing the rule here changes its visible verdict on a list it passes today (crm_opportunity lists every option). Before any dev starts, the route has to be settled — by the seat, or by the maintainer's ruling if it is a product choice:

  • (A) the rule keeps passing an every-option list (no change; document why);
  • (B) an every-option list draws a warning, not a refusal;
  • (C) an every-option list is refused like a missing one.

And whether app-crm's crm_opportunity keeps its list.

Re-check

git grep -n "STATE_MACHINE_NO_INITIAL_STATES" origin/main -- packages/lint/src · the initialStates of crm_opportunity under examples/app-crm/.

Dedupe: issue search initialStates every option, state-machine-no-initial-states inert → only #35251 and #34776.

Activity

  1. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:spec (lint) · pm:queue; rationale: area:build · Bug · Impeded (an initialStates list naming every option passes state-machine-no-initial-states yet refuses nothing on insert) · rare (one known case, crm_opportunity, where the full list is honest) → p3; kept open because the rule misses its own class. Route: this is a lint-strictness call inside the lane, not a product choice. The claiming seat picks among the card's options and records why; (B), a warning, flips no current pass to a refusal. If the seat reads (C) as changing what builders may publish, it moves the card to the decision box instead of dispatching.

  2. added
    domain:spec
    pm:queue
    on Nov 19, 2026
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

    area:builddomain:specpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions