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

+1 -1
View File
@@ -15,7 +15,7 @@ publish = false
[lib]
crate-type = ["staticlib"]
# Standalone crate: it lives inside the WeKnora tree, not the anydoc
# Standalone crate: it lives inside the Academy tree, not the anydoc
# workspace, so it takes the published crate rather than a path dependency.
# Pinned exactly: the C ABI mirrors this version's error and format enums.
[dependencies]
+10 -10
View File
@@ -2,7 +2,7 @@
Go bindings for [anydoc](https://github.com/firecrawl/anydoc), the Rust library
that converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF
documents to GitHub-Flavored Markdown. WeKnora links them through cgo so office
documents to GitHub-Flavored Markdown. Academy links them through cgo so office
documents can be parsed inside the Go process, without the Python docreader
service.
@@ -21,7 +21,7 @@ replace github.com/firecrawl/anydoc/go => ./third_party/anydoc-go
When an upstream module is published, first verify that it includes the local
safety fixes, the 0.2.x model/error additions, and the asset-link rendering API
listed below. Only then replace this directory and the `replace` directive.
WeKnora's backend calls our additional `ToDocumentWithAssetLinks` API, so the
Academy's backend calls our additional `ToDocumentWithAssetLinks` API, so the
original PR cannot replace this fork unchanged.
## Provenance
@@ -66,9 +66,9 @@ changes the document model and parsing behavior:
- 0.2.4 returns `NeedsOcr` for PDFs containing scanned pages, including mixed
PDFs that previously returned incomplete text. The Go ABI now has a distinct
`needs_ocr` error; page numbers remain in `ConvertError.Detail`. `NeedsOCR()`
lets WeKnora recognize wrapped errors without matching English messages.
lets Academy recognize wrapped errors without matching English messages.
Node/Python/CLI hosted OCR is outside the Rust crate. WeKnora continues using
Node/Python/CLI hosted OCR is outside the Rust crate. Academy continues using
its existing builtin docreader fallback and does not send documents to Firecrawl.
The PDF default engine remains builtin. See [upgrade verification and benchmarks](UPGRADE-0.2.4.md).
@@ -114,13 +114,13 @@ and spacing instead of running together, and small-caps runs merge instead of
being read as extra table columns — a spurious column reaches the model as a
misaligned markdown table.
Nothing else in the range reaches WeKnora, which is worth recording so the next
Nothing else in the range reaches Academy, which is worth recording so the next
upgrade does not go looking for it. The crate published as 0.1.8 was cut at
`pdf-inspector`'s `packages-2026-08-10` tag, one release behind 1.14.1, so 0.1.9
formally spans that release too — but its two functional commits both miss this
binding. One only touches the Node and Python surfaces. The other serves
invisible (`Tr 3`) OCR text layers instead of reporting `needs_ocr`, which
sounds like it would spare WeKnora an OCR round trip, except that it landed in
sounds like it would spare Academy an OCR round trip, except that it landed in
`extract_text_in_regions`; anydoc uses the positioned-text path, which already
retried with invisible text included. Scanned PDFs still come back as "OCR is
required" and still fall back to the docreader.
@@ -150,12 +150,12 @@ Keep this list current: it is the diff a future upgrade has to re-apply. Items
the first bounds check, turning a version mismatch into a dead process.
4. `src/lib.rs` — conversion entry points run inside `guarded()`,
which catches a panic and reports it as a malformed document. A panic
escaping an `extern "C"` function aborts the process, and WeKnora parses
escaping an `extern "C"` function aborts the process, and Academy parses
untrusted uploads in the same process that serves the API. Note the limit:
this cannot contain a stack overflow or an allocation failure, which is why
the dependency pin below matters as much as the guard.
5. Removed the upstream CLI (`cmd/anydoc`) and the binding test suite, which
reads fixtures from the anydoc repository. WeKnora's own tests live in
reads fixtures from the anydoc repository. Academy's own tests live in
`internal/infrastructure/docparser/anydoc`.
6. `scripts/build-anydoc-lib.sh` copies the pinned anydoc release to
`patched-anydoc/` (gitignored) and re-exports `document_to_markdown`, which
@@ -222,7 +222,7 @@ failing the job.
Markdown rendering drops embedded images: `ImageSource::Asset` renders as its
alt text, and the bytes are only reachable through the document model. The
renderer (`document_to_markdown`) is also crate-private. WeKnora keeps that
renderer (`document_to_markdown`) is also crate-private. Academy keeps that
serializer: `scripts/build-anydoc-lib.sh` re-exports the one function, then
`anydoc_to_markdown_with_asset_links` rewrites `Asset` images to
`ImageSource::External("images/image-N.ext")` so the official GFM output
@@ -239,7 +239,7 @@ scripts/build-anydoc-lib.sh # host platform
TARGET=aarch64-unknown-linux-musl scripts/build-anydoc-lib.sh
```
Then build WeKnora with the engine linked in:
Then build Academy with the engine linked in:
```bash
make build-anydoc # or: go build -tags anydoc ./cmd/server
+1 -1
View File
@@ -34,7 +34,7 @@
- `go test -race -tags anydoc -count=1 ./internal/infrastructure/docparser/...`:通过。Go race 检测不覆盖 Rust 内存访问。
- `go test -count=1 ./internal/infrastructure/docparser/...`:未链接引擎路径通过。
- `go vet -tags anydoc ./internal/infrastructure/docparser/...`:通过。
- `go build -tags anydoc -o /tmp/weknora-anydoc-server ./cmd/server`:完整服务编译通过。
- `go build -tags anydoc -o /tmp/academy-anydoc-server ./cmd/server`:完整服务编译通过。
- 既有 4,000 次并发错误详情、恶意 PDF 深层嵌套和 TJ lookback 回归:通过。
- `cargo audit --file third_party/anydoc-go/Cargo.lock`:无已知漏洞;保留 `ttf-parser 0.25.1` 的停止维护警告 `RUSTSEC-2026-0192`。