Skip to content

AX-2205: Add SH support - #78

Merged
davida-jfrog merged 2 commits into
mainfrom
AX-2205-bridge-client-self-hosted
Sep 3, 2026
Merged

AX-2205: Add SH support#78
davida-jfrog merged 2 commits into
mainfrom
AX-2205-bridge-client-self-hosted

Conversation

@davida-jfrog

@davida-jfrog davida-jfrog commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Self-hosted JFrog Platform instances serve these APIs behind /bridge-client rather than off the platform root, so the Agent Guard and AI Catalog checks always 404 and report the feature as unavailable.

Both checks now retry once behind /bridge-client after a 404, and use that answer only when it comes from a working endpoint — every other outcome keeps its existing behaviour. SaaS is unaffected.

Tests: node --test — 95 unit, 17 integration, all passing.

Self-hosted JPDs do not serve /ml/core off the platform root — the same
APIs sit behind /bridge-client — so every probe 404s and the caller reports
the feature as absent.

Each /ml/core call site now retries once behind /bridge-client after a 404,
and adopts that result only when it evidences a working endpoint, so no
pre-existing failure changes its status, detail or exit code:

- modules/core/agent-guard-check.mjs and its jfrog-mcp-management copy: the
  HTTP call is split into fetchSetting(), giving each attempt its own
  AbortController so the retry cannot inherit a spent timeout budget. Only an
  enabled/registry-off answer replaces the root verdict.
- jfrog-detect-catalog-runtime.mjs: the fallback runs in both parts. Part A
  resolves the prefix anonymously; Part B retries independently for a JPD that
  answers 401 anonymously at the root but 404s the authenticated call. Part A
  adopts only a code that says the catalog is deployed, Part B only a 2xx of
  the catalog's shape or a 403 — so a proxy's 400/501 or a WAF's 401 cannot
  promote a non-blocking exit 1 into a blocking exit 3, or blame credentials
  that are fine.

The marketplace registration script already had this fallback; it is unchanged.

Tests: 13 new unit tests drive the injectable module copy through a route-map
fetch double (no retry on 200/401/403/5xx/network, retry on 404, both-404
keeps the original reason, a fresh unaborted signal per attempt). A new
integration suite spawns both skill scripts against a localhost JPD stub with
a fake jf on PATH and HOME redirected, covering SaaS (asserting /bridge-client
is never probed), both resolution paths, not_entitled, and every case where
the fallback must not win.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@davida-jfrog
davida-jfrog requested a review from a team as a code owner September 3, 2026 17:00
Comment thread modules/core/agent-guard-check.mjs
Comment thread modules/core/agent-guard-check.mjs Outdated
Comment thread skills/jfrog-mcp-management/scripts/jfrog-agent-guard-check.mjs Outdated
Comment thread skills/jfrog-init/scripts/jfrog-detect-catalog-runtime.mjs Outdated
…ssignment

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
davida-jfrog added a commit to jfrog/cursor-plugin that referenced this pull request Sep 3, 2026
Self-hosted JFrog Platform instances serve these APIs behind
`/bridge-client` rather than off the platform root, so the Agent Guard
and AI Catalog checks always 404 and report the feature as unavailable.

Both checks now retry once behind `/bridge-client` after a 404, and use
that answer only when it comes from a working endpoint — every other
outcome keeps its existing behaviour. SaaS is unaffected.

Port of jfrog/claude-plugin#78. Tests: `node --test` — 13 unit, 17
integration, plus the two pre-existing suites, all passing and now wired
into CI.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@davida-jfrog
davida-jfrog merged commit 41a8da8 into main Sep 3, 2026
2 checks passed
@davida-jfrog
davida-jfrog deleted the AX-2205-bridge-client-self-hosted branch September 3, 2026 19:57
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.

2 participants