Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help


id: linter.scenario_bindings kind: intent statement: “WHEN a spec file is linted, THE linter SHALL fire scenario_binding_targets_declared_scenario on every binding row whose id slugifies to no — or to more than one — #### Scenario: heading of the same file under the one pinned canonicalization, SHALL fire scenario_binding_refs_own_file on every binding-cell reference that resolves only outside the row’s own file, SHALL warn scenario_binding_covers_constraint on every binding row whose verifies cell cites no Constraint row of its own file, SHALL warn scenario_binding_unbound_scenario once per declared scenario with no binding row in table-carrying files and scenario_binding_table_absent exactly once on a table-less file, SHALL warn scenario_binding_uninformative on a binding whose verifies cites more than 40% of the file’s Constraint rows (distinct_cited * 5 > total * 2) or whose on cell cites every declared Transition, SHALL fire scenario_binding_status_closed on every binding row whose optional status cell carries a value outside the closed vocabulary draft/confirmed — the absent cell is draft, SHALL compose with total_refs and ref_kind_compatible without double-reporting, SHALL walk binding rows in no file that carries no such table, and SHALL keep every scenario-binding finding and hint on the warnings channel with exit 0 — never on the issues channel.”

linter-scenario_bindings Specification

Purpose

The scenario-bindings checker: the scenario→model claim layer’s enforcement half. Every ### Scenario bindings row keys one #### Scenario: heading by its slug and cites own-file rows (given→State, on→Transition, asserts→State, verifies→Constraint), so a scenario’s compliance claim is data the linter can check: the slug join key must resolve to exactly one heading, every cited row must live in the binding’s own file (the scenario view projects one file’s machine), resolution and target-kind stay total_refs/ref_kind_compatible’s beat, and files without a table are walked not at all (per-file adoption). The coverage, unbound-hint, saturation, and reconciliation advisories of tickets pxjn/vkxv extend this capability’s family.

Constraints

