We cannot know what may cause the issue you describe without seeing the project in question or at the very least a minimal repository that reproduces the issue.
I suspect that you are displaying more than one content type on the list page. When the list page encounters a “repository” item, it will use repository/summary, otherwise it will use _default.summary. This is the intended behavior.