Skip to content

Support running on base URLs with path components#807

Merged
jviotti merged 6 commits intomainfrom
e2e-path
Apr 3, 2026
Merged

Support running on base URLs with path components#807
jviotti merged 6 commits intomainfrom
e2e-path

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Apr 2, 2026

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

@jviotti jviotti force-pushed the e2e-path branch 4 times, most recently from 06bce6a to ba42f15 Compare April 3, 2026 19:51
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: fed3d24 Previous: 6eda1dc Ratio
Add one schema (0 existing) 18 ms 18 ms 1
Add one schema (100 existing) 23 ms 24 ms 0.96
Add one schema (1000 existing) 78 ms 75 ms 1.04
Add one schema (10000 existing) 759 ms 939 ms 0.81
Update one schema (1 existing) 16 ms 16 ms 1
Update one schema (101 existing) 23 ms 22 ms 1.05
Update one schema (1001 existing) 77 ms 73 ms 1.05
Update one schema (10001 existing) 850 ms 913 ms 0.93
Cached rebuild (1 existing) 9 ms 8 ms 1.13
Cached rebuild (101 existing) 11 ms 10 ms 1.10
Cached rebuild (1001 existing) 32 ms 30 ms 1.07
Cached rebuild (10001 existing) 288 ms 292 ms 0.99
Index 100 schemas 108 ms 140 ms 0.77
Index 1000 schemas 934 ms 1055 ms 0.89
Index 10000 schemas 13147 ms 13008 ms 1.01

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: fed3d24 Previous: 6eda1dc Ratio
Add one schema (0 existing) 16 ms 20 ms 0.80
Add one schema (100 existing) 20 ms 26 ms 0.77
Add one schema (1000 existing) 59 ms 79 ms 0.75
Add one schema (10000 existing) 645 ms 920 ms 0.70
Update one schema (1 existing) 15 ms 25 ms 0.60
Update one schema (101 existing) 20 ms 26 ms 0.77
Update one schema (1001 existing) 58 ms 80 ms 0.72
Update one schema (10001 existing) 637 ms 689 ms 0.92
Cached rebuild (1 existing) 9 ms 10 ms 0.90
Cached rebuild (101 existing) 9 ms 12 ms 0.75
Cached rebuild (1001 existing) 22 ms 34 ms 0.65
Cached rebuild (10001 existing) 185 ms 255 ms 0.73
Index 100 schemas 84 ms 117 ms 0.72
Index 1000 schemas 703 ms 1044 ms 0.67
Index 10000 schemas 10167 ms 14263 ms 0.71

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the e2e-path branch 2 times, most recently from 78b05df to 99a2b72 Compare April 3, 2026 20:49
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added 2 commits April 3, 2026 17:58
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 April 3, 2026 22:17
@jviotti jviotti changed the title [WIP] Add an e2e test target with base URLs with paths Add an e2e test target with base URLs with paths Apr 3, 2026
@jviotti jviotti changed the title Add an e2e test target with base URLs with paths Fully support running on base URLs with paths Apr 3, 2026
@jviotti jviotti changed the title Fully support running on base URLs with paths Support running on base URLs with path components Apr 3, 2026
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.

4 issues found across 56 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/actions/action_schema_search.h">

<violation number="1" location="src/actions/action_schema_search.h:25">
P2: `base_path_` stores a `std::string_view` into `router` without owning the data. Since `router` isn’t stored, the view can dangle after construction, leading to undefined behavior when building error URLs. Store an owning `std::string` instead.</violation>
</file>

<file name="src/actions/action_default.h">

<violation number="1" location="src/actions/action_default.h:21">
P2: Storing router.base_path() in a std::string_view risks a dangling view because ActionDefault does not keep the router alive. Consider owning the base path (e.g., std::string) or otherwise guarantee the router lifetime.</violation>

<violation number="2" location="src/actions/action_default.h:28">
P2: The base-path guard only checks prefix, so `/apix` matches base `/api` and is incorrectly routed. Add a boundary check so only exact matches or `/api/...` are accepted.</violation>
</file>

<file name="test/e2e/path/schemas/example/with-ref.json">

<violation number="1" location="test/e2e/path/schemas/example/with-ref.json:6">
P2: `$ref` must be a URI reference to another schema; `"string"` is not valid. Use a string schema (`"type": "string"`) or point `$ref` to a defined schema.</violation>
</file>

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit f31a369 into main Apr 3, 2026
6 checks passed
@jviotti jviotti deleted the e2e-path branch April 3, 2026 23:02
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