[feat][backend] code evaluator#220
Conversation
(LogID: 202510101913360100911101348473F04) Co-Authored-By: Coda <coda@bytedance.com>
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## release/v1.4.0 #220 +/- ##
=================================================
Coverage ? 64.27%
=================================================
Files ? 507
Lines ? 56715
Branches ? 0
=================================================
Hits ? 36451
Misses ? 17745
Partials ? 2519
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
(LogID: 202510111803140100911101340639242) Co-Authored-By: Coda <coda@bytedance.com>
…rectory - Enhanced runtime package test coverage from 41.3% to 86.1% - Added comprehensive tests for RuntimeFactory, RuntimeManager, HTTPFaaSRuntimeAdapter - Extended PythonRuntime and JavaScriptRuntime testing with return_val functions - Added concurrent access testing and error handling verification - Implemented mock-based testing patterns following existing code style
- 移除测试文件中的多余空行 - 修复代码缩进不一致问题 - 使用go fmt格式化代码 这些修改仅涉及格式问题,未更改任何业务逻辑。
- 格式化运行时相关文件 - 修复代码缩进和空白字符问题 - 保持业务逻辑不变
- Fixed unchecked error returns in http_faas_runtime.go - Added safe env var helper functions in runtime_test.go - Removed unnecessary type conversions in evaluator.go - All packages now pass golangci-lint checks
…nto feat/open-code-eval
- Added missing Apache-2.0 license headers to 53 frontend TypeScript/TSX files - Fixed 48 files automatically using license-eye tool - Manually added headers to 5 .less files that weren't auto-fixable - All files now pass license header validation
This reverts commit 2cee2c1.
- 统一docker和k8s版本的响应格式 - 实现Pyodide预加载机制,使用vendor离线依赖 - 优化进程池管理,支持预创建进程 - 改进代码执行逻辑,使用临时文件避免转义问题 - 添加完整的错误处理和日志记录 - 支持return_val函数和多种返回值格式提取 - 删除ModelConfig配置
777a25a to
4879e6e
Compare
release/deployment/docker-compose/bootstrap/js-faas/entrypoint.sh
Outdated
Show resolved
Hide resolved
release/deployment/docker-compose/bootstrap/js-faas/entrypoint.sh
Outdated
Show resolved
Hide resolved
release/deployment/docker-compose/bootstrap/python-faas/Dockerfile
Outdated
Show resolved
Hide resolved
release/deployment/docker-compose/bootstrap/python-faas/Dockerfile
Outdated
Show resolved
Hide resolved
CozeLoop
left a comment
There was a problem hiding this comment.
Summary:
- Must-Fix: JS return_val is not captured by the current JS FaaS wrapper because it logs a raw string. Please emit a single JSON line (e.g.,
console.log(JSON.stringify({ret_val}))) so the server can parse it, or add an explicit marker protocol. - Should-Fix: Provide fail-open defaults for COZE_LOOP_JS_FAAS_URL and COZE_LOOP_PYTHON_FAAS_URL to improve robustness across dev/test environments.
- Suggestion: Use
normalizeLanguage(language)in the HTTP adapter, and include TypeScript aliases (ts/typescript) in config key normalization.
These changes will restore functional correctness for JS evaluators, reduce configuration friction, and make the runtime adapter more resilient.
CozeLoop
left a comment
There was a problem hiding this comment.
Aime CR summary: Backend runtime integration (factory/manager + HTTP FaaS adapter) is correct and concurrency-safe. ValidateEvaluator handler correctly restores service invocation. Config decoding and language normalization look good. No Must-Fix or Should-Fix issues found on backend Go changes. A few non-blocking suggestions: centralize default FaaS BaseURL config, remove unused basicSyntaxValidation or wire it into ValidateCode, and consider unifying logs to English for consistency. Full report is available in Feishu: https://bytedance.larkoffice.com/docx/RbfJdgpZsoqiBhxJ6epcqYWXnQf
release/deployment/helm-chart/charts/app/templates/deployment.yaml
Outdated
Show resolved
Hide resolved
release/deployment/helm-chart/charts/js-faas/bootstrap/entrypoint.sh
Outdated
Show resolved
Hide resolved
release/deployment/helm-chart/charts/python-faas/bootstrap/entrypoint.sh
Outdated
Show resolved
Hide resolved
release/deployment/helm-chart/charts/python-faas/templates/deployment.yaml
Show resolved
Hide resolved
release/deployment/helm-chart/umbrella/examples/minikube/bundle.values.yaml
Show resolved
Hide resolved
…nto feat/open-code-eval
…nto feat/open-code-eval
* fix(observability): chart cfg * [feat][backend] code evaluator (#220) --------- Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: wuwenqi <wuwenqi.depp@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com> * feat(all): release v1.4.0 --------- Co-authored-by: tpfz <155960978+tpfz@users.noreply.github.com> Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: wuwenqi <wuwenqi.depp@bytedance.com>
* feat: code evaluator --------- Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: wuwenqi <wuwenqi.depp@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com>
* [feat][backend] code evaluator (#220) * feat: code evaluator --------- Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: wuwenqi <wuwenqi.depp@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com> * fix: 补充路由 * fix: 评估器创建参数模型初始化 * fix: 隐藏筛选入口 * fix: 实验创建问题修复 * fix: 评估器问题修复 * fix: 回退配置文件 * fix: 回退配置文件 --------- Co-authored-by: tpfz <155960978+tpfz@users.noreply.github.com> Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com>
* [feat][backend] code evaluator (#220) * feat: code evaluator --------- Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: wuwenqi <wuwenqi.depp@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com> * fix: 补充路由 * fix: 评估器创建参数模型初始化 * fix: 隐藏筛选入口 * fix: 实验创建问题修复 * fix: 评估器问题修复 * fix: 回退配置文件 * fix: 回退配置文件 --------- Co-authored-by: tpfz <155960978+tpfz@users.noreply.github.com> Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com>
* [feat][backend] code evaluator (#220) * feat: code evaluator --------- * fix: 补充路由 * fix: 评估器创建参数模型初始化 * fix: 隐藏筛选入口 * fix: 实验创建问题修复 * fix: 评估器问题修复 * fix: 回退配置文件 * fix: 回退配置文件 --------- Co-authored-by: tpfz <155960978+tpfz@users.noreply.github.com> Co-authored-by: Coda <coda@bytedance.com> Co-authored-by: liushengyang <liushengyang@bytedance.com>
What type of PR is this?
Check the PR title.
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
zh(optional):
(Optional) Which issue(s) this PR fixes: