Repair mojibake in step comments and run-001 artifacts
This commit is contained in:
@@ -78,58 +78,58 @@ def validate_outputs(
|
||||
|
||||
if measurement_missing:
|
||||
failures.append("Verify-Measurement")
|
||||
actions.append("?? ??? ?? ?? stage 3/4 ???? ?? ???? ??.")
|
||||
actions.append("?? ??? ?? stage 3/4 ??? ?? ??? ?? ???? ???.")
|
||||
|
||||
if slide_overflow:
|
||||
failures.append("Verify-RenderSlide")
|
||||
actions.append("slide ?? overflow? ????? layout budget ?? ?? ???? ??? ????.")
|
||||
actions.append("slide ?? overflow? ???? layout budget? zone ??? ?? ???? ???.")
|
||||
|
||||
if zone_overflows:
|
||||
failures.append("Verify-RenderZone")
|
||||
actions.append(f"overflow? ??? zone({', '.join(zone_overflows)})? content budget, block ?, typography? ?????.")
|
||||
actions.append(f"overflow? ??? zone({', '.join(zone_overflows)})? content budget, block ?, typography? ?? ???? ???.")
|
||||
|
||||
if '???' in visible_text or '?? ??' in visible_text:
|
||||
failures.append("Verify-Placeholder")
|
||||
actions.append("placeholder? ?? ??? ????, ?? ??/???? ?? ???.")
|
||||
actions.append("placeholder ?? ?? ???? ?? ?? ?? ???? ??? ???? ?? ???? ???.")
|
||||
|
||||
matched_titles = sum(1 for title in required_titles if title and title in visible_text)
|
||||
visible_len = len(re.sub(r'\s+', ' ', visible_text).strip())
|
||||
if matched_titles < max(2, min(len(required_titles), 3)):
|
||||
failures.append("Verify-SectionTitles")
|
||||
actions.append("?? ?? ??? ?? ???? ? ????? ????.")
|
||||
actions.append("?? ?? ??? ??? ?? ??? ??? ????? ????? ???.")
|
||||
|
||||
if run_mode == 'run001':
|
||||
core_message_ok = all(any(marker in visible_text for marker in variants) for variants in CORE_MESSAGE_MARKERS)
|
||||
if not core_message_ok:
|
||||
failures.append("Verify-CoreMessage")
|
||||
actions.append("?? ??? ???? `?? ??`? `?? ??/?? ??? ??` ??? ?? ???? ??? ????? ????.")
|
||||
actions.append("?? ???? DX? BIM? ??? ???? ? ????? ????? ????? ???.")
|
||||
|
||||
if IMAGE_REFERENCE_KEY not in visible_text:
|
||||
failures.append("Verify-ImageRef")
|
||||
actions.append("???/?? ?? ?? `DX? ????? ????`? ?? ??? ?? ?? ???? ????.")
|
||||
actions.append("?? ??? ?? ??? ??? ???? ???? ???/?? ????? ?? ???? ???.")
|
||||
|
||||
comparison_visible = (COMPARISON_MARKER in body_html) and all(key in visible_text for key in COMPARE_KEYS)
|
||||
if not comparison_visible:
|
||||
failures.append("Verify-ComparisonVisible")
|
||||
actions.append("?? ?? 4?(??, ????, ???, ???)? ??? ?? ??? ?? ???? ????.")
|
||||
actions.append("?? ?? 4?(??, ????, ???, ???)? ?? ???? ??? ?? ??? ?? ???? ???.")
|
||||
|
||||
if RELATION_MARKER not in body_html:
|
||||
failures.append("Verify-DesignStructure")
|
||||
actions.append("?? ??? ???? ??? ??? ??? ?? ?? ??? ????.")
|
||||
actions.append("??? ?? ??? ??? ?? ?? ??? ??? ??? ?? ???? ???.")
|
||||
else:
|
||||
if visible_len < 420:
|
||||
failures.append("Verify-ContentDensity")
|
||||
actions.append("??? ?? ??? ?? ?? ???? ?? ?? ??? ????.")
|
||||
actions.append("?? ??? ??? ?? ?? ?? ??? ? ?? ??? ???? ????? ???.")
|
||||
if not body_html:
|
||||
failures.append("Verify-DesignStructure")
|
||||
actions.append("body ??? ?? ??? ?? ?? ?? ??? ???.")
|
||||
actions.append("body ??? ?? ?? ?? ?? ??? ?? ??? ???.")
|
||||
if matched_titles < max(3, len([title for title in required_titles if title]) - 1):
|
||||
failures.append("Verify-SectionTitles")
|
||||
actions.append("?? ?? ??? ? ?? ?? ?? ???? ????.")
|
||||
actions.append("?? ?? ??? ??? ?? ?? ?? ?? ??? ?? ???? ?? ???? ???.")
|
||||
if layout_template == "B_GOAL":
|
||||
for marker, reason in [
|
||||
("Goal details", "?? ?? ?? ?? ?? ???? ????."),
|
||||
("Process details", "?? ?? ?? ?? ???? ????."),
|
||||
("Goal details", "?? ??? ?? ???? ?? ?? ??? ? ?? ?? ??? ??? ???."),
|
||||
("Process details", "?? ?? ??? ???? process ??? ? ?? ?? bullet? ??? ???."),
|
||||
("Stakeholder details", "??? ???? ?? ?? ???? ????."),
|
||||
]:
|
||||
if marker not in body_html:
|
||||
@@ -137,15 +137,15 @@ def validate_outputs(
|
||||
actions.append(reason)
|
||||
if body_html.count("<li") < 10:
|
||||
failures.append("Verify-ContentDensity")
|
||||
actions.append("??/??/?? ??? ?? bullet ?? ?? ?? ??? ???.")
|
||||
actions.append("??/??/?? ??? bullet ?? ???? ?? bullet? ? ?? ???? ???.")
|
||||
elif layout_template == "B_RPP":
|
||||
for title in required_titles[:3]:
|
||||
if title and title not in body_html:
|
||||
failures.append("Verify-SectionTitles")
|
||||
actions.append("??/??/??? ?? ?? ??? ??? ?? ????.")
|
||||
actions.append("??/??/?? ?? ??? ?? ?? ??? ??? ????? ?? ???? ???.")
|
||||
if body_html.count("<li") < 14:
|
||||
failures.append("Verify-ContentDensity")
|
||||
actions.append("??/??/?? ??? ?? bullet ?? ??? ????? ??? ???.")
|
||||
actions.append("??/??/?? ??? bullet ?? ???? ?? ??? ? ?? ??? ??? ???.")
|
||||
|
||||
if failures:
|
||||
return "revise", sorted(set(failures)), list(dict.fromkeys(actions))
|
||||
@@ -232,18 +232,18 @@ def summarize_markdown_lines(text: str, limit: int = 8) -> list[str]:
|
||||
|
||||
|
||||
def build_step_comment(title: str, artifact_path: Path, lines: list[str], verdict: str = "pass") -> str:
|
||||
bullet_text = "\n".join(f"- {line}" for line in lines) if lines else "- ??? ??? ????."
|
||||
return f"""?? ??
|
||||
- {title} ?? ???? ?? ???? ?? run ???? ????.
|
||||
- ?? ??: `{artifact_path.as_posix()}`
|
||||
bullet_text = "\n".join(f"- {line}" for line in lines) if lines else "- No summarized execution result is available."
|
||||
return f"""Execution Summary
|
||||
- Reorganized the current run artifact for {title}.
|
||||
- Reference artifact: `{artifact_path.as_posix()}`
|
||||
|
||||
?? ??
|
||||
Execution Results
|
||||
{bullet_text}
|
||||
|
||||
KPI / ?? ??
|
||||
- ??: {verdict}
|
||||
KPI / Verdict
|
||||
- Verdict: {verdict}
|
||||
|
||||
?? ?? ???
|
||||
Next Deliverables
|
||||
- `{artifact_path.as_posix()}`
|
||||
"""
|
||||
|
||||
@@ -475,10 +475,10 @@ def main() -> None:
|
||||
4: run_dir / "04-plan" / "execution-plan.md",
|
||||
}
|
||||
step_titles = {
|
||||
1: "Step 1 ?? ??",
|
||||
2: "Step 2 ?? ??",
|
||||
3: "Step 3 ??? ???",
|
||||
4: "Step 4 ?? ??",
|
||||
1: "Step 1 Input Review",
|
||||
2: "Step 2 Interpretation",
|
||||
3: "Step 3 Content Structuring",
|
||||
4: "Step 4 Execution Planning",
|
||||
}
|
||||
|
||||
for step_no in (1, 2, 3, 4):
|
||||
|
||||
Reference in New Issue
Block a user