-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Summary
Add targeted Lua tests to raise coverage in the weakest non-generated runtime modules identified by the new luacov reporting path.
Why
Current non-generated Lua coverage is about 82.28%, but several boundary/error-heavy modules remain materially under-covered.
Current lowest-covered handwritten modules:
src/fairvisor/decision_api.lua—58.87%src/fairvisor/bundle_loader.lua—76.79%src/fairvisor/utils.lua—77.05%src/fairvisor/saas_client.lua—78.88%src/fairvisor/streaming.lua—84.91%
Scope
Add tests for the highest-value missing branches, prioritised in this order:
decision_api.luabundle_loader.luasaas_client.luastreaming.luautils.lua
Target gaps
decision_api.lua- flat JSON fallback parser branches
- retry/throttle edge paths
- non-
ngxhash/jitter fallback branches - error/no-op logging/guard branches
bundle_loader.lua- init/deps wiring
queue_eventfailure path- descriptor hint extraction branches
- signing/HMAC fallback path
saas_client.lua- missing
resty.http - transport/request_uri failures
- unhappy-path response handling
- missing
streaming.lua- empty
data:events - termination/error event paths
- reconcile failure / early-return branches
- empty
utils.lua- constant-time compare fallback
- bit/base64 helper branches
- nil/false return branches
Acceptance Criteria
- Add focused unit/integration tests for the gaps above.
- Increase meaningful non-generated Lua coverage above the current baseline.
- Keep generated code (
src/fairvisor/generated/) out of the success metric. - All existing unit, integration, and E2E suites still pass.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels