Skip to content

Stop re-checking saved workflow results against their source documents (screening layer 3a) - #1631

Merged
Paul Lizer (paullizer) merged 3 commits into
microsoft:paullizer-workspace-knowledge-holdsfrom
paullizer:paullizer-screening-layer-3a-workflows
Oct 3, 2026
Merged

Paul Lizer (paullizer) merged 3 commits into
microsoft:paullizer-workspace-knowledge-holdsfrom
paullizer:paullizer-screening-layer-3a-workflows

Conversation

@paullizer

@paullizer Paul Lizer (paullizer) commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Saved and generated workflow results no longer re-check the documents they came from. Task results, node results, structured execution history, For each and Repeat history, run history previews, chat Follow up on a workflow result and the document provenance run link now take their access from the workflow, run and group they belong to. Deleting, re-uploading or holding a source document no longer hides or fails them, and a later task can still read an earlier task's output after its source changed.
  • The checks that stay are unchanged: identity, lineage and hash integrity (forged producers, hash mismatches and broken receipt chains are still refused); container checks (workflow scope, run belongs to the workflow, group membership, someone else's run answers like a missing one); and input-time checks when a workflow reads an uploaded document (For each document items and selections, reference inputs, File Sync and other configured sources, file bytes). Each task attempt now gets its own model fence, so a held input still blocks its own model call but can no longer block a later task.
  • Flow inspection of a saved or frozen definition no longer returns 403 because one referenced document is missing, held or inaccessible: that selection row gets "available": false and V2 shows "Not available to you right now..." on it. Messages that said "or its contributing sources" were reworded.
  • Breaking API changes: lineage failures answer 409 instead of 403 on task result pages and execution history; activity streams end with activity_unavailable instead of source_access_denied; chat Follow up reports a lineage failure as workflow_result_invalid; source_snapshot_changed is always false (kept for older clients). No data migration; nothing is withdrawn.

Linked issue

Refs #1621

Layer 3a of the content-screening stack. It targets layer 1 (#1628) and merges after it, beside layer 3b. Layer 2 (#1629) has since merged into the layer 1 branch, and this branch merges that in: VERSION stays 0.261.231, with the 0.261.231 release notes above 0.261.230.

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
  • deployers/version.txt bumped, or not needed because deployers/ was not changed

Testing / validation

Python 3.12 venv with Flask 3.1.3, Werkzeug 3.1.6, Flask-Session 0.8.0 and cryptography 46.0.7. Each test file runs in its own process (python -m pytest <file> -q -rfE) on layer 1 (66a29bd60, baseline) and on this branch. FAILED/ERROR test ids were compared. The host is shared and heavily loaded.

  • After merging the updated base (4b5346c85, layer 1 plus layer 2 Limit content screening intake to uploads and apply metadata edits directly (layer 2 of 4) #1629) into this branch (137366ba4), I ran 38 related files on both the merged tree and the new base:
    • Files covered: this PR's workflow, publication, provenance and result tests; layer 2's screening and group/public document tests; the three route policy tests; and the docs tests.
    • No new failures. The only failures are 6 in test_content_screening_pipeline.py, with the same ids on the new base.
    • npm run typecheck and npm run build: passed.
    • UI: test_v2_workflow_flow_inspection.py 54 passed; test_v2_workflow_repeat_until.py 91 passed.
    • UI: test_v2_group_document_management.py 58 passed with ui_tests/fixtures on PYTHONPATH. Launched alone it fails collection with ModuleNotFoundError: playwright_connection, the same on the new base.
    • Guardrails against 4b5346c85: XSS 50 files, access control 46, swagger and git diff --check passed.
  • python -m pytest functional_tests/test_workflow_saved_results_container_access.py (new): passed, 34 passed. With the fix stashed (git stash push -- application functional_tests/test_support, run, git stash pop): 29 failed, 5 passed. The 5 are the checks that stay.
  • Full functional before/after, 241 files: functional_tests/test_workflow_*.py, test_group_workflow_*.py, Analyze, saved-analysis and provenance tests, route_tests/test_workflow_*_policy.py, the three route policy tests, plus the new file. No new failures. Baseline: 4,449 passed, 1,589 failed/errors. After: 4,479 passed, 1,580 failed/errors. Every remaining failure also fails on the base branch (stale harnesses, Azure configuration).
    • Two rewritten tests were renamed, and both their files already fail on base: test_workflow_data_flow_execution.py fails 8/8 and test_analyze_workflow_publication_integration.py errors 8/8 at setup, with the same errors after. Shim results for both are below.
    • test_orchestration_workflow_results_imports.py stalls inside the batch runner under load. Run directly: passed, 26 passed.
  • Stale harnesses, not repaired here (pre-existing and out of scope; CI doesn't run these files):
    • test_analyze_workflow_publication_integration.py: the sequence fixture patches functions_workflow_context.resolve_model_token_limits, which no longer exists, and its completion fake expects all 150 rows in one prompt while saved reports now page.
    • test_workflow_data_flow_execution.py: the inventory harness lacks generated_file_publication_allowed.
  • PYTHONPATH=<shim folder> python -m pytest -p budget_patch_plugin functional_tests/test_analyze_workflow_publication_integration.py (throwaway shim that only defines the missing helper): 6 failed, 2 passed on both base and this branch.
    • The renamed test_native_source_revocation_does_not_block_the_saved_report revokes the source after the Analyze result is saved.
    • On this branch it reaches the model call and stops at the same stale paging assertion in completion as the happy-path test.
    • On base, Explain is refused before the model with "A required source is no longer available for this workflow run."
  • PYTHONPATH=<shim folder> python -m pytest -p harness_patch_plugin "functional_tests/test_workflow_data_flow_execution.py::test_shared_reference_lineage_survives_reload_and_saved_outputs_stay_reusable": passed on this branch.
    • The same test fails on base, because reusing the saved output re-checks the revoked reference.
    • The old revocation version passes on base.
  • python -m pytest functional_tests/route_tests/test_route_blueprint_policy_inventory.py: passed, 11 passed.
  • python -m pytest functional_tests/route_tests/test_route_unauthenticated_policy_contract.py: passed, 6 passed.
  • python -m pytest functional_tests/route_tests/test_route_policy_test_coverage.py: passed, 2 passed.
  • python -m pytest functional_tests/route_tests/test_workflow_*_policy.py (7 files): passed, 150 passed.
  • python -m pytest functional_tests/test_analysis_workflow_source_inheritance.py: passed, 10 passed.
  • python -m pytest functional_tests/test_document_provenance_origin.py: passed, 84 passed.
  • python -m pytest functional_tests/test_group_workflow_*.py (8 files): unchanged from base. The same failures and errors occur on the base branch.
  • Six more files that import changed modules (test_group_document_publication.py, test_public_document_publication.py, test_mixed_source_hardening.py, test_orchestration_internal_analysis.py, test_orchestration_results.py, test_xsd_ingestion_generation_integration.py): unchanged from base, 288 passed, 7 failed, 1 error on both.
  • PLAYWRIGHT_SERVICE_URL= python -m pytest ui_tests/<file> (local Playwright) for 11 files: test_v2_workflow_repeat_until.py, test_v2_workflow_flow_authoring.py, test_v2_workflow_flow_inspection.py, test_v2_workflow_loops.py, test_v2_workflow_authoring_history.py, test_v2_workflow_control_runtime.py, test_v2_workflow_durable_runtime.py, test_v2_workflow_control_flow.py, test_chat_workflow_results.py, test_v2_document_provenance.py, test_v2_orchestration_workflow_results_input.py. No new failures: 339 passed before and after. The same 4 setup errors in test_v2_orchestration_workflow_results_input.py occur on base.
  • node functional_tests/test_workflow_results_clients.mjs, node functional_tests/test_workflow_execution_inspection_client.js, node functional_tests/test_v2_orchestration_workflow_results_naming.mjs: passed before and after.
  • npm run typecheck (application/v2_ui): passed.
  • npm run build (application/v2_ui): passed.
  • python scripts/build_docs_inventory.py: no inventory change. Line endings only; restored with git checkout -- docs/_data/app_surface.yml.
  • python functional_tests/test_docs_app_surface_coverage.py: passed, 7 passed.
  • python functional_tests/test_docs_site_quality.py: passed, 6 passed.
  • python scripts/check_xss_sinks.py --base-sha 66a29bd60 --head-sha HEAD <changed files>: passed, 50 files.
  • python scripts/check_broken_access_control.py --base-sha 66a29bd60 --head-sha HEAD <changed files>: passed, 46 files.
  • python scripts/check_swagger_routes.py application/single_app/route_backend_workflows.py: passed.
  • git diff --check 66a29bd60 HEAD: clean.

Documentation

  • Release notes updated, or not needed
  • Feature documentation updated, or not needed
  • Fix documentation updated, or not needed

Security checklist

  • New Flask routes include @swagger_route(security=get_auth_security())
  • Settings sent to non-admin frontends use sanitize_settings_for_user()
  • 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

Saved and generated workflow results now take their access from the
workflow, run and group they belong to. Task and node results, structured
execution history, For each and Repeat history, run history previews,
chat Follow up on a workflow result and the document provenance run link
no longer re-resolve the documents a run read; those are kept as
provenance. Lineage, contract and hash integrity checks stay, as do the
container checks and the input-time checks when a workflow reads an
uploaded document. Each task attempt gets its own model fence.

Flow inspection marks an unavailable authored source on its own
selection row instead of denying the definition. Lineage failures answer
409, activity streams end with activity_unavailable, and
source_snapshot_changed is always false.

Version 0.261.231. Refs microsoft#1621 (layer 3a).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
test_native_source_revocation_blocks_saved_report_and_publication asserted
the old re-check of a saved Analyze result against its source. It now
revokes the native source after the Analyze result is saved and expects
the same end state as the happy-path test: the saved report reaches the
model and its artifact publishes once. The shared assertions moved into
assert_saved_report_published_once. The file's stale harness is
unchanged and noted in the fix doc.

Refs microsoft#1621.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Brings in paullizer-workspace-knowledge-holds at 4b5346c, which now
includes the upload-only screening intake (0.261.230). Conflicts:
VERSION stays 0.261.231, and the 0.261.231 release notes sit above
0.261.230 and 0.261.229.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit 955f67d into microsoft:paullizer-workspace-knowledge-holds Oct 3, 2026
2 checks passed
Paul Lizer (paullizer) added a commit that referenced this pull request Oct 3, 2026
Syncs the local base-branch merge with #1631, which was merged into this
branch on GitHub. VERSION is 0.261.231 from layer 3a. The release notes
run 0.261.231 (layer 3a), 0.261.230 (layers 1 and 2) and 0.261.229
(Run as, from the base branch).

test_workflow_history_source_access.py keeps layer 3a's 0.261.231
header and labels layer 1's preview change 0.261.230. The layer 3a fix
doc now cites the layer 1 fix as 0.261.230.

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 3, 2026
Bring in the workflow saved-result changes that merged into
paullizer-workspace-knowledge-holds. Conflict resolution:
- config.py: keep VERSION 0.261.232.
- release_notes.md: keep the 0.261.232 section above 0.261.231 and 0.261.230.
CONTENT_SCREENING_FRAMEWORK.md, content_screening/access.py and
functions_saved_analysis.py merged cleanly; 3a's fence paragraph, fence helper
and workflow-only saved-analysis lines are unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer) added a commit that referenced this pull request Oct 3, 2026
The target branch moved to 0.261.231 (#1627 through #1631) and now uses
0.261.229, 0.261.230 and 0.261.231. Keep those release notes entries, move
this fix to a new 0.261.232 section, and renumber the fix document, the
logging reference note and the regression test header.

Refs #1623

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) deleted the paullizer-screening-layer-3a-workflows branch October 3, 2026 18:51
Paul Lizer (paullizer) added a commit to paullizer/simplechat that referenced this pull request Oct 3, 2026
… Run as

The microsoft#1621 screening changes (microsoft#1628, microsoft#1631, microsoft#1632) and microsoft#1630 have landed on
paullizer-react-v2-ui, so the roadmap no longer describes V2 where it says a
result is withheld when a source document becomes unreadable, or that every
material edit needs Run as approval again.

- §7: reads and deliveries re-check the chat, workflow and run that hold a
  result; since 0.261.231 the documents a run's tasks read are provenance only.
- Gotcha 36: delivery no longer withholds a result over an unreadable source.
- 6a: "lost access" in its Done when now means access to the workflow or run.
- Gotchas 4 and 15: since 0.261.229 a revision the Run as user saved, assistant
  edits included, runs as them without a separate approval; changes saved by
  someone else still ask again.
- The intro names both changes.

Docs only; the original plan text in §5 and the shipped Phase 3 notes are left
as history.

Refs microsoft#1543 microsoft#1546 microsoft#1621

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