feat: pre-edit verification gate for dependencies and activity tags#634
feat: pre-edit verification gate for dependencies and activity tags#634gabrielavaduva merged 8 commits intomainfrom
Conversation
Codify two failure modes surfaced in a recent CertificateHandling session post-mortem: 1. Removing UiPath.DocumentUnderstanding.Activities (preview-only) broke MergePDFs in another workflow — no usage search before removal, and `-preview` was treated as a stability defect when it is the package family's only ship vehicle. 2. Writing `<ui:DeleteFile>` from the Studio display name — the actual activity is `<ui:Delete>`, and the bad tag passed `get-errors` only to fail at `build`. Changes: - uipath-rpa/SKILL.md — new Critical Rule 6a "Pre-edit verification gate" covering both dependency removal and new activity tags. Adds Task Navigation row for the new PowerShell interop guide. - references/project-structure.md — "Removing a Dependency" section with the inspect-package + grep procedure, and a `-preview` verification step using `get-versions --include-prerelease`. - references/xaml/common-pitfalls.md — "Common Activity Name Confusions" table and a tag verification gate; adds `s:Exception` to the x:/s: namespace table for TryCatch authoring. - references/powershell-interop-guide.md (new) — PS 5.1 vs 7+ feature gap (Invoke-WebRequest -InFile, ConvertFrom-Json -AsHashtable, ternary, etc.), VB and C# patterns for escaping double-quotes when building PSArguments, status-file/exit-code patterns for surfacing script outcomes. - uipath-review/SKILL.md — anti-patterns 9 and 10 mirror the dependency-removal and `-preview` rules so review recommendations are grounded in the same verification.
|
Claude finished @AlvinStanescu's task in 3m 26s —— View job PR Review: Pre-edit verification gate for dependencies and activity tags
SummaryCodifies two post-mortem failure modes (removing a dependency without searching usages, deriving XAML tags from display names) as a pre-edit verification gate in Critical Rule 6a, with supporting reference material. Also adds a new PowerShell interop guide covering PS 5.1 vs 7+ gaps and argument quoting. The review skill gains matching anti-patterns (9, 10) so it won't recommend the same mistakes. Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | No frontmatter changes |
| E2E Tests | OK | No new skill folder; existing behavior unchanged |
| Skill Body | OK | Rule 6a + task navigation row well-placed |
| References & Assets | Issue | Minor: contradictory comment + --output json flag on inspect-package |
| Repo Hygiene | OK | CODEOWNERS covers both paths; no secrets; no cross-skill refs |
Issues for Manual Review
inspect-package --output jsonvalidity: The PR description says all CLI flags were verified against--help, but the canonicalinspect-package-guide.mddoes not show--output jsonas a parameter. Verify whetherinspect-packageactually supports this flag — if it only outputs markdown, the--output jsonflag inproject-structure.md:117will silently be ignored or error.
Conclusion
Strong post-mortem codification — the two failure modes are real, the procedures are correct and prescriptive, and the cross-links are clean. One medium issue: the inspect-package command in project-structure.md has a contradictory bash comment and potentially incorrect --output json flag that should be verified and cleaned up. Everything else looks good.
- powershell-interop-guide.md: lead with "Default: Use a Coded Workflow Instead." PowerShell interop is the legacy/exception path, not the recommendation. Three narrow cases for PS interop spelled out (existing .ps1, Windows-admin cmdlets, blocked NuGet). - SKILL.md: new row in Authoring Mode Selection — "Tempted to call a PowerShell script → Coded". - All additions from prior commit tersified per docs/prompting.md (Caveman Lite): drop hedging, redundant qualifiers, restated preambles. Technical content, code blocks, and CLI flags unchanged.
…ions' Drop the get-versions verification procedure. The principle is just: prefer stable over preview, except for the two sanctioned exceptions (UIA 26.4.1-preview, Document Understanding family). Applied consistently across uipath-review rule 10, uipath-rpa rule 6a, and project-structure.md.
- DU is not preview-only — verified via uip rpa get-versions (latest stable 2.17.4). Drop DU from the preview exception list; UIA 26.4.1-preview (rule 7a) is the only sanctioned preview. - ForEach row in activity-name table was wrong: `ui:ForEachX` does not exist. UiPath.System.Activities ships ForEach<T>, ForEachRow, ForEachFileX, ForEachFolderX — but no `ForEachX`. Drop the row to avoid steering agents wrong; the verification gate below the table handles discovery. - Drop "Path Exists" row too — keeping the table to two clean, verified examples (Delete, Wait/Delay). - Remove "Removing a Dependency" section + "Preview vs Stable" subsection from project-structure.md — duplicates SKILL.md rule 6a, which now stands as the single source.
Verified UiPath.Core.Activities.InvokePowerShell<T> exists in UiPath.System.Activities (find-activities + DLL strings dump): - CommandText, IsScript, Parameters, Input, Output<T> - PowerShellProcess enum (WindowsPowerShell32 / 64 / PowerShellCore) - ContinueOnError; exceptions propagate as activity faults The typed activity makes most of the previous guide irrelevant: no quote escaping (typed Parameters), no exit-code parsing (Output), no status-file dance (exceptions). PowerShell version selection is a property, not a script-detection branch. Rewrites the guide: - Lead unchanged: prefer coded workflow. - "When PS is needed" now points to InvokePowerShell as the supported path with a property table and minimal pattern. - Invoke Process drops to "Last-Resort" — kept for vendor-CLI cases, with the quote-escape and status-file rules retained as the only mitigations available there. - Down from 143 to 68 lines. SKILL.md table row tightened to match: PS impulse → coded workflow, fallback is InvokePowerShell (never Invoke Process).
|
Claude finished @AlvinStanescu's task in 3m 10s —— View job PR Review: Pre-edit verification gate for dependencies and activity tags
SummaryCodifies two post-mortem failure modes as Critical Rule 6a in the RPA skill: (1) removing a dependency without searching for usages, (2) deriving XAML tags from Studio display names. Adds a new PowerShell interop guide recommending Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | No frontmatter changes |
| E2E Tests | OK | No new skill folder; existing behavior unchanged |
| Skill Body | OK | Rule 6a + task navigation row well-placed |
| References & Assets | OK | New PS guide is clean; common-pitfalls additions are accurate |
| Repo Hygiene | OK | CODEOWNERS covers both paths (/skills/uipath-rpa/, /skills/uipath-review/); no secrets; no cross-skill refs |
Issues for Manual Review
InvokePowerShell<T>property accuracy. The property table (powershell-interop-guide.md:21–29) was verified againstfind-activitiesand DLL strings per the commit message, but theParameterscollection's element type andPowerShellProcessenum values should be confirmed against actual runtime behavior.- "never Invoke Process" vs "Last-Resort" inconsistency (SKILL.md:75 vs powershell-interop-guide.md:53). Low severity but worth a decision: either soften the table or remove the last-resort section.
Conclusion
Clean, well-motivated post-mortem codification. The two core failure modes are correctly captured in Rule 6a with appropriate cross-links. The PowerShell guide is solid after the follow-up rewrites. One low-severity inconsistency between the SKILL.md table ("never Invoke Process") and the guide ("Last-Resort Invoke Process"). The reverted project-structure.md content leaves a gap in detailed dependency-removal procedures — worth considering whether to restore a trimmed version. Otherwise ready to merge.
| 5. **Prefer UiPath built-in activities** for Orchestrator integration, UI automation, and document handling. Prefer plain .NET / third-party packages for pure data transforms, HTTP calls, parsing. | ||
| 6. **ALWAYS ensure required package dependencies are in `project.json`** before using their activities or services. | ||
| 6a. **Pre-edit verification gate.** Two authoring actions are hard to roll back once `build` fails — verify before serialization, not after. | ||
| - **Removing a dependency** — grep the project for usages first. A package may be the sole supplier of an activity used elsewhere (`MergePDFs` lives in the IntelligentOCR.StudioWeb family). Prefer stable over `-preview`; UIA `26.4.1-preview` is the lone exception (rule 7a). |
There was a problem hiding this comment.
removing dependencies should be done by a tool from rpa e.g. remove-unused-dependencies
There was a problem hiding this comment.
true, we should have such a tool instead
There was a problem hiding this comment.
Agreed — reframed the bullet to acknowledge a CLI tool (e.g. remove-unused-dependencies) is the right enforcement point; grep is the fallback until it ships.
- SKILL.md rule 6a / removing-a-dependency: dependency removal should be enforced by a CLI tool (e.g. remove-unused-dependencies) — frame the grep procedure as a fallback until that tool ships. Drop the preview-clause; preview vs stable is orthogonal to removal safety. - SKILL.md rule 6a / writing-a-new-activity-tag: drop the `<ui:DeleteFile>` / `<ui:Delete>` parenthetical. The rule should enforce the find-activities call generically; specifics live in common-pitfalls.md. - uipath-review rule 9: don't recommend removing dependencies at all yet — wait for the CLI tool. Manual recommendations risk silently breaking consumers. - uipath-review rule 10: do not flag `-preview` package versions during the public preview phase. Many packages currently ship preview-by-default and resolution explicitly brings them in with user confirmation. Stability concerns belong with activity owners, not user-facing reports. - common-pitfalls.md: correct the activity-name table — the modern tag for "Delete File" is `ui:DeleteFileX`, not `ui:Delete`. Verified via `uip rpa find-activities --query "delete file"`.
Summary
Codifies two failure modes that surfaced in a recent
CertificateHandling_UploadToSharePointsession post-mortem — bothwere avoidable and not yet covered by the skill docs:
removed
UiPath.DocumentUnderstanding.Activitiesbecause it was a-previewpackage, which silently brokeMergePDFsinMergeAttachments.xaml(the activity ships only in that package'sbundled
UiPath.IntelligentOCR.StudioWeb.Activities— preview isthat family's only ship vehicle, not a stability defect).
<ui:DeleteFile>from the Studio display name. Thecorrect tag is
<ui:Delete>(UiPath.Core.Activities.Delete,already documented under
references/activity-docs/UiPath.System.Activities/26.4/). Bad tagspass
get-errorsand fail only atbuild, after the file isalready serialized.
Plus two smaller post-mortem items:
Invoke Process— PS 5.1 (thedefault
powershell.exe) does not supportInvoke-WebRequest -InFile,ConvertFrom-Json -AsHashtable, ternary, null-conditional,&&/||, etc. Nothing in the skill covered this; the session hitthe
Invoke-WebRequest -InFiletrap and self-corrected afternoticing the runtime error.
PSArgumentsfrom XAML expressions without escapingembedded double-quotes — quote injection from any user-controlled
path silently shifts every subsequent positional arg.
Changes
skills/uipath-rpa/SKILL.mddependency removal and new activity tags, with cross-links to the
detailed procedures.
skills/uipath-rpa/references/project-structure.mdthe
inspect-package+ grep procedure.-previewIs Not Always a Stability Smell" subsection with aget-versions --include-prereleaseverification step and theknown preview-only families.
skills/uipath-rpa/references/xaml/common-pitfalls.mdmismatches and a tag verification gate.
s:Exceptionrow to thex:vss:namespace table for<Catch>andThrowauthoring.skills/uipath-rpa/references/powershell-interop-guide.md(new)PSArguments.with the "always write the file, even on crash" + "delete after
read" correctness rules.
skills/uipath-review/SKILL.md-previewverification rules so the review skill does not generate the same
bad recommendation that an authoring skill would now refuse to
execute.
CLI flags in all new examples were verified against
uip rpa --help/the per-command
--helpoutput (inspect-packageuses--package-name--package-version;get-versionsuses--package-id;find-activitiesuses--query;install-or-update-packagesuses--packages '[{"id":"…"}]').Test plan
bash hooks/validate-skill-descriptions.shexits 0 (descriptions unchanged)uipath-rpaSKILL.md to its ownreferences/)🤖 Generated with Claude Code