Skip to content

Stop exposing pointer locations on the locations endpoint - #1256

Merged
jviotti merged 1 commit into
mainfrom
no-pointers-locations
Sep 4, 2026
Merged

Stop exposing pointer locations on the locations endpoint#1256
jviotti merged 1 commit into
mainfrom
no-pointers-locations

Conversation

@jviotti

@jviotti jviotti commented Sep 4, 2026

Copy link
Copy Markdown
Member

We were not supposed to do this to begin with.

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

We were not supposed to do this to begin with.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Sep 4, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR stops the schema locations API from exposing entries for every JSON Pointer.

Changes:

  • Switches frame generation from Pointers to Locations, retaining resources, anchors, and subschemas.
  • Removes pointer from the advertised locations-response entry types.
  • Updates API wording and MCP response-size assertions for the revised response schema.
  • Reworks HTTP and MCP end-to-end tests to assert that plain pointer locations are absent.
Technical Notes: The dedicated positions endpoint remains the source of token-level JSON Pointer location data.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 8 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/self/v1/schemas/api/schemas/locations/response.json">

<violation number="1" location="src/self/v1/schemas/api/schemas/locations/response.json:46">
P1: The generator still emits "pointer" entries but this response schema no longer allows the value. For any schema that contains a JSON pointer location, the served locations artifact will contain a "type": "pointer" entry that now fails validation against this response schema, breaking the endpoint (or leaving the schema describing output the server still produces). Remove "pointer" from the generator too, or keep it in the enum until the artifact no longer emits it.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

"properties": {
"type": {
"enum": [ "resource", "anchor", "pointer", "subschema" ]
"enum": [ "resource", "anchor", "subschema" ]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The generator still emits "pointer" entries but this response schema no longer allows the value. For any schema that contains a JSON pointer location, the served locations artifact will contain a "type": "pointer" entry that now fails validation against this response schema, breaking the endpoint (or leaving the schema describing output the server still produces). Remove "pointer" from the generator too, or keep it in the enum until the artifact no longer emits it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/self/v1/schemas/api/schemas/locations/response.json, line 46:

<comment>The generator still emits "pointer" entries but this response schema no longer allows the value. For any schema that contains a JSON pointer location, the served locations artifact will contain a "type": "pointer" entry that now fails validation against this response schema, breaking the endpoint (or leaving the schema describing output the server still produces). Remove "pointer" from the generator too, or keep it in the enum until the artifact no longer emits it.</comment>

<file context>
@@ -43,7 +43,7 @@
       "properties": {
         "type": {
-          "enum": [ "resource", "anchor", "pointer", "subschema" ]
+          "enum": [ "resource", "anchor", "subschema" ]
         },
         "base": {
</file context>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (community)

Details
Benchmark suite Current: 4bc4480 Previous: b5ccb40 Ratio
Add one schema (0 existing) 229 ms 240 ms 0.95
Add one schema (100 existing) 34 ms 35 ms 0.97
Add one schema (1000 existing) 114 ms 100 ms 1.14
Add one schema (10000 existing) 679 ms 697 ms 0.97
Update one schema (1 existing) 32 ms 28 ms 1.14
Update one schema (101 existing) 34 ms 35 ms 0.97
Update one schema (1001 existing) 111 ms 100 ms 1.11
Update one schema (10001 existing) 701 ms 718 ms 0.98
Cached rebuild (1 existing) 10 ms 11 ms 0.91
Cached rebuild (101 existing) 12 ms 14 ms 0.86
Cached rebuild (1001 existing) 43 ms 37 ms 1.16
Cached rebuild (10001 existing) 298 ms 305 ms 0.98
Index 100 schemas 485 ms 503 ms 0.96
Index 1000 schemas 1411 ms 1428 ms 0.99
Index 10000 schemas 12204 ms 12398 ms 0.98
Index 10000 schemas (custom meta-schema) 14388 ms 14542 ms 0.99
Index 10000 schemas ($ref fan-out) 14685 ms 14888 ms 0.99
test/e2e/html: Schema Fetch (p50) 407 us 412 us 0.99
test/e2e/html: Schema Fetch (p99) 484 us 490 us 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (enterprise)

Details
Benchmark suite Current: 4bc4480 Previous: b5ccb40 Ratio
Add one schema (0 existing) 305 ms 300 ms 1.02
Add one schema (100 existing) 119 ms 119 ms 1
Add one schema (1000 existing) 178 ms 172 ms 1.03
Add one schema (10000 existing) 771 ms 781 ms 0.99
Update one schema (1 existing) 106 ms 119 ms 0.89
Update one schema (101 existing) 116 ms 122 ms 0.95
Update one schema (1001 existing) 182 ms 175 ms 1.04
Update one schema (10001 existing) 785 ms 799 ms 0.98
Cached rebuild (1 existing) 12 ms 12 ms 1
Cached rebuild (101 existing) 17 ms 15 ms 1.13
Cached rebuild (1001 existing) 41 ms 44 ms 0.93
Cached rebuild (10001 existing) 318 ms 340 ms 0.94
Index 100 schemas 544 ms 395 ms 1.38
Index 1000 schemas 1462 ms 1468 ms 1.00
Index 10000 schemas 13718 ms 13318 ms 1.03
Index 10000 schemas (custom meta-schema) 14966 ms 14408 ms 1.04
Index 10000 schemas ($ref fan-out) 14874 ms 14561 ms 1.02
enterprise/e2e/auth: Schema Anonymous (p50) 402 us 377 us 1.07
enterprise/e2e/auth: Schema Anonymous (p99) 514 us 498 us 1.03
enterprise/e2e/auth: Schema API Key Identity (p50) 407 us 381 us 1.07
enterprise/e2e/auth: Schema API Key Identity (p99) 522 us 488 us 1.07
enterprise/e2e/auth: Schema API Key SHA256 (p50) 413 us 389 us 1.06
enterprise/e2e/auth: Schema API Key SHA256 (p99) 523 us 489 us 1.07
enterprise/e2e/auth: Schema JWT (p50) 543 us 533 us 1.02
enterprise/e2e/auth: Schema JWT (p99) 702 us 670 us 1.05
test/e2e/html: Schema Fetch (p50) 409 us 384 us 1.07
test/e2e/html: Schema Fetch (p99) 496 us 475 us 1.04

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti
jviotti merged commit bd6fae8 into main Sep 4, 2026
6 checks passed
@jviotti
jviotti deleted the no-pointers-locations branch September 4, 2026 17:46
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