Skip to content

Commit f1f9706

Browse files
authored
Merge pull request #55 from runcycles/claude/analyze-spring-issue-29-vBIY9
Update AUDIT.md: test coverage from 313 to 494 tests across 22 test c…
2 parents 7bc286e + b2ddaa4 commit f1f9706

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

AUDIT.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cycles Protocol v0.1.23 — Server Implementation Audit
22

3-
**Date:** 2026-03-15
3+
**Date:** 2026-03-23 (updated), 2026-03-15 (initial)
44
**Spec:** `cycles-protocol-v0.yaml` (OpenAPI 3.1.0, v0.1.23)
55
**Server:** Spring Boot 3.5.11 / Java 21 / Redis (Lua scripts)
66

@@ -149,16 +149,17 @@ Two-pass audit covering:
149149

150150
### Test Coverage (above 98%)
151151
- JaCoCo line coverage threshold raised from 90% to **95%** (enforced in parent pom.xml)
152-
- **API module**: 209/209 lines covered — **100%** line coverage (93 unit tests)
153-
- **Data module**: 770+ lines covered — **98.5%+** line coverage, 76%+ branch coverage (215 unit tests)
152+
- **API module**: **100%** line coverage (270 tests across 14 test classes)
153+
- **Data module**: **98.5%+** line coverage, 76%+ branch coverage (215 tests across 7 test classes)
154154
- Branch gaps: defensive null-check ternaries and unreachable `&&` short-circuit branches in `RedisReservationRepository`
155155
- Tenant default resolution: 10 unit tests covering all fallback paths, TTL capping, max extensions, malformed JSON recovery
156-
- **Model module**: Coverage skipped (POJOs only, no business logic)
157-
- Total unit test count: 93 (API) + 215 (Data) + 5 (Model) = **313 unit tests**
156+
- **Model module**: Coverage skipped (POJOs only, no business logic) — 9 tests
157+
- Total test count: 270 (API) + 215 (Data) + 9 (Model) = **494 tests** across 22 test classes
158158
- **Integration tests**: 27+ nested test classes covering all 9 endpoints, including:
159159
- Tenant Defaults (9 tests): overage policy resolution (ALLOW_IF_AVAILABLE, ALLOW_WITH_OVERDRAFT, REJECT), explicit override vs tenant default, TTL capping, max extensions enforcement, default TTL usage, no-tenant-record fallback
160160
- Expiry Sweep (7 tests): end-to-end expire.lua execution, grace period skip, orphan TTL cleanup, multi-scope budget release, already-finalized skip
161161
- Budget Status (2 tests): BUDGET_FROZEN and BUDGET_CLOSED enforcement on reserve
162+
- ALLOW_IF_AVAILABLE commit overage (integration coverage)
162163
- All unit tests pass without Docker/Testcontainers (integration tests excluded by default)
163164

164165
### Tenant Default Configuration (correct)
@@ -240,4 +241,4 @@ Two-pass audit covering:
240241

241242
## Verdict
242243

243-
The server implementation is **fully compliant** with the YAML spec (v0.1.23). All 9 endpoints are implemented, all schemas match, auth/tenancy/idempotency are correctly enforced, and the normative behavioral requirements (atomic operations, debt/overdraft handling, scope derivation, error semantics, dry-run rules, grace period handling) are properly implemented. No remaining spec violations found.
244+
The server implementation is **fully compliant** with the YAML spec (v0.1.23). All 9 endpoints are implemented, all schemas match, auth/tenancy/idempotency are correctly enforced, and the normative behavioral requirements (atomic operations, debt/overdraft handling, scope derivation, error semantics, dry-run rules, grace period handling) are properly implemented. Test coverage expanded to 494 tests across 22 test classes. No remaining spec violations found.

0 commit comments

Comments
 (0)