fix(core): remove regular-file permalink lookup - #1191
Merged
Conversation
Signed-off-by: phernandez <paul@basicmachines.co>
This was referenced Aug 5, 2026
14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the discarded permalink lookup from regular-file indexing and make the existing non-Markdown identity contract explicit.
Non-Markdown resources continue to be addressed by their stable
external_idand project-relativefile_path. They continue to persist withpermalink=None.Fixes #1182.
Problem
BatchIndexer._upsert_regular_file()calledEntityService.resolve_permalink()when creating a PDF, image, or other non-Markdown entity, then discarded the returned value and created the entity without a permalink.That call was dead work, but it also obscured an important domain invariant: permalinks are semantic addresses for Markdown notes because they can round-trip through frontmatter. A generated database-only permalink for arbitrary resource bytes would introduce a second identity that the source cannot represent.
Implementation
resolve_permalink()call from the regular-file creation path.permalink=None.external_idis the stable API identity.file_pathlocates the resource in project storage.Scope
This is contract cleanup only. It does not:
Verification
uv run pytest -q --no-cov tests/indexing/test_batch_indexer.py::test_batch_indexer_indexes_non_markdown_files tests/index/test_local_project_index.py::test_local_project_index_indexes_regular_files tests/index/test_local_project_index.py::test_local_project_index_updates_regular_file_checksum tests/index/test_local_project_index.py::test_local_project_index_moves_and_deletes_regular_file_entities tests/index/test_local_project_index.py::test_local_project_index_resolves_regular_file_relations tests/index/test_local_watch_regular_file_parity.pyjust fast-checkgit diff --check