9.3 KiB
Data Model: Heavy Governance Lane Cost Reduction
This feature does not introduce new runtime database tables. The data-model work formalizes repository-level governance objects that describe how the heavy-governance lane is inventoried, decomposed, slimmed, and evaluated against a single explicit budget contract. It builds directly on the existing Spec 206 to 208 lane manifest and report artifacts.
1. Heavy Governance Budget Contract
Purpose
Represents the deliberate budget rule for the heavy-governance lane, including the authoritative pre-normalization 300s summary threshold, the legacy 200s detailed budget-target evaluation, and the final reconciled threshold published by Spec 209.
Fields
laneId: expected to beheavy-governancesummaryThresholdSeconds: current authoritative pre-normalization lane-level threshold used by the summary artifactevaluationThresholdSeconds: legacy threshold currently used in detailed budget evaluations until normalization is completenormalizedThresholdSeconds: the single threshold that will be treated as authoritative after Spec 209baselineSource: where the budget came from, such asmeasured-laneenforcementLevel:report-only,warn, orhard-faillifecycleState:draft,documented, orrecalibratedreconciliationRationale: explanation of why the single threshold is correct for the post-Spec-209 lanedecisionStatus:pending,recovered, orrecalibrated
Validation rules
laneIdmust beheavy-governance.summaryThresholdSecondsandevaluationThresholdSecondsmust both be captured when they differ, and the authoritative pre-normalization contract must remain identifiable until normalization is complete.normalizedThresholdSecondsmust be present before the rollout is considered complete.decisionStatus = recoveredrequires measured runtime less than or equal tonormalizedThresholdSeconds.decisionStatus = recalibratedrequires a non-emptyreconciliationRationale.
2. Heavy Governance Hotspot Inventory Record
Purpose
Represents one named heavy-governance family that materially contributes to the lane's runtime and needs explicit review.
Fields
familyId: stable family identifierclassificationId: current owning class such asui-workflow,surface-guard, ordiscovery-heavypurpose: why the family exists and what trust it providesmeasuredSeconds: current measured contribution from the latest heavy-governance reporthotspotFiles: dominant files tied to the familycostDriverCategory: primary cause such asoverbroad,redundant,discovery-heavy,workflow-heavy,surface-heavy,helper-driven,fixture-driven, orintentionally-heavypriorityTier:primary,secondary, orresidualcurrentBudgetSeconds: current family-level budget if one existsstatus:seeded,decomposed,slimmed,retained, orfollow-up
Validation rules
hotspotFilesmust contain at least one file.priorityTier = primaryis required for the families that explain most of the lane runtime.- The full hotspot inventory must cover the current top 5 families by runtime, or enough families to explain at least 80% of lane runtime, whichever set is larger.
status = slimmedorstatus = retainedrequires a corresponding decomposition record.- If
currentBudgetSecondsexists, it must match the checked-in family budget contract.
3. Family Cost Decomposition Record
Purpose
Represents the internal analysis for a targeted hotspot family so reviewers can see what part of the family is necessary and what part is duplicated or accidental.
Fields
familyId: referenced hotspot familytrustType: primary trust delivered, such asworkflow-trust,surface-trust,guard-trust, ordiscovery-trustrequiredBreadth: what breadth is genuinely needed for product trustduplicateWorkSources: repeated work sources such asrepeated-livewire-mounts,header-action-gating-matrix,filter-state-persistence,audit-fan-out,resource-discovery-pass, orhelper-graph-buildduplicateWorkEstimateSeconds: optional estimate of removable costresidualCostSource:family-breadth,helper-driven,fixture-driven,mixed, orintentional-depthrecommendedAction:split-family,centralize-work,narrow-assertions,retain-as-heavy, orroute-follow-upnotes: reviewer-readable explanation
Validation rules
- Every
primaryhotspot family must have one decomposition record. recommendedAction = route-follow-uprequiresresidualCostSourceto behelper-driven,fixture-driven, ormixed.recommendedAction = retain-as-heavyrequiresresidualCostSource = intentional-depth.duplicateWorkEstimateSecondsmay be omitted when cost is truly intentional, but the reason must be explicit.
4. Heavy Family Slimming Decision
Purpose
Represents the implementation-facing decision taken for a hotspot family after decomposition.
Fields
familyId: referenced hotspot familydecisionType:split,centralize,trim-duplicate-work,retain, orfollow-upscope: list of files, helpers, or manifest entries touched by the decisionguardPreservationPlan: how the original governance trust remains protectedexpectedDeltaSeconds: estimated improvement if knownowner: responsible maintainer or team rolevalidationPlan: focused tests or lane reruns needed to validate the decision
Validation rules
- Every
decisionTypeother thanretainmust include at least one item inscope. guardPreservationPlanis mandatory for all decisions.follow-updecisions must name the residual cause and target seam.retaindecisions must still reference a validation plan showing why the retained heaviness is acceptable.
5. Budget Recovery Snapshot
Purpose
Represents one snapshot in the before-and-after lane measurement pair used to prove recovery or justify recalibration.
Fields
snapshotId: stable identifier such aspre-slimmingorpost-slimmingcapturedAt: ISO timestampwallClockSeconds: measured heavy-governance wall-clock timeclassificationTotals: totals by classificationfamilyTotals: totals by familyslowestEntries: top slowest test entriesartifactPaths: references to summary, report, and budget artifactsbudgetStatus:within-budget,warning, orover-budget
Validation rules
- At least two snapshots are expected for a complete rollout: baseline and post-change.
artifactPathsmust stay understorage/logs/test-lanes.familyTotalsmust include the targeted hotspot families.- Summary, budget, and report artifacts captured for the same snapshot must not disagree on the authoritative threshold or budget outcome classification.
6. Budget Outcome Record
Purpose
Represents the final explicit outcome required by Spec 209.
Fields
outcomeId: stable identifierdecisionStatus:recoveredorrecalibratedfinalThresholdSeconds: authoritative heavy-governance threshold after the rolloutfinalMeasuredSeconds: measured post-change runtimedeltaSeconds: change from the baseline snapshotdeltaPercent: percentage change from the baseline snapshotremainingOpenFamilies: families still above expected cost or still awaiting follow-upjustification: human-readable explanation of the decisionfollowUpDebt: optional residual items that remain outside the current scope
Validation rules
decisionStatus = recoveredrequiresfinalMeasuredSeconds <= finalThresholdSeconds.decisionStatus = recalibratedrequires a non-emptyjustificationexplaining why the new threshold is honest.remainingOpenFamiliesmay be non-empty only when their residual status is explicit.
7. Heavy Author Guidance Rule
Purpose
Represents a short reviewer or author rule for future heavy-governance tests.
Fields
ruleId: stable identifierwhenToUse: the situation the rule applies torequiredDecision: what the author or reviewer must decideantiPattern: what overbroad behavior the rule preventspreferredOutcome: the intended family or separation behavior
Validation rules
- Guidance must cover at least: when to create a new heavy family, when to reuse an existing family, when a test is too broad, and when discovery, workflow, and surface trust must be separated.
8. Current Measured Inventory Snapshot
Current dominant families
baseline-profile-start-surfaces—98.112193s—ui-workflow— currently the largest heavy-governance familyaction-surface-contract—40.841552s—surface-guardops-ux-governance—38.794861s—surface-guardfindings-workflow-surfaces—36.459493s—ui-workflowfinding-bulk-actions-workflow—26.491446s—ui-workflowworkspace-settings-slice-management—21.740839s—ui-workflow
Current classification totals
ui-workflow—190.606431ssurface-guard—106.845887sdiscovery-heavy—0.863003s
Current budget signals
- Lane summary threshold:
300sand currently the authoritative pre-normalization contract - Budget target evaluation threshold:
200sand currently legacy drift evidence, not a second passing threshold - Current measured lane wall clock:
318.296962s
This dual-signal state is intentional input to Spec 209 and must be resolved by the final budget outcome.