Skip to content

Refactor near-limit files on their natural seams#254

Merged
alexkroman merged 1 commit into
mainfrom
claude/refactor-files-500-limit-k9swz0
Jun 19, 2026
Merged

Refactor near-limit files on their natural seams#254
alexkroman merged 1 commit into
mainfrom
claude/refactor-files-500-limit-k9swz0

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

Two source files sat within ~30 lines of the 500-line max-file-length gate.
Split each along its existing concern boundary, preserving behavior:

  • core/config.py (470->297): extract the config.toml document schema
    (Profile/Config/StoredSession) plus the parse/cache/atomic-write store
    into core/config_store.py, mirroring the keyring_store factoring. config
    stays the auth/profile facade and reads as plain accessors over
    config_store.load/dump/update.
  • commands/clip/_exec.py (466->381): extract the ffmpeg cutting stage
    (silence detection, per-segment re-encode, WrittenClip) into
    commands/clip/_cut.py, beside the existing _select selection module;
    _exec is now the orchestration that ties selection and cutting together.

Tests repoint to the new modules. Added coverage for two lines that the
move pulled into the diff scope: the Windows PermissionError retry path and
the real config_dir resolver (both previously uncovered-but-tolerated).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_016aEjd8hrNh1NoWLuZ2fyLT

Two source files sat within ~30 lines of the 500-line max-file-length gate.
Split each along its existing concern boundary, preserving behavior:

- core/config.py (470->297): extract the config.toml document schema
  (Profile/Config/StoredSession) plus the parse/cache/atomic-write store
  into core/config_store.py, mirroring the keyring_store factoring. config
  stays the auth/profile facade and reads as plain accessors over
  config_store.load/dump/update.
- commands/clip/_exec.py (466->381): extract the ffmpeg cutting stage
  (silence detection, per-segment re-encode, WrittenClip) into
  commands/clip/_cut.py, beside the existing _select selection module;
  _exec is now the orchestration that ties selection and cutting together.

Tests repoint to the new modules. Added coverage for two lines that the
move pulled into the diff scope: the Windows PermissionError retry path and
the real config_dir resolver (both previously uncovered-but-tolerated).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016aEjd8hrNh1NoWLuZ2fyLT
@alexkroman alexkroman enabled auto-merge June 19, 2026 05:42
@alexkroman alexkroman added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit 9520cc5 Jun 19, 2026
20 checks passed
@alexkroman alexkroman deleted the claude/refactor-files-500-limit-k9swz0 branch June 19, 2026 05:51
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