Skip to content

fix(ask): loopback gate applies to proxy mode only, not snippet - #41

Merged
DenDiem merged 1 commit into
mainfrom
fix/snippet-ungate-target
Aug 10, 2026
Merged

fix(ask): loopback gate applies to proxy mode only, not snippet#41
DenDiem merged 1 commit into
mainfrom
fix/snippet-ungate-target

Conversation

@DenDiem

@DenDiem DenDiem commented Aug 10, 2026

Copy link
Copy Markdown
Owner

The loopback target check ran before mode selection, so it blocked snippet mode too — but snippet mode doesn't proxy: the developer's own server serves the app at its real origin and Caliper only injects a <script> tag. So it needlessly rejected a real dev server at a custom hostname or over HTTPS (https://foo.local.example:4220), even when that host resolves to 127.0.0.1.

Now the loopback + reachability gate applies only in proxy mode. In snippet mode caliper_ask accepts any host — and because the origin never shifts to 127.0.0.1, the proxy-mode side effects vanish too (no third-party-key origin 403s like Google Maps, no CORS shift on the app's own API). caliper_design is proxy-only, so it's unchanged. Error message + skill guidance updated.

Verified: tsc + eslint clean, 189 tests.

@DenDiem
DenDiem merged commit 419a868 into main Aug 10, 2026
2 checks passed
@DenDiem
DenDiem deleted the fix/snippet-ungate-target branch August 10, 2026 13:36
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