-
Notifications
You must be signed in to change notification settings - Fork 4
WorkflowContext: add reset() method #3
Copy link
Copy link
Closed
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Currently, there is no way to reset a WorkflowContext to its initial state without creating a new instance. A reset() method would make it easier to reuse a context across multiple runs in tests or long-running processes.
ctx = WorkflowContext(workflow_id="run-001")
ctx.update(some_result)
ctx.reset()
assert ctx.confidence == 1.0
assert ctx.step_count == 0
What needs to change:
Add a reset() method to WorkflowContext in gateframe/core/context.py that restores confidence, _history, and related state to their initial values.
A test in tests/core/test_context.py should cover the basic reset behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed