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
@@ -50,7 +50,7 @@ test('isStreamAuthError matches the class and name-only wrappers', () => {
|
||||
|
||||
test('concurrent 401s share a single refresh call', async () => {
|
||||
const { store } = installBrowser()
|
||||
store.weknora_refresh_token = 'rt-1'
|
||||
store.academy_refresh_token = 'rt-1'
|
||||
let calls = 0
|
||||
let release!: (value: { success: true; data: { token: string; refreshToken: string } }) => void
|
||||
const pending = new Promise<{ success: true; data: { token: string; refreshToken: string } }>(
|
||||
@@ -70,16 +70,16 @@ test('concurrent 401s share a single refresh call', async () => {
|
||||
|
||||
release({ success: true, data: { token: 'access-2', refreshToken: 'rt-2' } })
|
||||
assert.deepEqual(await Promise.all([first, second]), ['access-2', 'access-2'])
|
||||
assert.equal(store.weknora_token, 'access-2')
|
||||
assert.equal(store.weknora_refresh_token, 'rt-2')
|
||||
assert.equal(store.academy_token, 'access-2')
|
||||
assert.equal(store.academy_refresh_token, 'rt-2')
|
||||
assert.equal(calls, 1)
|
||||
})
|
||||
|
||||
test('missing refresh token clears credentials, redirects, and throws an Error', async () => {
|
||||
const { store, location } = installBrowser()
|
||||
store.weknora_token = 'expired'
|
||||
store.weknora_user = '{}'
|
||||
store.weknora_selected_tenant_id = '9'
|
||||
store.academy_token = 'expired'
|
||||
store.academy_user = '{}'
|
||||
store.academy_selected_tenant_id = '9'
|
||||
|
||||
await assert.rejects(
|
||||
() => refreshAccessTokenShared({
|
||||
@@ -90,16 +90,16 @@ test('missing refresh token clears credentials, redirects, and throws an Error',
|
||||
}),
|
||||
(err: unknown) => err instanceof Error && err.message === 'please-relogin',
|
||||
)
|
||||
assert.equal(store.weknora_token, undefined)
|
||||
assert.equal(store.weknora_selected_tenant_id, undefined)
|
||||
assert.equal(store.academy_token, undefined)
|
||||
assert.equal(store.academy_selected_tenant_id, undefined)
|
||||
assert.equal(location.href, '/login')
|
||||
})
|
||||
|
||||
test('a failed refresh clears the newly irrelevant session and redirects', async () => {
|
||||
const { store, location } = installBrowser()
|
||||
store.weknora_refresh_token = 'rt-dead'
|
||||
store.weknora_token = 'expired'
|
||||
store.weknora_selected_tenant_id = '9'
|
||||
store.academy_refresh_token = 'rt-dead'
|
||||
store.academy_token = 'expired'
|
||||
store.academy_selected_tenant_id = '9'
|
||||
|
||||
await assert.rejects(
|
||||
() => refreshAccessTokenShared({
|
||||
@@ -107,8 +107,8 @@ test('a failed refresh clears the newly irrelevant session and redirects', async
|
||||
}),
|
||||
/revoked/,
|
||||
)
|
||||
assert.equal(store.weknora_refresh_token, undefined)
|
||||
assert.equal(store.weknora_selected_tenant_id, undefined)
|
||||
assert.equal(store.academy_refresh_token, undefined)
|
||||
assert.equal(store.academy_selected_tenant_id, undefined)
|
||||
assert.equal(location.href, '/login')
|
||||
})
|
||||
|
||||
@@ -154,8 +154,8 @@ test('embed visitors are not refreshed or redirected', async () => {
|
||||
|
||||
test('a second handshake 401 after a successful refresh does not wipe tokens', async () => {
|
||||
const { store, location } = installBrowser()
|
||||
store.weknora_token = 'expired'
|
||||
store.weknora_refresh_token = 'rt-1'
|
||||
store.academy_token = 'expired'
|
||||
store.academy_refresh_token = 'rt-1'
|
||||
location.href = 'http://localhost/chat'
|
||||
|
||||
await assert.rejects(
|
||||
@@ -179,8 +179,8 @@ test('a second handshake 401 after a successful refresh does not wipe tokens', a
|
||||
}),
|
||||
(err: unknown) => err instanceof Error && err.message === 'please-relogin',
|
||||
)
|
||||
assert.equal(store.weknora_token, 'fresh')
|
||||
assert.equal(store.weknora_refresh_token, 'rt-2')
|
||||
assert.equal(store.academy_token, 'fresh')
|
||||
assert.equal(store.academy_refresh_token, 'rt-2')
|
||||
assert.equal(location.href, 'http://localhost/chat')
|
||||
})
|
||||
|
||||
@@ -203,9 +203,9 @@ test('a superseded send skips the replay', async () => {
|
||||
|
||||
test('forceReloginRedirect does not bounce embed visitors to /login', () => {
|
||||
const { store, location } = installBrowser('/embed/ch-1')
|
||||
store.weknora_token = 'jwt'
|
||||
store.academy_token = 'jwt'
|
||||
forceReloginRedirect()
|
||||
assert.equal(store.weknora_token, undefined)
|
||||
assert.equal(store.academy_token, undefined)
|
||||
assert.equal(location.href, 'http://localhost/embed/ch-1')
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user