Skip to content

fix(tests,skills): de-flake nightly guardrail failures — valid fixtures, doc gaps, run_limits - #2421

Open
apetraru-uipath wants to merge 5 commits into
mainfrom
andrei/guardrail-nightly-timeout-fixes
Open

fix(tests,skills): de-flake nightly guardrail failures — valid fixtures, doc gaps, run_limits#2421
apetraru-uipath wants to merge 5 commits into
mainfrom
andrei/guardrail-nightly-timeout-fixes

Conversation

@apetraru-uipath

@apetraru-uipath apetraru-uipath commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What changed?

De-flakes the guardrail-tagged failures of nightly run 2026-07-28_04-16-10 (all tagged turn-timeout-too-short). Transcript analysis showed each timeout was a symptom of a concrete defect — fixture schema noise, a never-seeded test resource, or a missing skill-doc branch — not model slowness. Three change areas:

1. tests/tasks/uipath-review/ — fixtures now pass uip agent validate (5e170b1ab)

5 of 7 lowcode review fixtures failed uip agent validate on main, so reviewers saw "review: Grade A" vs "validate: hard errors" and burned 15+ min investigating harness noise instead of the seeded guardrail defect.

  • _shared/lowcode_scaffold.py: new content_tokens() / set_message() (rebuild contentTokens to match patched message content), connection_binding() / process_binding() / write_bindings() (emit the packager-shaped bindings_v2 entries), and the scaffold now writes root bindings_v2.json like a real uip agent init project.
  • All 7 inject scripts updated to use the helpers; inject_guardrail_audit_logging.py additionally gets a schema-valid integration tool resource (iconUrl, argumentProperties, properties.method/connection/parameters/bodyStructure).
  • Result: all 8 lowcode review fixtures return Status=Valid straight from injection (uip 1.200.0), with no reliance on the refresh-before-validate workaround.

2. escalation_app_validation — the schema trap is now real and deterministic (f81ce1617, eec9e91cf)

The task grades "fetch the app's action schema → detect the mismatch → reject", but EscalationWorksApp was never seeded in any tenant — the trap never fired: passes rejected for the wrong reason ("not found") and the nightly failure was the model hunting the missing resource for ~18 min.

  • New _fixtures/ValidationSol/: solution shell + EscalationWorksApp as a solution-internal resource (app / appVersion / package / process-webApp JSONs, fixed GUIDs) with a deliberately incompatible actionSchema (generic input/output; Submit/Reject outcomes). No tenant state — fully deterministic.
  • escalation_app_validation.yaml: pre_run copies the fixture; prompt becomes brownfield ("solution exists, do NOT re-create it") and bans uip solution resources refresh (refresh destroys the trap either way — it deletes unregistered local resources after a project registration, or regenerates them and wipes the authored schema when a backing project is registered); the advisory uip solution init criterion becomes a gating command_not_executed (same pattern as local_escalation); run_limits gain headroom (max_turns 40→60, turn_timeout 1200→1800, +task_timeout: 2400).

3. skills/ — two doc gaps that caused thinking rabbit holes (bece3e061, ba3303858, part of eec9e91cf)

  • uipath-agents/.../escalation.md (+4 lines): terminal-stop rule when the named app is not in the resources list / resources get fails (no retries, alternate endpoints, or re-auth; never wire an escalation against an unresolved app), and a note that --kind/--source/--search filters currently drop Source: Local rows — use the unfiltered uip solution resources list and pass the Key (not the name) to resources get.
  • uipath-review/.../coded-guardrails-review.md (+8 lines): in the Actionability check, the catalog verdict IS the evidence — do not verify SDK behavior empirically (importing/executing project dependencies, reading SDK sources, fetching SDK docs); write the finding and the report.

Out of scope: skill-case-artifact-safety-guard (uipath-maestro-case) also failed that night but is a different feature that coincidentally carries the guardrail tag — intentionally untouched.

CLI issues surfaced (not fixable in this repo)

  1. uip solution resources list with any filter (--kind, --source local, --search <name>) drops Source: Local rows; resources get <name> fails for local resources (Key-only). Worked around in escalation.md; worth a CLI fix.
  2. uip solution resources refresh deletes local resources with no registered backing project, and regenerates (wiping authored actionSchema) when one is registered. Mitigated via the task prompt; worth a CLI look.

How has this been tested?

  • All 8 lowcode review fixtures scaffolded from this branch validate Status=Valid on uip 1.200.0 (verified via CLI, no LLM involved).
  • Escalation fixture verified via CLI: app appears in the unfiltered resources list as Source=Local; resources get <key> returns the incompatible schema; uip agent init ValidationSol/ReviewAgent registers cleanly alongside it.
  • Final escalation_app_validation.yaml verified on both harnesses (Coder Eval v0.9.1, tempdir driver, isolated worktrees): Claude Sonnet 5 SUCCESS 1.0 (243s) and Codex gpt-5.6-terra SUCCESS 1.0 (107s) — both rejecting for the right reason, e.g. Terra: "schema only exposes input, output, Submit/Reject; guardrails require the named review inputs/outputs and Approve/Reject outcomes."
  • uipath-review guardrail tasks (action-ineffective, audit-logging, content-safety, misapplied): SUCCESS 1.0 on Claude Sonnet 5 across two independent replicates each, and on Codex gpt-5.6-terra.
  • git diff --check, python3 -m py_compile on all edited injects/scaffold, scripts/check-skill-status.py clean; check-skill-verbs.py findings on escalation.md are pre-existing (verified via stash).

