examples: add eval-attribution-optimize-gate loop example#217
examples: add eval-attribution-optimize-gate loop example#217tianyouyiwang wants to merge 1 commit into
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #217 +/- ##
==========================================
Coverage ? 87.90237%
==========================================
Files ? 479
Lines ? 44984
Branches ? 0
==========================================
Hits ? 39542
Misses ? 5442
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
recheck |
Add a self-contained example under examples/optimization that demonstrates a six-stage closed loop: baseline evaluation, failure attribution, candidate optimization, gate decision and audit reporting. It ships a deterministic fake backend that needs no API key, plus an optional real backend backed by an OpenAI-compatible model. Updates trpc-group#214 RELEASE NOTES: Add an evaluation-optimization loop example under examples/optimization.
30419d5 to
ed225ce
Compare
AI Code Review我现在已经有了完整且经过验证的图景。让我完成审查。 发现的问题🚨 Critical
|
| OUTPUT = _HERE / "artifacts" | ||
|
|
||
|
|
||
| def _resolve_config_for_real(path: Path) -> str: |
There was a problem hiding this comment.
真实模式凭据泄露入仓风险
_resolve_config_for_real 用 os.path.expandvars 把 ${TRPC_AGENT_API_KEY} 等占位符展开为明文凭据写入临时文件,随后 shutil.copy 将该临时文件原样拷贝到已纳入 git 跟踪的 artifacts 目录,存在明文 API Key 误提交风险。应在拷贝前对 apiKey 脱敏,或真实模式下不拷贝配置快照。
Add a self-contained example under examples/optimization that demonstrates a six-stage closed loop: baseline evaluation, failure attribution, candidate optimization, gate decision and audit reporting. It ships a deterministic fake backend that needs no API key, plus an optional real backend backed by an OpenAI-compatible model.
Updates #214
RELEASE NOTES: Add an evaluation-optimization loop example under examples/optimization.