Skip to content

Fix orchestrated action charts that were drawn but never shown - #1703

Merged
Paul Lizer (paullizer) merged 5 commits into
paullizer-react-v2-uifrom
paullizer-orchestrate-gather-only-response-fix
Oct 7, 2026
Merged

Paul Lizer (paullizer) merged 5 commits into
paullizer-react-v2-uifrom
paullizer-orchestrate-gather-only-response-fix

Conversation

@paullizer

Copy link
Copy Markdown
Contributor

Summary

With Orchestrate on, "Plot BatteryVoltage1 over the last 15 minutes, provide high granularity" was planned as a single Gather step (the Simulation action) with no Reason step. App Insights shows the action's ChartPlugin.create_chart call succeeded, but only a compose step places a chart in the answer, so the chart was dropped. The reply said only "The requested content is prepared. No downloadable files were created.", the plan panel listed the chart as delivered, and Retry wasn't offered because the run was saved as completed. The planner had been told "action_invoke can deliver a chart of the rows it retrieves" (0.261.135), and since 0.261.139 no Answer step always runs to catch a plan that gathers without answering.

  • Gather is always read by Reason. While planning, every enabled Gather step except workflow_run must feed the final_response answer, a file or a generated image, and every planned chart or diagram must reach the answer or a file (rules gather_not_used and visual_not_published, code deliverables_invalid, so the planner gets its existing single correction round). The prompt and chart recipe now say the compose step that reads the action's output places the chart. Saved plans are revalidated without these rules, so they still load and run.
  • A chart drawn during Gather is always shown. Finalization adds any chart an action or agent step drew that the answer didn't place, once, after the answer, the same way generated images are appended. The answer step now receives an upstream chart as its [[chart:<id>]] token instead of a second copy of the chart's data.
  • Honest delivery status. A planned chart or diagram that still isn't shown gets a delivery note, the run is partial with the new visual_not_delivered failure, and Retry from failed step reruns the step that draws it, after confirmation because it repeats the action's calls. The V2 plan panel uses the server's deliverable_states instead of step status after a run. A saved plan that gathered without answering now says so instead of "The requested content is prepared."
  • Faster saving. Structured results were saved as one record per JSON encoder token, so the reported 202 KB result took 258 storage pages and about 200 of the step's 231 seconds. They're now saved in 16,384-character records, a few pages for the same result. Results saved before this version still read.

Notes for reviewers:

  • Retrieved rows sent to the answer step are not trimmed. Only the chart's data is replaced by its token, which keeps the existing "no input is truncated" guarantee (result_input_too_large). A much longer time window can still exceed the model's input budget and fail with the existing message.
  • The workflow_run exception is stated in WORKFLOW_RUN_INSTRUCTIONS, not the base prompt, so a request that can't start workflows is still never told about runs.
  • The four functional_tests/test_support/orchestration_workflow_*_off_golden.json fixtures were regenerated with --write-golden. Their diffs contain only the planner prompt and chart recipe text.
  • In test_orchestration_workflow_results_capability.py, the degraded-plan test's answer step now reads the kept workflow result, as the workflow_results instructions already require, so its expected step order changes.
  • The version is 0.261.293 because V2: Fix left sidebar links opening the classic UI instead of V2 #1700, Fix V2 Orchestrate Ask an agent steps refused before the agent runs #1701 and Fix V2 Control Center Dashboard, Users and Groups 500s; remove Data health #1702 took 0.261.290 to 0.261.292. All three are merged into this branch.

Linked issue

N/A, no issue was filed for this fix.

Release Notes & Latest Features

  • New Feature
  • Bug Fix
  • UI Enhancement
  • Breaking Change
  • Internal only

Is this visible to end users?

  • Yes
  • No

Is this admin-facing (Admin Settings, governance, deployment, config)?

  • Yes
  • No

Should this become a Latest Feature card?

  • Yes
  • No
  • Already added

Screenshot needed for the card?

  • Yes
  • No
  • Attached

