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

Unleash / unleash / 43435919973
89%
master: 91%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 13 Nov 2026 01:46PM UTC
Jobs 1
Files 1264
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

13 Nov 2026 01:41PM UTC coverage: 88.76% (-0.008%) from 88.768%
43435919973

push

github

web-flow
fix: refuse a change request that deletes a segment in use

## Summary

Applying a change request that deletes a segment no longer strips it
from the live strategies that still use it. It now answers 409, like a
direct `DELETE` does, and says why. That's
[EG-4930](https://linear.app/unleash/issue/EG-4930).

## Key points

- A change request that deletes a segment a live strategy uses is
refused, and the whole change request rolls back. A live strategy is any
strategy on a flag that isn't archived, including one on an active
release plan milestone.
- A change request that deletes an unused segment still applies.

## Why

A direct `DELETE` of a segment in use answers 409, because the route
checks for use first. Applying a change request goes through
`unprotectedDelete` instead, which had no usage check. So the delete
went through. The foreign key dropped the segment from every strategy
that used it.

No event named a flag, so the environment's revision didn't move.
Without such an event, SDKs weren't told about the strategy change.
Polling SDKs picked it up at the next unrelated change in that
environment. They served the strategy without that segment. So users the
segment had excluded could get the flag. At that same change, delta SDKs
got `segment-removed` and no update for that flag. After that change, a
delta SDK starting fresh got the segment id with no definition. That
turned the strategy off.

With this change, the apply checks for live strategies using the segment
before deleting it, and refuses with a 409.

The check and the delete aren't locked against each other. So a strategy
that gets the segment attached while the apply runs can still lose it. A
direct `DELETE` has the same window today.

## Testing

- It only adds the usage check to the change request apply. The direct
`DELETE` route stays as it is.
- The check lives in the OSS segment service, but only the change
request apply calls it. So only Enterprise and Cloud behave differently.
- ... (continued)

4210 of 5300 branches covered (79.43%)

0 of 3 new or added lines in 1 file covered. (0.0%)

1 existing line in 1 file now uncovered.

16859 of 18994 relevant lines covered (88.76%)

826.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
84.06
-1.87% src/lib/features/segment/segment-service.ts

Coverage Regressions

Lines Coverage ∆ File
1
89.58
-2.08% src/lib/features/frontend-api/client-feature-toggle-read-model.ts
Jobs
ID Job ID Ran Files Coverage
1 43435919973.1 13 Nov 2026 01:46PM UTC 1264
88.76
GitHub Action Run
Source Files on build 43435919973
  • Tree
  • List 1264
  • Changed 4
  • Source Changed 1
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #43435919973
  • 415a89b6 on github
  • Prev Build on main (#43434493736)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc