fix(wiki): clear stale citation chunks on deletion

This commit is contained in:
langcaiye
2026-06-11 19:29:29 +08:00
committed by lyingbug
parent 903b014992
commit a0786b6fe7
4 changed files with 85 additions and 29 deletions
+4
View File
@@ -245,6 +245,10 @@ func TestRequireKBAccess_NotFound_Aborts(t *testing.T) {
require.False(t, ok, "no access should be stashed on failure")
}
func TestIsResourceNotFound_ChunkNotFound(t *testing.T) {
require.True(t, isResourceNotFound(errors.New("chunk not found")))
}
func TestRequireKBAccess_SharedKB_RewritesTenantContext(t *testing.T) {
share := &stubKBShareForGuard{
permission: map[string]types.OrgMemberRole{"kb-shared": types.OrgRoleEditor},