Repository navigation
Limit content screening to uploads and stop re-checking generated results #1621
Description
Summary
Content screening was meant to check documents when they enter a workspace. Its source-access checks now also run on everything generated from those documents. Workflow, orchestration and Analyze results are re-checked against every source document when they're saved and every time they're read. If any check fails, the result is blocked. This happens even with screening turned off and no screened documents. Symptoms:
Run history is unavailable because source access could not be confirmed.The whole list returns 403 if any one of the last 50 runs fails the check (Workflow run history returns 403 after an attached document is deleted or re-uploaded #1613).- Workflow tasks fail with
Saved task output was withheld because its source access could not be confirmed.because the runner re-checks a task's output right after saving it. - Saved Analyze results and orchestration files are withheld with similar messages.
- The Approvals page shows a content screening banner to everyone, even when screening is off.
This issue limits screening to uploads and removes the re-checks on generated results.
Agreed rules
- Screening checks only documents that enter a workspace through a user upload (personal, group, public) or File Sync.
- Generated content is never checked, neither when it's created nor when it's read. That covers model replies; workflow, orchestration and Analyze results; generated or merged files; files that agents or workflows save or publish into a workspace; and model-generated metadata. User edits to metadata don't trigger a rescan either.
- Saved results get their access from their container (the workflow or run, the conversation, or the orchestration run), not from their source documents.
- One input check stays: reading an uploaded document (search, document selection, file bytes, opening a citation, workflow document inputs) still requires that the reader has access and that the document isn't held.
- Nothing is withdrawn after the fact. Results generated from a document that's later deleted or rejected stay.
- Chat input/output checks are unchanged and stay off by default.
- Microsoft 365 Run as asks for a new approval only when someone other than the Run as user edits the workflow, or when that user's M365 connection changes (a new connection ID or generation).
Scope
- Quick relief: remove the run-history re-check (personal and group run routes in
route_backend_workflows.py) and the re-check right after a task saves its output (functions_workflow_runner.py, the "Saved task output was withheld" path). This resolves Workflow run history returns 403 after an attached document is deleted or re-uploaded #1613. - Intake: mark generated documents with an origin marker and exempt them in
document_requires_screening/prepare_document_upload. This covers the agent actions infunctions_simplechat_operations.py(_upload_generated_document_for_current_user,queue_generated_document_processing), artifact publication, and the group/public generated-document routes. Remove the publication screening reservation (_consume_publication_reservation,consume_artifact_publication_screening_scan). Publication readiness should treat a destination with no screening marker as ready. - Metadata: stop calling
queue_metadata_rescanon metadata edits (functions_documents.py), drop themetadata_fingerprintcomparison from_require_release_proof, and stop holding model-generated metadata. - Workflows: remove the source re-checks from
authorize_workflow_task_result_read/authorize_workflow_run_read,WorkflowLineageAuthorization,AuthorizedWorkflowRecordInput(source_snapshot_changed), execution/repeat/loop history, the flow runner, reporting, artifacts, generated artifact sources, the result reader, runtime, andsanitize_workflow_analysis_history. Keep the identity and integrity checks, and keep the checks on uploaded-document inputs (loop inputs, readiness, File Sync). - Chat, Analyze, orchestration: remove
authorize_analysis_sourcesfrom the save, read and retry paths for generated results (functions_saved_analysis.py, the saved-analysis routes inroute_backend_chats.py,route_backend_analysis_results.py). Also removeauthorize_orchestration_sources,OrchestrationResultAccess.authorize_sources, the output store's withholding, and thescreening_sourceschecks on generated exports. AI replies and their saved citations stay visible in history. Keep the input checks on search, document selection, citations and file bytes. Narrow the model fence (the guard that blocks later model calls after a check fails) so that only input reads can trigger it. - Run as: in
ensure_workflow_binding/prepare_m365_workflow_binding, approve the new revision automatically whenmodified_byis the Run as user and the connection ID and generation haven't changed. Otherwise, request approval as today. - UI: show the screening banner on the Approvals page only when
enable_content_screeningis on. Remove "source access could not be confirmed" messages that no longer apply, and thesource_snapshot_changedhandling inworkflowExecutionHistory.ts. - Tests: rewrite or retire the tests that assert re-checks (list below), and add coverage for the new behavior.
- Docs, version, release notes.
Acceptance Criteria
- Deleting, re-uploading or holding a source document doesn't hide saved workflow, orchestration or Analyze results, and run history always loads for anyone who can read the workflow.
- Workflow tasks no longer fail after saving output because of a source re-check.
- A held uploaded document still can't be used as an input (search, document selection, workflow input, file bytes, opening a citation).
- Generated or published documents never get a screening marker; user uploads and File Sync still do when screening is on.
- Editing metadata doesn't hold a cleared document.
- Container access is unchanged: group run results stay limited to group members, and someone else's run looks the same as a missing one.
- Run as: editing your own workflow doesn't ask for approval again; an edit by someone else or a change to the M365 connection does.
- The Approvals page shows the screening banner only when screening is on.
- Functional and UI tests are updated and pass; docs and release notes are updated;
VERSIONis bumped.
Notes
Related: this supersedes #1613 (run history 403), which can be closed when this lands. It narrows the scope of #1476 (content screening framework) and touches #1493 (M365 Run as) and #1509 (retained-result source checks in orchestration). The #1613 symptom was seen on a POC deployment running 0.261.221.
Assumptions to confirm
- A user's chat attachment saved into a workspace counts as an upload, so it is checked.
- The first run of a workflow you wrote yourself, running as you, doesn't ask for approval.
- Adding people to the conversation a workflow came from no longer asks for Run as approval again, because the separate M365 source-sharing approval covers publishing to them. This needs verifying.
- Group workflows can read only documents the whole group can see. If they can read the author's personal documents today, block that when the input is read.
Risks: the change touches a lot of code (about 18 workflow modules plus orchestration, Analyze and chat), and many tests are written around the old behavior. Held documents must still be blocked as inputs once the model fence is narrowed. Expect merge churn on paullizer-react-v2-ui.
Tests and docs to update
Tests that assert the re-checks: functional_tests/test_analysis_saved_source_access.py, test_analysis_workflow_source_inheritance.py, test_analyze_live_write_fences.py, test_analyze_backend_saved_integration.py, test_analyze_workflow_publication_integration.py, test_analysis_artifact_publication.py, test_orchestration_source_access.py, test_workflow_result_masking.py, test_workflow_result_review_paths.py, route_tests/test_workflow_flow_inspection_policy.py, route_tests/test_workflow_result_context_policy.py (keep the container checks), ui_tests/test_v2_orchestration_outputs.py, ui_tests/test_v2_workflow_repeat_until.py.
Docs: CONTENT_SCREENING_FRAMEWORK.md (update the scope and remove "Retained-result authority failures"), guides/review-screened-documents.md, admin/workflow.md, ANALYZE_RESULTS.md, ORCHESTRATION_OUTPUT_LIFECYCLE.md, CHAT_WORKFLOW_RESULTS_FOLLOW_UP.md, ORCHESTRATION_CHECKPOINT_RECOVERY.md, guides/analyze-results.md, the M365 Run as docs, and a new UPLOAD_ONLY_CONTENT_SCREENING.md.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReleased
Activity
Renumber the run history re-check fix to 0.261.229
Remove the queued metadata receipt from the V2 explorer and UI fixtures
Invert the Analyze publication source revocation test
paullizer commentedon Oct 3, 2026
Status update: the implementation PRs are open.
paullizer-react-v2-uipaullizer-react-v2-uiMerge order
paullizer-react-v2-ui.VERSIONand release-notes conflict.review-screened-documents.mdand thetest_content_screening_history.pyheader.Why these are separate PRs on #1628's branch rather than a stack
Write access to microsoft/simplechat lapsed partway through, so #1629, #1630, #1631 and #1632 were opened from the
paullizer/simplechatfork.Validation
Each PR lists its own commands and results. All five branches were also merged into a local, unpushed integration tree and compared with #1628 alone and with the base branch (
fd842e199):test_native_source_revocation_blocks_saved_report_and_publication, which still expected a revoked source to block a saved Analyze report.fb651cd41). Its rewritten data-flow test passes once the missing helper is supplied.Follow-ups
authorize_analysis_sourcesand any other source re-check helpers left without callers. This was deferred because each of the two PRs still contains code the other one removes.generated_file_publication_allowed,session,read_user_settings_snapshotorfunctions_workflow_context.resolve_model_token_limits. Until they're fixed, those tests stop before reaching what they assert. CI doesn't run them, so nothing flags it.Limit content screening intake to uploads and apply metadata edits di…
Update screening history and fixture parity tests for direct metadata…
Ask for M365 Run as approval only when someone else authored the revi…
Keep a Run as revocation in force when it overlaps a run
Let revocations from before 0.261.229 keep other approvals working
Stop re-checking saved workflow results against their source documents
Saved chat, Analyze and orchestration results take their container's …
paullizer commentedon Oct 3, 2026
Delivered. All five PRs are merged into
paullizer-react-v2-ui.#1629 and #1631 merged into #1628's branch, so they landed with #1628 (
c53ef2d9b). #1632 landed ase1e6949f2.After deploying
Follow-ups
A separate PR, which will reference this issue, is underway for:
Closing, because the work is merged. It reaches
mainalong withpaullizer-react-v2-ui.Stop re-checking workflow run sources in run history and after a task…
Align the roadmap with container-only result access and self-authored…
Clearer saved-result error messages and repaired workflow test harnesses