Skip to content

Comments

Fxing an issue removal of the registry path#434

Open
Shahafgo wants to merge 1 commit intoopenclaw:mainfrom
Shahafgo:fix_regitry_url
Open

Fxing an issue removal of the registry path#434
Shahafgo wants to merge 1 commit intoopenclaw:mainfrom
Shahafgo:fix_regitry_url

Conversation

@Shahafgo
Copy link

@Shahafgo Shahafgo commented Feb 19, 2026

Greptile Summary

Fixed URL construction to preserve registry base paths when the registry is hosted at a non-root path (e.g., http://host/custom/registry/path). Previously, new URL('/api/v1/skills', 'http://host/base') would discard /base because absolute paths override the base URL's path component. The new registryUrl() helper normalizes both arguments to construct relative URLs, ensuring http://host/base/api/v1/skills.

  • Introduced registryUrl() helper function in http.ts with proper path normalization
  • Updated all URL construction sites across inspect.ts, moderation.ts, and skills.ts to use the new helper
  • Added comprehensive test coverage in http.test.ts covering plain origins, custom base paths, trailing slashes, and encoded segments
  • Fixed moderation.ts to pass complete URLs instead of pathname-only strings to maintain base path context

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix addresses a clear bug with proper encapsulation through a helper function, includes comprehensive test coverage for edge cases, and consistently applies the fix across all affected call sites. The implementation is straightforward with no complex logic or side effects.
  • No files require special attention

Last reviewed commit: 8401d0d

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@vercel
Copy link
Contributor

vercel bot commented Feb 19, 2026

@Shahafgo is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

@Shahafgo
Copy link
Author

Attaching issue explanation: #433

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