Skip to content

fix: prune stale concept aliases during ingest#216

Open
yibeichan wants to merge 1 commit into
mainfrom
codex/fix-stale-concept-aliases
Open

fix: prune stale concept aliases during ingest#216
yibeichan wants to merge 1 commit into
mainfrom
codex/fix-stale-concept-aliases

Conversation

@yibeichan

Copy link
Copy Markdown
Owner

Summary

  • prune concept_aliases rows whose duplicate or canonical slugs no longer exist after a fresh ingest
  • keep valid alias rows across rebuilds
  • add regressions for stale alias pruning and valid alias preservation

Closes #213.

Tests

  • uv run --with pytest --with ./cli python -m pytest cli/tests/test_ingest.py::test_ingest_prunes_concept_aliases_for_missing_concepts -q
  • uv run --with pytest --with ./cli python -m pytest cli/tests/test_sync.py::TestRebuildIndexSideTablePreservation::test_concept_aliases_survive_rebuild -q
  • uv run --with pytest --with ./cli python -m pytest cli/tests/test_ingest.py cli/tests/test_sync.py -q
  • cd cli && uv run --with pytest --with . python -m pytest tests/

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.

bug: stale concept_aliases rows with dangling FK references survive after ingest drops and recreates the concepts table

1 participant