fix(HEL-199): 为补档工具补上仓库根 sys.path 引导

使 python3 tools/backfill_recent_snapshots.py --help 在干净环境下可直接运行,并同步文档运行示例为容器内执行。

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
总工
2026-08-27 15:12:42 +00:00
co-authored by Cursor multica-agent
parent 7ad445bc9f
commit 8e94c7b429
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -12,7 +12,13 @@ from __future__ import annotations
import argparse
import json
import sys
from datetime import date
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from backend.application import SERVICE
from backend.bootstrap.config import normalize_date