Extract run-mode helpers into digest.web.run_mode#15
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continues the
app.pydecomposition (after #9–#12).Change
Move the run-mode resolution helpers and the
RUN_MODE_OPTIONStable fromweb/app.pyinto a newdigest.web.run_modemodule: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.pyre-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_optionsstay internal.Anyis 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)
ruff check src tests: clean; bandit clean; detect-secrets clean (baseline unchanged)🤖 Generated with Claude Code
https://claude.ai/code/session_01GRvYFEnkge3dkDJRMmBTyh
Generated by Claude Code