Status Profile
The status-profile proves that a stack exposes the shared API-first IDP
status contract. It exists so the home page summary, dedicated status view, MCP
adapter, and static status publisher can all depend on one validated source of
truth instead of inventing separate status payloads.
Why it exists
The status MVP is intentionally narrow: it reports the status of IDP-owned components only. Plug-in and third-party system status are postponed until the repo has a concrete plug-in architecture and adapter contract. This profile keeps the first slice honest and testable.
Layer 1 spec
Source: tests/features/status-profile.feature
Scenarios (3 total)
BFF portal summary returns the expected shape
Precondition: The BFF server is running and the stack declares
capabilities.status.enabled = true.
Assertions:
GET /api/portal/summaryreturns an HTTP status code in the 2xx rangeContent-Typecontainsapplication/json- Response body contains
generatedAt,status,metrics,freshness, and a non-emptycomponentsarray - Each component entry contains
id,label,kind,status,latencyMs, andobservedAt
Portal summary metrics are internally consistent
Precondition: The BFF server is running and the stack declares
capabilities.status.enabled = true.
Assertions:
metrics.totalComponentsequals the number of componentsmetrics.healthyComponentsequals the number of healthy componentsmetrics.degradedComponentsequals the number of degraded components- Top-level
statusmatches the aggregate component state
Portal summary timestamps and freshness are valid
Precondition: The BFF server is running and the stack declares
capabilities.status.enabled = true.
Assertions:
generatedAtis within 60 seconds of the current time- Each component contains an ISO-8601
observedAt freshness.maxAgeSecondsmatches the oldest component observation age
Layer 2 harness
Source: tests/src/profiles/status-profile.ts
The TypeScript harness is derived from the .feature file above. When they
disagree, the .feature file is authoritative.
Stack declarations
Stacks that expose the shared status API must declare both the profile and the
capability flag in stack.json:
{
"contractProfiles": ["core", "operational", "status-profile"],
"capabilities": {
"status": {
"enabled": true
}
}
}
Related
- Contract Test Harness — Full harness guide
- MCP Profile — MCP tool checks that now validate the same summary contract
- ADR-0005 — Capability contract and conformance profiles
- ADR-0009 — Gherkin as Layer 1 format