Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ The product must be install-and-run and must not require users to configure Pyth
## Engine Test Selection Rules
- `npm run test:engine` and `npm run test:engine:fast` are the default day-to-day Python engine checks. Future AI should assume this fast suite is the minimum required validation for engine changes unless the heavier rules below apply.
- Run the fast suite after changes to normal engine/domain logic such as ingestion, dictionaries, workflow compilation, project storage, result shaping, or other Python behavior that does not change bundled sample bootstrapping or packaging.
- Run `npm run test:engine:full` when touching any first-run sample bootstrap, builtin sample generation, bundled sample workspace logic, public sample cache packaging, Python sidecar build scripts, or project flows that implicitly depend on seeded official samples.
- In practice, `test:engine:full` is required whenever changes touch files such as `services/python-engine/app/sample_projects.py`, `services/python-engine/app/bundled_sample_workspace.py`, `services/python-engine/app/cli.py` bootstrap paths, `services/python-engine/app/sample_dataset_*`, `scripts/build-bundled-sample-workspace.ps1`, `scripts/build-python-sidecar.ps1`, or tests marked `engine_full`.
- Run `npm run test:engine:full` when touching any first-run sample bootstrap, builtin sample generation, bundled sample workspace logic, seed-source handling, Python sidecar build scripts, or project flows that implicitly depend on seeded official samples.
- In practice, `test:engine:full` is required whenever changes touch files such as `services/python-engine/app/samples/projects.py`, `services/python-engine/app/samples/bundled_workspace.py`, `services/python-engine/app/samples/seed_sources.py`, `services/python-engine/app/api/actions/support.py` bootstrap paths, `scripts/build-bundled-sample-workspace.ps1`, `scripts/build-python-sidecar.ps1`, or tests marked `engine_full`.
- `test:engine:full` is also required for changes to export/import/template flows that may trigger seeded sample bootstrap or reuse packaged sample projects during validation.
- Frontend-only changes, docs-only changes, or styling changes do not require engine tests unless they also alter Python-facing contracts or packaged sample behavior.
- If there is doubt, run `npm run test:engine:full` before shipping or packaging.
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
### Performance

- Split Python engine verification into a default `test:engine` fast tier and a heavier `test:engine:full` tier so day-to-day changes do not always pay for bundled sample integration coverage.
- Moved the nine official sample projects to a build-time bundled workspace template that ships inside the Python sidecar, avoiding first-run live generation for empty workspaces.
- Moved the three official revised-flow sample projects to a build-time bundled workspace template that ships inside the Python sidecar, avoiding first-run live generation for empty workspaces.

### Fixes

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ TextFlow Studio 是一个桌面优先的本地文本预处理与基础文本挖

最新对外版本:

