Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

ci(frontend): remove docs terminology coupling

wizardchen2611babfef14
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml
index 0b04ec961..14df10f21 100644
--- a/.github/workflows/frontend.yml
+++ b/.github/workflows/frontend.yml
@@ -6,24 +6,11 @@ on:
paths:
- "frontend/**"
- "scripts/build_frontend_dist.sh"
- # The frontend terminology regression test also scans these public docs.
- - ".env.example"
- - "README_CN.md"
- - "client/**"
- - "docker-compose.yml"
- - "docs/**"
- - "mcp-server/**"
- ".github/workflows/frontend.yml"
pull_request:
paths:
- "frontend/**"
- "scripts/build_frontend_dist.sh"
- - ".env.example"
- - "README_CN.md"
- - "client/**"
- - "docker-compose.yml"
- - "docs/**"
- - "mcp-server/**"
- ".github/workflows/frontend.yml"
workflow_dispatch:
diff --git a/frontend/src/i18n/locales/workspaceTerminology.test.ts b/frontend/src/i18n/locales/workspaceTerminology.test.ts
index 492930f71..ecc7ddf45 100644
--- a/frontend/src/i18n/locales/workspaceTerminology.test.ts
+++ b/frontend/src/i18n/locales/workspaceTerminology.test.ts
@@ -1,8 +1,5 @@
import assert from 'node:assert/strict'
-import { readdirSync, readFileSync } from 'node:fs'
-import { dirname, extname, resolve } from 'node:path'
import test from 'node:test'
-import { fileURLToPath } from 'node:url'
import enUS from './en-US.ts'
import koKR from './ko-KR.ts'
@@ -41,26 +38,6 @@ const localeChecks = [
{ name: 'ru-RU', locale: ruRU, forbidden: /(?:тенант|арендатор)/i },
]
-const repositoryRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../../..')
-const publicDocumentationRoots = [
- '.env.example',
- 'README_CN.md',
- 'client',
- 'docker-compose.yml',
- 'docs',
- 'mcp-server',
-]
-const documentationExtensions = new Set(['.go', '.json', '.md', '.yaml', '.yml'])
-
-function collectDocumentationFiles(path: string): string[] {
- const entries = readdirSync(path, { withFileTypes: true })
- return entries.flatMap((entry) => {
- const child = resolve(path, entry.name)
- if (entry.isDirectory()) return collectDocumentationFiles(child)
- return documentationExtensions.has(extname(entry.name)) ? [child] : []
- })
-}
-
test('user-facing locale values use workspace terminology', () => {
for (const check of localeChecks) {
const legacyValues = collectStrings(check.locale)
@@ -74,21 +51,3 @@ test('user-facing locale values use workspace terminology', () => {
)
}
})
-
-test('public documentation uses workspace terminology', () => {
- const legacyLines = publicDocumentationRoots.flatMap((relativePath) => {
- const absolutePath = resolve(repositoryRoot, relativePath)
- const files = extname(absolutePath) ? [absolutePath] : collectDocumentationFiles(absolutePath)
- return files.flatMap((file) =>
- readFileSync(file, 'utf8')
- .split('\n')
- .flatMap((line, index) =>
- line.includes('租户')
- ? [`${file.slice(repositoryRoot.length + 1)}:${index + 1}=${line.trim()}`]
- : [],
- ),
- )
- })
-
- assert.deepEqual(legacyLines, [], 'public documentation still contains legacy tenant terminology')
-})