idkindexprtraces_to
slug_join_keyinvariantevery binding row's id is the slug of exactly one #### Scenario: heading in the binding row's own file, under the one pinned canonicalization — a slug matching zero headings is a labeled finding (a silent no-op binding is a lie), and a slug matching more than one is a labeled finding naming every candidate heading (a silent double-bind is a worse lie)[[linter.scenario_bindings]]
own_file_scopeinvariantevery [[link]] in a binding row's given/on/asserts/verifies cell resolves in the binding row's own file — the scenario view projects one file's machine, a foreign frame has no lifeline, and cross-file bindings stay a named future (Revision 23 pins the restriction; lifting it is its own revision)[[linter.scenario_bindings]]
lazy_resolutioninvariantbinding rows are walked only in files carrying a ### Scenario bindings table — a table-less file parses zero binding rows and reports zero scenario-binding findings; adoption is per file[[linter.scenario_bindings]]
coverage_own_fileinvariantevery binding row's verifies cell cites at least one Constraint row of the binding row's own file (bare id, file-qualified <intent-id>.<id>, or a member of either) — an empty verifies cell or a states-only binding leaves the compliance claim unchecked; FILE-SCOPED v1 is pinned: citing an unrelated own constraint passes by construction, and requirement-scoped matching is ticket specodelic-dsyk[[linter.scenario_bindings]]
status_vocabularyinvariantevery binding row's optional status cell carries a value in the closed vocabulary {draft, confirmed} — the absent cell is draft, so only an explicit misspelling can leave a binding's confirmation provenance unread; the cell sits between id` and the four typed reference columns (Revision 24 pins the column order)[[linter.scenario_bindings]]
rollout_meterinvarianta file with no ### Scenario bindings table gets exactly ONE scenario_binding_table_absent hint; a table-carrying file gets exactly one scenario_binding_unbound_scenario hint per declared scenario slug with no binding row — never both channels of the meter for one file[[linter.scenario_bindings]]
saturation_pinnedinvarianta binding is uninformative when distinct own Constraint rows cited * 5 > total Constraint rows * 2 (strictly more than 40%, integer arithmetic, never floats — 1-2 constraint rows make any citation saturating, 3 rows make one citation clean), or its on cell cites EVERY declared Transition of a non-empty Model; both arms together fire ONE advisory naming the scenario[[linter.scenario_bindings]]
advisory_channelinvariantall four coverage-gate rules render on the warnings channel with exit 0 and are never counted by Report::failures — the issues channel, the strict lint baseline gate (issues only), and every checker verdict stay untouched[[linter.scenario_bindings]]
composition_not_duplicationinvariantresolution and target-kind of binding-cell references stay total_refs / ref_kind_compatible's beat — neither the slug and own-file rules nor the coverage-gate family ever re-reports a dangling or wrong-kind target[[linter.scenario_bindings]]
finding_reportedeffectlinter.scenario_bindings.finding_reported(rule, subject) — every scenario-binding violation renders as one labeled Issue naming the rule id, the file, and the offending row or scenario, and every coverage-gate advisory renders as one labeled warning, each on its pinned channel with exit 0[[linter.scenario_bindings]]

Model

States

  • unwalked
  • walked_clean
  • violations_reported (emits: [[linter.scenario_bindings.finding_reported]])

Transitions

idfromtoguard
walk_tableunwalkedwalked_cleanthe file carries a ### Scenario bindingstable ∧ every binding row's id slug-matches exactly one own#### Scenario: heading ([[linter.scenario_bindings.slug_join_key]]) ∧ every binding-cell link resolves own-file ([[linter.scenario_bindings.own_file_scope]]) ∧ every binding row's status stays in the closed vocabulary ([[linter.scenario_bindings.status_vocabulary]]) ∧ every binding row's verifies cites an own-file Constraint ([[linter.scenario_bindings.coverage_own_file]]) ∧ every declared scenario has a binding row and no binding saturates ([[linter.scenario_bindings.saturation_pinned]])
report_violationsunwalkedviolations_reportedthe file carries a ### Scenario bindingstable ∧ ¬(every binding row's id slug-matches exactly one own#### Scenario: heading ∧ every binding-cell link resolves own-file ∧ every binding row's status stays in the closed vocabulary ∧ every binding row's verifies cites an own-file Constraint ∧ every declared scenario has a binding row and no binding saturates)

Properties

idkindderives_fromgeneratorpredicate
slug_without_heading_firesunit[[linter.scenario_bindings.slug_join_key]]binding_row_with_typo_slug()rule_fired(spec, "scenario_binding_targets_declared_scenario")
ambiguous_slug_fires_onceunit[[linter.scenario_bindings.slug_join_key]]two_headings_sharing_one_slug()exactly one finding naming the row and both headings
slug_match_passesunit[[linter.scenario_bindings.slug_join_key]]binding_row_matching_one_heading()lint_clean(spec)
foreign_ref_firesunit[[linter.scenario_bindings.own_file_scope]]binding_cell_citing_foreign_row()rule_fired(spec, "scenario_binding_refs_own_file")
own_ref_passesunit[[linter.scenario_bindings.own_file_scope]]binding_cell_citing_own_row()lint_clean(spec)
table_less_files_silentunit[[linter.scenario_bindings.lazy_resolution]]corpus_of_table_less_files()zero scenario-binding findings, exit 0
table_carrying_file_fully_walkedunit[[linter.scenario_bindings.lazy_resolution]]one_table_with_two_violations_among_51_clean_files()exactly two findings, both in the carrying file
dangling_ref_not_doubledunit[[linter.scenario_bindings.composition_not_duplication]]binding_cell_citing_absent_row()exactly one total_refs finding; zero own-file findings
wrong_kind_not_doubledunit[[linter.scenario_bindings.composition_not_duplication]]binding_cell_citing_wrong_kind_row()exactly one ref_kind_compatible finding; zero own-file findings
violation_labeledunit[[linter.scenario_bindings.finding_reported]]corpus_with_binding_violations()every finding names rule id, file, and binding row id
states_only_binding_warnsunit[[linter.scenario_bindings.coverage_own_file]]states_only_binding_with_own_constraints()rule_fired(spec, "scenario_binding_covers_constraint") naming the scenario
real_verifies_passesunit[[linter.scenario_bindings.coverage_own_file]]binding_row_citing_own_constraint()zero coverage warnings for that row
unbound_scenario_hints_onceunit[[linter.scenario_bindings.rollout_meter]]one_binding_row_two_headings()exactly one unbound_scenario hint, zero table_absent hints
table_less_file_hints_onceunit[[linter.scenario_bindings.rollout_meter]]corpus_of_table_less_files()exactly one table_absent hint per file, exit 0
saturated_verifies_warnsunit[[linter.scenario_bindings.saturation_pinned]]single_constraint_file_with_cited_binding()exactly one uninformative warning naming the scenario
every_transition_cited_warnsunit[[linter.scenario_bindings.saturation_pinned]]on_cell_citing_all_transitions()exactly one uninformative warning naming the scenario
proportionate_binding_passesunit[[linter.scenario_bindings.saturation_pinned]]three_constraints_one_cited_partial_on()zero saturation warnings
advisories_never_gateunit[[linter.scenario_bindings.advisory_channel]]corpus_firing_every_coverage_rule()issues empty, failures() == 0, all rules on warnings, exit 0
refs_not_doubledunit[[linter.scenario_bindings.composition_not_duplication]]binding_cell_citing_absent_or_wrong_kind_row()exactly the generic rule fires, never a coverage-gate duplicate
status_outside_vocabulary_firesunit[[linter.scenario_bindings.status_vocabulary]]binding_row_with_typo_status()rule_fired(spec, "scenario_binding_status_closed")
closed_or_absent_status_passesunit[[linter.scenario_bindings.status_vocabulary]]binding_rows_with_draft_confirmed_or_absent_status()zero scenario_binding_status_closed findings

Requirements

Requirement: Binding slugs name declared scenarios

The linter SHALL fire scenario_binding_targets_declared_scenario on every binding row whose id is not the slug — under the one pinned canonicalization (lowercase alphanumerics; every non-alphanumeric run → one hyphen; edge hyphens trimmed) — of exactly one #### Scenario: heading in the binding row’s own file, and SHALL pass a row whose id matches exactly one such heading.

Scenario: Slug without a heading fires

  • WHEN a spec file declares #### Scenario: renders folded machines and a binding row whose id is renders-folded-machines-typo
  • THEN the lint reports one scenario_binding_targets_declared_scenario finding naming the file and the binding row id, and exits nonzero

Scenario: Exactly one match passes

  • WHEN the file declares #### Scenario: renders folded machines and a binding row whose id is renders-folded-machines
  • THEN the lint reports zero scenario-binding findings for that row

Scenario: Ambiguous slug fires once

  • WHEN the file declares two #### Scenario: headings that slugify to the same slug, and a binding row whose id is that slug
  • THEN the lint reports exactly one scenario_binding_targets_declared_scenario finding naming the binding row and both headings — never a silent double-bind

Requirement: Binding references stay in the owning file

The linter SHALL fire scenario_binding_refs_own_file on every [[link]] in a binding row’s given/on/asserts/verifies cell that resolves only in a file other than the binding row’s own file, and SHALL pass a cell whose targets all resolve in the owning file.

Scenario: Foreign frame fires

  • WHEN a binding row’s on cell cites [[other.capability.row]] and no row with that id exists in the binding row’s own file
  • THEN the lint reports one scenario_binding_refs_own_file finding naming the binding row, the column, and the foreign target

Scenario: Own-file citation passes

  • WHEN a binding row’s verifies cell cites [[own.capability.constraint_row]] and that row is declared in the same file
  • THEN the lint reports zero own-file findings for that cell

Requirement: Binding rows are walked only where the table lives

The linter SHALL walk binding rows only in files that carry a ### Scenario bindings table: a file without the table parses zero binding rows and SHALL produce zero scenario-binding findings — a table-less file has opted out, and adoption is per file.

Scenario: Table-less corpus stays silent

  • WHEN the linter runs over the corpus’s 52 spec files, none of which carries a ### Scenario bindings table
  • THEN zero scenario_binding_targets_declared_scenario and zero scenario_binding_refs_own_file findings are reported, exit 0

Scenario: Table-carrying file is fully walked

  • WHEN one file carries the table with one slug violation and one foreign reference
  • THEN exactly those two findings are reported for that file, and the other 51 files stay silent

Requirement: Every binding verifies a constraint of its own file

The linter SHALL warn scenario_binding_covers_constraint on every binding row whose verifies cell cites no Constraint row of the binding row’s own file, and SHALL pass a row whose verifies cell cites at least one such row. The scope is FILE-level (v1, pinned): citing an unrelated own constraint passes the check by construction; the linter SHALL NOT attempt requirement-scoped matching (ticket specodelic-dsyk). The finding is advisory: the warnings channel, exit 0, never an Issue.

Scenario: States-only binding warns

  • WHEN a spec file declares Constraint rows and a binding row whose only populated cells are given/asserts
  • THEN the lint reports exactly one scenario_binding_covers_constraint warning naming the scenario slug, and exits 0

Scenario: A real verifies citation passes

  • WHEN a binding row’s verifies cell cites one Constraint row of its own file
  • THEN the lint reports zero coverage warnings for that row

Requirement: Unbound scenarios are metered as advisory hints

The linter SHALL warn scenario_binding_unbound_scenario once for every #### Scenario: heading of a table-carrying file whose slug has no binding row, and SHALL warn scenario_binding_table_absent exactly once on any file that declares no ### Scenario bindings table. A file WITH the table SHALL NOT receive the file-level hint, and a file WITHOUT the table SHALL NOT receive per-scenario hints. Both are advisory: the warnings channel, exit 0, never an Issue.

Scenario: One bound row for two headings hints once

  • WHEN a file carries the table with one binding row and declares two #### Scenario: headings
  • THEN the lint reports exactly one scenario_binding_unbound_scenario hint naming the unbound slug and zero file-level hints

Scenario: A table-less file hints once

  • WHEN the linter runs over a corpus of table-less spec files
  • THEN each file gets exactly one scenario_binding_table_absent warning and zero per-scenario hints, and the lint exits 0

Requirement: A binding that claims everything is uninformative

The linter SHALL warn scenario_binding_uninformative on a binding row whose verifies cell cites MORE than 40% of the file’s Constraint rows — the pinned comparison is distinct_cited * 5 > total * 2, in integer arithmetic — or whose on cell cites EVERY declared Transition of a non-empty Model; an empty on cell never fires. Both arms together SHALL fire ONE warning naming the scenario. The finding is advisory: the warnings channel, exit 0, never an Issue.

Scenario: Saturated verifies warns

  • WHEN a file declares one Constraint row and a binding row’s verifies cell cites it
  • THEN the lint reports exactly one scenario_binding_uninformative warning naming the scenario

Scenario: Every transition cited warns

  • WHEN a file declares two Transitions and a binding row’s on cell cites both, while verifies stays proportionate
  • THEN the lint reports exactly one scenario_binding_uninformative warning naming the scenario

Scenario: A proportionate binding passes

  • WHEN a file declares three Constraints and two Transitions, and a binding row cites one Constraint in verifies and one Transition in on
  • THEN the lint reports zero saturation warnings

Requirement: Coverage findings never gate

None of scenario_binding_covers_constraint, scenario_binding_unbound_scenario, scenario_binding_table_absent, or scenario_binding_uninformative SHALL ever appear on the issues channel, SHALL never be counted by Report::failures, and SHALL never trip the strict lint baseline gate or a checker verdict.

Scenario: The advisories stay on the warnings channel

  • WHEN the lint runs a corpus that fires every coverage-gate rule
  • THEN issues carries no scenario-binding finding, failures() is 0, and every fired rule appears on the warnings channel with exit 0

Requirement: Binding status stays in the closed vocabulary

The linter SHALL fire scenario_binding_status_closed on every binding row whose optional status cell carries a value outside the closed vocabulary {draft, confirmed} — the absent cell is draft — and SHALL pass every row whose status is draft, confirmed, or absent. The finding names the file, the binding row, and the offending value; like the other closed vocabularies it is an Issue on the failure channel, not an advisory.

Scenario: A status outside the vocabulary fires

  • WHEN a binding row carries status = confrimed
  • THEN the lint reports one scenario_binding_status_closed finding naming the file, the binding row id, and the value, and exits nonzero

Scenario: The closed statuses pass

  • WHEN one binding row carries status = draft and another carries status = confirmed, in a table whose declared columns include status
  • THEN the lint reports zero scenario_binding_status_closed findings and zero row-shape findings for both rows

Scenario: An absent status passes as draft

  • WHEN a binding row carries no status cell at all
  • THEN the lint reports zero scenario_binding_status_closed findings for that row

Scenario bindings

idstatusgivenonassertsverifies
slug-without-a-heading-fires[[slug_join_key]]
exactly-one-match-passes[[slug_join_key]]
ambiguous-slug-fires-once[[slug_join_key]]
foreign-frame-fires[[own_file_scope]]
own-file-citation-passes[[own_file_scope]]
a-status-outside-the-vocabulary-fires[[status_vocabulary]]
the-closed-statuses-pass[[status_vocabulary]]
an-absent-status-passes-as-draft[[status_vocabulary]]
table-less-corpus-stays-silent[[lazy_resolution]]
table-carrying-file-is-fully-walked[[lazy_resolution]]
states-only-binding-warns[[coverage_own_file]]
a-real-verifies-citation-passes[[coverage_own_file]]
one-bound-row-for-two-headings-hints-once[[rollout_meter]]
a-table-less-file-hints-once[[rollout_meter]]
saturated-verifies-warns[[saturation_pinned]]
every-transition-cited-warns[[saturation_pinned]]
a-proportionate-binding-passes[[saturation_pinned]]
the-advisories-stay-on-the-warnings-channel[[advisory_channel]]