Repository navigation
[Generated exports] Support universal CSV, JSON, and XML file generation #1071
Description
Summary
Provide one universal CSV-generation capability that works across Chat Search, ordinary Chat, streaming responses, selected agents, Analyze, Compare, workflows, and source-free prompts. CSV generation must not depend on whether the input is a PDF, Office document, text, image/media-derived evidence, CSV/XLSX, mixed selected files, a single file, many files within configured limits, or no workspace files.
User Value
Users need a reliable downloadable CSV whenever they ask for structured CSV output. The current behavior varies by route and source type, so equivalent requests can return inline text, a partial relevance-bounded result, or no artifact at all.
Current Failure
- Select multiple workspace documents, for example 16 PDFs.
- Leave the chat document action set to Search.
- Ask:
turn these into a single csv. - The response can say it contains one row per retrieved document and render inline CSV, but it does not reliably cover every selected file or attach a downloadable CSV artifact.
The shared CSV-intent predicate currently accepts turn these into a csv but rejects turn these into a single csv, so the exact request above does not invoke the artifact publisher.
Proposed Behavior
- Treat CSV as an output capability shared by all response producers, not as a tabular-file-only or Analyze-only feature.
- Recognize natural CSV requests including
single CSV,combined CSV,one CSV, download/export/save CSV, and equivalent phrasing. - For explicit selected sources, preserve the path's evidence semantics while making the requested CSV coverage explicit. When the request requires all selected sources, do not silently export only relevance hits.
- When a requested row shape or schema is ambiguous, ask one durable clarification rather than guessing whether rows represent files, documents, or extracted records.
- For larger requests, use a durable background job and publish the authorized completed artifact to the originating chat. Small results may publish immediately.
- For source-free requests, convert validated model-produced structured rows into the same downloadable CSV artifact contract.
- Produce a valid downloadable CSV or an explicit failure/partial-coverage result; never fabricate unprocessed rows.
Acceptance Criteria
- A request such as
turn these into a single csvcreates a downloadable CSV when the response contains valid structured rows. - CSV intent works for Chat Search, ordinary and streaming Chat, selected agents, Analyze, Compare, workflows, and source-free prompts.
- The capability works with every supported queryable input format through its native evidence adapter, including PDF, Office/text, image/media-derived evidence, CSV/XLSX, and mixed selections.
- Explicit selected-source requests disclose and enforce the requested coverage instead of silently reducing to relevance hits.
- Ambiguous row granularity/schema produces one resumable clarification; explicit row/schema instructions bypass it.
- Large work is durable, cancellable, reauthorizes source access and revision before publication, and exposes the completed download without duplicating artifacts.
- CSV output preserves current formula-injection protection, safe headers, quoted/multiline values, and authorized download controls.
- Partial, failed, unsupported, unresolved, canceled, and source-version-changed inputs are surfaced with per-source coverage and do not produce misleading complete results.
- Functional coverage validates no-source, one source, multi-source, mixed formats, all response paths, exact
single CSVphrasing, clarification, background completion, cancellation, authorization loss, and downloads.
Notes
- This is a distinct output-capability issue, not a subtask of mixed-source orchestration issue [Mixed-source orchestration] Phase 6: Harden and roll out native mixed-source processing #1061.
- Existing artifacts and downloads are already generic enough to reuse; the main remediation is shared intent/finalization and source-coverage coordination.
- Focused existing CSV serializer tests passed 23/23. The current lossless-analysis artifact test needs harness maintenance because its AST loader does not inject the new cancellation helper and it has an outdated version pin.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn progress
Activity
paullizer commentedon Jul 23, 2026
Follow-up Architecture Decision
The durable execution and artifact-publication portion of this issue is intended to establish reusable, format-neutral primitives for generated deliverables:
CSV remains the first format-specific capability on this issue. The implementation should not turn the existing tabular CSV/JSON executor into a generic Office renderer. Instead, it should extract or define the neutral job/artifact contract so format adapters can own their own planning and rendering.
Follow-on consumers of this foundation:
Template population and editing remain separate concerns under #1045, #968, #969, and #999.
paullizer commentedon Jul 23, 2026
Performance And Operability Requirements
Observed failure mode
A background CSV export can remain visibly
Runningat the same percentage/batch for a long period with no reliable indication whether it is actively making progress, waiting for capacity, retrying, stalled, or permanently hung. A progress card that continues to show an old ETA is not sufficient evidence of healthy execution.Treat this as a first-class product requirement for universal generated artifacts, not only a CSV concern. The same job contract should serve the long-form DOCX and PPTX work tracked by #1072 and #1073.
Required performance model
Forward-progress and recovery requirements
last_heartbeat_ator aRunningstatus.last_heartbeat_atandlast_forward_progress_at, plus the last completed unit and phase. Do not advance the displayed percentage until the corresponding checkpoint is durable.stalledor an equivalent actionable state, retain the completed checkpoint, and record the diagnostic reason.Running.User-visible progress requirements
Runningbadge without an explanation.Validation and release gates
Architecture boundary
Extract these metrics, lifecycle, checkpoint, recovery, and publication contracts into the format-neutral generated-artifact job foundation described in #1071. CSV, DOCX (#1072), and PowerPoint (#1073) should report comparable performance metrics while retaining format-specific planning and rendering adapters.
paullizer commentedon Jul 23, 2026
Implementation Update: Background CSV Export Throughput and Timeout Hardening
Implemented in application version 0.250.070.
What changed
Expected impact
A six-batch export now completes its post-schema model work in two three-batch windows instead of up to three two-batch windows. A batch that hangs no longer occupies the background worker indefinitely; it is retried from its last durable checkpoint.
Validation
functional_tests/test_tabular_background_generated_exports.py: 7/7 passed.py_compilepassed forfunctions_tabular_generated_exports.py.Remaining issue scope
This is a focused throughput and bounded-wait improvement. The broader work already defined in this issue remains: durable forward-progress detection distinct from heartbeat, workload performance budgets, benchmark/soak gates, ETA confidence, queue-pressure telemetry, and extraction of a format-neutral generated-artifact job foundation for CSV, DOCX, and PPTX.
Release notes and fix documentation were updated in the same version.
paullizer commentedon Jul 23, 2026
Related background-export resilience work is included in PR #1074: #1074
The PR increases safe post-schema batch concurrency from two to three and adds bounded model-call timeout recovery using the existing durable checkpoint path. It preserves serial schema discovery, authorization, ordered output, and idempotent artifact publication.
This is a related export reliability increment only; it does not claim to complete the broader universal CSV-generation scope in this issue.
paullizer commentedon Jul 23, 2026
Implementation Update: Universal CSV Generation
Implemented in application version 0.250.071.
PR: #1075
What changed
turn these into a single CSV,one CSV, andcombined CSV.Validation
functional_tests/test_assistant_table_csv_artifact.py: 27/27 passedfunctional_tests/test_mixed_source_analyze_workflow.py: passedfunctional_tests/test_document_action_token_usage_aggregation.py: 5/5 passedfunctional_tests/test_document_action_conversation_scope_metadata.py: 4/4 passedfunctional_tests/test_mixed_source_conversation_continuity.py: 3/3 passedfunctional_tests/test_tabular_row_orchestration_scale.py: passedfunctional_tests/test_tabular_background_generated_exports.py: 7/7 passedRemaining Scope
This completes the shared CSV intent/finalization and current durable-export integration increment. The broader format-neutral generated-artifact job foundation, forward-progress stall detection, workload performance budgets, and benchmark/soak gates described in this issue remain follow-up work, so the issue remains open.
Add universal CSV generation and mixed-source Analyze
Add generic generated file export framework
paullizer commentedon Jul 23, 2026
Follow-up Implementation Update: Generated File Export Framework
Implemented in application version 0.250.073.
PR: #1076
What changed
Validation
functional_tests/test_assistant_table_csv_artifact.py: 31/31 passed, including CSV/DOCX/PDF rendering from structured function results and workflow DOCX publication.functional_tests/test_mixed_source_manifest_contracts.py: 13/13 passed.functional_tests/test_document_action_token_usage_aggregation.py: 5/5 passed.Scope Boundary
This establishes the shared source/planning/publication contract requested for generated artifacts. Durable long-form DOCX and PPTX planning, checkpoints, retries, and performance budgets remain separately tracked by #1072 and #1073.
[-][CSV exports] Support universal CSV generation across all paths and file types[/-][+][Generated exports] Support universal CSV, JSON, and XML file generation[/+]paullizer commentedon Aug 4, 2026
Expanding this issue to cover the JSON/XML export failures observed in chat and Analyze flows.
Additional scope:
.xmlfile, not an MD analysis artifact or a partial explanatory response.Additional acceptance criteria:
convert this entire XML into JSONcreates a downloadable.jsonartifact and avoids dumping the full JSON into the assistant bubble.extract content from this PDF and populate this XML templatecreates a downloadable.xmlartifact or clearly reports why generation could not complete.paullizer commentedon Aug 4, 2026
Implementation update from
paullizer-export-file-framework-json-xml:0.250.110and added fix documentation.Validation:
python -m py_compile application\single_app\functions_generated_file_exports.py application\single_app\functions_tabular_generated_exports.py application\single_app\functions_workflow_runner.py application\single_app\functions_document_analysis.py application\single_app\functions_documents.py application\single_app\route_backend_chats.py functional_tests\test_generated_json_xml_exports.pypython functional_tests\test_generated_json_xml_exports.pypython functional_tests\test_tabular_background_generated_exports.pygit --no-pager diff --checkUpdate release notes for JSON XML exports
Harden generated XML export parsing
Harden mixed-source orchestration and CSV exports
Support generated JSON and XML exports
Add consolidated release note for generated file output work (Refs mi…
paullizer commentedon Aug 19, 2026
Status update: v0.260.004 through v0.260.011
Recent work delivered a meaningful part of this capability for the selected agents path in ordinary and streaming Chat, where the artifact is built from authorized action results. Posting a map of what is now covered and what this issue still needs, so the remaining scope stays clear.
Delivered
The artifact no longer fails or silently degrades
Generated output schema mismatch at row 2. The export now pins a union of every column before the run starts and pads the missing cells.list_instances,list_parameters) were blended into the dataset. Rows are grouped by originating action, and the action holding the substantive dataset wins.Ambiguous row shape produces one resumable clarification (acceptance criterion 5)
Follow-up turns reuse evidence already gathered
Partial coverage is disclosed (partial credit toward acceptance criterion 8)
Partialbadge and a note stating it covers only the rows the action returned.The model no longer denies the capability
Format parity
Verified against the original repro
The shared intent predicate now accepts the phrasing called out in the description:
That closes the intent half of acceptance criterion 1. The end-to-end multi-document coverage half of that criterion is not verified here, because the work above exercised action-result sources rather than a 16-PDF selection.
Still open on this issue
Related PRs
Fix documentation:
docs/explanation/fixes/GENERATED_ARTIFACT_PAGING_AND_GUIDANCE_FIX.mdRelease notes: consolidated entry under
v0.260.011.