9.5 KiB
Data Model: Filament/Livewire Heavy Suite Segmentation
This feature does not introduce new runtime database tables. The data-model work formalizes repository-level governance objects that describe how heavy Filament, Livewire, surface, discovery, and browser families are classified, assigned to lanes, guarded against drift, and attributed in reporting. It builds directly on the existing Spec 206 lane manifest and Spec 207 fixture-cost outputs.
1. Heavy Test Classification
Purpose
Represents a repository-defined cost and purpose class for a UI-related test family.
Fields
classification_id: stable identifier such asui-light,ui-workflow,surface-guard,discovery-heavy, orbrowserpurpose: contributor-facing description of what this class is meant to coverdominant_cost_drivers: list of characteristics such assingle-mount,multi-mount,relation-manager breadth,reflection,resource discovery,workflow fan-out, orreal-browser interactiondefault_lane_id: primary execution lane for this classallowed_lane_ids: lanes where the class may legitimately appearforbidden_lane_ids: lanes where the class must not appearreviewer_signals: short list of clues a reviewer should look for when classifying a new testescalation_triggers: conditions that force a test out of a lighter class, such as broad discovery, wide reflection, or repeated multi-surface mounts
Validation rules
browsermust allow only thebrowserlane.discovery-heavymust forbidfast-feedbackandconfidence.surface-guardmust forbidfast-feedbackandconfidenceand default toheavy-governance.ui-lightmay appear infast-feedbackandconfidenceonly when its dominant cost drivers remain localized.ui-workflowdefaults toconfidenceand may escalate toheavy-governanceif its breadth becomes governance-wide.
2. Heavy Test Family
Purpose
Represents a named cluster of related tests that share a heavy behavior pattern, hotspot files, and intended lane placement.
Fields
family_id: stable identifier for the familyclassification_id: owning heavy classpurpose: why the family exists and what safety it providescurrent_lane_id: the lane where the family currently runstarget_lane_id: the intended lane after segmentationselectors: one or more selectors that identify the family in the manifest or guardshotspot_files: representative or dominant files in the familycost_signals: concrete evidence of heaviness such as reflection use, multi-page mounts, relation-manager breadth, concern-driven fixture graphs, or repeated action-surface assertionsconfidence_rationale: explanation of why the family should remain in Confidence or move to Heavy Governancevalidation_status:seeded,reviewed,migrated, orguarded
Validation rules
- Every family must have at least one selector and one hotspot file.
target_lane_idmust be compatible with the owningclassification_id.- Families assigned to
fast-feedbackmay not carrydiscovery-heavyor broadsurface-guardsignals. - A family with
classification_id = browsermust target thebrowserlane only. - Families assigned to
confidencemust includeconfidence_rationaleexplaining why the retained UI safety is worth the lane cost.
3. Heavy Family Selector
Purpose
Represents the checked-in selector used to find a heavy family during lane execution and guard validation.
Fields
selector_type:suite,path,group, orfileselector_value: exact selector value used by the manifest or guardselector_role:include,exclude, orinventory-onlyrationale: why this selector is neededsource_of_truth:manifest,pest-group,guard-test, orreport-attribution
Validation rules
- Selectors used for execution must be representable in
TestLaneManifest. - Families with more than one hotspot should not rely on a single ad-hoc file selector alone unless the file is intentionally the whole family.
4. Lane Placement Rule
Purpose
Describes the allowed relationship between a heavy class and an execution lane.
Fields
rule_id: stable identifierclassification_id: heavy class under reviewlane_id: execution laneallowance:required,allowed,discouraged, orforbiddenreason: concise explanation of the ruleexception_policy: how rare justified exceptions are handled
Validation rules
- Each heavy class must have exactly one
requiredordefaultlane target. browsercannot beallowedin non-browser lanes.discovery-heavyand broadsurface-guardclasses must beforbiddeninfast-feedback.confidencemay contain only the classes explicitly markedallowedorrequiredthere.
5. Mixed File Resolution
Purpose
Represents how a file that exhibits more than one heavy behavior is resolved for lane placement.
Fields
file_path: relative test file pathprimary_classification_id: the classification that drives lane placementsecondary_classification_ids: additional observed behaviorsresolution_strategy:split-fileorbroadest-cost-winsrationale: why the chosen resolution is acceptablefollow_up_required: boolean
Validation rules
- Files with
resolution_strategy = broadest-cost-winsmust have an explicit rationale. - Files whose primary classification is
discovery-heavyorsurface-guardmay not remain infast-feedbackorconfidence.
6. Drift Guard
Purpose
Represents a checked-in validation that prevents wrong-lane placement for heavy classes or families.
Fields
guard_id: stable identifierscope:classification,family,lane, orreportassertion_type:forbidden-membership,required-membership,required-attribution,required-selector, orbrowser-isolationtarget_refs: classes, families, files, or lanes covered by the guardfailure_contract: the minimum actionable failure output expected from the guardowning_test_paths: tests that enforce the guard
Validation rules
- Every forbidden lane relationship for
browser,discovery-heavy, and broadsurface-guardmust have at least one drift guard. - Drift guards must fail with actionable output that identifies the violating file or family.
7. Heavy Budget Threshold
Purpose
Represents the runtime budget target for a heavy lane, heavy class, or heavy family.
Fields
budget_id: stable identifiertarget_type:lane,classification, orfamilytarget_id: referenced lane, classification, or familythreshold_seconds: allowed wall-clock targetbaseline_source:measured-current-suite,measured-lane, ormeasured-post-spec-207enforcement_level:report-only,warn, orhard-faillifecycle_state:draft,measured,documented, orenforcedreview_cadence: how often the budget should be revisited
Validation rules
- Heavy Governance must retain a lane-level budget.
- At least one heavy family budget must exist beyond the lane total.
- New family budgets should stay report-oriented until lane baselines stabilize.
8. Heavy Attribution Report
Purpose
Represents the reporting view that explains heavy-lane cost by class and family.
Fields
lane_id: lane being reportedwall_clock_seconds: total lane durationslowest_entries: canonical top 10 runtime hotspot entries ordered by slowest wall-clock timeclassification_attribution: totals grouped by heavy classfamily_attribution: totals grouped by heavy familybudget_evaluations: lane, classification, and family budget evaluationsartifact_paths: generated report artifacts
Validation rules
- Heavy reports must retain the canonical top 10 runtime hotspot view ordered by slowest wall-clock time.
- If a heavy family is cataloged, its cost should be attributable either directly or through its classification.
- Report artifact paths must remain under the app-root contract path
storage/logs/test-lanes.
9. First-Slice Governance Inventory
Existing lane infrastructure
- Operational lanes already present:
fast-feedback,confidence,browser, andheavy-governance - Support-lane entries already present:
profilingandjunit - Existing family budgets currently cover
ops-ux-governanceandbrowser-smoke
Initial heavy family clusters
tests/Feature/Filament/: broadest mixed UI cluster; currently contains UI-Light, UI-Workflow, Surface-Guard, and Discovery-Heavy candidatestests/Feature/Rbac/: relation-manager and role-matrix heavy families with repeated Livewire mounts and capability transitionstests/Feature/Baselines/plus related Filament baseline pages: dense workflow and matrix-style coverage with expensive fixture constructiontests/Feature/Concerns/: heavy builder traits such as baseline compare and portfolio triage fixtures that amplify test cost across familiestests/Feature/Guards/ActionSurfaceContractTest.phpand related governance guards: canonical Surface-Guard seeds already treated as heavytests/Browser/: isolated Browser class, already a separate lane and cost domain
Initial heavy signals
- Reflection-based discovery such as
ReflectionPropertyand global-search parity checks - Multi-mount Livewire tests across pages, relation managers, and actions
- Broad action-surface and navigation-discipline validation
- Concern-driven fixture construction that creates dense comparison or triage graphs
- Browser interaction and end-to-end smoke coverage