- step1: 所有 LLM 调用返回空 function_units 时抛出 RuntimeError - step1: main() 在 _quick_validate 未通过时 sys.exit(1) - step2: function_units 为空时提前报错终止 - step3: fragments 为空时提前报错终止 - test: test_step1 捕获 SystemExit, test_step2_5/step3 空数据改为 skip Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -376,10 +376,13 @@ def _load_si_and_doc():
|
||||
"""Try to load semantic_index.json and the input document. Returns (si, doc) or (None, None)."""
|
||||
try:
|
||||
si = config.load_json(config.SEMANTIC_INDEX_JSON)
|
||||
doc = config.load_input_document()
|
||||
return si, doc
|
||||
except FileNotFoundError:
|
||||
return None, None
|
||||
try:
|
||||
doc = config.load_input_document()
|
||||
except (FileNotFoundError, SystemExit):
|
||||
return None, None
|
||||
return si, doc
|
||||
|
||||
|
||||
def test_step1_unit_ids():
|
||||
|
||||
Reference in New Issue
Block a user