refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s

- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名)
- 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块)
- docreader proto 描述符采用等长替换,保持序列化字节布局有效
- Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像
- 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
runny committed 2026-11-13 20:52:51 +08:00
1 parent 9097ee699d
commit 9058149576
3136 files changed
+18018 -18004

No files matched your search

+18 -18
View File
@@ -35,9 +35,9 @@ import (
"github.com/moby/moby/client"
"github.com/redis/go-redis/v9"
"github.com/Tencent/WeKnora/internal/sandbox/admission"
"github.com/Tencent/WeKnora/internal/sandbox/allocation"
"github.com/Tencent/WeKnora/internal/types"
"academy/internal/sandbox/admission"
"academy/internal/sandbox/allocation"
"academy/internal/types"
)
const dockerIntegrationTenantID = 1
@@ -66,7 +66,7 @@ func newDockerIntegrationManager(t *testing.T, cfg *Config) *SessionBoundManager
probeCtx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
defer cancel()
if err := client.Health(probeCtx); err != nil {
if os.Getenv("WEKNORA_REQUIRE_INTEGRATION") == "1" {
if os.Getenv("ACADEMY_REQUIRE_INTEGRATION") == "1" {
t.Fatalf("docker daemon unreachable: %v", err)
}
t.Skipf("docker daemon unreachable: %v", err)
@@ -592,7 +592,7 @@ func TestDockerSkillSnapshotIntegration(t *testing.T) {
probeCtx, cancelProbe := context.WithTimeout(context.Background(), 15*time.Second)
defer cancelProbe()
if err := client.Health(probeCtx); err != nil {
if os.Getenv("WEKNORA_REQUIRE_INTEGRATION") == "1" {
if os.Getenv("ACADEMY_REQUIRE_INTEGRATION") == "1" {
t.Fatalf("docker daemon unreachable: %v", err)
}
t.Skipf("docker daemon unreachable: %v", err)
@@ -609,7 +609,7 @@ func TestDockerSkillSnapshotIntegration(t *testing.T) {
builder, err := client.Create(ctx, RemoteCreateRequest{
TemplateID: cfg.DockerImage,
Metadata: map[string]string{"weknora.test": "skill-snapshot"},
Metadata: map[string]string{"academy.test": "skill-snapshot"},
})
if err != nil {
t.Fatalf("Create builder: %v", err)
@@ -636,7 +636,7 @@ func TestDockerSkillSnapshotIntegration(t *testing.T) {
t.Fatalf("seed skill tree: err=%v result=%#v", err, seed)
}
ref, err := client.CreateSnapshot(ctx, builder.ID(), "weknora-sk-itest-g1")
ref, err := client.CreateSnapshot(ctx, builder.ID(), "academy-sk-itest-g1")
if err != nil {
t.Fatalf("CreateSnapshot: %v", err)
}
@@ -655,7 +655,7 @@ func TestDockerSkillSnapshotIntegration(t *testing.T) {
booted, err := client.Create(ctx, RemoteCreateRequest{
TemplateID: ref.ID,
Metadata: map[string]string{"weknora.test": "skill-snapshot-boot"},
Metadata: map[string]string{"academy.test": "skill-snapshot-boot"},
})
if err != nil {
t.Fatalf("Create from snapshot: %v", err)
@@ -892,7 +892,7 @@ func TestDockerBackendTerminalCloseTerminatesShellIntegration(t *testing.T) {
// Record the shell PID and start a long foreground job with a unique
// marker so the probe can find the job without matching itself.
if err := session.Write(ctx, []byte("echo $$ > /tmp/weknora-close.pid\n")); err != nil {
if err := session.Write(ctx, []byte("echo $$ > /tmp/academy-close.pid\n")); err != nil {
t.Fatalf("write pid: %v", err)
}
// A job the user detached on purpose must outlive the hangup, as it would
@@ -909,7 +909,7 @@ func TestDockerBackendTerminalCloseTerminatesShellIntegration(t *testing.T) {
var shellPID string
for deadline := time.Now().Add(15 * time.Second); time.Now().Before(deadline); {
shellPID = strings.TrimSpace(terminalProbeOutput(
t, ctx, executor, sessionID, "cat /tmp/weknora-close.pid 2>/dev/null || true"))
t, ctx, executor, sessionID, "cat /tmp/academy-close.pid 2>/dev/null || true"))
if shellPID != "" && terminalProbeJobAlive(t, ctx, executor, sessionID, "sleep 3611") {
break
}
@@ -998,7 +998,7 @@ func TestDockerBackendTerminalContextCancelTerminatesShellIntegration(t *testing
}
}()
if err := session.Write(sessionCtx, []byte("echo $$ > /tmp/weknora-cancel.pid\n")); err != nil {
if err := session.Write(sessionCtx, []byte("echo $$ > /tmp/academy-cancel.pid\n")); err != nil {
t.Fatalf("write pid: %v", err)
}
if err := session.Write(sessionCtx, []byte("sleep 3613\n")); err != nil {
@@ -1008,7 +1008,7 @@ func TestDockerBackendTerminalContextCancelTerminatesShellIntegration(t *testing
var shellPID string
for deadline := time.Now().Add(15 * time.Second); time.Now().Before(deadline); {
shellPID = strings.TrimSpace(terminalProbeOutput(
t, probeCtx, executor, sessionID, "cat /tmp/weknora-cancel.pid 2>/dev/null || true"))
t, probeCtx, executor, sessionID, "cat /tmp/academy-cancel.pid 2>/dev/null || true"))
if shellPID != "" && terminalProbeJobAlive(t, probeCtx, executor, sessionID, "sleep 3613") {
break
}
@@ -1093,8 +1093,8 @@ func dockerCheckpointScript(l WorkspaceLayout, messageID string) string {
git_ws rev-parse --git-dir >/dev/null 2>&1 || {
mkdir -p "$(dirname "$GIT_DIR")"
git_ws init -q
git_ws config user.email agent@weknora.local
git_ws config user.name 'WeKnora Agent'
git_ws config user.email agent@academy.local
git_ws config user.name 'Academy Agent'
}
git_ws add -A
git_ws commit -q --allow-empty -m 'turn:%s'
@@ -1158,7 +1158,7 @@ func requireDockerContainerGone(t *testing.T, ctx context.Context, id string) {
func TestDockerUserMachineSharesContainerAndIsolatesDirectories(t *testing.T) {
cfg := dockerIntegrationConfig(t)
redisAddr := integrationEnv(t, "WEKNORA_TEST_REDIS_ADDR")
redisAddr := integrationEnv(t, "ACADEMY_TEST_REDIS_ADDR")
remote, err := NewDockerRemoteClient(cfg)
if err != nil {
t.Fatalf("build docker client: %v", err)
@@ -1167,14 +1167,14 @@ func TestDockerUserMachineSharesContainerAndIsolatesDirectories(t *testing.T) {
probeCtx, cancelProbe := context.WithTimeout(context.Background(), 15*time.Second)
defer cancelProbe()
if err := remote.Health(probeCtx); err != nil {
if os.Getenv("WEKNORA_REQUIRE_INTEGRATION") == "1" {
if os.Getenv("ACADEMY_REQUIRE_INTEGRATION") == "1" {
t.Fatalf("docker daemon unreachable: %v", err)
}
t.Skipf("docker daemon unreachable: %v", err)
}
sessionA, sessionB, sessionC := uuid.NewString(), uuid.NewString(), uuid.NewString()
ns := "weknora-it-" + uuid.NewString()[:8]
ns := "academy-it-" + uuid.NewString()[:8]
rc := redis.NewClient(&redis.Options{Addr: redisAddr})
t.Cleanup(func() { _ = rc.Close() })
store, err := NewRedisSessionSandboxBindingStore(rc, ns)
@@ -1188,7 +1188,7 @@ func TestDockerUserMachineSharesContainerAndIsolatesDirectories(t *testing.T) {
Config: cfg, Client: remote, Store: store,
Checker: PermissiveSessionExistenceChecker{}, SkipHealthProbe: true,
ConfigID: "docker-conformance", ConfigTenantID: dockerIntegrationTenantID,
Allocations: allocs, Admission: admission.NewRedis(rc, "weknora:sandbox:user:"),
Allocations: allocs, Admission: admission.NewRedis(rc, "academy:sandbox:user:"),
Namespace: ns,
})
if err != nil {