jlewi / foyle

Foyle is a copilot to help developers deploy and operate their applications.
https://foyle.io
Apache License 2.0
108 stars 9 forks source link

Divide By Zero Error #248

Closed jlewi closed 1 month ago

jlewi commented 2 months ago

We're getting a panic here https://github.com/jlewi/foyle/blob/5f30c461b1f178474d23e08a5bca073ca93724f8/app/pkg/learn/in_memory.go#L217

I think the problem is if len(matches) < 1.5 we end up rounding down to 0 which causes a problem.