Are there any breaking changes?

  • None
  • Under Feature Flag
  • DB migrations
  • API removals

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Claude finished @apetraru-uipath's task in 58s —— View job


Summary

Bumps run_limits for two guardrail test tasks that timed out in the 2026-07-28 nightly coder_eval run. Changes are limited to numeric timeout/turn-cap values — no prompt, criteria, or structural changes.

Change-by-Change Review

1. tests/tasks/uipath-agents/lowcode/guardrails/escalation_app_validation/escalation_app_validation.yaml

Severity: OK

max_turns 40→60, turn_timeout 1200→1800, new task_timeout: 2400. Precautionary headroom bump — PR author reports the original failure was tail-latency variance, not a systematic gap, and local repro passed cleanly at original limits. The added task_timeout (2400s) exceeds turn_timeout (1800s), which is correct (overall wall-clock cap vs. per-turn cap). expected_turns (20) unchanged, keeping the baseline realistic.

2. tests/tasks/uipath-maestro-case/guardrails/artifact_safety_guard.yaml

Severity: OK

task_timeout/turn_timeout 900→1500, max_turns 120→160. Well-justified — original run died at 904.5s against a 900s cap with 113/120 turns used while still making forward progress. The ~67% timeout increase and ~33% turn increase give adequate headroom without being excessive. task_timeout and turn_timeout remain equal (matching the file's original pattern).

What's Missing

Nothing identified. This is a clean, scoped timeout bump with thorough local repro evidence in the PR description.

Area Ratings

Area Status Notes
Frontmatter N/A No skill frontmatter changed
E2E Tests OK Task structure, tags, and criteria untouched — only run_limits bumped
Skill Body N/A No skill docs changed
References & Assets N/A No references or assets changed
Repo Hygiene OK Changes scoped to the two affected task files; no secrets or path leaks

Issues for Manual Review

None found.

Conclusion

Clean, well-scoped PR. Both limit bumps are justified by nightly failure evidence and validated by local repro on two models. No issues found — approve.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Claude finished @apetraru-uipath's task in 1m 51s —— View job


Coder-eval task lint (advisory)

2 task YAMLs changed; verdict counts: 0 Critical, 0 High, 0 Medium, 0 Low, 2 OK.

Rubric: .claude/commands/lint-task.md. This check is advisory and never blocks merge.

Evidence of passing run

✅ Author confirms passing run: "Reproduced locally against skills main (9711c2c9f) / Coder Eval v0.9.1escalation_app_validation: Claude Sonnet 5 → SUCCESS, score 1.0, 266s. Codex Terra → SUCCESS, score 1.0, 123s. artifact_safety_guard: Claude Sonnet 5 → SUCCESS, score 1.0, 553s"

Per-task lint

tests/tasks/uipath-agents/lowcode/guardrails/escalation_app_validation/escalation_app_validation.yaml — verdict: OK

Changes are limited to run_limits (lines 63–67): max_turns 40→60, turn_timeout 1200→1800, added task_timeout: 2400. No prompt, criteria, or structural changes. The task has strong criteria: command_executed checks for key CLI verbs (solution init, agent init, solution resources list, solution resources get) plus a run_command gating on a Python validation script (check_escalation_app_validation.py, weight 5.0). Not a near-duplicate of sibling escalation_app.yaml — that tests the happy-path (compatible app accepted), this tests the negative case (incompatible app rejected).

tests/tasks/uipath-maestro-case/guardrails/artifact_safety_guard.yaml — verdict: OK

Changes are limited to run_limits (lines 207–210): task_timeout 900→1500, max_turns 120→160, turn_timeout 900→1500. No prompt, criteria, or structural changes. Criteria mix is solid: file_exists + json_check with real assertions (action + process task types) + run_command via uip maestro case validate (weight 3.0) + two command_not_executed Rule 13 guardrails (weights 2.0 each). Not a near-duplicate — only task in guardrails/ and exercises a materially distinct concern (artifact assembly method guard) vs. other maestro-case siblings.

Within-PR duplicates

No duplicate clusters detected.

Conclusion

✅ All changed tasks pass the rubric. Evidence of passing run confirmed. Both changes are run-limit-only bumps with clear nightly-failure evidence in the PR body.


@apetraru-uipath apetraru-uipath changed the title fix(tests): raise run_limits for two guardrail integration tasks fix(tests,skills): de-flake nightly guardrail failures — valid fixtures, doc gaps, run_limits Aug 1, 2026
@apetraru-uipath
apetraru-uipath force-pushed the andrei/guardrail-nightly-timeout-fixes branch from 1c41712 to ba33038 Compare August 1, 2026 20:08
apetraru-uipath and others added 5 commits August 3, 2026 15:00
Nightly run 2026-07-28_04-16-10 failed this task with final_status
ERROR: "Agent turn timed out after 1200s (iteration 1)" — the single-shot
turn ran ~20m03s (41 tool calls, 16.2m of thinking) and was killed by the
task's own explicit turn_timeout: 1200, not by max_turns (only 1 orchestrator
iteration ran; the 41 "turns" are tool calls within that one iteration).
task_timeout was unset, inheriting the experiment default of 1200s, which
would have fired at the same time as turn_timeout even if turn_timeout alone
were raised.

