fix(tabular): union passthrough CSV schema and keep assistant text visible - #1302
Merged
Paul Lizer (paullizer) merged 1 commit intoAug 19, 2026
Conversation
…sible Passthrough CSV exports staged already-final rows, but _build_passthrough_batch_results derived the output schema from row 1 only and required every later row to match it exactly. Rows merged from multiple action results (or records with optional fields) failed with "Generated output schema mismatch at row N", were classified as model_validation retries even though no model runs on this path, and the run failed after exhausting its retries. queue_tabular_generated_output_run now unions column names across every staged passthrough batch and pins output_schema, public_output_schema, and internal_checkpoint_schema up front. _build_passthrough_batch_results pads sparse rows to that schema, falling back to a per-batch union for runs queued before this change. Model-generated runs still defer to batch-1 schema discovery. Also stop hiding the assistant response when a CSV artifact card renders. suppress_assistant_text exists for JSON/XML, whose payload is withheld from the streamed text and replaced with a placeholder. CSV narratives stream intact, so the card must append below them instead of replacing them. Added ASSISTANT_TEXT_SUPPRESSING_FORMATS and reused it for background structured exports; Markdown analysis artifacts keep suppression as a real handoff. Version: 0.260.005
Paul Lizer (paullizer)
merged commit Aug 19, 2026
e1164b6
into
microsoft:Development
11 of 12 checks passed
This was referenced Aug 19, 2026
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
Two customer-reported failures in chat CSV/tabular artifact creation.
1. Passthrough CSV exports failed with a schema mismatch
Chat and workflow CSV artifacts stage already-final rows with
passthrough_input_rows=True._build_passthrough_batch_resultsfed those rows to_normalize_generated_batch_entriesas both source and "generated" entries, so the output schema was derived from row 1 only and every later row had to match it exactly.extract_authorized_function_result_rowsmerges rows from multiple action results into a single set, so field sets legitimately differ. Real failure:It was then classified
model_validationretryable and burned all three automatic retries in ~20 ms each -- no model runs on the passthrough path at all -- before failing the run permanently.Fix:
queue_tabular_generated_output_rununions column names across every staged passthrough batch and pinsoutput_schema/public_output_schema/internal_checkpoint_schemaup front._build_passthrough_batch_resultspads sparse rows to that schema, with a per-batch union fallback for runs queued before this change. Model-generated runs still defer to batch-1 schema discovery.This matches
build_assistant_table_csvand_build_generated_output_csv, which already unioned columns on the synchronous path.2. The CSV artifact card hid the assistant response
hideCompletedGeneratedArtifactHandoff()addsd-noneto.message-textand.message-footerwhen an artifact setssuppress_assistant_text. That flag exists for JSON/XML, whose payload is deliberately withheld from the streamed text (suppress_streamed_file_payload = requested_streamed_file_format in {'json', 'xml'}) and replaced with a "Generating the X file..." placeholder.CSV was wrongly in the same set, so a full CSV narrative -- including inline charts -- was hidden the moment the card hydrated.
Fix: added
ASSISTANT_TEXT_SUPPRESSING_FORMATS = {'json', 'xml'}and reused it for background structured exports. Markdown analysis artifacts keepsuppress_assistant_text=True; that one is a genuine handoff.Changes
application/single_app/functions_tabular_generated_exports.py-- union passthrough schema at queue time,_extend_passthrough_output_field_names,_align_passthrough_rows_to_output_fields, format-aware suppressionapplication/single_app/functions_generated_file_exports.py--ASSISTANT_TEXT_SUPPRESSING_FORMATSapplication/single_app/config.py-- version0.260.005functional_tests/test_tabular_passthrough_heterogeneous_rows.py-- newfunctional_tests/test_assistant_table_csv_artifact.py-- assistant-text preservation coverageValidation
New
test_tabular_passthrough_heterogeneous_rows.py(4/4) exercises the realqueue_tabular_generated_output_runand_build_passthrough_batch_resultsvia the AST harness, with only Cosmos/blob/telemetry stubbed.test_tabular_passthrough_heterogeneous_rows.pytest_assistant_table_csv_artifact.pytest_generated_json_xml_exports.pytest_tabular_background_generated_exports.pytest_tabular_queue_run_output_schema_end_to_end.pytest_tabular_row_orchestration_scale.pytest_tabular_phase5_artifact_set_lifecycle.pytest_tabular_combined_artifact_set_download_visibility.pytest_tabular_durable_artifact_lifecycle_recovery.pytest_tabular_search_analyze_artifact_matrix.pytest_tabular_shared_request_planner.pyui_tests/test_chat_background_generated_export_status.pySIMPLECHAT_UI_BASE_URL)py_compileclean, editor diagnostics clean, Windows-safegit diff --checkclean.Notes