[阶段1] 抽出 domain/ 层 #20

Closed
opened 2026-08-21 13:31:17 +08:00 by tao.chen · 0 comments
Owner

新建 schedule/src/schedule/domain/__init__.py

  • 移动 context.pydomain/context.py(41 行,纯常量 + 时区 helper,无 I/O)
  • 拆分 execution.py:
    • dataclass(ExecutionResult 等)+ 终态常量 → domain/execution.py
    • _execute_notebook / _limited_log 本阶段不挪,留旧文件以最小化 diff
  • 内部 import 全部改:from schedule.contextfrom schedule.domain.context,from schedule.executionfrom schedule.domain.execution
  • main.py 不动

Executor: Codex

验证:

  • uv run --package schedule pytest schedule/tests -q 全绿
  • uv run python -m compileall schedule/src 零错误

约束: 不引入新依赖,不修改 main.py,不修改 pyproject.toml


Task: xatvhlfxm7l3chlb121dr9bi

<p>新建 <code>schedule/src/schedule/domain/__init__.py</code></p> <ul> <li>移动 <code>context.py</code> → <code>domain/context.py</code>(41 行,纯常量 + 时区 helper,无 I/O)</li> <li>拆分 <code>execution.py</code>: <ul><li>dataclass(<code>ExecutionResult</code> 等)+ 终态常量 → <code>domain/execution.py</code></li> <li><code>_execute_notebook</code> / <code>_limited_log</code> <strong>本阶段不挪</strong>,留旧文件以最小化 diff</li></ul> </li> <li>内部 import 全部改:<code>from schedule.context</code> → <code>from schedule.domain.context</code>,<code>from schedule.execution</code> → <code>from schedule.domain.execution</code></li> <li><code>main.py</code> 不动</li> </ul> <p><strong>Executor:</strong> Codex</p> <p><strong>验证:</strong></p> <ul> <li><code>uv run --package schedule pytest schedule/tests -q</code> 全绿</li> <li><code>uv run python -m compileall schedule/src</code> 零错误</li> </ul> <p><strong>约束:</strong> 不引入新依赖,不修改 main.py,不修改 pyproject.toml</p> --- <sub>Task: xatvhlfxm7l3chlb121dr9bi</sub>
tao.chen added the priority:mediumstatus:to-do labels 2026-08-21 13:31:19 +08:00
tao.chen added status:in-progress and removed status:to-do labels 2026-08-21 13:36:00 +08:00
tao.chen added status:done and removed status:in-progress labels 2026-08-21 13:41:36 +08:00
tao.chen added status:archived and removed status:done labels 2026-08-24 10:09:10 +08:00
tao.chen reopened this issue 2026-08-24 10:09:17 +08:00
tao.chen added the status:in-review label 2026-08-24 14:21:22 +08:00
tao.chen removed the status:in-review label 2026-08-24 14:25:15 +08:00
tao.chen reopened this issue 2026-08-24 14:25:35 +08:00
tao.chen added the status:to-do label 2026-08-24 14:26:05 +08:00
tao.chen added the status:done label 2026-08-24 14:50:34 +08:00
tao.chen reopened this issue 2026-08-24 14:50:41 +08:00
tao.chen removed the status:donestatus:to-do labels 2026-08-24 14:51:14 +08:00
tao.chen reopened this issue 2026-08-24 14:51:18 +08:00
tao.chen added the status:done label 2026-08-24 14:51:19 +08:00
tao.chen added status:to-dostatus:in-review and removed status:done labels 2026-08-24 14:51:56 +08:00
tao.chen reopened this issue 2026-08-24 14:51:59 +08:00
tao.chen added status:done and removed status:in-review labels 2026-08-24 14:53:20 +08:00
tao.chen added status:in-review and removed status:done labels 2026-08-24 14:53:36 +08:00
tao.chen reopened this issue 2026-08-24 14:53:43 +08:00
tao.chen added status:done and removed status:in-reviewstatus:to-do labels 2026-08-24 14:54:39 +08:00
tao.chen added the status:in-review label 2026-08-24 14:55:00 +08:00
tao.chen reopened this issue 2026-08-24 14:55:03 +08:00
tao.chen removed the status:done label 2026-08-24 14:55:12 +08:00
tao.chen reopened this issue 2026-08-24 14:55:18 +08:00
tao.chen added status:to-do and removed status:in-review labels 2026-08-24 14:55:28 +08:00
tao.chen added status:in-review and removed status:to-do labels 2026-08-25 19:16:55 +08:00
tao.chen added status:done and removed status:in-review labels 2026-08-27 18:54:02 +08:00
Sign in to join this conversation.