Bump turn_timeout 1200->1800 and add an explicit task_timeout: 2400 (both
~1.5x, matching the precedent fix for the sibling
skill-review-agents-coded-guardrail-action-ineffective task in #(local
investigation)). Also raise max_turns 40->60 for headroom given the extra
wall-clock budget. No criteria/prompt changes.
… validate

The nightly 2026-07-28_04-16-10 guardrail failures were not plain slowness:
transcripts show reviewers hitting fixture schema errors from
'uip agent validate' (contentTokens drift vs patched message content, a
schema-invalid SendCustomerEmail tool resource, missing bindings_v2.json
entries) and burning 15+ minutes investigating harness noise instead of the
intended guardrail defect — review says Grade A while validate throws hard
errors.

- lowcode_scaffold: content_tokens()/set_message() build contentTokens
  matching patched content; connection_binding()/process_binding()/
  write_bindings() emit the packager-shaped bindings_v2 entries; scaffold
  writes root bindings_v2.json like a real 'uip agent init' project
- all five guardrail injects patch messages via set_message()
- audit_logging: schema-valid integration tool wiring (iconUrl,
  argumentProperties, properties.method/connection/parameters/bodyStructure)
- action_ineffective / audit_logging / tool_overlap / vague_tool_description
  write the derived bindings entries their tools require

All 8 lowcode review fixtures now return Status=Valid straight from
injection (verified against uip 1.200.0), so the only review signal left in
each fixture is the intended one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…he catalog

In nightly 2026-07-28_04-16-10, skill-agent-guardrail-escalation-app-validation
died at turn_timeout after ~18 minutes of hunting for the missing
'EscalationWorksApp' (alternate search terms, GUID lookups, resource
remove/re-add, sourcing ~/.uipath/.auth for a raw token) before starting to
wire the guardrail anyway. guardrails.md already declares a failed verifier
call terminal (line ~347), but escalation.md — the doc the model actually
reads for escalation wiring — had no not-found branch at Steps 2-3. Add it:
report and stop, no retries/alternate endpoints/re-auth, never wire an
escalation against an unresolved app.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s in Actionability

In nightly 2026-07-28_04-16-10, the coded-guardrail-action-ineffective
reviewer had CLI+catalog evidence at t+60s, then spent 19 minutes on SDK
forensics (inspecting uipath_langchain sources, WebFetching SDK docs,
executing agent factory code with a fake API key) and never wrote the
report, dying at turn_timeout. State it in Audit Mode's Actionability check:
source read + catalog comparison fully decides the finding — no empirical
SDK verification; the report file is the deliverable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… the schema trap actually fires

skill-agent-guardrail-escalation-app-validation is designed around an
Action Center app with an action schema incompatible with the guardrail
escalation contract — but the app was never seeded in any tenant, so the
designed signal (fetch schema -> spot the mismatch -> reject) was never
exercisable: passes rejected for the wrong reason (app not found) and the
2026-07-28 nightly failure was the model hunting the missing resource for
~18 minutes.

Ship the app as a solution-internal fixture instead (same mechanism as
lowcode/local_escalation): a ValidationSol solution whose
resources/solution_folder tree carries EscalationWorksApp with a
deliberately incompatible actionSchema (generic input/output,
Submit/Reject outcomes). Deterministic — no tenant state involved.
Verified via CLI with no LLM: the app appears in the unfiltered
'uip solution resources list' as Source=Local, 'resources get <key>'
returns the incompatible schema, and 'uip agent init' registers cleanly
alongside it.

Task updates: pre_run copies the fixture; brownfield prompt (solution
exists, do not re-create; do not run 'uip solution resources refresh' —
after a project registration, refresh deletes unregistered local
resources, and with a registered backing project it regenerates them and
wipes the authored actionSchema, either way destroying the trap); the
advisory 'uip solution init' criterion becomes a gating
command_not_executed, matching local_escalation.

escalation.md: document that --kind/--source/--search filters currently
drop Source=Local rows (only the unfiltered list shows solution-internal
apps) and that 'resources get' needs the Key, not the name.

Verified on both harnesses against this exact YAML: Claude Sonnet 5
SUCCESS 1.0 (243s) and Codex gpt-5.6-terra SUCCESS 1.0 (107s), both
rejecting FOR THE RIGHT REASON — e.g. Terra: 'schema only exposes input,
output, Submit/Reject; guardrails require the named review inputs/outputs
and Approve/Reject outcomes.'

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@apetraru-uipath
apetraru-uipath force-pushed the andrei/guardrail-nightly-timeout-fixes branch from eec9e91 to 571b772 Compare August 3, 2026 12:01
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