docs(guardrails): don't let fetched SDK docs override tenant availability - #2787
Conversation
|
Claude finished @apetraru-uipath's task in 1m 28s —— View job PR Review: docs(guardrails) — don't let fetched SDK docs override tenant availability
SummaryAdds a single precedence rule to each of three guardrail reference files ( Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | No frontmatter changes |
| E2E Tests | OK | No new capabilities — existing 17 guardrail tasks cover these files; 15/17 pass, 2 fail identically on main |
| Skill Body | OK | No SKILL.md changes |
| References & Assets | OK | All three reference edits are correct, well-placed, and self-contained |
| Repo Hygiene | OK | No secrets, no cross-skill deps, changes scoped to the two affected skills |
Issues for Manual Review
None found. The claim that Platform Availability notes are product-wide (not per-tenant) is a domain fact — the PR description cites the upstream PRs (UiPath/uipath-python#1868, UiPath/uipath-langchain-python#1045) that introduced those notes, and the existing uip agent guardrails list machinery already handles per-tenant availability.
Conclusion
Clean PR. The three additions are minimal, correctly placed at the exact points where each file scopes what to take from fetched SDK docs, and consistent with the existing precedence model (uip agent guardrails list as the tenant-availability authority). No issues found — approve.
…lity 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) <noreply@anthropic.com>
7f8e3ed to
b95a7ee
Compare
Three coded-guardrail references tell the agent to
WebFetchcore/guardrails/andlangchain/guardrails/and treat them as a source of truth:uipath-agents/references/coded/capabilities/guardrails/guardrails.mduipath-agents/references/coded/capabilities/guardrails/guardrails-recommend.mduipath-review/references/agents/guardrails/coded-guardrails-review.mdThose pages just gained
Platform Availabilitynotes saying BYOG and LLM-as-judge aren't 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 listreports asAvailablehere.guardrails-recommend.mdis 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 this adds one precedence line to each file, placed where that file scopes what to take from the fetched pages. +11 lines, additive, no logic touched.
No skill gets an availability note of the docs' kind, deliberately. Skills already resolve availability the right way — at runtime, against the live tenant. A static "not available yet" line would go stale the moment the flag flips, and could cause the very refusal this PR guards against. The existing machinery is left alone: the mandatory
Check Tenant Availabilitystep, the low-code not-found/Available/Unauthorisedladder,ByoGuardrailsUnavailableinuipath-platform, and the disabled-configuration handling inuipath-review/uipath-troubleshoot.Also checked and deliberately unchanged:
uipath-planner/references/platform-availability-guide.md. It's a product × delivery-model matrix (Cloud vs Automation Suite) — wrong granularity for a per-tenant feature flag.Flavors: only
studiowebexists, it has no guardrail overrides, and none of the three files carryskill-flavor:markers. Plain canonical edit — no override work, no pack cycle needed.Verification
npm run skills:validate— OK on the rebased tree (26 skills / 1726 files, both flavors compose).Evals run with
--type claude-code --model claude-sonnet-5,experiments/default.yaml,--driver tempdir,-D 'agent.setting_sources=[]'. Scope is the 17 tasks covering these three files — the 13 underuipath-agents/coded/guardrails/plus the 4coded_review_guardrail_*. Low-code anduipath-platformguardrail tasks are excluded; they don't fetch the Python SDK docs.Two passes, because #2707 bumped the pin mid-review:
1. Full 17 on coder-eval
0.10.2(the pin before this branch was rebased) — 15/17 pass. Both LLM-as-judge and all four coded-review tasks at 1.000. Task logs confirm the runs read the checked-out repo, not a stale global~/.agents/skillscopy.2. Re-verified on the current pin
0.11.2. 0.11.0 madetask.referencedirectory-only — a load-time breaking change — so firstcoder-eval planover all 17: "All tasks are valid!" (the migration touched 297uipath-troubleshoottasks, none here). Then a representative subset re-run —smoke,llm_as_judge,recommend_scoped,coded_review_guardrail_misapplied— 4/4 at 1.000.The full 17 were not re-run on 0.11.2: the first pass took hours (one task 7039s) for 11 lines of additive prose. Single run per task throughout, not
--repeats 3.The two failures are pre-existing on
maincoded-byog-middlewareUiPathByoGuardrailMiddlewarenot spread with*into the middleware listcoded-byog-decorator@guardrail(validator=ByoValidator(...))—ByoValidatornever wiredRe-ran both against unmodified
main(worktree, identical flags): they fail identically — same scores, same checker messages. Not caused by this change.Worth a separate look, though: a prior recorded Sonnet regression run in this repo has both at 1.000, so something regressed independently of this PR.
Follow-up worth its own issue
getGuardrailDefinitions(packages/agent-sdk/src/governance.ts, comment: "FeatureDisabled is always dropped") filtersFeatureDisabledout ofuip agent guardrails list. A flagged-off validator — BYOG and LLM-as-judge today — therefore yields no entry at all, not an entry with a bad status. The coded authoring rule keys onStatus != "Available", so it never fires for that case; the low-code twin handles absence explicitly, the coded page has no not-found branch. Separately,getGuardrailCatalogdoes not filter andGuardrailCatalogEntry.statusincludes"FeatureDisabled"— yet no skill reads that status. So an agent currently can't tell "flagged off on this tenant" from "misspelled validator name".🤖 Generated with Claude Code