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
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:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
@@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/Tencent/WeKnora/cli/internal/cmdutil"
|
||||
"academy/cli/internal/cmdutil"
|
||||
)
|
||||
|
||||
// TestAllReferencedCodesAreRegistered scans cli/cmd/ for every literal use of
|
||||
|
||||
@@ -10,12 +10,12 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/Tencent/WeKnora/cli/cmd"
|
||||
"github.com/Tencent/WeKnora/cli/cmd/doctor"
|
||||
"github.com/Tencent/WeKnora/cli/internal/cmdutil"
|
||||
"github.com/Tencent/WeKnora/cli/internal/iostreams"
|
||||
"github.com/Tencent/WeKnora/cli/internal/secrets"
|
||||
sdk "github.com/Tencent/WeKnora/client"
|
||||
"academy/cli/cmd"
|
||||
"academy/cli/cmd/doctor"
|
||||
"academy/cli/internal/cmdutil"
|
||||
"academy/cli/internal/iostreams"
|
||||
"academy/cli/internal/secrets"
|
||||
sdk "academy/client"
|
||||
)
|
||||
|
||||
// TestMain pins the doctor credential-storage outcome for the whole suite.
|
||||
@@ -40,7 +40,7 @@ var update = flag.Bool("update", false, "update golden files")
|
||||
// newTestFactory builds a Factory whose Client returns mockClient.
|
||||
// Caller must NOT use t.Parallel() - see iostreams.SetForTest contract.
|
||||
//
|
||||
// WEKNORA_BASE_URL is set when mockServer is non-nil. buildClient does not
|
||||
// ACADEMY_BASE_URL is set when mockServer is non-nil. buildClient does not
|
||||
// currently honor this env var (it reads from config.Host); commands that
|
||||
// need the mock URL rely on the mockClient injection above. The env is set
|
||||
// anyway for any direct net/http callers (e.g. doctor's HEAD /health).
|
||||
@@ -49,7 +49,7 @@ func newTestFactory(t *testing.T, mockServer *httptest.Server, mockClient *sdk.C
|
||||
t.Setenv("XDG_CONFIG_HOME", t.TempDir())
|
||||
t.Setenv("XDG_CACHE_HOME", t.TempDir())
|
||||
if mockServer != nil {
|
||||
t.Setenv("WEKNORA_BASE_URL", mockServer.URL)
|
||||
t.Setenv("ACADEMY_BASE_URL", mockServer.URL)
|
||||
}
|
||||
f := cmdutil.New()
|
||||
if mockClient != nil {
|
||||
|
||||
@@ -40,8 +40,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/Tencent/WeKnora/cli/internal/config"
|
||||
sdk "github.com/Tencent/WeKnora/client"
|
||||
"academy/cli/internal/config"
|
||||
sdk "academy/client"
|
||||
)
|
||||
|
||||
// wireCase declares one row in the contract matrix. Optional fields:
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
// Sub-packages:
|
||||
//
|
||||
// contract/ - envelope JSON shape golden + error.code registry consistency
|
||||
// e2e/ - real WeKnora server blackbox tests (testscript-style)
|
||||
// e2e/ - real Academy server blackbox tests (testscript-style)
|
||||
package acceptance
|
||||
@@ -1,6 +1,6 @@
|
||||
//go:build acceptance_e2e
|
||||
|
||||
// Package e2e_test drives the WeKnora CLI binary against a real running
|
||||
// Package e2e_test drives the Academy CLI binary against a real running
|
||||
// server to validate the RAG closing loop end-to-end.
|
||||
//
|
||||
// Build tag isolation: //go:build acceptance_e2e excludes this file from
|
||||
@@ -8,11 +8,11 @@
|
||||
// requested. To run:
|
||||
//
|
||||
// cd cli
|
||||
// WEKNORA_E2E_HOST=https://kb.example.com \
|
||||
// WEKNORA_E2E_TOKEN=eyJhbGc... \
|
||||
// ACADEMY_E2E_HOST=https://kb.example.com \
|
||||
// ACADEMY_E2E_TOKEN=eyJhbGc... \
|
||||
// go test -tags=acceptance_e2e -v ./acceptance/e2e/...
|
||||
//
|
||||
// Optional WEKNORA_E2E_KB_NAME_PREFIX customizes the throwaway KB name (default
|
||||
// Optional ACADEMY_E2E_KB_NAME_PREFIX customizes the throwaway KB name (default
|
||||
// "cli-e2e-"). Cleanup runs even on test failure via t.Cleanup so the server
|
||||
// doesn't accumulate test debris.
|
||||
package e2e_test
|
||||
@@ -34,14 +34,14 @@ import (
|
||||
// step parses the CLI's bare JSON to extract IDs for the next step -
|
||||
// validating both functional behavior and wire-contract stability.
|
||||
func TestRAGFullLoop(t *testing.T) {
|
||||
host := mustEnv(t, "WEKNORA_E2E_HOST")
|
||||
token := mustEnv(t, "WEKNORA_E2E_TOKEN")
|
||||
prefix := envOr("WEKNORA_E2E_KB_NAME_PREFIX", "cli-e2e-")
|
||||
host := mustEnv(t, "ACADEMY_E2E_HOST")
|
||||
token := mustEnv(t, "ACADEMY_E2E_TOKEN")
|
||||
prefix := envOr("ACADEMY_E2E_KB_NAME_PREFIX", "cli-e2e-")
|
||||
|
||||
bin := buildBinary(t)
|
||||
xdg := t.TempDir()
|
||||
|
||||
// Inject host + token as WEKNORA_HOST / WEKNORA_TOKEN env vars. The
|
||||
// Inject host + token as ACADEMY_HOST / ACADEMY_TOKEN env vars. The
|
||||
// CLI's env-credential path (buildClientFromEnv) takes precedence
|
||||
// over profile config, so this bypasses the secrets-store dance
|
||||
// entirely — no keychain access, no file:// ref plumbing. This is
|
||||
@@ -49,18 +49,18 @@ func TestRAGFullLoop(t *testing.T) {
|
||||
env := append(os.Environ(),
|
||||
"XDG_CONFIG_HOME="+xdg,
|
||||
"XDG_CACHE_HOME="+filepath.Join(xdg, "cache"),
|
||||
"WEKNORA_HOST="+host,
|
||||
"WEKNORA_TOKEN="+token,
|
||||
"ACADEMY_HOST="+host,
|
||||
"ACADEMY_TOKEN="+token,
|
||||
// SDK debug off - explicit so the CI run isn't noisy.
|
||||
"WEKNORA_LOG_LEVEL=error",
|
||||
"ACADEMY_LOG_LEVEL=error",
|
||||
)
|
||||
|
||||
// 1. kb create → KnowledgeBase object (envelope-wrapped: {ok, data})
|
||||
// The CLI now requires explicit model binding so uploaded docs are
|
||||
// immediately searchable. Use the server's builtin model IDs (they
|
||||
// exist on every deployment that configures builtin_models.yaml).
|
||||
embeddingModel := envOr("WEKNORA_E2E_EMBEDDING_MODEL", "Qwen/Qwen3-Embedding-8B")
|
||||
chatModel := envOr("WEKNORA_E2E_CHAT_MODEL", "deepseek-ai/DeepSeek-V3.2")
|
||||
embeddingModel := envOr("ACADEMY_E2E_EMBEDDING_MODEL", "Qwen/Qwen3-Embedding-8B")
|
||||
chatModel := envOr("ACADEMY_E2E_CHAT_MODEL", "deepseek-ai/DeepSeek-V3.2")
|
||||
kbName := prefix + fmt.Sprintf("%d", time.Now().UnixNano())
|
||||
var created struct {
|
||||
OK bool `json:"ok"`
|
||||
@@ -174,7 +174,7 @@ func envOr(key, fallback string) string {
|
||||
func buildBinary(t *testing.T) string {
|
||||
t.Helper()
|
||||
dir := t.TempDir()
|
||||
out := filepath.Join(dir, "weknora")
|
||||
out := filepath.Join(dir, "academy")
|
||||
// Repo layout: this test sits at cli/acceptance/e2e/, so cli/ is two levels up.
|
||||
cmd := exec.Command("go", "build", "-o", out, ".")
|
||||
cmd.Dir = filepath.Join("..", "..")
|
||||
@@ -191,13 +191,13 @@ func buildBinary(t *testing.T) string {
|
||||
// window.
|
||||
func writeSampleDoc(t *testing.T) string {
|
||||
t.Helper()
|
||||
content := `WeKnora E2E Sample Document
|
||||
content := `Academy E2E Sample Document
|
||||
|
||||
This sample document is used by the WeKnora CLI acceptance test suite to
|
||||
This sample document is used by the Academy CLI acceptance test suite to
|
||||
validate the end-to-end retrieval-augmented generation pipeline.
|
||||
|
||||
向量检索的核心思想是把文本通过 embedding 模型映射到高维向量空间,然后通过余弦相似度
|
||||
等度量找出语义最接近的内容片段。WeKnora 支持 vector + keyword 的混合检索模式。
|
||||
等度量找出语义最接近的内容片段。Academy 支持 vector + keyword 的混合检索模式。
|
||||
|
||||
The hybrid search mode combines vector similarity (semantic) with keyword
|
||||
matching (lexical) to balance recall and precision.
|
||||
@@ -211,7 +211,7 @@ matching (lexical) to balance recall and precision.
|
||||
}
|
||||
|
||||
// waitDocReady polls `doc list` until the uploaded document's status indicates
|
||||
// indexing is complete. WeKnora server uses a few status values across versions
|
||||
// indexing is complete. Academy server uses a few status values across versions
|
||||
// ("ready", "completed", "ok") - accept any non-pending/non-processing/non-failed
|
||||
// state so we don't break on a server-side rename. Failed status fails the test
|
||||
// fast.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"ok":true,"data":{"summary":{"all_passed":false,"passed":1,"failed":1,"skipped":2},"checks":[{"name":"base_url_reachable","status":"fail","details":"server returned 500","hint":"verify the host configured for the active profile (run `weknora profile list` / `weknora profile add <n> --host=...`) and network reachability"},{"name":"auth_credential","status":"skip","details":"prereq failed: base_url_reachable"},{"name":"server_version","status":"skip","details":"prereq failed: auth_credential"},{"name":"credential_storage","status":"ok","details":"keyring or file storage available"}]}}
|
||||
{"ok":true,"data":{"summary":{"all_passed":false,"passed":1,"failed":1,"skipped":2},"checks":[{"name":"base_url_reachable","status":"fail","details":"server returned 500","hint":"verify the host configured for the active profile (run `academy profile list` / `academy profile add <n> --host=...`) and network reachability"},{"name":"auth_credential","status":"skip","details":"prereq failed: base_url_reachable"},{"name":"server_version","status":"skip","details":"prereq failed: auth_credential"},{"name":"credential_storage","status":"ok","details":"keyring or file storage available"}]}}
|
||||
Reference in new issue
Block a user