Skip to content

refactor: consolidate ProcessingMode into RunMode (ARCH-002)#102

Merged
Muizzkolapo merged 3 commits intomainfrom
arch-002/consolidate-runmode-enum
Apr 2, 2026
Merged

refactor: consolidate ProcessingMode into RunMode (ARCH-002)#102
Muizzkolapo merged 3 commits intomainfrom
arch-002/consolidate-runmode-enum

Conversation

@Muizzkolapo
Copy link
Copy Markdown
Owner

Summary

  • Removes the duplicate ProcessingMode enum from processing/types.py and replaces all usages with RunMode from config/types.py
  • Eliminates the is_batch_mode boolean bridge in PreparationContext, replacing it with a direct mode: RunMode field so mode flows as a typed enum end-to-end
  • Cleans up the reconversion in TaskPreparer._render_prompt() and a stale docstring in config/interfaces.py

Changes (17 files)

Category Files What
Enum removed processing/types.py Deleted ProcessingMode, added RunMode import, updated ProcessingContext.mode
Bridge removed prepared_task.py, task_preparer.py is_batch_mode: boolmode: RunMode; removed boolean reconversion
Import swaps 8 production files ProcessingModeRunMode across processing, workflow, prompt, and input modules
Docstring fix config/interfaces.py Updated stale reference to deleted enum
Tests updated 5 test files Swapped imports + assertions

Note: config/interfaces.py::ProcessingMode (SYNC | ASYNC | AUTO) is a different, unrelated enum and was intentionally left untouched.

Test plan

  • ruff check . — all clean
  • pytest — 4279 passed, 2 skipped, 0 failures
  • grep -rn "processing.types.*ProcessingMode" — zero hits
  • grep -rn "is_batch_mode" — zero hits
  • config/interfaces.py::ProcessingMode (SYNC/ASYNC/AUTO) confirmed unchanged

Closes #83

🤖 Generated with Claude Code

… truth (#83)

Remove the duplicate `ProcessingMode` enum from `processing/types.py`
(ONLINE | BATCH) and replace all usages with `RunMode` from
`config/types.py`. Eliminate the `is_batch_mode` boolean bridge in
`PreparationContext` so the mode flows as a typed enum end-to-end,
removing unnecessary round-trip conversions.

- Delete `ProcessingMode` from `processing/types.py`
- Update `ProcessingContext.mode` to use `RunMode`
- Replace `is_batch_mode: bool` with `mode: RunMode` on `PreparationContext`
- Remove bridge conversion in `TaskPreparer._render_prompt()`
- Update all imports across 12 production files and 5 test files
- Update stale docstring in `config/interfaces.py`

Closes #83
- Remove duplicate `from agent_actions.config.types import RunMode`
  local import in test_invocation_strategy.py (already at module level)
- Update processing/_MANIFEST.md to reflect RunMode usage in
  prepared_task.py and types.py
@Muizzkolapo Muizzkolapo force-pushed the arch-002/consolidate-runmode-enum branch from 4ae8732 to 41582fb Compare April 2, 2026 14:29
@Muizzkolapo Muizzkolapo merged commit 1e598bf into main Apr 2, 2026
4 checks passed
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.

ARCH-002: Consolidate duplicate RunMode / ProcessingMode enums into a single source of truth

1 participant