Repository navigation
fix(uipath-maestro-bpmn): count a connector response with .Count, and align the live-debug grader hint - #4833
Conversation
… align the live-debug grader hint
Plain `=` expressions have no `.length`: on alpha, `=result.response.length`
read back null while `.Count` and `=js:...length` returned 3.
The live-debug grader's hint told the agent to `return { response: ... }`,
which double-wraps under scriptVersion v3.
Refs MW-279, MW-281
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @rockymadden's task in 42s —— View job SummaryTwo one-line fixes. Change-by-Change Review1.
|
| Area | Status | Notes |
|---|---|---|
| Frontmatter | OK | Unchanged |
| E2E Tests | OK | Hint string fixed; the PR body includes eval runs |
| Skill Body | OK | Unchanged |
| References & Assets | OK | Outside flavor blocks; consistent with bpmn-runtime.md |
| Repo Hygiene | OK | Scoped to one skill; no secrets or paths |
Issues for Manual Review
.Counton a connectorresponsethat is an object rather than an array has not been tested; the probe used a script result. The PR body already lists this under "Not verified".
Conclusion
Approve. The fix is correct, minimal and matches the rest of the skill. The only suggestion is the optional Low item above.
tmatup
left a comment
There was a problem hiding this comment.
Approve. No blocking issues. Both two-line edits are correct.
.length->.Count(connectors.md:72) matches cli#6132's newCOLLECTION_LENGTH_NOT_SUPPORTEDrule, which suggests.Count/.Length(or=js:with.length); its tests accept=result.response.Count > 0. No other plain-=.lengthremains in the skill; the two left (composing-guide.md:176,high-volume-batch-guide.md:56) are inside Jint script bodies, where JS.lengthis right.- Grader hint (
check_live_debug.py:307): the old hint told the agent to writereturn { response: 6 * 7 }, which the same checker fails at line 332 (regexreturn\s*\{\s*response) andlive_debug_e2e.yaml:68forbids. The new hint matches both.py_compilepasses; CI is green, including the maestro-bpmn checker unit tests.
Smaller issues (inline): envelope responses and a backtick nit.
Not reviewed: no live connector run; the cited coder-eval runs were not re-run.
Review run with Claude Code; each finding was reproduced with a probe at the PR head.
| - Outlook `send-email`: `message.toRecipients`, `ccRecipients` and `bccRecipients` are ONE comma-separated string, never an array (`CONNECTOR_INPUT … expected string, got object`). Always set `saveAsDraft`: `false` to send, `true` to draft. The definition's default (`true`) is not compiled into the task, and the response (`status: "success"`) does not say which happened. | ||
| - An `=`-expression is left alone; a plain string is checked against the field's declared type. | ||
| - The response lands in `outputVar` (default `<id>_response`) and the failure in `errorVar` (default `<id>_Error`); `outputs: { poCount: { source: '=response.length', name: 'POCount', type: 'integer' } }` adds a mapped output row per extra variable, each declared by the task like the two standard ones. These are what a decompiled import's `.connector()` calls carry, so an edit keeps the variables the process already reads. | ||
| - The response lands in `outputVar` (default `<id>_response`) and the failure in `errorVar` (default `<id>_Error`); `outputs: { poCount: { source: '=response.Count', name: 'POCount', type: 'integer' } }` adds a mapped output row per extra variable, each declared by the task like the two standard ones. These are what a decompiled import's `.connector()` calls carry, so an edit keeps the variables the process already reads. |
There was a problem hiding this comment.
Non-blocking: .Count counts an array response. For a list operation that returns an envelope ({ items: [...] }), =response.Count won't count the records. Consider adding "for an envelope, count the list field, e.g. =response.items.Count". Not verified on a live connector.
There was a problem hiding this comment.
Fixed in 7cd0a80, but not as =response.items.Count. builder-sdk's typescript/sdk/lib/library-json.samples/list-envelopes.json measures all eight list operations as bare arrays at runtime. { items, Pagination } is only what uip is resources run prints, so =response.items.Count would read nothing at runtime. The line now says .Count counts an array, silently returns the field count on an object, and that the runtime list response is the bare array even when the CLI shows { items, Pagination }.
| f"{path}: script output maps product from source=\"=result\". " | ||
| "Studio Web completes this shape but reads product back empty; " | ||
| "return { response: 6 * 7 } and map source=\"=result.response\"." | ||
| "return 6 * 7; and map source=\"=result.response\"." |
There was a problem hiding this comment.
Nit: return 6 * 7; and map ... reads as one statement. Wrap the code in backticks, as line 337 does: return `return 6 * 7;` and map source="=result.response".
There was a problem hiding this comment.
Fixed in 7cd0a80: the hint now reads \return 6 * 7;` and map source="=result.response"`.
DevMomo
left a comment
There was a problem hiding this comment.
Consolidated from two independent agent reviews (one validating claims against PO.Frontend origin/develop and PO.BpmnEngine origin/main, one on completeness and house rules). Findings were deduplicated and checked against source; items that only restate existing threads are marked as such.
Verified correct:
.Countand.Lengthresolve;.lengthdoes not (ExpressionList.cs:24,60).- The
return 6 * 7;+=result.responsehint matches v2+ wrapping (ScriptTaskService.cs:262-266) and the checker at :332.
Medium
connectors.md:72:.Counton an envelope response silently returns the number of keys. It does not fail, does not return null, andvalidatepasses (ExpressionDictionary.cs:25). tmatup's open thread understates this.- Fix: add "
.Countcounts an array response; when the response is an object, count its list field (=response.items.Count) —.Counton an object returns its number of fields, with no error."
- Fix: add "
Low / Nit
bpmn-runtime.md:51-57(js-for-methods) still implies a property read like.lengthworks. Add "a JS property such as.lengthreads backnullwithout faulting; use.Countor=js:."check_live_debug.py:307: tmatup's backtick nit is open.- Optional: the version wording differs (the body and
bpmn-runtime.md:112say "v3", the checker at :335 says "v2+").
`.Count` on an object returns its field count with no error. A list
operation's runtime response is the bare array (builder-sdk
list-envelopes.json: all eight measured operations), even where
`uip is resources run` prints `{ items, Pagination }`.
Backtick the grader hint's code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…js-for-methods rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@DevMomo thanks. Each item checked against source:
|
Picks up #4858, which fixes main's package build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…omputed result reads - bpmn-runtime.md: js-everywhere keeps #4833's warning for plain = expressions an agent keeps or edits (.length reads null; use .Count; .length only inside =js:). - Contract test: FORM_VALUE also exempts the start-event row source: '=vars.<inputId>', var: (#4892 writes these). - Grader: RESULT_READ exempts only a bare result/response/Error/iterator path, so a computed plain expression fails --check js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/cherrypick release/v1.207 |
|
A cherry pick from this PR targeting |
|
✅ Cherry-pick to |
… align the live-debug grader hint (#4833) (#4952) * fix(uipath-maestro-bpmn): count a connector response with .Count, and align the live-debug grader hint Plain `=` expressions have no `.length`: on alpha, `=result.response.length` read back null while `.Count` and `=js:...length` returned 3. The live-debug grader's hint told the agent to `return { response: ... }`, which double-wraps under scriptVersion v3. Refs MW-279, MW-281 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(uipath-maestro-bpmn): say what .Count counts on a connector response `.Count` on an object returns its field count with no error. A list operation's runtime response is the bare array (builder-sdk list-envelopes.json: all eight measured operations), even where `uip is resources run` prints `{ items, Pagination }`. Backtick the grader hint's code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(uipath-maestro-bpmn): a plain-grammar .length reads null, in the js-for-methods rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
references/connectors.md: the connectoroutputsexample counts a response with=response.Count, not=response.length. A plain=expression has no.length: it reads backnulland the run still completes.references/connectors.md:.Countcounts an array and silently returns the field count on an object. A list operation's runtime response is the bare array (builder-sdklist-envelopes.json: all eight measured operations), even whereuip is resources runprints{ items, Pagination }.references/bpmn-runtime.md(js-for-methods): a JS property such as.lengthreads backnullwith no incident; use.Count.live_debug_e2e/check_live_debug.py: thesource="=result"failure hint now saysreturn 6 * 7;. The old hint (return { response: 6 * 7 }) double-wraps underscriptVersionv2 and later and contradictedlive_debug_e2e.yaml.Refs MW-279. Companion: UiPath/cli#6132 now fails
validateon a plain.lengthon any root.Evidence
Alpha debug run (instance
bc0388cd-48dc-408a-a457-64e9da5c9f1f, solution deleted): a script returning[1, 2, 3], mapped three ways.=result.response.lengthnull(run Completed)=result.response.Count3=js:result.response.length3validatepassed all three on uip 1.207.0-dev.Coder evals
paginated_reference_lookup: every required criterion passed.live_debug_e2e: passed on rerun (1.000). The first run failed the debug-evidence check because the agent hand-wrotedebug-evidence/debug.jsonwithoutFinalStatus; the hint this PR edits was not reached. Theorigin/mainbaseline passed (1.000).Not verified
responsegoes through the same plain evaluator, but no connector run was made.🤖 Generated with Claude Code