elsa-workflows / elsa-workflows/elsa-core

Remove or quarantine obsolete IBookmarkResumer / IWorkflowInbox still registered in DI

Open
#8,136 0 comments 0 reactions 0 assignees View on GitHub
core elsa 3 maintenance prio low tech debt triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

## Problem

The runtime still **DI-registers** obsolete resume/inbox stacks alongside the current Stimulus / `IWorkflowResumer` path. That keeps two mental models and two entry points alive for the same job (resume by stimulus/bookmark), which fights subtractive clarity.

## Evidence (main)

Contracts are marked obsolete:

- `IBookmarkResumer` — `[Obsolete("Use IWorkflowResumer instead.")]`
- `IWorkflowInbox` — `[Obsolete("Use the Stimulus API instead")]`

Yet `WorkflowRuntimeFeature` (and the shell twin) still registers implementations:

```csharp
.AddScoped()

.AddScoped()
```

`StimulusProxyWorkflowInbox` itself is an adapter over `IStimulusSender` — useful as a bridge, but leaving the obsolete surface in the default container invites new call sites and prolongs dual-stack maintenance (filters, inbox message types, docs that still mention both).

## Expected

- Prefer removal or explicit opt-in/legacy feature registration over silent default DI.
- One resume story for new code: `IStimulusSender` / `IWorkflowResumer`.
- If a compatibility shim must remain for one more minor, quarantine it behind a clearly named legacy registration and stop documenting it as first-class.

## Not a duplicate of

- #4502 — WorkflowInbox cleanup event (enhancement on the obsolete inbox)
- #7313 — broader runtime architecture inventory (actor readiness); this issue is a concrete dual-stack DI cut
- #7068 — Generic Task Reporter
- #7726 / bookmark race issues — persistence races, not API surface cleanup

## Suggested follow-through

1. Inventory remaining in-repo + published-extension consumers of `IBookmarkResumer` / `IWorkflowInbox`.
2. Migrate or delete; then drop default DI registration (breaking → label/coordinate; otherwise gate behind legacy feature).
3. Update wiki/security-assessment docs that still list `IWorkflowInbox` next to `IStimulusSender` as peer mechanisms.

## Milestone

Unset — Elsa 3 Issue Triage / Crew Lead place. Soft proposal: Backlog / tech-debt lane, not 3.9 prune unless Crew Lead wants subtractive wins there. Do not auto-assign Engineer.

Contributor guide

Open the contributing guide

Research direction

Start with WorkflowRuntimeFeature and its shell twin, then inventory in-repository and published-extension consumers of IBookmarkResumer and IWorkflowInbox. Determine whether each consumer can migrate to IStimulusSender or IWorkflowResumer, and check the wiki/security-assessment documentation named in the issue. Done means obsolete services are removed from default DI or clearly isolated behind legacy registration, with affected consumers and documentation updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.