Repository navigation
Fix orchestration runs failing on settings saves and unexplained file failures - #1721
Merged
Paul Lizer (paullizer) merged 3 commits intoOct 8, 2026
Conversation
…in failed files Waiting runs failed with "Saved step inputs changed" while their work was still running: the checkpoint binding hashed the whole settings document, so any save, including the Cosmos DB throughput autoscaler recording a scale action, changed it. The fingerprint now leaves out storage metadata and the runtime state that background tasks write (functions_settings_runtime_state.py); configuration changes still fail closed. A run that ended while a step waited stayed "Waiting for results" and could never be retried. Ended attempts now offer Retry from failed step, which runs the waiting step again without restoring the old attempt's wait, and the V2 plan panel shows those steps as Not finished and their deliverables as Not delivered. Files built from web, deep research, agent or action results failed at publication because the check used a fresh service without the user's sign-in. Publication now uses the rendering service that ran the attempt. A file that still needs a sign-in fails as output_sign_in_required with a reason, and the chat offers Retry from failed step for a file that can't be retried alone. Version 0.261.302. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…failure-status The base already released 0.261.302, so these orchestration fixes move to 0.261.303. Release notes keep the base's 0.261.302 section and add a 0.261.303 section. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer)
merged commit Oct 8, 2026
5891659
into
paullizer-react-v2-ui
10 checks passed
Paul Lizer (paullizer)
added a commit
to paullizer/simplechat
that referenced
this pull request
Oct 8, 2026
…file sign-in fixes Brings in microsoft#1721 (0.261.303): waiting orchestration runs survive settings saves, failed files explain why, and a plan retry is offered for a file that failed for good. Conflict resolutions: - config.py: keep 0.261.304, the next version after the base's 0.261.303. - functions_orchestration_recovery.py: docstring only; Version 0.261.304 and both history notes, in version order. The code merged cleanly: the waiting step eligibility change and the Microsoft 365 confirmation exemption touch different lines. - release_notes.md: v0.261.304 above the base's v0.261.303 and v0.261.302. - chat-controls.md: the base's new Retry from failed step condition, this branch's Confirm retry wording, and its two new rows. Semantic resolution: microsoft#1721 gates the plan retry on planRetryOffered instead of "no file outputs". The inline Microsoft 365 approval card continues the plan, so it now uses the same gate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two V2 orchestration bugs reported from a production deployment and traced through its App Service console logs and Application Insights. A plan waiting on a long tabular analysis replied "The request could not be completed. Saved step inputs changed." while the analysis was still running, and the plan panel kept spinning on Waiting for results with no retry. Separately, a Word file built from action results failed with only "This file could not be created." and offered no retry.
_etag,_ts,_settings_revision) and runtime state that background tasks write. In the failing run, the Cosmos throughput autoscaler saved settings under 4 seconds before the scheduler continued the waiting run, so the continuation raisedrecovery_changed; the analysis itself finished about 2 seconds later. All threerecovery_changedfailures in the previous 14 days came within 30 minutes of a settings save, two of them within 6 seconds. The fingerprint now covers configuration only (newfunctions_settings_runtime_state.pyregistry). An admin configuration change still invalidates saved work.execution_steps, so the panel spun forever and recovery refused retry withresult_not_ready. Recovery now ignores waiting steps of a terminal run, and the V2 run view shows them as Not finished with their deliverables Not delivered. A retry also no longer restores the previous attempt's pending wait from a reused checkpoint snapshot, which made retries fail withrecovery_changedtoo.external_identity_session_unavailable) and surfaced as a genericoutput_access_denied. Publication now reuses the rendering service running the attempt through aContextVarscope (render_attempt_scope). A file that still can't be checked without a session fails withoutput_sign_in_requiredand says so, and other failed files now carry a specific reason instead of the generic message.Worth a careful look
ContextVar, so it never crosses threads, and_bound_serviceonly uses it when the user and conversation match the binding's producer.Linked issue
N/A. No issue was filed; both bugs were reported from production and investigated from telemetry.
Release Notes & Latest Features
Is this visible to end users?
Is this admin-facing (Admin Settings, governance, deployment, config)?
Should this become a Latest Feature card?
Screenshot needed for the card?
Version bump
application/single_app/config.pyVERSIONthird segment bumped, or not needed because this is docs-only (0.261.301 -> 0.261.303; the base released 0.261.302 while this PR was open)deployers/version.txtbumped, or not needed becausedeployers/was not changedTesting / validation
Run from the repo root with
PYTHONPATH=application/single_app;functional_testsandPYTHONIOENCODING=utf-8, in a venv with pyOpenSSL 26.4.0 (this machine's global Python pairs cryptography 50 with pyOpenSSL 25.3.0, which breaksimport OpenSSLthrough semantic_kernel/aiortc). Unless noted, results are on this branch's HEAD after merging the latestpaullizer-react-v2-ui(merge commit 53c6f65).python -m pytest -q functional_tests/test_orchestration_settings_runtime_state_binding.py functional_tests/test_orchestration_terminal_wait_retry.py functional_tests/test_orchestration_file_sign_in_publication.py functional_tests/test_orchestration_settings_upgrade.py functional_tests/test_orchestration_output_lifecycle.py functional_tests/test_docs_app_surface_coverage.py functional_tests/test_session_store_merge.py functional_tests/test_m365_connections.py functional_tests/test_m365_routes.py: 367 passed, 1 failed, pre-existing. The new regression tests fail with the fixes stashed. The failure,test_m365_routes.py::test_real_notification_helper_only_targets_subject_and_deduplicates, also fails on a clean checkout of the base branch.python functional_tests/test_docs_site_quality.py: passed (6/6 checks).npm --prefix application/v2_ui run typecheck: passed.npm --prefix application/v2_ui run build -- --outDir ../../ui_tests/artifacts/orchestration-plan-editor: passed.python -m pytest -q ui_tests/test_v2_orchestration_recovery.py ui_tests/test_v2_drawer_generated_files.py -m ui: passed (43 passed in Chromium, including 3 new tests).python -m pytest -q functional_tests/test_xss_guardrails_checker.py functional_tests/test_broken_access_control_guardrails_checker.py: 15 passed, 1 failed, pre-existing.test_checker_assets_and_version_are_wired_into_repoexpectsactions/upload-artifact@v4in.github/workflows/broken-access-control-full-scan.yml, which the base branch now pins to a SHA ofactions/upload-artifactv7.0.1. This PR doesn't touch.github/.functional_tests/test_orchestration*.pyfiles with--continue-on-collection-errors): 6932 passed, 76 failed, none caused by this change. 61 failures are in four files that fail identically on the base branch:test_orchestration_document_merge_capability.py(4),test_orchestration_plan_revision_references.py(24),test_orchestration_plan_revision_routes.py(29) andtest_orchestration_services.py(4). The other 15 are intest_orchestration_failure_telemetry.pyandtest_orchestration_workflow_propose_capability.py, which pass when run on their own. Not re-run after the merge; the merged base changes don't touch orchestration code.Documentation
ORCHESTRATION_CHECKPOINT_RECOVERY.md,ORCHESTRATION_DELIVERABLES.md, plusdocs/reference/chat-controls.md, two orchestration guides and troubleshooting rows indocs/admin/orchestration.md)ORCHESTRATION_SETTINGS_WRITE_RECOVERY_FIX.md,ORCHESTRATION_FILE_SIGN_IN_PUBLICATION_FIX.md)Security checklist
@swagger_route(security=get_auth_security())(no new routes)sanitize_settings_for_user()(nothing new is sent to the browser)