Version bump

  • application/single_app/config.py VERSION third segment bumped, or not needed because this is docs-only (0.261.293)
  • deployers/version.txt bumped, or not needed because deployers/ was not changed

Testing / validation

All results are on the final commit, 53c3b52. Each Python test file runs in its own process with PYTHONPATH=application/single_app;functional_tests, because collecting the whole folder in one process fails on cross-module imports.

  • python -m pytest functional_tests/test_orchestration_action_chart_delivery.py -q: 15 passed. All 15 fail on the code before this fix.
  • python -m pytest functional_tests/test_orchestration_harness_execution.py -q: 649 passed, 2 xfailed
  • python -m pytest functional_tests/test_orchestration_deliverables.py -q: 53 passed
  • python -m pytest functional_tests/test_orchestration_dependency_runtime.py -q: 95 passed
  • python -m pytest functional_tests/test_orchestration_visual_outputs.py -q: 24 passed
  • python -m pytest functional_tests/test_orchestration_recovery_safety.py -q: 39 passed
  • python -m pytest on test_orchestration_results.py, test_orchestration_result_contracts.py, test_orchestration_result_recovery.py, test_orchestration_result_claim_fencing.py and test_orchestration_result_imports.py: 57, 47, 33, 8 and 11 passed
  • python -m pytest on test_orchestration_workflow_handoff_capability.py, test_orchestration_workflow_propose_capability.py, test_orchestration_workflow_results_capability.py and test_orchestration_workflow_run_capability.py: 90, 89, 70 and 79 passed
  • python -m pytest on the handoff, results, runs and setting test_orchestration_workflow_*_off_golden.py files and test_workflow_chat_delivery_off_golden.py: 10, 5, 5, 9 and 6 passed
  • python -m pytest functional_tests/test_orchestration_agent_document_type_fix.py -q: 31 passed
  • python -m pytest on test_docs_app_surface_coverage.py and test_docs_site_quality.py: 7 and 6 passed
  • node --test functional_tests/test_v2_orchestration_deliverables.mjs: 10 passed
  • npm --prefix .\application\v2_ui run build -- --outDir ..\..\ui_tests\artifacts\orchestration-plan-editor, then python -m pytest .\ui_tests\test_v2_orchestration_dependency_plans.py -q: 34 passed, local Playwright
  • npm run typecheck in application/v2_ui: passed
  • python scripts/check_xss_sinks.py --base-sha origin/paullizer-react-v2-ui --head-sha HEAD <changed files>: passed for 16 files
  • python scripts/check_broken_access_control.py --base-sha origin/paullizer-react-v2-ui --head-sha HEAD <changed .py files>: passed for 11 files
  • Before the base merges, 181 orchestration, chart and workflow functional test files were run per file on this branch and on the pre-change base. That run found two new failures, both fixed here (the workflow_run prompt placement and the results-capability test fixture). Every other failure in it also fails on the base.
  • These fail identically on the base branch in this environment and are unrelated to this change: test_docs_link_integrity.py (3), test_docs_release_notes_integrity.py (1, the generated release-notes pages are stale), test_docs_json_gem_security_fix.py (1), test_workflow_cancellation.py (3), test_v2_control_center_groups.py and test_v2_control_center_public_workspaces.py (setup errors from the local werkzeug version), test_chart_action_inline_rendering.py, test_chat_backend_inline_chart_handoff.py, test_tabular_inline_chart_handoff.py, test_conversation_chart_and_tabular_reuse.py, test_conversation_export_inline_chart_images.py, test_orchestration_document_merge_capability.py, test_orchestration_plan_revision_references.py, test_orchestration_plan_revision_routes.py and test_orchestration_services.py.
  • Not run: the fix has not been deployed or tried against a live app yet.

Documentation

  • Release notes updated, or not needed (v0.261.293 in docs/explanation/release_notes.md)
  • Feature documentation updated, or not needed (ORCHESTRATION_DELIVERABLES.md, CHAT_ORCHESTRATION.md, CHAT_ORCHESTRATION_ACTIONS.md, and the charts section and troubleshooting rows in docs/admin/orchestration.md)
  • Fix documentation updated, or not needed (docs/explanation/fixes/ORCHESTRATION_ACTION_CHART_NOT_DELIVERED_FIX.md)

Security checklist

  • New Flask routes include @swagger_route(security=get_auth_security()) (no new or changed routes)
  • Settings sent to non-admin frontends use sanitize_settings_for_user() (no settings are sent; the new public deliverable_states field carries only well-formed deliverable ids, states and server-written messages)
  • Browser JavaScript is served from local SimpleChat static assets only; no CDN-hosted JS
  • No secrets, keys, connection strings, or local-only artifacts are included

Paul Lizer (paullizer) and others added 5 commits October 7, 2026 15:56
A chart request could be planned as a single Gather step with no Reason
step. The action drew the chart, but only a compose step places charts,
so the chart was dropped, the reply said "The requested content is
prepared.", and the run was saved as completed.

- Planning: every gather step except workflow_run must feed the answer,
  a file or a generated image, and every planned chart or diagram must
  reach the answer or a file. A plan that breaks either rule gets the
  planner's one correction round. The prompt no longer says an action
  delivers a chart on its own.
- Execution: a chart an action or agent drew is always shown, the way
  generated images are. The answer step receives the chart's placement
  token instead of a second copy of its data.
- Delivery: a chart or diagram that isn't shown is reported as not
  delivered, the run is partial (visual_not_delivered), Retry redraws it
  after confirmation, and the V2 plan panel uses the server's check.
- Saving: structured results are written in 16 KB records instead of one
  record per JSON token, so a 202 KB result takes a few pages, not 258.
- Version 0.261.291, regression tests, regenerated goldens and docs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
PR #1701 merged into paullizer-react-v2-ui with 0.261.291, so this fix
takes the next free patch number.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Brings in #1700 (V2 sidebar links, 0.261.290) and #1701 (Ask an agent
steps, 0.261.291). VERSION keeps 0.261.292, the next free patch number.
The admin troubleshooting table keeps the base's 0.261.289 and 0.261.291
rows, followed by this fix's chart rows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
#1702 merged into paullizer-react-v2-ui with 0.261.292, so this fix
takes 0.261.293. Adds the v0.261.293 release notes. The admin
troubleshooting row now links to the page's charts section, because the
site never publishes fix pages and the old link did not resolve.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Brings in #1702 (V2 Control Center fixes, 0.261.292). VERSION keeps
0.261.293, and this fix's release notes stay above v0.261.292.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit 49a52bb into paullizer-react-v2-ui Oct 7, 2026
11 checks passed
Paul Lizer (paullizer) added a commit to paullizer/simplechat that referenced this pull request Oct 7, 2026
Brings in V2 at 49a52bb (microsoft#1703, VERSION 0.261.293).

Conflicts:
- docs/explanation/release_notes.md: V2's file byte-for-byte, with this
  branch's own (v0.261.293) section inserted at the very top, above V2's
  first section, microsoft#1703's (v0.261.293). Every V2 section is unchanged.

application/single_app/config.py merged cleanly: both sides set VERSION
to 0.261.293.

OrchestrationRunView.tsx, orchestrationPlan.ts and
docs/admin/orchestration.md merged cleanly. microsoft#1703's changes there pass
the server's after-run chart and diagram checks to the deliverables
list and add its own notes. This branch's changes there are the
hand-off approval floor, the hand-off step's argument text and its
capability label, and its own settings and pause rows. They are
separate hunks and don't interact.

The next commit renumbers this branch's section and VERSION to
0.261.294, above V2's 0.261.293.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer) added a commit to paullizer/simplechat that referenced this pull request Oct 7, 2026
V2 now uses 0.261.293 (microsoft#1703), with its own release notes section, so
this branch's version moves above it. Renumbers the same 20 lines in 15
files as the previous bump: config.py, this branch's release-notes
section, the documentation version notes and the new tests' headers.
V2's own (v0.261.293) release-notes section and microsoft#1703's 0.261.293 notes
are untouched. The tests' version floor stays 0.261.253.

Refs microsoft#1549

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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