Skip to content

fix(maestro-flow): teach one-solution-one-folder; repin and regrade slack_weather_pipeline - #2554

Draft
jiyangzh wants to merge 3 commits into
mainfrom
fix/slack-weather-folder-pin
Draft

fix(maestro-flow): teach one-solution-one-folder; repin and regrade slack_weather_pipeline#2554
jiyangzh wants to merge 3 commits into
mainfrom
fix/slack-weather-folder-pin

Conversation

@jiyangzh

Copy link
Copy Markdown
Contributor

Summary

slack_weather_pipeline has failed deterministically since #1030 deleted its folder hint: the tenant holds duplicate is-sandboxes Slack connections in two folders, agents bind the wrong-folder one, and the solution's single <bindings.FolderKey> resolves to the weather connection's folder — Slack lookup 404s with [102001] after a clean validate. Two runs fail identically on otherwise-correct agent work (2026-08-10: <bindings.FolderKey> unresolved on connection e03f734e, folder 5da18ec0; 2026-08-06: [102001] on readOfficeBellevueDescription1), both weighted 0.375.

Two commits:

  1. docs — the platform constraint, taught where selection is taught: a solution binds exactly ONE Orchestrator folder, so every connection in a flow must come from the same folder. Canonical rule + [102001] troubleshooting row in connector/impl.md; one-sentence cross-linked qualifiers at the four other --all-folders teaching sites + SKILL.md. --all-folders stays a discovery aid; selection now has a rule.
  2. test — restore the pin, grade the named contract: prompt = one environment fact ("connections live in Shared/uipath-maestro-flow") + a named output contract (weatherVerdict, two exact values) + the debug success bar the 5.0-weight criterion always graded but the prompt never demanded. Checker: the all-globals substring sweep → assert_output_nonempty("weatherVerdict") + exactly-one-of-two-verdicts (tolerant of wrapping/punctuation, fails both-or-neither), diagnostics via the module's own _fail_with_capture.

Deliberately NOT changed: slack_channel_description stays unpinned (dormant in the nightly set; serves as the canary proving the skill rule alone steers agents), channel name→ID resolution stays the agent's work.

Testing

  • 1165 task YAMLs parse; checker py_compile + assert-semantics smoke (4 directions); _shared pytest 68 green; skill-description hook green; all new relative links resolve
  • Live verification run is queued: the alpha tenant's create-debug-instance endpoint is currently returning 500s (4 distinct traceIds over several hours) — will run when the backend recovers and the result posted here

`--all-folders` is mandated for connection discovery across the connector,
connector-trigger and HTTP plugins, but nothing told the agent how to
CHOOSE among the folders it widens into. A deployed solution carries one
folder binding, and `<bindings.FolderKey>` matches by name only, so a flow
that binds connections from two folders resolves one folder key and every
connection outside it 404s.

The failure is silent until runtime: mixed-folder bindings pass
`flow validate` and fault at `flow debug` with
`[102001] Integration Services resource not found` plus
`Unresolved context binding placeholder "<bindings.FolderKey>"`.

State the constraint once at the selection step in the connector plugin
impl, add a Common Errors row for the signature, and qualify the
`--all-folders` mandate at each site with a one-line pointer.

Found while auditing skill-flow-slack-weather-pipeline, which has failed
deterministically since #1030 (ac39db7) for exactly this reason: the
tenant holds two `is-sandboxes` Slack connections in different folders.
PR #1030 (ac39db7) deleted the `Shared/uipath-maestro-flow` folder hint
from this prompt, assuming `uip is connections list --all-folders` made it
redundant. It does not. The tenant holds two `is-sandboxes` Slack
connections in different folders; `--all-folders` surfaces the
maestro-case one; the solution's single `<bindings.FolderKey>` then
resolves to the weather connection's folder and the Slack lookup 404s.

Two archived runs, same failure, otherwise correct agent work:

- skill-flow-slack-weather-pipeline/00, 2026-08-10 — FAILURE, weighted
  0.375, `<bindings.FolderKey>` unresolved on connection e03f734e,
  folder 5da18ec0, element readOfficeBellevueChannel1.
- eval/skill-flow-slack-weather-pipeline/00, 2026-08-06 — FAILURE,
  weighted 0.375, [102001] on element readOfficeBellevueDescription1.

The prompt states the folder as a bare environment fact. The general
lesson — one solution binds one folder — belongs to the skill, not to
every task prompt, and lands in the preceding commit.

The same audit found three grading flaws, fixed here:

- The prompt demanded only `validate` while the 5.0-weight criterion
  graded a live `flow debug`. The completion bar now names debug.
- The checker swept every runtime global and element output through
  assert_outputs_contain, so verdict text echoed anywhere in the debug
  payload scored a pass. It now scopes to the named `weatherVerdict`
  output and requires exactly one of the two verdicts to appear —
  both-or-neither fails.
- No output name was pinned, so no named assertion was possible. The
  prompt now declares the `weatherVerdict` out variable contract, and
  the criterion description matches the checker.
…nism

The previous wording claimed "a solution binds exactly ONE Orchestrator
folder" as platform law. Source verification disproved it. Multi-folder
binding state is valid and expressible; what actually breaks is a CLI
upsert bug, now filed as MST-13421.

The real mechanism, verified at source:

- Every connector manifest names its folder binding with the bare literal
  `FolderKey`, while `ConnectionId` is namespaced per connector
  (flow-workbench flow-core/src/manifest/mappers/connector.ts:186-195).
- The resolver is strictly per-connection — exact `(name, resourceKey)`
  match, no fallback; on a miss the placeholder ships literal and warns
  (flow-schema/src/packaging/resolve-context.ts:83-90).
- `node configure`'s fallback matches `(name, resource, propertyAttribute)`
  and ignores `resourceKey`, so it OVERWRITES the single `FolderKey` row —
  the second connection claims the first's row
  (cli flow-tool/src/services/connector-service.ts:360-399).

So the same-folder advice survives as the simple path, not as law, and
cross-folder gets the real remedy: `binding add` dedupes on the full
`(name, resource, resourceKey, propertyAttribute)` quadruple and can hold
the row `node configure` cannot.

Also reconcile the § Top-level bindings shape and § Multi-connector
sections, which asserted `node configure` emits two rows per connection.
It does not; two rows is the healthy target state that `binding add`
repairs toward.
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