dev-strender's picture
Replace v24-era demo with v34 pipeline demo (engine-vendored bundle)
9c84f9d verified
Raw History Blame Contribute Delete
3.15 kB
"""νŒŒμ΄ν”„λΌμΈ μ‹€ν–‰ 쀑 λ§Œλ‚˜λŠ” μ˜ˆμ™Έ.
μ˜ˆμ „ 엔진은 λͺ¨λ₯΄λŠ” step_type/rule_type 을 λ§Œλ‚˜λ©΄ 아무 일도 μ•ˆ ν•˜κ³  ν…μŠ€νŠΈλ₯Ό
κ·ΈλŒ€λ‘œ ν†΅κ³Όμ‹œμΌ°λ‹€(μ‘°μš©ν•œ no-op). μ˜€νƒ€ λ‚œ μŠ€ν… 이름이 API 호좜 ν•œ 번 없이
"성곡"으둜 μ§€λ‚˜κ°€λŠ” λ²„κ·Έμ˜€λ‹€. μ§€κΈˆμ€ 두 겹으둜 λ§‰λŠ”λ‹€:
1. **생성 μ‹œμ  검증** -- `create_pipeline` 이 steps λͺ©λ‘ 전체λ₯Ό STEP_REGISTRY μ—μ„œ
ν•΄μ„ν•œλ‹€. λͺ¨λ₯΄λŠ” 이름은 run 이 μ‹œμž‘λ˜κΈ°λ„ 전에 μ—¬κΈ° μ˜ˆμ™Έλ‘œ μ£½λŠ”λ‹€.
2. μ—λŸ¬ λ©”μ‹œμ§€μ— λ“±λ‘λœ μŠ€ν… λͺ©λ‘μ„ μ‹€μ–΄, μ˜€νƒ€μΈμ§€ λ―Έκ΅¬ν˜„μΈμ§€ λ°”λ‘œ 보이게 ν•œλ‹€.
(`.agents/01-plans/harness/2026-08-09-chosun-proofread-evalsample-migration.md` Β§5-C)
"""
from __future__ import annotations
def _format_available(available: list[str] | None) -> str:
if not available:
return ""
return f" (registered steps: {', '.join(available)})"
class UnknownStepTypeError(ValueError):
"""step `type` 이 STEP_REGISTRY 에 등둝돼 μžˆμ§€ μ•Šμ„ λ•Œ."""
def __init__(self, step_type: str, available: list[str] | None = None) -> None:
super().__init__(f"Unknown pipeline step type: {step_type!r}{_format_available(available)}")
self.step_type = step_type
class KnowledgeAssetError(FileNotFoundError):
"""μŠ€ν…μ΄ μ„ μ–Έν•œ 지식 μžμ‚°(μΉ˜ν™˜ μ‚¬μ „Β·ν™”μ΄νŠΈλ¦¬μŠ€νŠΈ λ“±)을 읽을 수 없을 λ•Œ.
2026-08-11 μ΄μ „μ—λŠ” 이걸 μ‚ΌμΌ°λ‹€ -- `except Exception: warning; vocabulary = []`.
κ·Έ κ²°κ³Ό `pipeline_prod_251231` 의 vocab μŠ€ν… 2κ°œκ°€ **빈 μ‚¬μ „μœΌλ‘œ 톡과**ν•˜λ©°
run 은 "성곡"으둜 끝났고, 운영 κΈ°μ€€μ„  μ μˆ˜κ°€ μ˜€λž«λ™μ•ˆ μΉ˜ν™˜ 없이 츑정됐닀
(μ‹€μΈ‘: prod 0개 λ‘œλ“œ vs v24 146개). λͺ¨λ₯΄λŠ” μŠ€ν… 이름을 μ¦‰μ‹œ μ£½μ΄λ©΄μ„œ
지식 μžμ‚° μœ μ‹€μ€ ν†΅κ³Όμ‹œν‚€λŠ” 건 μ•žλ’€κ°€ μ•ˆ λ§žλŠ”λ‹€ -- λ‘˜ λ‹€ "μ„ μ–Έν•œ 것이
μ‹€ν–‰λ˜μ§€ μ•Šμ•˜λ‹€"λŠ” 같은 사고닀.
μ„ μ–Έ μžμ²΄κ°€ μ—†μœΌλ©΄(ν‚€ λΆ€μž¬) 이 μ˜ˆμ™ΈλŠ” λ‚˜μ§€ μ•ŠλŠ”λ‹€ -- 그건 정상적인 no-op 이닀.
"""
def __init__(self, asset: str, searched: list[str]) -> None:
locations = "\n ".join(searched)
super().__init__(
f"μ„ μ–Έλœ 지식 μžμ‚°μ„ 읽을 수 μ—†μŠ΅λ‹ˆλ‹€: {asset!r}\n {locations}\n"
f"(config μžμ‚°μ€ 03-evaluation/resources/ μ•„λž˜, 데이터 μžμ‚°μ€ 데이터 루트 κΈ°μ€€)"
)
self.asset = asset
self.searched = searched
class UnknownRuleTypeError(UnknownStepTypeError):
"""legacy `type: rule` μŠ€ν…μ˜ `rule_type` 이 등둝돼 μžˆμ§€ μ•Šμ„ λ•Œ.
`UnknownStepTypeError` 의 ν•˜μœ„ νƒ€μž…μ΄λ‹€ -- rule 은 이제 별도 λ””μŠ€νŒ¨μΉ˜ 계측이
μ•„λ‹ˆλΌ λ ˆμ§€μŠ€νŠΈλ¦¬ ν•­λͺ©μΌ 뿐이고, 이 ν΄λž˜μŠ€λŠ” κΈ°μ‘΄ ν˜ΈμΆœλΆ€/ν…ŒμŠ€νŠΈμ™€μ˜ ν˜Έν™˜μš©
κ΅¬λΆ„μžλ‘œλ§Œ λ‚¨λŠ”λ‹€.
"""
def __init__(self, rule_type: str, available: list[str] | None = None) -> None:
ValueError.__init__(
self, f"Unknown pipeline rule type: {rule_type!r}{_format_available(available)}"
)
self.step_type = rule_type
self.rule_type = rule_type