Skip to content

fix(server): surface partial results in list-all-entities - #45

Merged
tyejcoleman merged 1 commit into
mainfrom
fix/engine-quickwins
Jun 18, 2026
Merged

fix(server): surface partial results in list-all-entities#45
tyejcoleman merged 1 commit into
mainfrom
fix/engine-quickwins

Conversation

@tyejcoleman

Copy link
Copy Markdown
Contributor

Summary

The top finding from the engine audit: the list-all-entities path (HandleListMemories, no entity_id) silently continued on a per-entity List error, so one failing entity returned a 200 with quietly-incomplete results. Now each skip is logged plus a partial-result summary — the request still doesn't fail for one bad entity, but the gap is no longer invisible.

Scope note (rest of the audit "quick wins")

  • Committed binaries / test DBs (~140MB): already cleaned from main — not needed.
  • MaxBytesReader(nil, …) → proper 413 (handlers.go:380): requires changing decodeBody's signature across all callers for a cosmetic 413-vs-400 difference. Deferred — not a low-risk "quick win" in BSL core; happy to do it as its own PR if you want it.
  • strings.Contains(err,"HNSW")errors.Is (handlers.go:371): no vector-index error sentinel exists yet, so this would mean inventing + threading one through. Deferred to avoid risk; works correctly today.

Verification

go build ./... · go vet ./cmd/keyoku-server/ · go test ./cmd/keyoku-server/ — all green.

🤖 Generated with Claude Code

…masking

The list-across-all-entities path silently `continue`d on a per-entity List
error, so a failing entity produced a 200 with quietly-incomplete results. Log
each skip and a partial-result summary so the gap is visible (behavior otherwise
unchanged — one bad entity still doesn't fail the whole request).

go build ./... + go vet + go test ./cmd/keyoku-server/ all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 18, 2026 22:58
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement.

To sign, please comment on this PR with the following text:

I have read the CLA Document and I hereby sign the CLA


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves observability for the HandleListMemories “list-all-entities” path so that per-entity failures no longer produce a quietly-incomplete 200 response without any operator signal.

Changes:

  • Track how many entities are skipped due to h.k.List errors when entity_id is omitted.
  • Emit warning logs per skipped entity and a final “partial results” summary warning.

@tyejcoleman
tyejcoleman merged commit ea0bb46 into main Jun 18, 2026
3 of 4 checks passed
@tyejcoleman
tyejcoleman deleted the fix/engine-quickwins branch June 18, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants