feat(orchestrator): 续写链前一章无已验收终稿发 warning——静默丢前文引子可观测(CR-L1)
This commit is contained in:
@@ -325,7 +325,17 @@ async def _read_prior_accepted(
|
||||
if chapter_no <= 1:
|
||||
return ""
|
||||
view = await chapter_repo.latest_accepted(project_id, chapter_no - 1)
|
||||
return view.content if view is not None else ""
|
||||
if view is None:
|
||||
# 静默降级须可观测(CR-L1):续写式链本章续接的前一章尚无已验收终稿——续写会丢失
|
||||
# 前文引子(降级为 build_continuation_context 的占位)。发 warning 便于查错,勿静默吞。
|
||||
log.warning(
|
||||
"chain_prior_accepted_missing",
|
||||
project_id=str(project_id),
|
||||
chapter_no=chapter_no,
|
||||
prior_chapter_no=chapter_no - 1,
|
||||
)
|
||||
return ""
|
||||
return view.content
|
||||
|
||||
|
||||
async def _commit(session: CommitSession) -> None:
|
||||
|
||||
Reference in New Issue
Block a user