Repository navigation
Add an optional stable_id to every extraction entity - #39
Merged
Merged
Conversation
A store mints stable_id, a lowercase UUID, the first time it sees an entity, and keeps it across re-runs, so a later extraction of the same paper matches the same entity. A local_id is unique only within one record. Extractors never set it. It is declared in extraction-deviations.yaml's required_additions, so pondie's generator keeps it. Storage's `id` is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds an optional
stable_idslot to every extraction entity: the 18 classes that have alocal_id.Why
A
local_idis unique only within one record. Renaming an entity, or re-running a pipeline, would split its claims across ids. neurostore's review app will mint a UUID the first time it sees an entity, keep it, and write it back on export, so a re-import or a later extraction of the same paper is matched to the same entity. Extractors never set it.What changes
stable_idis a lowercase UUID string, and optional. It is declared inextraction-deviations.yamlunderrequired_additions, sopondie.schema.generatekeeps it. The generated extraction YAML, the JSON Schema and the pydantic models are regenerated.idis unchanged, and the extraction-to-storage map does not mapstable_idonto it."stable_id": null, as the writer emits it for other optional slots.extraction-readme.mdhas a short section on who sets the slot and what it is for.Checks
pytest tests: 132 passed, 2 skipped. The skips already existed: pyarrow, and the wheel build.tools/generate_models.py --check: passes.d722f69), run on this branch and on main, reports the same three files out of date on both:analysis.yaml,analysis_enums.yamland the root schema. That drift already exists on main. Everystable_idattribute parses identically to pondie's output.🤖 Generated with Claude Code