feat(core): finalize rvw stability updates and pending module changes

Summary:
- Harden RVW prompt protocol handling and methodology review flow with 20-checkpoint coverage, divide-and-conquer execution, and timeout tuning
- Update RVW frontend methodology report rendering to show real structured outputs and grouped checkpoint sections
- Include pending backend/frontend updates across IIT admin, SSA, extraction forensics, and related integration files
- Sync system and RVW status documentation, deployment checklist, and RVW architecture/plan docs

Validation:
- Verified lint diagnostics for touched RVW backend/frontend files show no new errors
- Kept backup dump files and local test artifacts untracked

Made-with: Cursor
This commit is contained in:
2026-03-14 00:00:04 +08:00
parent 6edfad032f
commit ba464082cb
35 changed files with 1575 additions and 268 deletions

View File

@@ -67,7 +67,7 @@ async def forensics_health():
@router.post("/analyze_docx")
async def analyze_docx(
file: UploadFile = File(...),
check_level: str = "L1_L2",
check_level: str = "EXTRACT_ONLY",
tolerance_percent: float = 0.1,
max_table_rows: int = 500
):
@@ -76,7 +76,7 @@ async def analyze_docx(
Args:
file: 上传的 .docx 文件
check_level: 验证级别 (L1 / L1_L2)
check_level: 验证级别 (EXTRACT_ONLY / L1 / L1_L2)
tolerance_percent: 百分比容错范围
max_table_rows: 单表最大行数
@@ -125,18 +125,21 @@ async def analyze_docx(
methods_found = detect_methods(full_text)
logger.info(f"检测到统计方法: {methods_found}")
# 8. L1 算术验证
arithmetic_validator = ArithmeticValidator(config)
for table in tables:
if not table.skipped:
arithmetic_validator.validate(table)
# 9. L2 统计验证(如果启用)
if check_level == "L1_L2":
stat_validator = StatValidator(config)
# 8. 规则验证(可关闭)
# EXTRACT_ONLY仅提取表格不执行任何规则验证
if check_level != "EXTRACT_ONLY":
# L1 算术验证
arithmetic_validator = ArithmeticValidator(config)
for table in tables:
if not table.skipped:
stat_validator.validate(table, full_text)
arithmetic_validator.validate(table)
# L2 统计验证(如果启用)
if check_level == "L1_L2":
stat_validator = StatValidator(config)
for table in tables:
if not table.skipped:
stat_validator.validate(table, full_text)
# 10. 统计问题数量
total_issues = 0

View File

@@ -41,8 +41,8 @@ class IssueType(str, Enum):
class ForensicsConfig(BaseModel):
"""数据侦探配置"""
check_level: str = Field(
default="L1_L2",
description="验证级别L1仅算术、L1_L2算术+基础统计)"
default="EXTRACT_ONLY",
description="验证级别:EXTRACT_ONLY仅提取表格L1仅算术、L1_L2算术+基础统计)"
)
tolerance_percent: float = Field(
default=0.1,