Skip to content

fix: http(s) scheme validation for webhook URLs + cross-platform BuildingBlocks tests#1244

Merged
iammukeshm merged 2 commits into
developfrom
feat/distribution-polyglot-template
May 24, 2026
Merged

fix: http(s) scheme validation for webhook URLs + cross-platform BuildingBlocks tests#1244
iammukeshm merged 2 commits into
developfrom
feat/distribution-polyglot-template

Conversation

@iammukeshm
Copy link
Copy Markdown
Member

@

Summary

Two fixes carried on top of the distribution branch:

  • fix(webhooks): require http(s) scheme for subscription URLUri.TryCreate(UriKind.Absolute) accepts leading-/ paths as file:// on Unix (but not Windows), so the webhook subscription URL validator now also asserts the scheme is http/https. Fixes a Linux-only CI flake.
  • fix(tests): make BuildingBlocks dependency checks cross-platformBuildingBlocksIndependenceTests no longer assumes Windows path separators.

Changes

  • CreateWebhookSubscriptionCommandValidator.cs — scheme guard on the subscription URL.
  • BuildingBlocksIndependenceTests.cs — cross-platform path handling.

Test plan

  • dotnet test src/FSH.Starter.slnx (architecture + webhook validation suites)

🤖 Generated with Claude Code
@

iammukeshm and others added 2 commits May 24, 2026 04:48
ProjectReference Include paths are authored with Windows separators
(..\Core\Core.csproj). Path.GetFileNameWithoutExtension only treats
"\" as a separator on Windows, so on Linux CI it returned the full
path minus extension (..\Core\Core) instead of the bare name (Core).

This caused BuildingBlocks_Should_Follow_Layered_Dependencies to report
12 false-positive violations on Linux (passed locally on Windows), and
silently disabled the module-reference enforcement in
BuildingBlocks_Projects_Should_Not_Reference_Modules_Directly.

Normalize "\" to "/" before extracting the project name so both checks
work on every platform.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Uri.TryCreate(UriKind.Absolute) accepts a leading-/ path as an implicit
file:// URI on Unix (but not Windows), so "/relative/path" passed
validation on the Linux CI runner while the test passed locally on
Windows. A webhook target must be an HTTP(S) endpoint regardless of
platform, so assert the scheme explicitly. Fixes the Linux-only failure
of Create_Should_Fail_When_Url_Relative.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
fullstackhero 8d98981 Commit Preview URL

Branch Preview URL
May 24 2026, 08:03 AM

@iammukeshm iammukeshm merged commit 4b7a641 into develop May 24, 2026
5 checks passed
@iammukeshm iammukeshm deleted the feat/distribution-polyglot-template branch May 24, 2026 08:06
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