2.0 KiB
2.0 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 02-implement-safe-session-parking | Route source and destination behavior | pending | 2 |
|
plan.md |
|
|
|
Task 02: Route Source and Destination Behavior
Summary
Use the destination step for session selection and the source step for session retirement.
In scope
- Split profile-switch routing into start and end inputs.
- Thread the source step or normalized end setting through every entry path.
- Keep credential preflight, promotion, queue rollback, parking, stop intent, guard release, and callback suppression.
- Cover legacy, manual, queued, and direct engine transitions.
Acceptance
- Tests prove all four start-and-end combinations.
- A destination setting cannot change source retirement.
- The workflow engine core gains no action, event, or state.
Verification
cd apps/backend && go test -tags fts5 ./internal/orchestrator -run 'Test(SwitchSessionForStep|PrepareWorkflowStepSession|HandleAgentCompleted|HandleAgentStopped).*ProfileSession' -count=1 -v
Files likely touched
apps/backend/internal/orchestrator/event_handlers_workflow.goapps/backend/internal/orchestrator/workflow_callbacks.goapps/backend/internal/orchestrator/event_handlers_workflow_profile_session_policy_test.goapps/backend/internal/orchestrator/workflow_profile_session_lifecycle.go
Dependencies
Task 01.
Risks
A direct engine entry can lose the source step after the task moves.
Parallelism
sequential
Results
Pending.