TenantAtlas/specs/211-runtime-trend-recalibration/contracts/test-runtime-trend-history.schema.json
ahmido 81a07a41e4
Some checks failed
Main Confidence / confidence (push) Failing after 46s
feat: implement runtime trend recalibration reporting (#244)
## Summary
- implement Spec 211 runtime trend reporting with bounded lane history, drift classification, hotspot trend output, and recalibration evidence handling
- extend the repo-truth governance seams and workflow wrappers for comparable-bundle hydration, trend artifact publication, and contract-backed reporting
- add the Spec 211 planning artifacts, data model, quickstart, tasks, and repository contract documents

## Validation
- parsed `specs/211-runtime-trend-recalibration/contracts/test-runtime-trend-history.schema.json`
- parsed `specs/211-runtime-trend-recalibration/contracts/test-runtime-trend.logical.openapi.yaml`
- re-ran cross-artifact consistency analysis for the Spec 211 artifact set until no material findings remained
- no application test suite was re-run as part of this final commit/push/PR step

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #244
2026-04-18 07:36:05 +00:00

540 lines
12 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tenantatlas.local/specs/211-runtime-trend-recalibration/contracts/test-runtime-trend-history.schema.json",
"title": "LaneTrendHistoryArtifact",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"laneId",
"workflowProfile",
"generatedAt",
"policy",
"history",
"currentAssessment"
],
"properties": {
"schemaVersion": {
"type": "string",
"const": "1.0.0"
},
"laneId": {
"type": "string",
"enum": [
"fast-feedback",
"confidence",
"heavy-governance",
"browser",
"junit",
"profiling"
]
},
"workflowProfile": {
"type": "string"
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"policy": {
"$ref": "#/$defs/policy"
},
"history": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/$defs/historyRecord"
}
},
"currentAssessment": {
"$ref": "#/$defs/assessment"
},
"hotspotSnapshot": {
"$ref": "#/$defs/hotspotSnapshot"
},
"recalibrationDecisions": {
"type": "array",
"items": {
"$ref": "#/$defs/recalibrationDecision"
},
"default": []
},
"warnings": {
"type": "array",
"items": {
"type": "string"
},
"default": []
}
},
"$defs": {
"policy": {
"type": "object",
"additionalProperties": false,
"required": [
"retentionLimit",
"comparisonWindowSize",
"minimumComparableSamples",
"varianceFloorSeconds",
"nearBudgetHeadroomSeconds",
"hotspotFamilyLimit",
"hotspotFileLimit",
"slowestEntryRetention"
],
"properties": {
"retentionLimit": {
"type": "integer",
"minimum": 1
},
"comparisonWindowSize": {
"type": "integer",
"minimum": 1
},
"minimumComparableSamples": {
"type": "integer",
"minimum": 3
},
"varianceFloorSeconds": {
"type": "integer",
"minimum": 0
},
"nearBudgetHeadroomSeconds": {
"type": "integer",
"minimum": 0
},
"hotspotFamilyLimit": {
"type": "integer",
"minimum": 1
},
"hotspotFileLimit": {
"type": "integer",
"minimum": 1
},
"slowestEntryRetention": {
"type": "integer",
"minimum": 1
},
"recalibrationPolicy": {
"type": "object",
"additionalProperties": false,
"properties": {
"baselineRequiresExplicitReview": {
"type": "boolean"
},
"budgetRequiresExplicitReview": {
"type": "boolean"
},
"minimumBudgetEvidenceSamples": {
"type": "integer",
"minimum": 1
}
}
}
}
},
"historyRecord": {
"type": "object",
"additionalProperties": false,
"required": [
"runRef",
"laneId",
"workflowId",
"triggerClass",
"generatedAt",
"wallClockSeconds",
"budgetSeconds",
"budgetStatus",
"blockingStatus",
"comparisonFingerprint"
],
"properties": {
"runRef": {
"type": "string"
},
"laneId": {
"type": "string"
},
"workflowId": {
"type": "string"
},
"triggerClass": {
"type": "string",
"enum": [
"pull-request",
"mainline-push",
"manual",
"scheduled",
"local"
]
},
"generatedAt": {
"type": "string",
"format": "date-time"
},
"wallClockSeconds": {
"type": "number",
"minimum": 0
},
"baselineSeconds": {
"type": [
"number",
"null"
],
"minimum": 0
},
"baselineSource": {
"type": [
"string",
"null"
]
},
"budgetSeconds": {
"type": "number",
"minimum": 0
},
"budgetStatus": {
"type": "string"
},
"blockingStatus": {
"type": "string"
},
"comparisonFingerprint": {
"type": "string"
},
"classificationTotals": {
"type": "array",
"items": {
"$ref": "#/$defs/runtimeBucket"
},
"default": []
},
"familyTotals": {
"type": "array",
"items": {
"$ref": "#/$defs/runtimeBucket"
},
"default": []
},
"hotspotFiles": {
"type": "array",
"items": {
"$ref": "#/$defs/runtimeBucket"
},
"default": []
},
"slowestEntries": {
"type": "array",
"items": {
"$ref": "#/$defs/slowestEntry"
},
"default": []
},
"artifactRefs": {
"type": "object",
"additionalProperties": false,
"properties": {
"summary": {
"type": "string"
},
"report": {
"type": "string"
},
"budget": {
"type": "string"
},
"junit": {
"type": "string"
},
"trendHistory": {
"type": "string"
}
}
}
}
},
"assessment": {
"type": "object",
"additionalProperties": false,
"required": [
"healthClass",
"recalibrationRecommendation",
"budgetHeadroomSeconds",
"summaryLine",
"windowStatus",
"sampleCount"
],
"properties": {
"healthClass": {
"type": "string",
"enum": [
"healthy",
"budget-near",
"trending-worse",
"regressed",
"unstable"
]
},
"recalibrationRecommendation": {
"type": "string",
"enum": [
"none",
"investigate",
"review-baseline",
"review-budget"
]
},
"budgetHeadroomSeconds": {
"type": "number"
},
"deltaToPreviousSeconds": {
"type": [
"number",
"null"
]
},
"deltaToPreviousPercent": {
"type": [
"number",
"null"
]
},
"deltaToBaselineSeconds": {
"type": [
"number",
"null"
]
},
"deltaToBaselinePercent": {
"type": [
"number",
"null"
]
},
"worseningStreak": {
"type": "integer",
"minimum": 0
},
"varianceObservedSeconds": {
"type": "number",
"minimum": 0
},
"windowStatus": {
"type": "string",
"enum": [
"stable",
"insufficient-history",
"scope-changed",
"noisy"
]
},
"sampleCount": {
"type": "integer",
"minimum": 0
},
"previousComparableRunRef": {
"type": [
"string",
"null"
]
},
"summaryLine": {
"type": "string"
}
}
},
"hotspotSnapshot": {
"type": "object",
"additionalProperties": false,
"required": [
"evidenceAvailability",
"familyDeltas",
"fileHotspots"
],
"properties": {
"evidenceAvailability": {
"type": "string",
"enum": [
"available",
"unavailable"
]
},
"familyDeltas": {
"type": "array",
"items": {
"$ref": "#/$defs/deltaBucket"
}
},
"fileHotspots": {
"type": "array",
"items": {
"$ref": "#/$defs/deltaBucket"
}
},
"newEntrants": {
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"droppedEntrants": {
"type": "array",
"items": {
"type": "string"
},
"default": []
}
}
},
"recalibrationDecision": {
"type": "object",
"additionalProperties": false,
"required": [
"targetType",
"decisionStatus",
"evidenceRunRefs",
"previousValueSeconds",
"rationaleCode",
"recordedIn",
"notes"
],
"properties": {
"targetType": {
"type": "string",
"enum": [
"baseline",
"budget"
]
},
"decisionStatus": {
"type": "string",
"enum": [
"candidate",
"approved",
"rejected"
]
},
"evidenceRunRefs": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"previousValueSeconds": {
"type": "number",
"minimum": 0
},
"proposedValueSeconds": {
"type": [
"number",
"null"
],
"minimum": 0
},
"rationaleCode": {
"type": "string",
"enum": [
"lane-scope-change",
"infrastructure-shift",
"post-improvement-reset",
"sustained-erosion",
"noise-rejected",
"manual-hold"
]
},
"recordedIn": {
"type": "string",
"description": "Active spec path or implementation PR reference for the approved or rejected recalibration decision."
},
"notes": {
"type": "string"
}
}
},
"runtimeBucket": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"runtimeSeconds"
],
"properties": {
"name": {
"type": "string"
},
"runtimeSeconds": {
"type": "number",
"minimum": 0
}
}
},
"slowestEntry": {
"type": "object",
"additionalProperties": false,
"required": [
"label",
"runtimeSeconds"
],
"properties": {
"label": {
"type": "string"
},
"runtimeSeconds": {
"type": "number",
"minimum": 0
},
"file": {
"type": [
"string",
"null"
]
}
}
},
"deltaBucket": {
"type": "object",
"additionalProperties": false,
"required": [
"name",
"currentSeconds",
"previousSeconds",
"deltaSeconds"
],
"properties": {
"name": {
"type": "string"
},
"currentSeconds": {
"type": "number",
"minimum": 0
},
"previousSeconds": {
"type": "number",
"minimum": 0
},
"deltaSeconds": {
"type": "number"
},
"deltaPercent": {
"type": [
"number",
"null"
]
},
"direction": {
"type": [
"string",
"null"
],
"enum": [
"up",
"down",
"flat",
null
]
}
}
}
}
}