-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Context
After PR #28 (issue #25), the following modules remain below 80% non-generated coverage:
| File | Coverage |
|---|---|
decision_api.lua |
~58.87% |
saas_client.lua |
~78.88% |
Goal
Add targeted unit tests to raise both files meaningfully above 80%.
decision_api.lua gaps (58.87%)
Key uncovered paths:
build_request_contextbody parsing branches (JSON body, body file fallback)_resolve_ip_from_headermulti-value/invalid header branchesaccessphase: shadow-mode path,cost_basedrule path_apply_llm_budget_rulebranchesbody_filter_responsenon-streaming reconciliation path_get_header_hint_tokensedge cases
saas_client.lua gaps (~78.88%)
Key uncovered paths:
queue_eventwhen transport is unavailable- Retry/backoff logic branches
flushwith empty queue- HTTP error response handling
Acceptance criteria
decision_api.luacoverage > 75% (from 58.87%)saas_client.luacoverage > 85% (from 78.88%)- All existing + new tests pass (
busted spec/unit/) lua-qualityCI green
Reactions are currently unavailable