Skip to content

Fix broken /self/v1 extend with a base URL with path#808

Merged
jviotti merged 2 commits intomainfrom
self-extend-with-path
Apr 2, 2026
Merged

Fix broken /self/v1 extend with a base URL with path#808
jviotti merged 2 commits intomainfrom
self-extend-with-path

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Apr 2, 2026

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: ddb0b15 Previous: 3f2bc04 Ratio
Add one schema (0 existing) 18 ms 18 ms 1
Add one schema (100 existing) 23 ms 22 ms 1.05
Add one schema (1000 existing) 74 ms 73 ms 1.01
Add one schema (10000 existing) 624 ms 627 ms 1.00
Update one schema (1 existing) 16 ms 16 ms 1
Update one schema (101 existing) 23 ms 23 ms 1
Update one schema (1001 existing) 76 ms 73 ms 1.04
Update one schema (10001 existing) 648 ms 676 ms 0.96
Cached rebuild (1 existing) 9 ms 9 ms 1
Cached rebuild (101 existing) 11 ms 11 ms 1
Cached rebuild (1001 existing) 31 ms 30 ms 1.03
Cached rebuild (10001 existing) 251 ms 243 ms 1.03
Index 100 schemas 147 ms 131 ms 1.12
Index 1000 schemas 1102 ms 1003 ms 1.10
Index 10000 schemas 14037 ms 13126 ms 1.07

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: ddb0b15 Previous: 3f2bc04 Ratio
Add one schema (0 existing) 23 ms 20 ms 1.15
Add one schema (100 existing) 25 ms 25 ms 1
Add one schema (1000 existing) 74 ms 73 ms 1.01
Add one schema (10000 existing) 727 ms 606 ms 1.20
Update one schema (1 existing) 19 ms 19 ms 1
Update one schema (101 existing) 25 ms 25 ms 1
Update one schema (1001 existing) 76 ms 75 ms 1.01
Update one schema (10001 existing) 610 ms 610 ms 1
Cached rebuild (1 existing) 10 ms 11 ms 0.91
Cached rebuild (101 existing) 12 ms 12 ms 1
Cached rebuild (1001 existing) 32 ms 31 ms 1.03
Cached rebuild (10001 existing) 248 ms 252 ms 0.98
Index 100 schemas 112 ms 110 ms 1.02
Index 1000 schemas 1001 ms 1017 ms 0.98
Index 10000 schemas 14372 ms 14123 ms 1.02

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

@jviotti jviotti force-pushed the self-extend-with-path branch 2 times, most recently from cfdae66 to 2243a63 Compare April 2, 2026 18:38
@jviotti jviotti marked this pull request as ready for review April 2, 2026 18:38
@jviotti jviotti changed the title [WIP] Fix broken /self/v1 extend with a base URL with path Fix broken /self/v1 extend with a base URL with path Apr 2, 2026
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Apr 2, 2026

🤖 Augment PR Summary

Summary: This PR fixes reference rebasing when the server base URL includes a non-root path (e.g. /v1/catalog), which was breaking /self/v1 extension behavior.

Changes:

  • Stores the server URL path in Resolver and threads it into reference normalization.
  • Updates normalise_ref so configured resolve mappings are prefixed with the server URL path before being written back into $ref/$dynamicRef.
  • Initializes the cached path during Resolver::add().
  • Adds unit tests covering add/resolve behavior when server_url contains a path segment.

🤖 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. 2 suggestions posted.

Fix All in Augment

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

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 3 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/resolver/resolver.cc">

<violation number="1" location="src/resolver/resolver.cc:256">
P1: Write to `this->server_url_path` is not guarded by `mutex`, but it is read during resolution in `operator()`. If `add()` and `operator()` can be called concurrently, this is a data race (undefined behavior). Guard this write with the same `mutex` used for `views`.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@jviotti jviotti force-pushed the self-extend-with-path branch 3 times, most recently from 51b5abc to 13a6d79 Compare April 2, 2026 18:52
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the self-extend-with-path branch from 13a6d79 to ddb0b15 Compare April 2, 2026 18:54
@jviotti jviotti merged commit b4c34b3 into main Apr 2, 2026
5 checks passed
@jviotti jviotti deleted the self-extend-with-path branch April 2, 2026 19:11
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