Skip to content

Extract run-mode helpers into digest.web.run_mode#15

Merged
DCCA merged 1 commit into
masterfrom
claude/wizardly-archimedes-a1duo9
Jun 21, 2026
Merged

Extract run-mode helpers into digest.web.run_mode#15
DCCA merged 1 commit into
masterfrom
claude/wizardly-archimedes-a1duo9

Conversation

@DCCA

@DCCA DCCA commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Continues the app.py decomposition (after #9#12).

Change

Move the run-mode resolution helpers and the RUN_MODE_OPTIONS table from web/app.py into a new digest.web.run_mode module: RUN_MODE_OPTIONS, DEFAULT_WEB_RUN_MODE, _resolve_run_mode, _resolve_profile_run_mode, _resolve_run_mode_for_request, _run_mode_options, _web_live_run_options.

  • app.py re-imports the four route-facing names (RUN_MODE_OPTIONS, _resolve_profile_run_mode, _resolve_run_mode_for_request, _web_live_run_options); DEFAULT_WEB_RUN_MODE, _resolve_run_mode, and _run_mode_options stay internal.
  • Only Any is an external dependency — no circular import.

web/app.py: 1751 → 1688 LOC.

Cumulative (session)

web/app.py: 2589 → 1688 LOC (−901, −35%) via five focused, re-exporting modules — schedule, run_progress, sources, security, run_mode — each verbatim, no behavior change.

Verification (mirrors CI)

  • Backend: 254 tests pass; ruff check src tests: clean; bandit clean; detect-secrets clean (baseline unchanged)
  • Frontend: 24 tests pass, production build succeeds

🤖 Generated with Claude Code

https://claude.ai/code/session_01GRvYFEnkge3dkDJRMmBTyh


Generated by Claude Code

Continue breaking up src/digest/web/app.py by moving the run-mode resolution
helpers and the RUN_MODE_OPTIONS table into a focused digest.web.run_mode module
(following the feedback/schedule/run_progress/sources/security pattern).

- New digest.web.run_mode holds RUN_MODE_OPTIONS, DEFAULT_WEB_RUN_MODE,
  _resolve_run_mode, _resolve_profile_run_mode, _resolve_run_mode_for_request,
  _run_mode_options, and _web_live_run_options
- app.py re-imports the four route-facing names; DEFAULT_WEB_RUN_MODE,
  _resolve_run_mode, and _run_mode_options stay internal

app.py drops from 1751 to 1688 lines; no behavior change. ruff/bandit/
detect-secrets clean and all 254 backend tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GRvYFEnkge3dkDJRMmBTyh
@DCCA DCCA merged commit 03967ba into master Jun 21, 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.

2 participants