- [GitHub Release v0.1.1](https://github.com/tylevnovik/TextFlow/releases/tag/v0.1.1)
- [GitHub Release v0.2.0](https://github.com/tylevnovik/TextFlow/releases/tag/v0.2.0)

## 技术栈

Expand Down
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,16 @@
开发环境、脚本、测试、打包、压测入口。
- [示例项目说明](./sample-projects.md)
首次启动从安装包内置模板恢复的 3 个官方 revised-flow 样例及用途。
- [内置场景样例](./examples.md)
官方样例矩阵、seed 授权、存储形态和使用提醒。
- [大规模压测记录](./benchmark.md)
当前仓库保留的万条级工作流压测数据与性能边界。
- [技术全景与架构设计](./technical-overview.md)
当前技术栈、前后端边界、节点 catalog、测试覆盖和已知差距的全景说明。
- [节点 Catalog Schema](./node-catalog-schema.md)
后端驱动节点 definition、UI schema、slot 白名单和插件示例。
- [ADR](./adr/)
架构决策记录,说明重要迁移和边界选择的背景。
- [插件节点说明](../plugins/nodes/README.md)
本地纯 Python 节点插件的加载方式、注册接口和当前运行边界。

Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Tauri 不直接嵌入 Python 逻辑,而是通过 sidecar 暴露的本地 FastA
节点注册分为两层,但入口形状保持一致:

- 内置节点:`services/python-engine/app/workflow/nodes/*.py`
- 外部插件节点:仓库根目录 `plugins/nodes`、打包 sidecar 同级 `plugins/nodes`、`TEXTFLOW_NODE_PLUGIN_DIR`
- 外部插件节点:`TEXTFLOW_NODE_PLUGIN_DIR`、仓库根目录 `plugins/nodes`、打包 sidecar 同级 `plugins/nodes`

内置节点模块可以暴露:

Expand All @@ -238,7 +238,7 @@ Tauri 不直接嵌入 Python 逻辑,而是通过 sidecar 暴露的本地 FastA
- `register_nodes(builder, runtime_profile?)`
- `register(builder, runtime_profile?)`

每个内置节点文件应同时拥有节点级 definition、compiler、executor 和注册函数。definition 必须包含 `graph` 与 `ui`,并通过 `app/workflow/schema.py` 校验。节点可以调用 `analysis`、`storage`、`reporting` 或 `workflow/executors/support.py` 里的共享算法/工具,但不应再要求开发者为了修改同一个节点而同时改多个前后端 schema 文件。
每个内置节点文件应同时拥有节点级 definition、compiler、executor 和注册函数。definition 必须包含 `graph` 与 `ui`,并通过 `app/workflow/schema.py` 校验。节点可以调用 `analysis`、`storage`、`reporting`、`workflow/runtime` 或 `workflow/nodes/_support.py` 里的共享算法/工具,但不应再要求开发者为了修改同一个节点而同时改多个前后端 schema 文件。

外部插件节点继续使用同样的 `register_nodes` / `register` 入口。registry 会先扫描内置节点目录,再加载外部插件;插件 definition 使用同一套校验器。无效插件节点会被跳过,错误通过 `plugin_errors` 返回,不影响内置节点和其他插件节点。所有内置节点都已经迁移到 `app/workflow/nodes`,旧的全局 compiler/executor map 不再参与节点注册。

Expand Down
4 changes: 2 additions & 2 deletions docs/current-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ Phase 4 已开始把旧 `WorkflowEditorPage` 迁移为节点图默认主工作
截至 `2026-05-26`,本地与 CI 验证结果如下:

- `npm run lint` 通过
- `npm run test --workspace apps/desktop` 通过(56 个测试全部通过)
- `npm run test --workspace apps/desktop` 通过
- `npm run build` 通过
- `npm run test:engine` (或 `test:engine:fast`) 通过(154 个测试全部通过)
- `npm run test:engine` (或 `test:engine:fast`) 通过
- `npm run test:engine:full` 通过
- `powershell -ExecutionPolicy Bypass -File .\scripts\build-python-sidecar.ps1` 通过
- `npm run tauri:build --workspace apps/desktop` 通过,且 GitHub Actions 自动化 CI 和 Release 打包工作流正常运行
Expand Down
6 changes: 3 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ powershell -ExecutionPolicy Bypass -File .\scripts\test-engine.ps1 -Suite full
- 只改前端、样式或文档:通常不需要 Python 引擎测试;至少按改动范围跑 `npm run lint`,触及组件行为时补跑 `npm run test --workspace apps/desktop`。
- 改普通引擎逻辑但不涉及官方样例打包/引导:跑 `npm run test:engine`。
- 改工作区首次启动、官方样例、样例 seed gate、sidecar 打包脚本、导出会触发样例运行的链路:跑 `npm run test:engine:full`。
- 如果改动同时碰到 `services/python-engine/app/sample_projects.py`、`services/python-engine/app/bundled_sample_workspace.py`、`services/python-engine/app/cli.py` 的 bootstrap 路径、`scripts/build-bundled-sample-workspace.ps1` 或 `scripts/build-python-sidecar.ps1`,直接视为 `full`。
- 如果改动同时碰到 `services/python-engine/app/samples/projects.py`、`services/python-engine/app/samples/bundled_workspace.py`、`services/python-engine/app/samples/seed_sources.py`、`services/python-engine/app/api/actions/support.py` 的 bootstrap 路径、`scripts/build-bundled-sample-workspace.ps1` 或 `scripts/build-python-sidecar.ps1`,直接视为 `full`。
- 发布前或对测试层级有疑问时,补跑 `npm run test:engine:full`。

### 缩小官方样例规模用于测试
Expand Down Expand Up @@ -331,9 +331,9 @@ powershell -ExecutionPolicy Bypass -File .\scripts\run-large-benchmark.ps1 --lim
截至 `2026-05-26`,本地与 CI 验证情况如下:

- `npm run lint` 通过
- `npm run test --workspace apps/desktop` 通过(56 个测试全部通过)
- `npm run test --workspace apps/desktop` 通过
- `npm run build` 通过
- `npm run test:engine` (或 `test:engine:fast`) 通过(154 个测试全部通过)
- `npm run test:engine` (或 `test:engine:fast`) 通过
- `npm run test:engine:full` 通过
- `powershell -ExecutionPolicy Bypass -File .\scripts\build-python-sidecar.ps1` 通过
- `npm run tauri:build --workspace apps/desktop` 通过,且 GitHub Actions 自动化 CI 和 Release 打包工作流正常运行
Expand Down
Loading
Loading