diff --git a/CITATION.cff b/CITATION.cff index a5481a5..a8afd45 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -6,5 +6,5 @@ authors: - name: LexBench Web Fetch contributors repository-code: "https://github.com/lexmount/lexbench-webfetch" url: "https://github.com/lexmount/lexbench-webfetch" -license: MIT +license: Apache-2.0 version: 0.3.0 diff --git a/README.md b/README.md index c25fa17..6fd5894 100644 --- a/README.md +++ b/README.md @@ -2,46 +2,29 @@ LexBench Web Fetch — Measure what comes back. -[English](README.md) · [简体中文](docs/README.zh-CN.md) +**English** · [简体中文](docs/README.zh-CN.md) [![CI](https://github.com/lexmount/lexbench-webfetch/actions/workflows/ci.yml/badge.svg)](https://github.com/lexmount/lexbench-webfetch/actions/workflows/ci.yml) [![License: Apache 2.0](https://img.shields.io/badge/code-Apache--2.0-51735b)](LICENSE) [![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-356a91)](pyproject.toml) -[Tasks](#task-suites) · [Quickstart](#quickstart) · [Evaluation protocol](docs/protocol.md) · [Contributing](CONTRIBUTING.md) +[Tasks](#task-suites) · [Quickstart](#quickstart) · [Scoring](#score-an-answer) · [Contributing](CONTRIBUTING.md) ---- - -LexBench Web Fetch defines what a retrieval system must deliver: page text, named records with usable links, expected resources, or a requested file. The versioned task rules distinguish a successful request from a usable answer. - -The benchmark is independent of any browser, provider or execution harness. It has no Browser Eval dependency. Use its JSON task definitions with your own runner, or export verified inputs for [Browser Eval](https://github.com/lexmount/browser-eval). - -```mermaid -flowchart LR - A[Versioned task and acceptance rules] --> B[Your retrieval system] - B --> C[Saved response or delivered file] - A --> D[Evaluate the declared requirements] - C --> D - E[Hash-bound reference inputs] --> D -``` +LexBench Web Fetch provides tasks and scoring tools for web retrieval: page text, records with usable links, resources and files. Use it with your own runner or [Browser Eval](https://github.com/lexmount/browser-eval). ## Task suites -| Suite | Task entries | Scope | +| Suite | Tasks | Scope | | --- | ---: | --- | | `webfetch` | 150 | Web pages, documents, images, video and challenge pages | -| `dynamic-content` | 100 | Content and records loaded after the initial page response | -| `popular-sites` | 100 | Task-relevant content on widely used websites | -| `access-restrictions` | 100 | URLs where access restrictions were previously observed | -| `articles` | 100 | Displayed article bodies; fixed initial comment and post coverage rules | +| `dynamic-content` | 100 | Content and records loaded after the initial response | +| `popular-sites` | 100 | Content on widely used websites | +| `access-restrictions` | 100 | URLs with previously observed access restrictions | +| `articles` | 100 | Article bodies, initial comments and post collections | -These are five separately versioned populations, with 550 task entries in total. They are not a deduplicated 550-site leaderboard. The access-restriction label describes historical observations; a URL may behave differently today. WebMainBench, WCXB and WebArena remain separate upstream benchmarks. - -Each suite ships a readable `tasks.json`, a catalog with original task-definition hashes, and a manifest binding the exact executable dataset and reference files. See [data layout and rights](docs/data.md). Task wording and frozen acceptance rules retain their original language. - -The [article suite](src/lexbench_webfetch/definitions/evaluation/articles/README.md), `articles-v11`, adds 95 fixed articles and five changing post collections. It checks displayed article content and required page components, including initial comment and post coverage, to catch title-only or body-only extraction. Fixed articles require 80% coverage in every declared body region and the reviewed ending. This tolerates formatting differences but does not prove every small module or its order. Changing comments and post lists use structural checks (record counts, attribution and nonempty text), not verification of the full contents of each record. Complete references remain outside Git. +The catalog contains 550 task entries across five suites. Public definitions include task instructions and acceptance rules; complete frozen reference inputs must be obtained separately. See [data and access](docs/data.md) and [article requirements](src/lexbench_webfetch/definitions/evaluation/articles/README.md). ## Quickstart @@ -55,99 +38,46 @@ uv run --frozen lexbench-webfetch list uv run --frozen lexbench-webfetch validate ``` -This checks the public definitions without a browser, API key or Browser Eval checkout. It does not fetch websites or compute benchmark scores. +These commands check the bundled definitions offline, without a browser or API key. -To reproduce a frozen suite, obtain an approved copy of its inputs. The required files and hashes are in `src/lexbench_webfetch/definitions/registry.json`. Third-party snapshots are not redistributed here; no public download bundle is currently provided. +To export a suite, obtain the frozen files listed in its input manifest and run: ```sh -uv run --frozen lexbench-webfetch verify-inputs \ - --suite webfetch --source /absolute/path/approved-inputs uv run --frozen lexbench-webfetch export \ --suite webfetch --source /absolute/path/approved-inputs \ --output /absolute/path/new-input-directory ``` -The export includes only manifest-listed files and prints the executable dataset path. Missing files, changed bytes and symlinks fail validation. Existing output directories are never reused. - -## Freeze a benchmark version +Export verifies the input hashes and writes the declared files to a new directory. Full reference captures are not distributed in this repository; there is currently no public input bundle. The [data guide](docs/data.md) describes required files and access. -Reports bind a benchmark edition, its frozen dataset and its scoring source. -Package upgrades do not change historical results. Use `lexbench-webfetch release` -to freeze an external `benchmark-release.json`, and `compare-releases` to check -whether two editions support direct comparison, require rescoring or belong -to separate major versions. See [benchmark versions](docs/versions.md). +## Score an answer -`lexbench-webfetch version` verifies and prints the installed catalog edition, -including every suite's task count, frozen input hashes and scoring source. -The immutable `benchmark-vMAJOR.MINOR.PATCH` tag identifies its repository revision. - -## Score a saved answer - -The benchmark includes its own scorer. It needs no Browser Eval installation: +Try an accepted and a rejected saved response: ```sh uv run --frozen lexbench-webfetch score --task examples/task.json --response examples/answer.txt uv run --frozen lexbench-webfetch score --task examples/task.json --response examples/missing.txt ``` -The first answer passes; the second fails. Use `--metadata /absolute/path/metadata.json` to include structured answer fields such as `links` or `images`; the file must contain a JSON object. Metadata cannot supply a file-acceptance verdict. Supply the complete task JSON from a verified dataset for a real result. Public task projections bind reference bodies by hash and cannot replace those complete rules. File tasks use repeated `--file /absolute/path/file` arguments; acceptance is derived from the actual bytes, signature, length and declared hash, not a supplied pass flag. Optional ordered-tree tasks require `uv sync --frozen --extra tree`. - - -Compile the audited access-restriction rules with independently captured references: - -```sh -uv run --frozen lexbench-webfetch compile-access-restrictions \ - --evidence-home /absolute/path/reference-data-home --output /absolute/path/new-dataset.json -``` - -## Run an evaluation - -A runner receives each task's URL and prompt, saves its response or files, and evaluates the declared requirements against the verified reference inputs. Record the benchmark commit, suite ID, input hashes, method versions, execution policy and scorer revision. Follow the [evaluation protocol](docs/protocol.md) when reporting scores or timing. - -With Browser Eval installed in a separate checkout: - -```sh -uv run --frozen browser-harness-eval validate \ - --dataset /absolute/path/new-input-directory/dataset.json -uv run --frozen browser-harness-eval run \ - --dataset /absolute/path/new-input-directory/dataset.json \ - --provider-config configs/providers.quickstart.json --providers http -``` +For real evaluations, use the complete task from a verified dataset. Add `--metadata metadata.json` for structured response fields, or `--file /absolute/path/file` for delivered files. Scoring requirements and result reporting are described in the [evaluation protocol](docs/protocol.md). -Run these two commands from Browser Eval. Ordinary runs are diagnostic; a formal live-site comparison additionally requires its pre-call/post-call reference certification. The benchmark input checker verifies frozen bytes, not present-day website validity. See the [Browser Eval integration guide](https://github.com/lexmount/browser-eval/blob/main/docs/benchmarks.md). +## Versions and execution -## Scoring behavior +Run `uv run --frozen lexbench-webfetch version` to inspect the installed catalog. Tags use `bench-vMAJOR.MINOR.PATCH`. Each report freezes the selected tasks and scoring source in `benchmark-release.json`; a package upgrade leaves that selection unchanged. -Version 0.3 matches Latin words at word boundaries for facts, markers and stable anchors. Required body facts use the returned content; a separate document title cannot supply missing body text. Chinese phrases retain literal matching, and numeric and currency checks keep their value boundaries. +Use `release` to freeze an edition and `compare-releases` to check comparability. See [versioning](docs/versions.md) for commands and major/minor/patch rules. -A task can set `page_identity_required: true` to require its final URL observations. Missing or mismatched observations then fail acceptance. Dynamic tasks can also set `document_language_match: "exact"` when the complete language tag matters; the default is `"primary"`. These checks apply across interfaces. Frozen tasks that do not require URL metadata keep their content-based acceptance rules. - -Offline scoring recomputes derived fields. It retains the original reference hash, deadline evidence and file fingerprints. A file verdict requires current file verification; an old pass flag cannot certify a rescore. Summaries expose `mean_all_attempts_ms`, `all_attempts_p50_ms` and `all_attempts_p95_ms` alongside the existing successful-call timings. The all-attempt population includes failed calls and timeouts. - -These changes do not revise frozen tasks or certify historical results. Score corrections require a new evidence revision tied to the scorer and its regression controls. - -## Repository contents - -| Path | Purpose | -| --- | --- | -| `src/lexbench_webfetch/definitions/` | Task definitions, catalogs and frozen input manifests | -| `src/lexbench_webfetch/benchmark.py` | Independent definition checks and verified input export | -| `src/lexbench_webfetch/scoring.py` | Authoritative task acceptance and content diagnostics | -| `src/lexbench_webfetch/risk_control_dataset.py` | Compile audited access-restriction task requirements | -| `docs/protocol.md` | Acceptance, evidence, timing and result-reporting rules | -| `tests/` | Accepted/rejected input scenarios and export behavior | - -Browser adapters, credentials, measured runs, report renderers and hosting configuration belong to the execution harness or its evidence storage. This repository owns task models, deterministic acceptance scoring, file-byte checks and task compilation. Browser Eval imports these implementations as a pinned dependency. This repository publishes no measured leaderboard. +To execute browser or service calls and build reports, follow the [Browser Eval integration guide](https://github.com/lexmount/browser-eval/blob/main/docs/benchmarks.md). ## Contribute -Read [CONTRIBUTING](CONTRIBUTING.md) before changing a task or proposing a result. Run `make check` to validate the definitions and test the input tools. Report security issues through [SECURITY](SECURITY.md). +Read [CONTRIBUTING](CONTRIBUTING.md) before changing task requirements or scoring. Run `make check` to validate definitions and tests. -Project-owned code and definitions use the [Apache 2.0 license](LICENSE); third-party source material retains its own terms, described in [THIRD_PARTY](THIRD_PARTY.md). +[Security](SECURITY.md) · [Third-party content](THIRD_PARTY.md) · [Apache 2.0](LICENSE) ## Cite LexBench Web Fetch -If you use the task definitions or scoring tools in published work, cite this repository and record the exact commit and suite used. GitHub's citation menu reads [CITATION.cff](CITATION.cff). For version 0.3.0: +Use this citation or [CITATION.cff](CITATION.cff), and record the benchmark edition and suites used. ```bibtex @software{lexbench_webfetch_2026, @@ -158,5 +88,3 @@ If you use the task definitions or scoring tools in published work, cite this re url = {https://github.com/lexmount/lexbench-webfetch} } ``` - -Cite [Browser Eval](https://github.com/lexmount/browser-eval#cite-browser-eval) separately when using its execution harness, and cite upstream sources or benchmarks according to their attribution terms. This repository citation does not replace those citations. When using another version, update the version and year in the example and identify its tag or commit. diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md index fe691fc..57a7178 100644 --- a/docs/README.zh-CN.md +++ b/docs/README.zh-CN.md @@ -1,47 +1,30 @@
-LexBench Web Fetch — Measure what comes back. +LexBench Web Fetch — 评测实际返回的内容。 -[English](../README.md) · 简体中文 +[English](../README.md) · **简体中文** [![CI](https://github.com/lexmount/lexbench-webfetch/actions/workflows/ci.yml/badge.svg)](https://github.com/lexmount/lexbench-webfetch/actions/workflows/ci.yml) [![License: Apache 2.0](https://img.shields.io/badge/code-Apache--2.0-51735b)](../LICENSE) [![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-356a91)](../pyproject.toml) -[任务集](#任务集) · [快速开始](#快速开始) · [评测协议](protocol.md) · [参与贡献](../CONTRIBUTING.md) +[任务集](#任务集) · [快速开始](#快速开始) · [评分](#给响应评分) · [参与贡献](../CONTRIBUTING.md)
---- - -LexBench Web Fetch 规定抓取系统需要交付哪些内容:网页正文、名称与链接对应的记录、指定资源,或可用的文件。任务的验收规则区分“请求成功”和“交付内容符合要求”。 - -这个 benchmark 独立于浏览器、服务商和执行脚手架,不依赖 Browser Eval。可以用自己的工具读取 JSON 任务定义,也可以导出经过校验的输入,交给 [Browser Eval](https://github.com/lexmount/browser-eval) 执行。 - -```mermaid -flowchart LR - A[版本固定的任务与验收规则] --> B[待测抓取系统] - B --> C[保存的响应或交付文件] - A --> D[按任务要求验收] - C --> D - E[哈希绑定的参考输入] --> D -``` +LexBench Web Fetch 提供网页获取任务和评分工具,评测正文、带有效链接的记录、资源和文件。可以使用自己的运行器,也可以接入 [Browser Eval](https://github.com/lexmount/browser-eval)。 ## 任务集 -| 任务集 | 任务记录数 | 范围 | +| 任务集 | 题数 | 范围 | | --- | ---: | --- | -| `webfetch` | 150 | 网页、文档、图片、视频和挑战页面 | -| `dynamic-content` | 100 | 初始页面响应后加载的正文与记录 | -| `popular-sites` | 100 | 常用网站上与任务相关的内容 | -| `access-restrictions` | 100 | 曾观察到访问限制的网址 | -| `articles` | 100 | 已展示的文章正文;固定的初始评论和帖子覆盖规则 | +| `webfetch` | 150 | 网页、文档、图片、视频和挑战页 | +| `dynamic-content` | 100 | 初始响应之后加载的内容和记录 | +| `popular-sites` | 100 | 常用网站的内容 | +| `access-restrictions` | 100 | 曾观察到访问限制的 URL | +| `articles` | 100 | 文章正文、初始评论和帖子列表 | -五组任务分别固定版本,共 550 条任务记录,不代表去重后的 550 个网站,也不直接合成总榜。访问限制描述的是历史观察,网址今天的表现可能不同。WebMainBench、WCXB 和 WebArena 仍是各自独立的上游 benchmark。 - -每组提供可读的 `tasks.json`、包含原始完整任务哈希的目录,以及绑定可执行数据集和参考文件的清单。详见[数据结构与使用权](data.md)。任务原文和冻结的验收规则保留原语言。 - -[文章分类](../src/lexbench_webfetch/definitions/evaluation/articles/README.md)的 `articles-v11` 增加了 95 个固定文章和 5 个变化的帖子集合案例。它检查已展示的文章内容及必需页面组成部分,包括初始评论和帖子覆盖,识别只抓到标题或只抓到正文的遗漏。固定文章要求每个正文分区及核对过的正文结尾均达到 80% 覆盖率。这允许格式差异,但不保证每个小节及其顺序完整。变化的评论和帖子列表检查记录数量、作者及非空正文等基本结构,不验证每条记录的正文是否完整。完整参考保存在 Git 之外。 +题库共五个任务集、550 条题目。公开定义包含任务说明和验收规则,完整冻结参考输入需另行获取。详见[数据与获取方式](../docs/data.md)和[文章验收要求](../src/lexbench_webfetch/definitions/evaluation/articles/README.md)。 ## 快速开始 @@ -53,99 +36,48 @@ cd lexbench-webfetch uv sync --frozen uv run --frozen lexbench-webfetch list uv run --frozen lexbench-webfetch validate -uv run --frozen lexbench-webfetch version ``` -这一步检查公开任务定义,无需浏览器、API Key 或 Browser Eval。它不访问网站,也不计算评测分数。 - -`version` 会校验并显示当前题库版本,包括各子集题数、冻结输入哈希和评分器哈希。`benchmark-v主版本.次版本.补丁版本` 标签固定对应的仓库提交;报告另行绑定实际使用的题目和评分规则。 +这些命令离线检查仓库自带的定义,无需浏览器或 API 密钥。 -复现冻结任务集需要取得获准使用的原始输入。所需文件及哈希列在 `src/lexbench_webfetch/definitions/registry.json` 中。本仓库不分发第三方页面快照,目前也没有公开的完整输入下载包。 +导出任务集前,先获取其输入清单列出的冻结文件,再运行: ```sh -uv run --frozen lexbench-webfetch verify-inputs \ - --suite webfetch --source /absolute/path/approved-inputs uv run --frozen lexbench-webfetch export \ --suite webfetch --source /absolute/path/approved-inputs \ --output /absolute/path/new-input-directory ``` -导出工具只复制清单内的文件,并打印可执行数据集路径。缺文件、内容变化或符号链接都会使校验失败,已有输出目录不会被复用。 +导出会验证输入哈希,将清单中的文件写入新目录。仓库不分发完整参考快照,目前也没有公开输入包。所需文件和获取条件见[数据指南](../docs/data.md)。 -## 固定评测版本 +## 给响应评分 -报告绑定评测版本、冻结题目和评分源码。升级软件包不会改变历史结果。 -用 `lexbench-webfetch release` 在外部输入目录生成 `benchmark-release.json`, -用 `compare-releases` 检查两个版本能否直接比较、是否需要统一重评,或应按不同大版本分别展示。 -具体规则见[评测版本管理](versions.md)。 - -## 对保存的响应评分 - -本仓库自带评分器,无需安装 Browser Eval: +用一个应通过和一个应失败的示例试跑: ```sh uv run --frozen lexbench-webfetch score --task examples/task.json --response examples/answer.txt uv run --frozen lexbench-webfetch score --task examples/task.json --response examples/missing.txt ``` -第一份响应通过,第二份失败。若回答含有结构化链接或图片等字段,可通过 `--metadata /absolute/path/metadata.json` 提供,文件内容须为 JSON 对象。元数据不能指定文件验收结果。实际评分时,请使用已校验数据集中的完整任务 JSON。公开任务文件中的参考正文只有哈希绑定,不能替代完整验收输入。文件任务通过可重复的 `--file /absolute/path/file` 提供真实文件;评分器检查字节签名、长度和声明的哈希,不接受调用者自报的通过标记。可选的树结构任务需要先运行 `uv sync --frozen --extra tree`。 - - -使用独立采集的参考输入编译已审定的访问受限任务规则: - -```sh -uv run --frozen lexbench-webfetch compile-access-restrictions \ - --evidence-home /absolute/path/reference-data-home --output /absolute/path/new-dataset.json -``` - -## 执行评测 - -执行工具读取任务网址与提示词,保存响应或文件,再按任务规则和已校验的参考输入验收。记录 benchmark 提交版本、任务集 ID、输入哈希、待测方法版本、执行策略和评分器版本。分数与耗时的报告方式见[评测协议](protocol.md)。 - -如果已在另一目录安装 Browser Eval,可在 Browser Eval 根目录运行: - -```sh -uv run --frozen browser-harness-eval validate \ - --dataset /absolute/path/new-input-directory/dataset.json -uv run --frozen browser-harness-eval run \ - --dataset /absolute/path/new-input-directory/dataset.json \ - --provider-config configs/providers.quickstart.json --providers http -``` +实际评测应使用经过验证的数据集中的完整任务。结构化响应字段通过 `--metadata metadata.json` 传入,交付文件通过 `--file /absolute/path/file` 传入。评分要求和结果发布规则见[评测协议](../docs/protocol.md)。 -普通运行用于诊断。正式比较实时网站时,还需要完成调用前后的参考内容认证。输入校验只能证明文件版本相符,不能证明网站今天仍然符合旧参考。详见 [Browser Eval 接入说明](https://github.com/lexmount/browser-eval/blob/main/docs/benchmarks.md)。 +## 版本与运行 -## 评分规则 +运行 `uv run --frozen lexbench-webfetch version` 查看安装的题库版本。标签格式为 `bench-v主版本.次版本.补丁版本`。每份报告通过 `benchmark-release.json` 固定所选题目和评分源码,升级包不会替换这份选择。 -0.3 版对事实、标记和固定锚点中的拉丁文使用单词边界匹配。正文事实只匹配返回内容,单独返回的文档标题不能补足正文。中文短语仍按原文匹配,数字和货币保留原有的数值边界检查。 +用 `release` 固定评测版本,用 `compare-releases` 检查结果是否可比。命令和主版本、次版本、补丁版本规则见[版本说明](../docs/versions.md)。 -任务可设置 `page_identity_required: true`,要求返回的最终网址符合任务声明;缺少网址或网址不符都会判为未通过。动态任务需要区分完整语言标签时,可再设置 `document_language_match: "exact"`,默认值为 `"primary"`,只比较主语言。这些检查适用于所有接口。没有要求网址元数据的冻结任务,继续按原有内容规则验收。 - -离线评分会重新计算派生字段,保留原始参考哈希、调用时限证据和文件指纹。文件结论需要当前文件验收依据;旧的通过标记不能认证本次重评分。汇总在原有成功调用耗时之外,提供全部调用的 `mean_all_attempts_ms`、`all_attempts_p50_ms` 和 `all_attempts_p95_ms`,包含失败调用与超时。 - -上述修改不改写冻结题目,也不自动认证历史成绩。更正分数仍需建立新的证据修订,绑定评分器版本和回归用例。 - -## 仓库内容 - -| 路径 | 用途 | -| --- | --- | -| `src/lexbench_webfetch/definitions/` | 任务定义、目录和冻结输入清单 | -| `src/lexbench_webfetch/benchmark.py` | 独立的定义检查与输入导出 | -| `src/lexbench_webfetch/scoring.py` | 统一的任务验收与内容诊断 | -| `src/lexbench_webfetch/risk_control_dataset.py` | 将已审定的访问受限任务规则编译为数据集 | -| `docs/protocol.md` | 验收、证据、耗时和结果报告规则 | -| `tests/` | 输入接受、拒绝及导出行为测试 | - -浏览器适配器、凭据、实测结果、报告生成器和托管配置由执行脚手架或外部证据存储管理。任务模型、确定性验收评分、文件字节校验和任务编译由本仓库维护,Browser Eval 通过固定版本的依赖直接调用。本仓库没有实测排行榜。 +执行浏览器或服务调用并生成报告,请按 [Browser Eval 接入指南](https://github.com/lexmount/browser-eval/blob/main/docs/benchmarks.md)操作。 ## 参与贡献 -修改任务或提交结果前,请阅读 [CONTRIBUTING](../CONTRIBUTING.md)。`make check` 会检查任务定义和输入工具。安全问题请参阅 [SECURITY](../SECURITY.md)。 +修改任务要求或评分前,请阅读 [CONTRIBUTING](../CONTRIBUTING.md)。运行 `make check` 检查定义和测试。 -项目自有代码和任务定义采用 [Apache 2.0 许可](../LICENSE),第三方原始材料保留各自使用条件,详见 [THIRD_PARTY](../THIRD_PARTY.md)。 +[安全](../SECURITY.md) · [第三方内容](../THIRD_PARTY.md) · [Apache 2.0](../LICENSE) ## 引用 LexBench Web Fetch -在公开作品中使用本仓库的任务定义或评分工具时,请引用仓库,并记录具体提交和任务集。GitHub 的引用入口读取 [CITATION.cff](../CITATION.cff)。0.3.0 版可这样引用: +使用以下引用或 [CITATION.cff](../CITATION.cff),并注明评测版本和任务集。 ```bibtex @software{lexbench_webfetch_2026, @@ -156,5 +88,3 @@ uv run --frozen browser-harness-eval run \ url = {https://github.com/lexmount/lexbench-webfetch} } ``` - -如果还使用了 [Browser Eval](https://github.com/lexmount/browser-eval#cite-browser-eval) 执行脚手架,请单独引用。上游来源或 benchmark 也应按各自的署名要求引用,本仓库的引用不能替代它们。使用其他版本时,请相应修改示例中的版本号和年份,并注明实际 tag 或提交。 diff --git a/docs/versions.md b/docs/versions.md index f53e6f2..01ccb6e 100644 --- a/docs/versions.md +++ b/docs/versions.md @@ -6,14 +6,16 @@ the Python package version. A package upgrade does not upgrade a report. Use a readable `MAJOR.MINOR.PATCH` together with immutable SHA-256 bindings. Keep the exact repository commit in the harness dependency lock. A Git tag -such as `benchmark-v2.0.0` gives a released commit a durable name; never move +such as `bench-v2.0.1` gives a released commit a durable name; never move or overwrite a published release tag. A tag alone does not identify external reference bytes or a report's selected task population. -Use `benchmark-vMAJOR.MINOR.PATCH` in both the benchmark and report repositories. -A report names the benchmark edition it uses; it does not introduce a separate -report-version sequence. The hosting platform's immutable version ID identifies -each published report build. Retain historical tags at their original commits. +Create `bench-vMAJOR.MINOR.PATCH` tags only in this benchmark repository. +Browser Eval publishes software versions as `vMAJOR.MINOR.PATCH` and records the +full Git commit for execution and report-building code. +A report names the benchmark edition it uses, and the hosting platform's +immutable version ID identifies each published build. Retain benchmark tags +needed by published reports; do not create report, date or review-checkpoint tags. | Change | Version | Comparing results | | --- | --- | --- | @@ -32,7 +34,7 @@ their independent source evidence and executable correction controls. `lexbench-webfetch version` verifies the installed catalog's complete suite list, task definitions, frozen reference bindings and scorer against -`definitions/benchmark-release.json`. The published `benchmark-vMAJOR.MINOR.PATCH` +`definitions/benchmark-release.json`. The published `bench-vMAJOR.MINOR.PATCH` tag fixes that catalog. Full reference inputs remain separately hash-bound; the catalog does not replace the executable datasets or distribute their source captures. A report binds its actual selected population with the sidecar below; @@ -46,7 +48,7 @@ provider calls: uv run --frozen lexbench-webfetch release \ --dataset /absolute/inputs/dataset.json \ --output /absolute/inputs/benchmark-release.json \ - --benchmark lexbench-webfetch --version 2.0.0 \ + --benchmark lexbench-webfetch --version 2.0.1 \ --scorer-revision ``` diff --git a/src/lexbench_webfetch/definitions/benchmark-release.json b/src/lexbench_webfetch/definitions/benchmark-release.json index 3c39a34..f2c2177 100644 --- a/src/lexbench_webfetch/definitions/benchmark-release.json +++ b/src/lexbench_webfetch/definitions/benchmark-release.json @@ -3,7 +3,7 @@ "kind": "benchmark_catalog_release", "benchmark": "lexmount-webfetch", "version": "2.0.1", - "tag": "benchmark-v2.0.1", + "tag": "bench-v2.0.1", "scorer_revision": "d9e2f00c7bca0298960ee42e8d2493ab1e835bb0", "scoring_source_sha256": "c97158df8941ea55d358f5defd9c3e97869f82ae8aba5ecb6468dc43f1ed1c7a", "case_count": 550, diff --git a/src/lexbench_webfetch/versions.py b/src/lexbench_webfetch/versions.py index 1b5f072..a2a2904 100644 --- a/src/lexbench_webfetch/versions.py +++ b/src/lexbench_webfetch/versions.py @@ -171,7 +171,7 @@ def catalog_release(path: Path | None = None) -> dict: if release.get("schema_version") != 1 or release.get("kind") != "benchmark_catalog_release": raise ValueError("Unsupported benchmark catalog release") _version(release.get("version")) - if release.get("tag") != "benchmark-v" + release["version"]: + if release.get("tag") != "bench-v" + release["version"]: raise ValueError("Catalog release tag differs from its version") if release.get("scoring_source_sha256") != SCORING_SOURCE_SHA256: raise ValueError("Catalog release scoring source changed") diff --git a/tests/test_release_versions.py b/tests/test_release_versions.py index 7a933f8..26ec636 100644 --- a/tests/test_release_versions.py +++ b/tests/test_release_versions.py @@ -12,6 +12,7 @@ def test_installed_catalog_binds_every_registered_suite(): from lexbench_webfetch.benchmark import registry release = catalog_release() + assert release["tag"] == "bench-v" + release["version"] entries = registry()["suites"] assert [row["suite"] for row in release["suites"]] == [row["id"] for row in entries] assert release["case_count"] == sum(row["case_count"] for row in entries) @@ -29,7 +30,7 @@ def test_published_catalog_rejects_changed_population_rules_or_reference_binding elif change == "scorer": release["scoring_source_sha256"] = "0" * 64 else: - release["tag"] = "benchmark-v99.0.0" + release["tag"] = "bench-v99.0.0" path = tmp_path / "release.json" path.write_text(json.dumps(release)) with pytest.raises(ValueError):