[app-task] feat: v0.12 控制台/调度集群化/CLI/配置占位符全面升级 - #119
Merged
Merged
Conversation
- app/agent/chat/ → app/agent/main/(包与注册名 main,/chat 路由与计费 purpose 保留) - 测试同步更名(test_main_agent_*),删除旧 chat agent 测试 - 网关 421 归类为可重试错误;LLM 空终答走重试兜底
调度器并发化与集群化(无主多实例):
- 批量认领事务(SKIP LOCKED)+ 并行派发,两级闸门(全局池/per-URL)
- dispatching 瞬态状态 + fencing token(finalize/release 按令牌栅栏)
- TTL 回收 + 心跳名册(internal/cluster)+ 死节点快速接管
- cron 延展原子化(消灭孤儿重复);批量认领按 token 回读
- 权重分摊(weight/最大存活权重);邮件队列同款认领语义
控制台与 CLI:
- Bootstrap 3.4.1 UI 体系 + CodeMirror 5 编辑器(T 字品牌标)
- at CLI(serve/info/ps/task/script/logs/email/node join)
- 集群页:名册/待接入/加入节点(预登记+指引,admin 门)
- 准入闸门 cluster.admission=pre_approved(fail-closed)
配置:
- ${VAR}/${VAR:默认} 占位符展开(对齐主 app loader)
- MySQL/Redis 连接配置补全(池/超时/TLS/PrepareStmt/慢查询)
鉴权与安全:
- API 密钥体系(service 面 X-API-Key + 控制台生成/吊销)
- APISIX app-task 路由注入 X-API-Key;中心密钥库 AES-256-GCM
- 集群信息 admin 门;node_id 字符集校验;weight 上限钳制
测试: 全套单测+并发/一致性不变量(bench 包),go test 全绿
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
app-task v0.12 全面升级(详见 CHANGELOG Unreleased 与 app-task/docs/)。
调度器并发化与集群化(无主多实例)
dispatching瞬态状态 + fencing token(finalize/release 按令牌栅栏,陈旧持有者结果按孤儿丢弃)internal/cluster)+ 死节点快速接管;cron 延展原子化;批量认领按 token 回读internal/cluster集群管理包:名册/心跳/存活/优雅注销;控制台「集群」页 +GET /api/cluster+at node lsat node join预登记 → 指引生成 → 首次心跳转正;可选pre_approvedfail-closed 准入控制台与 CLI
atCLI:serve/info/ps/task/script/logs/email/node join配置
${VAR}/${VAR:默认}占位符展开(对齐主 app loader)鉴权与安全
附带
测试
go test ./...全绿(10 包,含并发/一致性不变量测试:认领排他/栅栏 finalize/混合负载排空/邮件认领唯一/cron 原子/死节点接管)app-task/bench/(认领/竞争/排空吞吐,未随 CI 运行)Closes #无关联 issue