Layer bounds is incorrect in some situation

I got a .psd file from my user, and the bounds of one layer is wrong.

this layer has 1px outside stroke effect, but the bounds is not equal to boundsNoEffects plus 1px stroke。

I’m not sure if this is a bug

How Can I get correct bounds with effects? is bounds untrustworthy?

by the way: I did not find where to upload attachments to this topic

this layer is a pixel layer(kind=1)

Bounds are always shown in full pixels. However, the stroke effect doesn’t seem to occupy exactly one pixel always - it depends on how soft the edge of your layer is. Here’s an example with two circles that have the same size, but one has a softer edge (semi-transparent pixels):

In this example, both layers have a stroke effect of 1px, the one on the left is clearly wider than 1px though.
Logging the bounds / boundsNoEffects of the left one, I’m getting the same results as you (difference of 3px).