• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / go-sdk / 19575001294
92%

Build:
DEFAULT BRANCH: master
Ran 21 Nov 2025 03:21PM UTC
Jobs 1
Files 84
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Nov 2025 03:19PM UTC coverage: 91.93% (+0.08%) from 91.854%
19575001294

push

github

web-flow
[FSSDK-11552] Add holdout support and refactor decision logic (#422)

* add holdouts service and logic

* fix: resolve range variable address bug in holdout loop (CWE-118)

- Changed loop from 'for _, holdout := range holdouts' to 'for i := range holdouts'
- Created proper pointer 'holdout := &holdouts[i]' to avoid address-of-iteration-variable issue
- This fixes the security warning where all iterations would point to the same memory location
- All tests passing

Resolves Prisma Cloud security scan: Incorrect access of indexable resource

* feat: Complete holdout implementation with parsing, mapping, and tests

- Implemented holdout parsing from datafile with global/specific/exclusion logic
- Added MapHoldouts() to process holdout relationships with feature flags
- Implemented GetHoldoutsForFlag() to retrieve applicable holdouts per flag
- Fixed bucketer initialization to use pointer (interface value)
- Created comprehensive unit tests for HoldoutService (11 test cases)
- Added integration test with real bucketer and evaluator
- Added GetHoldoutsForFlag() mock method to helpers_test.go

All tests passing (decision and config packages)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: Add comprehensive tests for holdout implementation and fix linting

- Added 3 unit tests for GetHoldoutsForFlag() in config_test.go
- Created holdout_test.go with 7 comprehensive mapper tests:
  - Empty holdouts
  - Global holdouts with exclusions
  - Specific holdouts with inclusions
  - Non-running holdouts filtering
  - Mixed global and specific holdouts
  - Audience conditions mapping
  - Variations and traffic allocation mapping
- Fixed govet shadow linting error in holdout_service.go line 105

All tests passing. Improves code coverage for new holdout functionality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fixed holdouts pr... (continued)

180 of 192 new or added lines in 4 files covered. (93.75%)

5616 of 6109 relevant lines covered (91.93%)

8395.08 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
94.57
pkg/decision/holdout_service.go
7
92.22
pkg/config/datafileprojectconfig/mappers/holdout.go
Jobs
ID Job ID Ran Files Coverage
1 19575001294.1 21 Nov 2025 03:21PM UTC 84
91.93
GitHub Action Run
Source Files on build 19575001294
  • Tree
  • List 84
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 4c853528 on github
  • Prev Build on master (#19047163689)
  • Next Build on master (#19902164149)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc