Skip to content

fix: ingest stops reading the fixture format's own metadata as knowledge - #217

Merged
vicenteliu merged 1 commit into
mainfrom
fix/ingest-skips-fixture-sidecars
Sep 1, 2026
Merged

fix: ingest stops reading the fixture format's own metadata as knowledge#217
vicenteliu merged 1 commit into
mainfrom
fix/ingest-skips-fixture-sidecars

Conversation

@vicenteliu

Copy link
Copy Markdown
Owner

Closes #214.

What

/kb list showed 11 docs, five titled doc-metakb load-dir's sidecar files (doc-meta.json / chunks.jsonl) ingested as first-class documents by ingest's directory walk.

#207 fixed this for examples/sample_data_en by splitting sources (kb/) from fixtures (fixtures/) — deliberately with no product-code change. But the walk still trusts layout: the scn_* examples pair sidecars with source documents in one directory to this day, so opspilot ingest examples/scn_ticket_summary_zh/kb/ re-poisons a KB right now. The five rows in the demo gif were leftovers ingested before the #207 split.

discover_files now skips the two reserved sidecar names exactly the way it skips dotfiles: they describe the corpus, they aren't part of it. New test covers the mixed-directory layout and the explicit-file case.

Cleanup + artifact

  • The five leftover doc-meta documents were hard-deleted from the local KB via opspilot kb delete (audit-logged as del_22a2fe72del_c133e42f).
  • docs/assets/tui.gif regenerated: the /kb list frame now shows 6 doc(s), all real SOPs; the /wiki list frame confirms the fix: the TUI tour gif stops racing its own workers #213 race fix still holds.

Verification

  • tests/test_ingestion.py: 23 passed (incl. the new sidecar test); ruff + mypy clean.
  • GIF frames visually inspected.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KXrF6HMB12V1hC9xFtooDE

/kb list showed 11 docs, five titled "doc-meta" — kb load-dir's sidecar
files (doc-meta.json / chunks.jsonl) ingested as documents by the
generic directory walk (#214). #207 fixed the sample_data_en case by
splitting the directories but left the walk trusting layout; the scn_*
examples still pair sidecars with source documents in one directory,
so the same one command re-poisons a KB today.

discover_files now skips the two reserved sidecar names the way it
skips dotfiles: they describe the corpus, they aren't part of it.

docs/assets/tui.gif is regenerated against a cleaned-up KB (the five
leftover doc-meta documents hard-deleted via `opspilot kb delete`,
audit-logged) — the /kb list frame now shows 6 real documents.

Closes #214.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXrF6HMB12V1hC9xFtooDE
@vicenteliu
vicenteliu merged commit 9929d99 into main Sep 1, 2026
4 checks passed
@vicenteliu
vicenteliu deleted the fix/ingest-skips-fixture-sidecars branch September 1, 2026 10:12
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.

/kb list shows doc-meta fixture entries as documents

1 participant