Skip to content

GO-7578 Keep hidden internal properties out of type definitions - #3318

Open
requilence wants to merge 2 commits into
developfrom
go-7578-internal-property-names
Open

requilence wants to merge 2 commits into
developfrom
go-7578-internal-property-names

Conversation

@requilence

@requilence requilence commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In the API v2 / MCP eval (MCP-08), create_type with a property named "Score" listed the internal fulltext _score on the type. Every create_object after that was refused, because _score is internal. That caused 8 of the 11 errors in the run.

Two paths led there:

Change

  • keys.go: the step-4 match skips hidden internal keys. _score written exactly still resolves. id is kept, so its envelope refusal still fires.
  • schema_write.go: in create_type and full-list update_type, a property_definitions entry naming a hidden internal key is dropped and the response carries a warning. Entries the type already lists are kept, because the bundled template type lists templateIsBundled and reading a type then sending it back must not remove it.
  • typeops.go: the add_property op refuses these keys instead of silently doing nothing.
  • Visible internal keys (Created by, Links, Backlinks, Object type, …) can still be placed. They are layout entries in a type's lists (relationutils/recommended.go defaults).

Dependency

anyproto/any-block#16 is merged and released as v2.0.0-rc6. This PR bumps to it.

Tests

  • New internalprops_test.go. With the fix reverted, the "Score" cases fail.
  • ./core/api/... and every package that imports anyblockjson pass, except TestV1ProtosMatchAnyBlockCanonicalSources, which fails the same way on develop already.

requilence added a commit that referenced this pull request Oct 11, 2026
The integration test's chat adapter predates ChatState, OpenSpaceChats
and OpenObjectSearch on apicore.ChatSubscriptionService, so the package
stopped building; it now reads the chat state as core/api does and
refuses the two streams this fixture does not wire. The two Score
subtests wait on the any-block bump in #3318 (GO-7578) and skip until
it lands.
@requilence
requilence force-pushed the go-7578-internal-property-names branch from dd54acd to 4e47b68 Compare October 11, 2026 12:38
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​anyproto/​any-block@​v0.0.0-20260919082013-9906a7c36b68 ⏵ v0.0.0-20261009103535-7a34818e210299 +1100100100100

View full report

@github-actions

Copy link
Copy Markdown

New Coverage 61.9% of statements
Patch Coverage 0.0% of changed statements (0/0)

Coverage provided by https://github.com/seriousben/go-patch-cover-action

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.

1 participant