fix(knowledge): avoid panic on empty table raw content#2679
Conversation
|
|
|
Quick follow-up: this PR is ready on my side. If there is a preferred fix direction or any additional test / guard you’d like for the empty-table case, I’m happy to update it quickly. Thanks for reviewing. |
|
Quick follow-up: this PR appears mergeable from my side; the remaining blocker looks like required maintainer review. Happy to adjust if you prefer a different approach. |
|
Checking in on this PR. It is still open and appears to be waiting on maintainer review. I am happy to adjust the scope or add verification details if that would make review easier. |
Problem
code=105000005and panic onindex out of range [0] with length 0packInsertDataaccessedslice.RawContent[0]without validating thatRawContentexisted and contained a valid table payloadFix
RawContentTest
PATH=/home/clawos/work/.local-go/go/bin:$PATH GOPATH=/home/clawos/work/.gopath GOCACHE=/home/clawos/work/.gocache GOMODCACHE=/home/clawos/work/.gomodcache GOPROXY=https://proxy.golang.org,direct GOSUMDB=sum.golang.org GOFLAGS='-buildvcs=false -p=1' /home/clawos/work/.local-go/go/bin/go test -gcflags='all=-N -l' ./domain/knowledge/service -run 'Test(EventHandle|PackInsertData)' -count=1 -v