发布 TraceFetch 1.0.0:统一 Agent 搜索产品 - #1
Merged
Merged
Conversation
estelledc
marked this pull request as ready for review
July 24, 2026 08:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What\n\n- 发布 TraceFetch 1.0.0:统一本地、公开网络与显式 Provider 搜索入口\n- 默认输出稳定的 Agent JSON 契约,并保留 0.1 兼容调用\n- 增加受限命令 Provider 协议、敏感范围 fail-closed 约束与 JSON Schema\n- 增加版本一致性检查、构建验证及 GitHub Release 工作流\n- 移除对 intern-journal 的产品级耦合,改为通用 workspace 示例\n\n## Why\n\nTraceFetch 需要从仓库内实验升级为可独立安装、可验证、可被其他 Agent 项目复用的搜索产品。\n\n## Impact and risk\n\n- 默认搜索仅访问本地 workspace;公开网络必须显式选择 scope\n- account/internal Provider 必须显式授权,internal scope 必须隔离运行\n- Provider 使用固定 argv 与 stdin/stdout JSON,不经过 shell\n- 1.0.0 首发范围是 GitHub Release;本 PR 不声明 PyPI 发布、SLA 或全网覆盖\n\n## Checks\n\n- 全新克隆:uv lock --check
uv run --locked ruff format --check .
53 files already formatted
uv run --locked ruff check .
All checks passed!
uv run --locked mypy src
Success: no issues found in 23 source files
uv run --locked python scripts/generate_schemas.py --check
uv run --locked python scripts/check_version.py
{
"failures": [],
"schema_version": "tracefetch.version-check.v1",
"status": "ok",
"version": "1.0.0"
}
uv run --locked pytest --cov=tracefetch --cov-report=term --cov-fail-under=80
........................................................................ [ 66%]
.................................... [100%]
================================ tests coverage ================================
______________ coverage: platform darwin, python 3.11.15-final-0 _______________
Name Stmts Miss Branch BrPart Cover Missing
src/tracefetch/init.py 4 0 0 0 100%
src/tracefetch/main.py 4 4 2 0 0% 1-6
src/tracefetch/adapters/init.py 3 0 0 0 100%
src/tracefetch/adapters/base.py 24 0 0 0 100%
src/tracefetch/adapters/readers.py 136 61 40 4 52% 56, 60, 97, 115-139, 162-163, 168-218
src/tracefetch/adapters/search.py 129 22 48 12 79% 45-46, 51, 74, 81-82, 87, 101, 131-132, 134-139, 146-147, 149, 189->193, 203, 225-236, 261->270, 264, 271->274
src/tracefetch/anchors.py 53 1 26 2 96% 33->61, 59
src/tracefetch/bundle.py 103 6 16 3 92% 50, 51->53, 68, 228-231
src/tracefetch/cli.py 184 45 64 13 70% 126-133, 164-165, 180-188, 211, 226, 228, 230-231, 255-264, 273-274, 276-278, 287-292, 296, 303, 307-310, 314
src/tracefetch/config.py 43 1 6 1 96% 41
src/tracefetch/contracts.py 193 0 0 0 100%
src/tracefetch/crawl.py 188 24 50 10 86% 129-137, 167, 171, 173, 179, 189, 203-207, 211, 219-222, 233, 257, 261, 285, 288-289
src/tracefetch/doctor.py 19 2 2 1 86% 54-55
src/tracefetch/errors.py 36 0 0 0 100%
src/tracefetch/normalize.py 124 20 34 5 82% 59-72, 79, 137, 155-181, 195-196, 217->214
src/tracefetch/pipeline.py 99 21 32 8 76% 34, 36, 55-66, 74-101, 135, 138-140, 152, 155-156, 158, 174-176, 219
src/tracefetch/providers.py 122 25 50 7 77% 46, 49-52, 65, 71, 103-107, 134-140, 161, 193, 196-206
src/tracefetch/robots.py 61 10 18 4 80% 57-61, 63, 68, 74-76
src/tracefetch/search.py 65 6 32 5 89% 30, 32, 35, 47-55, 85
src/tracefetch/security.py 72 12 24 6 81% 16-17, 25-26, 51, 72, 78, 85, 91-92, 95, 102
src/tracefetch/unified.py 126 7 50 5 93% 153-155, 160->159, 216, 248-249, 317, 333
src/tracefetch/verify.py 245 43 98 17 82% 27, 30-31, 41-42, 55-57, 71-72, 92, 106, 116, 118, 145->147, 150-152, 167-169, 193, 216, 219-220, 223-224, 233, 236, 238, 241-242, 253-254, 256-258, 294-295, 297->299, 340-342, 344-345
src/tracefetch/workspace.py 184 22 70 16 85% 157->159, 171->173, 184->161, 186, 199-200, 202, 208, 212, 227->229, 236, 239, 256-258, 268, 286->285, 289, 383, 398-399, 410-411, 420-431
TOTAL 2217 332 662 119 82%
Required test coverage of 80% reached. Total coverage: 82.25%
108 passed in 6.77s
uv build\n- 108 tests passed;coverage 82.25%\n- Ruff、mypy strict、Schema drift、version contract、wheel/sdist build passed\n- Python 3.12 / 3.13 isolated tests passed\n- dependency audit: no known vulnerabilities\n- real local search、demo Provider、public search、fetch/verify bundle、wheel install smoke passed\n- public release guard and passed