fix: normalise short IDs when storing relationship links#50
Merged
hmans merged 1 commit intohmans:mainfrom Jan 12, 2026
Merged
Conversation
Short IDs (e.g., "abc1") were being stored verbatim in relationship fields (parent, blocking), causing resolution failures since the resolver expects full IDs (e.g., "beans-abc1"). - Add NormalizeID() helper to Core that resolves short IDs to full IDs - Update SetParent, AddBlocking, RemoveBlocking mutations to normalize - Update CreateBean mutation to normalize parent and blocking IDs - Add comprehensive tests for short ID normalization
Owner
|
Looking good, thank you! |
hmans
added a commit
to divaltor/beans
that referenced
this pull request
Jan 17, 2026
* origin/main: feat(tui): Two-column layout with detail preview (hmans#42) feat: add ETag support for optimistic concurrency control (hmans#59) feat(plugin): improve OpenCode plugin robustness with availability checks (hmans#58) feat(cli): Add --prefix flag to create command (hmans#56) chore: clean up README.md docs: only push prime if it exists (hmans#52) fix: normalise short IDs when storing relationship links (hmans#50)
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.
Fixes #49
Short IDs were being stored verbatim in relationship fields (parent, blocking), causing resolution failures since the resolver expects full IDs.
Changes
NormalizeID()helper to Core that resolves short IDs to full IDsSetParent,AddBlocking,RemoveBlockingmutations to normalise IDs before storingCreateBeanmutation to normalise parent and blocking IDsNote: This prevents the issue going forward. Existing broken links from short IDs could potentially be healed by extending
beans check --fixto normalise resolvable short IDs, but that felt like separate scope.