Skip to content

docs(api): document SLA/SLO targets and add NFR validation checks (#899) - #1104

Merged
Junirezz merged 1 commit into
Junirezz:mainfrom
Francis6-git:docs/api-sla-slo-targets-issue-899
Aug 1, 2026
Merged

docs(api): document SLA/SLO targets and add NFR validation checks (#899)#1104
Junirezz merged 1 commit into
Junirezz:mainfrom
Francis6-git:docs/api-sla-slo-targets-issue-899

Conversation

@Francis6-git

Copy link
Copy Markdown
Contributor

Summary

Fixes #899

This PR formalizes and documents the SLA/SLO targets for API uptime and latency across the YieldVault-RWA backend. To prevent documentation drift over time, the implementation programmatically links the markdown documentation (docs/api/SLA_SLO.md) directly to the machine-readable configuration (docs/nfr-baselines.json) via updated NFR validation scripts.

Changes Included

📄 Documentation

  • docs/api/SLA_SLO.md: Created dedicated document outlining overall availability targets (99.9%), max permitted monthly downtime (43.8 mins), P95/P99 latency objectives for read/write endpoints, and error budget burn rate policies.
  • README.md: Added reference link pointing to the new SLA/SLO documentation.

Configuration & Endpoint Registry

  • docs/nfr-baselines.json: Added Tier 2 backend targets for latency_p99_read_ms (500ms) and latency_p99_write_ms (1200ms).
  • backend/src/endpointSlaRegistry.ts: Updated EndpointSlaAnnotation interface to include p99BudgetMs and populated P99 latency budgets for all 11 endpoints.

Validation & Testing

  • scripts/validate-nfr-baselines.ts:
    • Added latency bounds checks for P95/P99 metrics.
    • Implemented validateApiSlaSloDocContent to verify structure and heading completeness of SLA_SLO.md.
    • Added automated drift checking to guarantee targets in nfr-baselines.json match the public documentation verbatim.
  • tests/validate-nfr-baselines.test.ts & tests/endpointSlaRegistry.test.ts:
    • Added unit tests for invalid/negative latency metrics and markdown formatting validation.
    • Verified p99BudgetMs is defined for every endpoint and strictly exceeds p95BudgetMs.

Verification

  • Ran npm run validate:nfr-baselines locally — passed successfully.
  • Ran Vitest suite — all NFR and registry tests passing with full coverage.
  • CI checks run clean with zero regressions.

CLoses #899

@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Francis6-git Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Junirezz
Junirezz merged commit 2b0764a into Junirezz:main Aug 1, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

General: Document SLA/SLO targets for API uptime and latency

2 participants