Skip to content

Workflow run history returns 403 after an attached document is deleted or re-uploaded #1613

Closed

Description

@paullizer

Issue

The run history for a workflow can disappear entirely after one of its attached documents is deleted or re-uploaded. GET /api/user/workflows/<workflow_id>/runs (and the group variant) returns 403 with "Run history is unavailable because source access could not be confirmed." even though the owner still has access to the workflow, its conversation and the current document. Runs that never used the removed document are hidden too.

Steps to Reproduce

  1. Create a personal workflow that attaches a workspace document as a reference input, and let it run a few times.
  2. Delete that document, or re-upload it (which gives it a new document ID) and point the workflow at the new copy.
  3. Open the workflow's run history in the V2 Workflows page, or call GET /api/user/workflows/<workflow_id>/runs.

Expected Behavior

Every run the caller may read is listed. A run whose source can no longer be confirmed is shown with that source marked unavailable, or left out on its own, and the rest of the history stays visible.

Actual Behavior

The whole request fails with 403. get_user_workflow_runs in route_backend_workflows.py calls authorize_workflow_run_read for each of the last 50 runs inside one try block, and the first run that raises AnalysisResultUnavailable fails the entire response. The group run-history route has the same loop.

Impact

Routine document maintenance hides a workflow's whole history from its owner. Results can still be found by opening the workflow conversation, but the history view is unusable until the old runs age out of the last 50.

Notes

  • Locations: get_user_workflow_runs and the group run-history route in route_backend_workflows.py (both return "Run history is unavailable because source access could not be confirmed.").
  • Possible fix: authorize each run separately and filter or redact the runs that fail; tell a deleted source apart from a denied one; keep the 403 only when the caller cannot read any of the runs.
  • Seen on a SimpleChat POC deployment running 0.261.221.

Activity

  1. added
    bugSomething isn't working
    P2Priority 2: important, scheduled after P0/P1
    on Oct 2, 2026
  2. paullizer commented on Oct 3, 2026

    @paullizer
    CollaboratorAuthor

    Fixed by #1628, which merged into paullizer-react-v2-ui as c53ef2d9b (version 0.261.230). Run lists, run task results, the live activity view and the last-run preview now take their access from the workflow. A deleted or re-uploaded document no longer turns run history into a 403. I am closing this manually because the fix merged into the V2 branch rather than main, so GitHub did not close it automatically.

  3. added a commit that references this issue on Oct 3, 2026
    a82a506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Priority 2: important, scheduled after P0/P1bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions