Skip to content

Include a JSON Pointer location for the dependents endpoint#1017

Merged
jviotti merged 4 commits into
mainfrom
dependents-at
Jun 5, 2026
Merged

Include a JSON Pointer location for the dependents endpoint#1017
jviotti merged 4 commits into
mainfrom
dependents-at

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Jun 5, 2026

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti marked this pull request as ready for review June 5, 2026 19:58
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

No issues found across 14 files

Re-trigger cubic

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Jun 5, 2026

🤖 Augment PR Summary

Summary: This PR extends the schema dependents API/tooling output to include a JSON Pointer indicating where each dependency originates in the source schema.

Changes:

  • Documented the new at field for GET /self/v1/api/schemas/dependents/{path} in docs/api.md
  • Updated the dependents API response schema to require at (format: json-pointer)
  • Adjusted the index generator (GENERATE_DEPENDENTS) to carry at through when building the reverse dependency graph
  • Updated MCP tool response example data to include at
  • Expanded e2e Hurl coverage (headless/HTML/enterprise) to assert the new at field for dependents results
  • Added new test schemas (draft-07 and 2020-12 custom meta-schemas + consumers) and updated list counts accordingly

Technical Notes: The generator now stores edges as (from, to, at) tuples so the resulting dependents graph can surface an origin pointer per edge while maintaining deterministic ordering via std::set.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

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

Comment thread src/self/v1/schemas/mcp/tools/call/get-schema-dependents/response.json Outdated
jviotti added 2 commits June 5, 2026 16:08
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link
Copy Markdown

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

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 (changes from recent commits).

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/mcp/tools/call/get-schema-dependencies/response.json">

<violation number="1" location="src/self/v1/schemas/mcp/tools/call/get-schema-dependencies/response.json:11">
P3: The example value in this file's update is inconsistent with the example in the referenced API schema (`api/schemas/dependencies/response.json`), which still uses `/properties/address`. Both describe the same data format for the dependencies endpoint — the MCP tool schema references the API schema for the `results` property definition — so they should agree on example values.</violation>
</file>

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

Re-trigger cubic

"from": "https://example.com/schemas/user.json",
"to": "https://example.com/schemas/address.json",
"at": "/properties/address"
"at": "/properties/address/$ref"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The example value in this file's update is inconsistent with the example in the referenced API schema (api/schemas/dependencies/response.json), which still uses /properties/address. Both describe the same data format for the dependencies endpoint — the MCP tool schema references the API schema for the results property definition — so they should agree on example values.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/self/v1/schemas/mcp/tools/call/get-schema-dependencies/response.json, line 11:

<comment>The example value in this file's update is inconsistent with the example in the referenced API schema (`api/schemas/dependencies/response.json`), which still uses `/properties/address`. Both describe the same data format for the dependencies endpoint — the MCP tool schema references the API schema for the `results` property definition — so they should agree on example values.</comment>

<file context>
@@ -8,7 +8,7 @@
           "from": "https://example.com/schemas/user.json",
           "to": "https://example.com/schemas/address.json",
-          "at": "/properties/address"
+          "at": "/properties/address/$ref"
         }
       ]
</file context>

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Benchmark Index (community)

Details
Benchmark suite Current: ab9acbf Previous: 5fb937a Ratio
Add one schema (0 existing) 392 ms 404 ms 0.97
Add one schema (100 existing) 30 ms 30 ms 1
Add one schema (1000 existing) 92 ms 90 ms 1.02
Add one schema (10000 existing) 729 ms 738 ms 0.99
Update one schema (1 existing) 22 ms 23 ms 0.96
Update one schema (101 existing) 30 ms 31 ms 0.97
Update one schema (1001 existing) 90 ms 91 ms 0.99
Update one schema (10001 existing) 744 ms 755 ms 0.99
Cached rebuild (1 existing) 7 ms 6 ms 1.17
Cached rebuild (101 existing) 9 ms 9 ms 1
Cached rebuild (1001 existing) 32 ms 31 ms 1.03
Cached rebuild (10001 existing) 273 ms 265 ms 1.03
Index 100 schemas 662 ms 671 ms 0.99
Index 1000 schemas 1349 ms 1674 ms 0.81
Index 10000 schemas 13791 ms 13987 ms 0.99
Index 10000 schemas (custom meta-schema) 135627 ms 156039 ms 0.87

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

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Benchmark Index (enterprise)

Details
Benchmark suite Current: ab9acbf Previous: 5fb937a Ratio
Add one schema (0 existing) 323 ms 396 ms 0.82
Add one schema (100 existing) 24 ms 33 ms 0.73
Add one schema (1000 existing) 71 ms 93 ms 0.76
Add one schema (10000 existing) 613 ms 703 ms 0.87
Update one schema (1 existing) 18 ms 24 ms 0.75
Update one schema (101 existing) 23 ms 34 ms 0.68
Update one schema (1001 existing) 73 ms 93 ms 0.78
Update one schema (10001 existing) 579 ms 738 ms 0.78
Cached rebuild (1 existing) 5 ms 7 ms 0.71
Cached rebuild (101 existing) 6 ms 10 ms 0.60
Cached rebuild (1001 existing) 19 ms 32 ms 0.59
Cached rebuild (10001 existing) 163 ms 418 ms 0.39
Index 100 schemas 452 ms 634 ms 0.71
Index 1000 schemas 1108 ms 1627 ms 0.68
Index 10000 schemas 10878 ms 13817 ms 0.79
Index 10000 schemas (custom meta-schema) 133252 ms 142692 ms 0.93

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

@jviotti jviotti merged commit 87a5ab6 into main Jun 5, 2026
5 checks passed
@jviotti jviotti deleted the dependents-at branch June 5, 2026 21:03
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