From b95a7ee3d62a1c9cc816984302c097fc6174aac9 Mon Sep 17 00:00:00 2001 From: Andrei Petraru Date: Tue, 25 Aug 2026 07:06:09 +0300 Subject: [PATCH] docs(guardrails): don't let fetched SDK docs override tenant availability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three coded-guardrail references tell the agent to WebFetch core/guardrails/ and langchain/guardrails/ and treat them as a source of truth. Those pages just gained "Platform Availability" notes saying BYOG and LLM-as-judge are not enabled on every tenant (UiPath/uipath-python#1868, UiPath/uipath-langchain-python#1045). Nothing told the agent that prose is product-wide, not a statement about the tenant in front of it. The risk is a false stop: an agent refusing to author, or filing a review finding, for a validator that `uip agent guardrails list` reports as Available on this tenant. guardrails-recommend.md is the sharpest case — in Validate mode it already calls the SDK docs "authoritative, sufficient" and demotes the tenant list to a non-mandatory cross-check. So: a precedence line in each of the three, placed where each file scopes what to take from the fetched pages. Deliberately no availability note of the docs' kind in any skill — skills resolve availability at runtime against the live tenant, and a static "not available yet" line would go stale the moment the flag flips and could cause the very refusal this guards against. Verified: skills:validate OK (26 skills, both flavors). Evals on Sonnet 5 (coder-eval 0.10.2, the version tests/.coder-eval-version pins) over the 17 tasks covering these three files — 15/17 pass. The two failures, coded-byog-middleware (0.000) and coded-byog-decorator (0.231), reproduce identically on unmodified main with the same flags: same scores, same checker messages. Pre-existing, not caused by this change, and worth its own look since a prior recorded Sonnet run had both at 1.0. Not fixed here, found while checking: getGuardrailDefinitions drops "FeatureDisabled" outright, so a flagged-off validator yields no list entry at all rather than a bad status. The coded authoring rule keys on Status != "Available" and so never fires for it, while the low-code twin handles absence explicitly. No skill reads the "FeatureDisabled" status the catalog does expose. Needs its own issue. Co-Authored-By: Claude Opus 5 (1M context) --- .../coded/capabilities/guardrails/guardrails-recommend.md | 5 +++++ .../references/coded/capabilities/guardrails/guardrails.md | 2 ++ .../references/agents/guardrails/coded-guardrails-review.md | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md b/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md index 63ada7dbfc..174c823db7 100644 --- a/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md +++ b/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.md @@ -14,6 +14,11 @@ Both workflows are driven by live data — the catalog (`uip agent guardrails ca > Full three-fetch mandate applies to **Recommend mode**. In **Validate mode** of an existing guardrail the SDK docs are the authoritative, sufficient source for a validator's scope/stage — `catalog` (relevance metadata) and `list` (tenant entitlement) are recommended cross-checks, not a hard prerequisite for a scope/placement fix. See [Validate Mode](#validate-mode). +> **The SDK docs are authoritative for shape, never for availability.** They carry `Platform Availability` +> notes for features still rolling out (BYOG, LLM-as-judge). Those are product-wide statements, not facts +> about this tenant — only `uip agent guardrails list` decides that. Never withhold or down-rank a +> recommendation because a fetched page called the feature "not enabled on every tenant yet". + **Required first operation in both modes:** use `WebFetch` on `https://uipath.github.io/uipath-python/core/guardrails/` before catalog calls, project inspection, analysis, or edits. A coded guardrail recommendation or diff --git a/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md b/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md index 1aa4809e5f..0eedbf8823 100644 --- a/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md +++ b/skills/uipath-agents/references/coded/capabilities/guardrails/guardrails.md @@ -24,6 +24,8 @@ Add guardrails to a Python coded agent (LangChain/LangGraph) in two styles: **mi - Entity type names or their allowed values - Import paths +> **That authority covers shape, not availability.** These pages carry `Platform Availability` notes for features still rolling out (BYOG, LLM-as-judge). Those notes are product-wide, never a statement about the tenant in front of you — [Check Tenant Availability](#check-tenant-availability-mandatory-for-built-in-ai-validators) below is the only authority for that. A validator the docs describe as "not enabled on every tenant yet" can still be `Available` here; author it. + When available, the `langchain/guardrails/` page documents three actions — **`LogAction`**, **`BlockAction`**, and **`EscalateAction`** (human-in-the-loop). Treat the fetched page as the source of truth for `EscalateAction`'s parameters, supported scopes, and stages; the operational wiring it doesn't cover (the suspend->resume UX, the diff --git a/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md b/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md index 147297e902..7bf02b7986 100644 --- a/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md +++ b/skills/uipath-review/references/agents/guardrails/coded-guardrails-review.md @@ -167,6 +167,10 @@ the mapping IS needed, fetch via `WebFetch`: (`uipath-langchain` in `pyproject.toml` or `from langchain…` / `from langgraph…` imports): middleware classes, their supported scopes/stages, and the `uipath_langchain.guardrails` import paths. +The `Platform Availability` notes on these pages are product-wide, so never turn one into a review finding: +tenant availability comes from `uip agent guardrails list`, and the fetched pages supply class, scope, and +import names only. + Build a `{ validator_id → { middleware_class, validator_class, entity_enum, allowed_scopes, allowed_stages, import_path } }` lookup by joining catalog entries with the SDK class names. Use the fetched content as the sole source of truth for class/enum/import names — never memory.