Repository navigation
GO-7578 Give hidden internal properties no display name - #16
Merged
Merged
Conversation
A caller's "Score" bound to the fulltext `_score`, and every write naming it was then refused as internal. A key that is internal and hidden now claims no name: it spells its stored key, which still resolves, and the name is free for a caller's own property. Visible internal keys and id/type keep their names, where the refusal is the useful answer.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
The bundled name table maps the display name of every bundled relation to its key, including hidden internal ones. So a caller's own "Score" property resolved to the fulltext
_score, and every write naming it was then refused as internal (API v2 / MCP eval, MCP-08). 67 of the 81 internal keys answered to a name, among them "Timestamp", "Snippet", "Mentions", "Highlighted" and "Sync status".Change
InternalPropertyKeys) and hidden claims no name. It is written under its stored key, which still resolves back, so the reverse table stays an exact inverse. The name is free for a caller's own property.id/typekeep their names. For those, the refusal that explains the key is the useful answer.Tests
TestBundledNames_HiddenInternalKeysAnswerToNoName.TestAuthoringDeniedKeysAreRefusedUnderEverySpellingadjusted for keys that have no name.go test ./...passes.Heart counterpart: anyproto/anytype-heart (GO-7578).