diff --git a/docs/RELEVANCE-CALIBRATION.md b/docs/RELEVANCE-CALIBRATION.md new file mode 100644 index 0000000..5ff62d6 --- /dev/null +++ b/docs/RELEVANCE-CALIBRATION.md @@ -0,0 +1,48 @@ +# Relevance calibration preparation + +The existing frozen mixed diagnostic returned candidates for all ten requests +without a relevant source. That observation identifies an abstention problem; +it does not justify choosing a cosine cutoff on those same queries. + +The new [text/code diagnostic](../fixtures/relevance-v2/README.md) separates +calibration and held-out topic families and repositories before inference. +Its 14 files support 48 English/German queries: 32 positive requests and 16 +requests for absent artifacts or implementations. Both translations of an +intent stay in the same split. A broadly related neighbour may be useful for +an exploratory topic query, so these absence labels require concrete artifacts. + +The source inventory and blinded review have been completed. Independent AI +review agreed with all expected file sets; the final labels are frozen in +`fixture.json` with hashes and a UTC timestamp in `fixture.lock.json`. +No retrieval run, threshold selection or ranking change has occurred. Agent +agreement will not be described as human review. + +The first independent agent review detected Windows-1252 mojibake in the +authored German requests and ambiguity in the wildcard-comparator request. +Before inference or freezing, German request strings were restored to Unicode +and the comparator request clarified to a lone `*` followed by another +comparator, such as `*, >=1.0.0`. Numeric partial versions such as `1.*` are +outside that rejection claim. The original blinded input and per-query changes +are preserved in `fixtures/relevance-v2/review-history`; upstream source and +licence bytes were unchanged. The corrected independent re-read agreed with +all expected file sets. Before freezing, two further paired requests were made +more precise: bounded pattern search requests its first match, and the museum +request asks for operative loan terms rather than an executed agreement. +Both the preceding input and report remain byte-exact in review history; +independent re-reading confirmed those four wording changes. + +An absent label means the requested artifact or implementation is missing. +It does not mean no related file exists or that related files must never be +shown as suggestions. Any future abstention policy must distinguish that +semantics explicitly when it reports results. + +After freezing, use calibration only to propose an explicit relevance policy; +**Keep held-out queries unevaluated until that policy and its parameters are fixed.** +report positive recall alongside absent-query behaviour. Preserve raw candidates, +native and end-to-end timings, model/runtime hashes, task scope and any unsupported +filters. Evaluate the held-out split once without selecting parameters from it. +If labels need correction after model output, create a new version and explain +why instead of altering this diagnostic silently. + +This small corpus does not close independent human relevance, media abstention, +music discrimination, speech localisation or production-scale quality gates. diff --git a/fixtures/relevance-v2/.gitattributes b/fixtures/relevance-v2/.gitattributes new file mode 100644 index 0000000..d46882b --- /dev/null +++ b/fixtures/relevance-v2/.gitattributes @@ -0,0 +1,5 @@ +sources/** -text +licenses/** -text +# Frozen hashes cover JSON and review history as exact bytes, too. +*.json -text whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol +review-history/** -text whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol diff --git a/fixtures/relevance-v2/README.md b/fixtures/relevance-v2/README.md new file mode 100644 index 0000000..b83bcd0 --- /dev/null +++ b/fixtures/relevance-v2/README.md @@ -0,0 +1,43 @@ +# Text and code relevance diagnostic + +This frozen fixture contains 14 actual files and 48 English/German requests. It is a +small, agent-authored diagnostic, not a human-labelled production quality gate. +No inference has been performed against these labels. + +`inventory.json` records exact source bytes, upstream immutable commits and +complete licence files. Twelve documents describe fictional organisations and +procedures; no customer information is used. Two complete Rust files come from +unrelated upstream projects. Local `.gitattributes` prevents Git newline +conversion of source and licence files. + +Calibration uses bicycle warranty, bakery labels, apartment maintenance and +aho-corasick. Held-out uses museum loans, irrigation, ferry operations and +semver. Topic families and upstream repositories are disjoint. Each bilingual +intent pair stays within one split. Positive requests include contrasting +nearby procedures; absent requests require a specific missing artifact or +implementation. A related topic alone cannot fulfil such a request. + +The independent agent reviewer should read only `blind-review-input.json` and +its referenced source files, then return candidate file IDs, an empty set for +an absent artifact, or an explicit ambiguity. Do not read `author-labels.json` +until that review is saved. No vector, search ranking or threshold is available +to either annotator. Disagreements must be resolved with written reasons before +a final immutable label lock is created. + +The independent AI review is now saved and agreed with all expected file sets. +`fixture.json` combines the reviewed queries and labels; `fixture.lock.json` +records their hashes and the UTC freeze time before any inference. Review history +preserves encoding repairs and wording clarifications before that freeze. +**Do not evaluate held-out queries until a policy or threshold has been fixed +using calibration only.** Do not adjust that policy from held-out results. + +No media is included: this corpus cannot calibrate music, images, video or +spoken-passage abstention. Existing media benchmarks remain separate. A held-out +split made by the same author is weaker than independent human annotation and +larger real customer libraries. + +Run `python fixtures/relevance-v2/verify.py` for source integrity and split +structure. That check proves consistency, not retrieval quality. +Run `python fixtures/relevance-v2/test_verify.py` for isolated corruption, +duplicate, split-leak and lock regressions, including verifier execution with +Python optimization enabled. diff --git a/fixtures/relevance-v2/author-labels.json b/fixtures/relevance-v2/author-labels.json new file mode 100644 index 0000000..dd527e9 --- /dev/null +++ b/fixtures/relevance-v2/author-labels.json @@ -0,0 +1,357 @@ +{ + "status": "draft pending independent agent review; not frozen", + "labels": [ + { + "query_id": "bicycle-target-en", + "expected_ids": [ + "bicycle-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "bicycle-target-de", + "expected_ids": [ + "bicycle-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "bicycle-contrast-en", + "expected_ids": [ + "bicycle-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "bicycle-contrast-de", + "expected_ids": [ + "bicycle-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "bicycle-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "bicycle-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "bakery-target-en", + "expected_ids": [ + "bakery-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "bakery-target-de", + "expected_ids": [ + "bakery-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "bakery-contrast-en", + "expected_ids": [ + "bakery-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "bakery-contrast-de", + "expected_ids": [ + "bakery-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "bakery-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "bakery-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "meter-target-en", + "expected_ids": [ + "meter-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "meter-target-de", + "expected_ids": [ + "meter-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "meter-contrast-en", + "expected_ids": [ + "meter-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "meter-contrast-de", + "expected_ids": [ + "meter-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "meter-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "meter-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "museum-target-en", + "expected_ids": [ + "museum-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "museum-target-de", + "expected_ids": [ + "museum-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "museum-contrast-en", + "expected_ids": [ + "museum-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "museum-contrast-de", + "expected_ids": [ + "museum-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "museum-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "museum-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "irrigation-target-en", + "expected_ids": [ + "irrigation-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "irrigation-target-de", + "expected_ids": [ + "irrigation-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "irrigation-contrast-en", + "expected_ids": [ + "irrigation-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "irrigation-contrast-de", + "expected_ids": [ + "irrigation-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "irrigation-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "irrigation-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "ferry-target-en", + "expected_ids": [ + "ferry-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "ferry-target-de", + "expected_ids": [ + "ferry-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "query_id": "ferry-contrast-en", + "expected_ids": [ + "ferry-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "ferry-contrast-de", + "expected_ids": [ + "ferry-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "query_id": "ferry-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "ferry-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "query_id": "pattern-build-en", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Builder::build and Builder::add assemble packed searchers." + }, + { + "query_id": "pattern-build-de", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Builder::build and Builder::add assemble packed searchers." + }, + { + "query_id": "pattern-range-en", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Searcher::find_in implements bounded-span dispatch." + }, + { + "query_id": "pattern-range-de", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Searcher::find_in implements bounded-span dispatch." + }, + { + "query_id": "pattern-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "Neither code source nor customer document implements certificate verification." + }, + { + "query_id": "pattern-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "Neither code source nor customer document implements certificate verification." + }, + { + "query_id": "version-parse-en", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "FromStr for Version parses major/minor/patch, prerelease and build." + }, + { + "query_id": "version-parse-de", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "FromStr for Version parses major/minor/patch, prerelease and build." + }, + { + "query_id": "version-wildcard-en", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "VersionReq parsing rejects WildcardNotTheOnlyComparator." + }, + { + "query_id": "version-wildcard-de", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "VersionReq parsing rejects WildcardNotTheOnlyComparator." + }, + { + "query_id": "version-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source implements digital signature verification." + }, + { + "query_id": "version-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source implements digital signature verification." + } + ] +} diff --git a/fixtures/relevance-v2/blind-review-input.json b/fixtures/relevance-v2/blind-review-input.json new file mode 100644 index 0000000..70b888f --- /dev/null +++ b/fixtures/relevance-v2/blind-review-input.json @@ -0,0 +1,581 @@ +{ + "version": 2, + "scope": "text/code only; no inference performed", + "assets": [ + { + "id": "code-pattern", + "path": "sources/BurntSushi__aho-corasick__src__packed__api.rs", + "kind": "code", + "split": "calibration", + "repository": "BurntSushi/aho-corasick", + "commit": "6c0abf5681bfc30bb9d8f7f52b68a350b436fffa", + "source_path": "src/packed/api.rs", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/src/packed/api.rs", + "sha256": "7bcb23b99bbf87e41348ef8d4db72a88dff744de503dcb684ac9d40659656f96", + "bytes": 23091, + "license": "MIT OR Unlicense", + "license_files": [ + { + "path": "licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt", + "sha256": "0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/LICENSE-MIT" + }, + { + "path": "licenses/BurntSushi__aho-corasick__UNLICENSE.txt", + "sha256": "7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/UNLICENSE" + }, + { + "path": "licenses/BurntSushi__aho-corasick__COPYING.txt", + "sha256": "01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/COPYING" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "code-version", + "path": "sources/dtolnay__semver__src__parse.rs", + "kind": "code", + "split": "held_out", + "repository": "dtolnay/semver", + "commit": "280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe", + "source_path": "src/parse.rs", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/src/parse.rs", + "sha256": "2d9cb28a72a813968c16da29a9690f8e53f1ce00727a1dbe67aec3ddb5ed59ed", + "bytes": 12187, + "license": "MIT OR Apache-2.0", + "license_files": [ + { + "path": "licenses/dtolnay__semver__LICENSE-MIT.txt", + "sha256": "23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-MIT" + }, + { + "path": "licenses/dtolnay__semver__LICENSE-APACHE.txt", + "sha256": "62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-APACHE" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "bicycle-a", + "path": "sources/bicycle-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "2d77a47673d5900784efa2eb7943efb29abcf36b19ef81e4291ce52dc47f1f70", + "bytes": 274, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bicycle-b", + "path": "sources/bicycle-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "6302d4a3832b65d25a46e8502cfa5dcaeb6256ef22cae9b7f6eda9d01e5d3375", + "bytes": 247, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-a", + "path": "sources/bakery-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "158ee5091f8c6cdb6775da7244441731869da3645059f10048c975504003484d", + "bytes": 267, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-b", + "path": "sources/bakery-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "c17ce0846c41b46b4346ed7e83815677dddd678cc6268297d865bca912df4920", + "bytes": 270, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-a", + "path": "sources/meter-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "ab41afc2781a045ab2eac305a68074830c9878cd951a8ee4fcd65335b4a91aab", + "bytes": 307, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-b", + "path": "sources/meter-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "6044b38f140d5302619f450fa6a7ad5ae08133e2d748a4279b325ca42b28fbb9", + "bytes": 255, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-a", + "path": "sources/museum-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "4e88213ad17ac4eb63f8acd13d9842ededebd6f211226876bd817bbd296246d0", + "bytes": 278, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-b", + "path": "sources/museum-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "51072d9e67336305851f74100583e748a4b9cbc817a83a4ec3575d5bdb792a15", + "bytes": 260, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-a", + "path": "sources/irrigation-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "e57ab03ca777a20f8a281ea700f1117d56b25439a12e05f08af5d3a928e78488", + "bytes": 306, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-b", + "path": "sources/irrigation-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "9a9b28cc09bc8f1468c6933f1d0969909e7f58478084fcbbda51b96dabb83c6c", + "bytes": 251, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-a", + "path": "sources/ferry-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "c88a26ac20a896b2f815861e2fc10d6ccee8a572ff3ee637b4eecdcac4adce86", + "bytes": 261, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-b", + "path": "sources/ferry-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "47c14d1b88e3f38167778347ec1978b4346555b66f81f321bf18e5d7ce868a41", + "bytes": 244, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + } + ], + "queries": [ + { + "id": "bicycle-target-en", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "en", + "query": "warranty instructions for a cracked bicycle frame weld", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bicycle-target-de", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "de", + "query": "Garantieanleitung für eine gerissene Schweißnaht am Fahrradrahmen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bicycle-contrast-en", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "en", + "query": "price list for replacing bicycle brake pads", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bicycle-contrast-de", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "de", + "query": "Preisliste für den Austausch von Fahrradbremsbelägen", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bicycle-absent-en", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "en", + "query": "signed recall notice for Aster electric bicycle battery fires", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bicycle-absent-de", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "de", + "query": "unterschriebene Rückrufmitteilung zu Akkubränden bei Aster-Elektrofahrrädern", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bakery-target-en", + "pair_id": "bakery-target", + "split": "calibration", + "language": "en", + "query": "procedure for checking almond warnings before biscuit batches leave the kitchen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bakery-target-de", + "pair_id": "bakery-target", + "split": "calibration", + "language": "de", + "query": "Verfahren zur Prüfung von Mandelwarnungen vor der Freigabe von Keks-Chargen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bakery-contrast-en", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "en", + "query": "checklist for loading biscuit deliveries into reusable crates", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bakery-contrast-de", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "de", + "query": "Checkliste zum Verladen von Kekslieferungen in Mehrwegkisten", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bakery-absent-en", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "en", + "query": "laboratory certificate proving Juniper biscuits contain no gluten", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bakery-absent-de", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "de", + "query": "Laborzertifikat zum Nachweis glutenfreier Juniper-Kekse", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "meter-target-en", + "pair_id": "meter-target", + "split": "calibration", + "language": "en", + "query": "instructions for photographing an electricity meter when moving out", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "meter-target-de", + "pair_id": "meter-target", + "split": "calibration", + "language": "de", + "query": "Anleitung zum Fotografieren des Stromzählers beim Auszug", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "meter-contrast-en", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "en", + "query": "November schedule for checking leaking radiator valves", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "meter-contrast-de", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "de", + "query": "Novemberplan zur Prüfung undichter Heizkörperventile", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "meter-absent-en", + "pair_id": "meter-absent", + "split": "calibration", + "language": "en", + "query": "solar installation permit for the roof of Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "meter-absent-de", + "pair_id": "meter-absent", + "split": "calibration", + "language": "de", + "query": "Genehmigung für eine Solaranlage auf dem Dach von Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "museum-target-en", + "pair_id": "museum-target", + "split": "held_out", + "language": "en", + "query": "loan terms requiring insurance for the return journey of a ceramic bowl", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "museum-target-de", + "pair_id": "museum-target", + "split": "held_out", + "language": "de", + "query": "Leihbedingungen mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "museum-contrast-en", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "en", + "query": "log instructions for recording gallery humidity twice daily", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "museum-contrast-de", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "de", + "query": "Anleitung zur zweimal täglichen Erfassung der Luftfeuchtigkeit im Museumssaal", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "museum-absent-en", + "pair_id": "museum-absent", + "split": "held_out", + "language": "en", + "query": "customs export permit for the Elm Museum bronze statue", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "museum-absent-de", + "pair_id": "museum-absent", + "split": "held_out", + "language": "de", + "query": "Zollausfuhrgenehmigung für die Bronzestatue des Elm Museums", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "irrigation-target-en", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "en", + "query": "controller instructions that stop the irrigation pump when the tank is nearly empty", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "irrigation-target-de", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "de", + "query": "Steuerungsanleitung zum Abschalten der Bewässerungspumpe bei fast leerem Tank", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "irrigation-contrast-en", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "en", + "query": "winter checklist for draining and storing sprinkler hoses", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "irrigation-contrast-de", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "de", + "query": "Wintercheckliste zum Entleeren und Lagern von Beregnungsschläuchen", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "irrigation-absent-en", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "en", + "query": "water quality laboratory report certifying Linden tank water is safe to drink", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "irrigation-absent-de", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "de", + "query": "Laborbericht zur Trinkwassereignung des Wassers im Linden-Tank", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "ferry-target-en", + "pair_id": "ferry-target", + "split": "held_out", + "language": "en", + "query": "rota rules for cancelling Saturday ferry trips when a crew member is unavailable", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "ferry-target-de", + "pair_id": "ferry-target", + "split": "held_out", + "language": "de", + "query": "Dienstplanregeln zur Absage von Samstagsfahrten bei Ausfall eines Fährbesatzungsmitglieds", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "ferry-contrast-en", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "en", + "query": "fare sheet listing the cost of taking a bicycle on the ferry", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "ferry-contrast-de", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "de", + "query": "Tarifblatt mit den Kosten für die Fahrradmitnahme auf der Fähre", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "ferry-absent-en", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "en", + "query": "signed engineering certificate for replacing the Alder Ferry diesel engine", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "ferry-absent-de", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "de", + "query": "unterschriebenes Ingenieurzertifikat zum Austausch des Dieselmotors der Alder-Fähre", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "pattern-build-en", + "pair_id": "pattern-build", + "split": "calibration", + "language": "en", + "query": "implementation that builds a packed matcher from several byte patterns", + "required_artifact": "source implementation of packed matcher construction" + }, + { + "id": "pattern-build-de", + "pair_id": "pattern-build", + "split": "calibration", + "language": "de", + "query": "Implementierung zum Aufbau eines gepackten Suchers aus mehreren Byte-Mustern", + "required_artifact": "source implementation of packed matcher construction" + }, + { + "id": "pattern-range-en", + "pair_id": "pattern-range", + "split": "calibration", + "language": "en", + "query": "code that returns the first match among several byte patterns inside a bounded span of a byte string", + "required_artifact": "source implementation of bounded pattern search" + }, + { + "id": "pattern-range-de", + "pair_id": "pattern-range", + "split": "calibration", + "language": "de", + "query": "Code, der den ersten Treffer unter mehreren Byte-Mustern innerhalb eines begrenzten Bytebereichs zurückgibt", + "required_artifact": "source implementation of bounded pattern search" + }, + { + "id": "pattern-absent-en", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "en", + "query": "implementation of TLS certificate hostname verification", + "required_artifact": "source implementation of TLS hostname verification" + }, + { + "id": "pattern-absent-de", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "de", + "query": "Implementierung der Hostnamenprüfung für TLS-Zertifikate", + "required_artifact": "source implementation of TLS hostname verification" + }, + { + "id": "version-parse-en", + "pair_id": "version-parse", + "split": "held_out", + "language": "en", + "query": "parser for semantic version numbers with prerelease and build metadata", + "required_artifact": "source implementation parsing SemVer components" + }, + { + "id": "version-parse-de", + "pair_id": "version-parse", + "split": "held_out", + "language": "de", + "query": "Parser für semantische Versionsnummern mit Vorabversion und Build-Metadaten", + "required_artifact": "source implementation parsing SemVer components" + }, + { + "id": "version-wildcard-en", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "en", + "query": "implementation rejecting a lone wildcard followed by additional version comparators, for example *, >=1.0.0", + "required_artifact": "source implementation checking wildcard comparator constraints" + }, + { + "id": "version-wildcard-de", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "de", + "query": "Implementierung zum Ablehnen eines alleinstehenden Platzhalters mit weiteren Versionsvergleichern, zum Beispiel *, >=1.0.0", + "required_artifact": "source implementation checking wildcard comparator constraints" + }, + { + "id": "version-absent-en", + "pair_id": "version-absent", + "split": "held_out", + "language": "en", + "query": "implementation that verifies an Ed25519 digital signature", + "required_artifact": "source implementation of Ed25519 verification" + }, + { + "id": "version-absent-de", + "pair_id": "version-absent", + "split": "held_out", + "language": "de", + "query": "Implementierung zur Prüfung einer digitalen Ed25519-Signatur", + "required_artifact": "source implementation of Ed25519 verification" + } + ] +} diff --git a/fixtures/relevance-v2/blind-review.json b/fixtures/relevance-v2/blind-review.json new file mode 100644 index 0000000..70456bc --- /dev/null +++ b/fixtures/relevance-v2/blind-review.json @@ -0,0 +1,522 @@ +{ + "version": 2, + "reviewer": "independent AI agent blind review; not human annotation", + "inputPath": "fixtures/relevance-v2/blind-review-input.json", + "inputSHA256": "d90a3b863c7985acfc93fce0b4c4b1325c109c80d012e81dda87e14aa6bcc94a", + "blindness": "No author labels, ranking results, model outputs or query runtime read. Required project instructions and input-listed local sources/licenses only.", + "assetSHA256Verified": true, + "queries": [ + { + "id": "bicycle-target-en", + "expectedIDs": [ + "bicycle-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-a: five-year cracked-weld warranty; submit photo, serial and receipt.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-target-de", + "expectedIDs": [ + "bicycle-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-a: five-year cracked-weld warranty; submit photo, serial and receipt.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-contrast-en", + "expectedIDs": [ + "bicycle-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-b: brake-pad replacement costs 24 euros; bicycle-a exclusions are not a tariff.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-contrast-de", + "expectedIDs": [ + "bicycle-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-b: brake-pad replacement costs 24 euros; bicycle-a exclusions are not a tariff.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-target-en", + "expectedIDs": [ + "bakery-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-a: second staff member verifies almond warning before release; record batch and initials.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-target-de", + "expectedIDs": [ + "bakery-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-a: second staff member verifies almond warning before release; record batch and initials.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-contrast-en", + "expectedIDs": [ + "bakery-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-b: pack sealed cartons in reusable crates and check address/count before loading.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-contrast-de", + "expectedIDs": [ + "bakery-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-b: pack sealed cartons in reusable crates and check address/count before loading.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-target-en", + "expectedIDs": [ + "meter-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-a: moving-day electricity-meter photo must show reading and identifier; send within three days.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-target-de", + "expectedIDs": [ + "meter-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-a: moving-day electricity-meter photo must show reading and identifier; send within three days.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-contrast-en", + "expectedIDs": [ + "meter-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-b: November inspection checks radiator valve leaks and air; access 09:00-15:00.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-contrast-de", + "expectedIDs": [ + "meter-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-b: November inspection checks radiator valve leaks and air; access 09:00-15:00.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-target-en", + "expectedIDs": [ + "museum-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity: query requests loan terms, which the source supplies.", + "reason": "museum-a states loan terms requiring insurance during both outward and return ceramic-bowl transport, directly satisfying the clarified operative-rule request.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-target-de", + "expectedIDs": [ + "museum-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity: query requests loan terms, which the source supplies.", + "reason": "museum-a states loan terms requiring insurance during both outward and return ceramic-bowl transport, directly satisfying the clarified operative-rule request.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-contrast-en", + "expectedIDs": [ + "museum-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "museum-b: conservators record relative humidity twice each day.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-contrast-de", + "expectedIDs": [ + "museum-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "museum-b: conservators record relative humidity twice each day.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-target-en", + "expectedIDs": [ + "irrigation-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-a: stop pump below twelve centimetres, refill above twenty before reset.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-target-de", + "expectedIDs": [ + "irrigation-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-a: stop pump below twelve centimetres, refill above twenty before reset.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-contrast-en", + "expectedIDs": [ + "irrigation-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-b: drain hoses before frost, disconnect and store dry in shed.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-contrast-de", + "expectedIDs": [ + "irrigation-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-b: drain hoses before frost, disconnect and store dry in shed.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-target-en", + "expectedIDs": [ + "ferry-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-a: two qualified crew required Saturday; cancel and notify if either unavailable.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-target-de", + "expectedIDs": [ + "ferry-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-a: two qualified crew required Saturday; cancel and notify if either unavailable.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-contrast-en", + "expectedIDs": [ + "ferry-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-b: bicycle carriage costs one euro per crossing.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-contrast-de", + "expectedIDs": [ + "ferry-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-b: bicycle carriage costs one euro per crossing.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-build-en", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Builder::add/extend accumulates byte patterns; Builder::build constructs configured pattern and RabinKarp/Teddy state and returns Searcher. Searcher::new invokes construction. Actual executable implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-build-de", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Builder::add/extend accumulates byte patterns; Builder::build constructs configured pattern and RabinKarp/Teddy state and returns Searcher. Searcher::new invokes construction. Actual executable implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-range-en", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity: clarified request explicitly asks for the first match among configured patterns in a bounded span.", + "reason": "Executable Searcher::find_in caps haystack at span.end and invokes Teddy/RabinKarp from span.start, with a slow short-span fallback, returning the first occurrence of any configured pattern according to match semantics.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-range-de", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity: clarified request explicitly asks for the first match among configured patterns in a bounded span.", + "reason": "Executable Searcher::find_in caps haystack at span.end and invokes Teddy/RabinKarp from span.start, with a slow short-span fallback, returning the first occurrence of any configured pattern according to match semantics.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "version-parse-en", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Version::from_str validates major/minor/patch and optional prerelease/build identifiers, then constructs Version. Actual parser implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "version-parse-de", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Version::from_str validates major/minor/patch and optional prerelease/build identifiers, then constructs Version. Actual parser implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "version-wildcard-en", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Clarified lone wildcard example matches implemented rejection; numeric partial wildcards are outside the request.", + "reason": "VersionReq::from_str rejects lone */x/X followed by a comma using WildcardNotTheOnlyComparator; recursive version_req also checks a later lone wildcard. Matches clarified *, >=1.0.0 example.", + "sourceQueryMismatch": [] + }, + { + "id": "version-wildcard-de", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Clarified lone wildcard example matches implemented rejection; numeric partial wildcards are outside the request.", + "reason": "VersionReq::from_str rejects lone */x/X followed by a comma using WildcardNotTheOnlyComparator; recursive version_req also checks a later lone wildcard. Matches clarified *, >=1.0.0 example.", + "sourceQueryMismatch": [] + }, + { + "id": "version-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "version-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + } + ], + "evaluationAssessment": { + "meaningfulTextAbstention": true, + "meaningfulCodeAbstention": true, + "limits": [ + "Small fictional corpus, unusually explicit rules and contrasts; not representative customer diversity.", + "Specific absent-artifact queries are distinct from broad-topic retrieval; no broad-topic queries are included.", + "Two real code files and far-away negatives do not cover near-miss implementations or overloaded symbols.", + "EN/DE pairs are correlated observations.", + "Provisional AI review; human annotation and inference remain unperformed." + ], + "humanReviewRemaining": [ + "Human-adjudicate all provisional agent labels before treating them as human reference data.", + "Add realistic customer documents, near-miss implementations and broad-topic queries for representative calibration; current small corpus remains a diagnostic." + ] + }, + "correctedInputReview": "Independently reread four precision clarifications: museum-target EN/DE asks loan terms and pattern-range EN/DE explicitly asks first bounded match. Both original caveats resolved; expected IDs unchanged. Verified current native German strings and all 14 source fixture SHA identities. Previous input/review preserved by coordinating author under review-history." +} diff --git a/fixtures/relevance-v2/fixture.json b/fixtures/relevance-v2/fixture.json new file mode 100644 index 0000000..796948b --- /dev/null +++ b/fixtures/relevance-v2/fixture.json @@ -0,0 +1,839 @@ +{ + "version": 2, + "frozen_at_utc": "2026-10-13T07:55:54.215767+00:00", + "label_policy": "Frozen before any inference. Agent author plus independent blinded AI review; not human annotation. Absent means requested artifact missing, not absence of related neighbours. No media scope. Held-out remains UNEVALUATED until policy/threshold fixed on calibration only. Never revise labels after model output; create a new version with reasons.", + "split_policy": "Calibration and held_out have disjoint customer topics and upstream repositories; bilingual paired intents remain in one split.", + "assets": [ + { + "id": "code-pattern", + "path": "sources/BurntSushi__aho-corasick__src__packed__api.rs", + "kind": "code", + "split": "calibration", + "repository": "BurntSushi/aho-corasick", + "commit": "6c0abf5681bfc30bb9d8f7f52b68a350b436fffa", + "source_path": "src/packed/api.rs", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/src/packed/api.rs", + "sha256": "7bcb23b99bbf87e41348ef8d4db72a88dff744de503dcb684ac9d40659656f96", + "bytes": 23091, + "license": "MIT OR Unlicense", + "license_files": [ + { + "path": "licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt", + "sha256": "0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/LICENSE-MIT" + }, + { + "path": "licenses/BurntSushi__aho-corasick__UNLICENSE.txt", + "sha256": "7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/UNLICENSE" + }, + { + "path": "licenses/BurntSushi__aho-corasick__COPYING.txt", + "sha256": "01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/COPYING" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "code-version", + "path": "sources/dtolnay__semver__src__parse.rs", + "kind": "code", + "split": "held_out", + "repository": "dtolnay/semver", + "commit": "280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe", + "source_path": "src/parse.rs", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/src/parse.rs", + "sha256": "2d9cb28a72a813968c16da29a9690f8e53f1ce00727a1dbe67aec3ddb5ed59ed", + "bytes": 12187, + "license": "MIT OR Apache-2.0", + "license_files": [ + { + "path": "licenses/dtolnay__semver__LICENSE-MIT.txt", + "sha256": "23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-MIT" + }, + { + "path": "licenses/dtolnay__semver__LICENSE-APACHE.txt", + "sha256": "62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-APACHE" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "bicycle-a", + "path": "sources/bicycle-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "2d77a47673d5900784efa2eb7943efb29abcf36b19ef81e4291ce52dc47f1f70", + "bytes": 274, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bicycle-b", + "path": "sources/bicycle-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "6302d4a3832b65d25a46e8502cfa5dcaeb6256ef22cae9b7f6eda9d01e5d3375", + "bytes": 247, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-a", + "path": "sources/bakery-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "158ee5091f8c6cdb6775da7244441731869da3645059f10048c975504003484d", + "bytes": 267, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-b", + "path": "sources/bakery-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "c17ce0846c41b46b4346ed7e83815677dddd678cc6268297d865bca912df4920", + "bytes": 270, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-a", + "path": "sources/meter-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "ab41afc2781a045ab2eac305a68074830c9878cd951a8ee4fcd65335b4a91aab", + "bytes": 307, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-b", + "path": "sources/meter-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "6044b38f140d5302619f450fa6a7ad5ae08133e2d748a4279b325ca42b28fbb9", + "bytes": 255, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-a", + "path": "sources/museum-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "4e88213ad17ac4eb63f8acd13d9842ededebd6f211226876bd817bbd296246d0", + "bytes": 278, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-b", + "path": "sources/museum-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "51072d9e67336305851f74100583e748a4b9cbc817a83a4ec3575d5bdb792a15", + "bytes": 260, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-a", + "path": "sources/irrigation-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "e57ab03ca777a20f8a281ea700f1117d56b25439a12e05f08af5d3a928e78488", + "bytes": 306, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-b", + "path": "sources/irrigation-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "9a9b28cc09bc8f1468c6933f1d0969909e7f58478084fcbbda51b96dabb83c6c", + "bytes": 251, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-a", + "path": "sources/ferry-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "c88a26ac20a896b2f815861e2fc10d6ccee8a572ff3ee637b4eecdcac4adce86", + "bytes": 261, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-b", + "path": "sources/ferry-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "47c14d1b88e3f38167778347ec1978b4346555b66f81f321bf18e5d7ce868a41", + "bytes": 244, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + } + ], + "queries": [ + { + "id": "bicycle-target-en", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "en", + "query": "warranty instructions for a cracked bicycle frame weld", + "required_artifact": "document with the requested operative rule", + "query_id": "bicycle-target-en", + "expected_ids": [ + "bicycle-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "bicycle-target-de", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "de", + "query": "Garantieanleitung für eine gerissene Schweißnaht am Fahrradrahmen", + "required_artifact": "document with the requested operative rule", + "query_id": "bicycle-target-de", + "expected_ids": [ + "bicycle-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "bicycle-contrast-en", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "en", + "query": "price list for replacing bicycle brake pads", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "bicycle-contrast-en", + "expected_ids": [ + "bicycle-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "bicycle-contrast-de", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "de", + "query": "Preisliste für den Austausch von Fahrradbremsbelägen", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "bicycle-contrast-de", + "expected_ids": [ + "bicycle-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "bicycle-absent-en", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "en", + "query": "signed recall notice for Aster electric bicycle battery fires", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "bicycle-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "bicycle-absent-de", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "de", + "query": "unterschriebene Rückrufmitteilung zu Akkubränden bei Aster-Elektrofahrrädern", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "bicycle-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "bakery-target-en", + "pair_id": "bakery-target", + "split": "calibration", + "language": "en", + "query": "procedure for checking almond warnings before biscuit batches leave the kitchen", + "required_artifact": "document with the requested operative rule", + "query_id": "bakery-target-en", + "expected_ids": [ + "bakery-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "bakery-target-de", + "pair_id": "bakery-target", + "split": "calibration", + "language": "de", + "query": "Verfahren zur Prüfung von Mandelwarnungen vor der Freigabe von Keks-Chargen", + "required_artifact": "document with the requested operative rule", + "query_id": "bakery-target-de", + "expected_ids": [ + "bakery-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "bakery-contrast-en", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "en", + "query": "checklist for loading biscuit deliveries into reusable crates", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "bakery-contrast-en", + "expected_ids": [ + "bakery-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "bakery-contrast-de", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "de", + "query": "Checkliste zum Verladen von Kekslieferungen in Mehrwegkisten", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "bakery-contrast-de", + "expected_ids": [ + "bakery-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "bakery-absent-en", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "en", + "query": "laboratory certificate proving Juniper biscuits contain no gluten", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "bakery-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "bakery-absent-de", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "de", + "query": "Laborzertifikat zum Nachweis glutenfreier Juniper-Kekse", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "bakery-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "meter-target-en", + "pair_id": "meter-target", + "split": "calibration", + "language": "en", + "query": "instructions for photographing an electricity meter when moving out", + "required_artifact": "document with the requested operative rule", + "query_id": "meter-target-en", + "expected_ids": [ + "meter-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "meter-target-de", + "pair_id": "meter-target", + "split": "calibration", + "language": "de", + "query": "Anleitung zum Fotografieren des Stromzählers beim Auszug", + "required_artifact": "document with the requested operative rule", + "query_id": "meter-target-de", + "expected_ids": [ + "meter-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "meter-contrast-en", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "en", + "query": "November schedule for checking leaking radiator valves", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "meter-contrast-en", + "expected_ids": [ + "meter-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "meter-contrast-de", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "de", + "query": "Novemberplan zur Prüfung undichter Heizkörperventile", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "meter-contrast-de", + "expected_ids": [ + "meter-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "meter-absent-en", + "pair_id": "meter-absent", + "split": "calibration", + "language": "en", + "query": "solar installation permit for the roof of Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "meter-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "meter-absent-de", + "pair_id": "meter-absent", + "split": "calibration", + "language": "de", + "query": "Genehmigung für eine Solaranlage auf dem Dach von Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "meter-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "museum-target-en", + "pair_id": "museum-target", + "split": "held_out", + "language": "en", + "query": "loan terms requiring insurance for the return journey of a ceramic bowl", + "required_artifact": "document with the requested operative rule", + "query_id": "museum-target-en", + "expected_ids": [ + "museum-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "museum-target-de", + "pair_id": "museum-target", + "split": "held_out", + "language": "de", + "query": "Leihbedingungen mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "required_artifact": "document with the requested operative rule", + "query_id": "museum-target-de", + "expected_ids": [ + "museum-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "museum-contrast-en", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "en", + "query": "log instructions for recording gallery humidity twice daily", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "museum-contrast-en", + "expected_ids": [ + "museum-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "museum-contrast-de", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "de", + "query": "Anleitung zur zweimal täglichen Erfassung der Luftfeuchtigkeit im Museumssaal", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "museum-contrast-de", + "expected_ids": [ + "museum-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "museum-absent-en", + "pair_id": "museum-absent", + "split": "held_out", + "language": "en", + "query": "customs export permit for the Elm Museum bronze statue", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "museum-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "museum-absent-de", + "pair_id": "museum-absent", + "split": "held_out", + "language": "de", + "query": "Zollausfuhrgenehmigung für die Bronzestatue des Elm Museums", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "museum-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "irrigation-target-en", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "en", + "query": "controller instructions that stop the irrigation pump when the tank is nearly empty", + "required_artifact": "document with the requested operative rule", + "query_id": "irrigation-target-en", + "expected_ids": [ + "irrigation-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "irrigation-target-de", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "de", + "query": "Steuerungsanleitung zum Abschalten der Bewässerungspumpe bei fast leerem Tank", + "required_artifact": "document with the requested operative rule", + "query_id": "irrigation-target-de", + "expected_ids": [ + "irrigation-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "irrigation-contrast-en", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "en", + "query": "winter checklist for draining and storing sprinkler hoses", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "irrigation-contrast-en", + "expected_ids": [ + "irrigation-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "irrigation-contrast-de", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "de", + "query": "Wintercheckliste zum Entleeren und Lagern von Beregnungsschläuchen", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "irrigation-contrast-de", + "expected_ids": [ + "irrigation-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "irrigation-absent-en", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "en", + "query": "water quality laboratory report certifying Linden tank water is safe to drink", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "irrigation-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "irrigation-absent-de", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "de", + "query": "Laborbericht zur Trinkwassereignung des Wassers im Linden-Tank", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "irrigation-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "ferry-target-en", + "pair_id": "ferry-target", + "split": "held_out", + "language": "en", + "query": "rota rules for cancelling Saturday ferry trips when a crew member is unavailable", + "required_artifact": "document with the requested operative rule", + "query_id": "ferry-target-en", + "expected_ids": [ + "ferry-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "ferry-target-de", + "pair_id": "ferry-target", + "split": "held_out", + "language": "de", + "query": "Dienstplanregeln zur Absage von Samstagsfahrten bei Ausfall eines Fährbesatzungsmitglieds", + "required_artifact": "document with the requested operative rule", + "query_id": "ferry-target-de", + "expected_ids": [ + "ferry-a" + ], + "classification": "positive", + "rationale": "Target document explicitly states the requested rule; the paired document concerns a different procedure." + }, + { + "id": "ferry-contrast-en", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "en", + "query": "fare sheet listing the cost of taking a bicycle on the ferry", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "ferry-contrast-en", + "expected_ids": [ + "ferry-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "ferry-contrast-de", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "de", + "query": "Tarifblatt mit den Kosten für die Fahrradmitnahme auf der Fähre", + "required_artifact": "document containing the requested procedure or tariff", + "query_id": "ferry-contrast-de", + "expected_ids": [ + "ferry-b" + ], + "classification": "positive", + "rationale": "Contrasting document explicitly states this requested procedure or tariff." + }, + { + "id": "ferry-absent-en", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "en", + "query": "signed engineering certificate for replacing the Alder Ferry diesel engine", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "ferry-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "ferry-absent-de", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "de", + "query": "unterschriebenes Ingenieurzertifikat zum Austausch des Dieselmotors der Alder-Fähre", + "required_artifact": "specific certificate, permit or signed notice described in the query", + "query_id": "ferry-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source contains this named certificate, permit or signed notice; related topic alone does not satisfy the artifact request." + }, + { + "id": "pattern-build-en", + "pair_id": "pattern-build", + "split": "calibration", + "language": "en", + "query": "implementation that builds a packed matcher from several byte patterns", + "required_artifact": "source implementation of packed matcher construction", + "query_id": "pattern-build-en", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Builder::build and Builder::add assemble packed searchers." + }, + { + "id": "pattern-build-de", + "pair_id": "pattern-build", + "split": "calibration", + "language": "de", + "query": "Implementierung zum Aufbau eines gepackten Suchers aus mehreren Byte-Mustern", + "required_artifact": "source implementation of packed matcher construction", + "query_id": "pattern-build-de", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Builder::build and Builder::add assemble packed searchers." + }, + { + "id": "pattern-range-en", + "pair_id": "pattern-range", + "split": "calibration", + "language": "en", + "query": "code that returns the first match among several byte patterns inside a bounded span of a byte string", + "required_artifact": "source implementation of bounded pattern search", + "query_id": "pattern-range-en", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Searcher::find_in implements bounded-span dispatch." + }, + { + "id": "pattern-range-de", + "pair_id": "pattern-range", + "split": "calibration", + "language": "de", + "query": "Code, der den ersten Treffer unter mehreren Byte-Mustern innerhalb eines begrenzten Bytebereichs zurückgibt", + "required_artifact": "source implementation of bounded pattern search", + "query_id": "pattern-range-de", + "expected_ids": [ + "code-pattern" + ], + "classification": "positive", + "rationale": "Searcher::find_in implements bounded-span dispatch." + }, + { + "id": "pattern-absent-en", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "en", + "query": "implementation of TLS certificate hostname verification", + "required_artifact": "source implementation of TLS hostname verification", + "query_id": "pattern-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "Neither code source nor customer document implements certificate verification." + }, + { + "id": "pattern-absent-de", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "de", + "query": "Implementierung der Hostnamenprüfung für TLS-Zertifikate", + "required_artifact": "source implementation of TLS hostname verification", + "query_id": "pattern-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "Neither code source nor customer document implements certificate verification." + }, + { + "id": "version-parse-en", + "pair_id": "version-parse", + "split": "held_out", + "language": "en", + "query": "parser for semantic version numbers with prerelease and build metadata", + "required_artifact": "source implementation parsing SemVer components", + "query_id": "version-parse-en", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "FromStr for Version parses major/minor/patch, prerelease and build." + }, + { + "id": "version-parse-de", + "pair_id": "version-parse", + "split": "held_out", + "language": "de", + "query": "Parser für semantische Versionsnummern mit Vorabversion und Build-Metadaten", + "required_artifact": "source implementation parsing SemVer components", + "query_id": "version-parse-de", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "FromStr for Version parses major/minor/patch, prerelease and build." + }, + { + "id": "version-wildcard-en", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "en", + "query": "implementation rejecting a lone wildcard followed by additional version comparators, for example *, >=1.0.0", + "required_artifact": "source implementation checking wildcard comparator constraints", + "query_id": "version-wildcard-en", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "VersionReq parsing rejects WildcardNotTheOnlyComparator." + }, + { + "id": "version-wildcard-de", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "de", + "query": "Implementierung zum Ablehnen eines alleinstehenden Platzhalters mit weiteren Versionsvergleichern, zum Beispiel *, >=1.0.0", + "required_artifact": "source implementation checking wildcard comparator constraints", + "query_id": "version-wildcard-de", + "expected_ids": [ + "code-version" + ], + "classification": "positive", + "rationale": "VersionReq parsing rejects WildcardNotTheOnlyComparator." + }, + { + "id": "version-absent-en", + "pair_id": "version-absent", + "split": "held_out", + "language": "en", + "query": "implementation that verifies an Ed25519 digital signature", + "required_artifact": "source implementation of Ed25519 verification", + "query_id": "version-absent-en", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source implements digital signature verification." + }, + { + "id": "version-absent-de", + "pair_id": "version-absent", + "split": "held_out", + "language": "de", + "query": "Implementierung zur Prüfung einer digitalen Ed25519-Signatur", + "required_artifact": "source implementation of Ed25519 verification", + "query_id": "version-absent-de", + "expected_ids": [], + "classification": "absent_artifact", + "rationale": "No source implements digital signature verification." + } + ] +} diff --git a/fixtures/relevance-v2/fixture.lock.json b/fixtures/relevance-v2/fixture.lock.json new file mode 100644 index 0000000..6483702 --- /dev/null +++ b/fixtures/relevance-v2/fixture.lock.json @@ -0,0 +1,19 @@ +{ + "version": 2, + "frozen_at_utc": "2026-10-13T07:55:54.215767+00:00", + "inference_status_at_freeze": "No model, search output or vectors observed for this corpus", + "approval": "Root approved after independent final blind review with zero expected-set disagreements", + "sha256": { + "fixture.json": "000047fd17accd315b6138093bbdc9f353cd877b4bf1958fbe336e4a6b10cd2e", + "inventory.json": "1e9eb8e636eab4256f779639ee30520eaadd4a819c3b91ec0c1d06b65d1526b5", + "blind-review-input.json": "d90a3b863c7985acfc93fce0b4c4b1325c109c80d012e81dda87e14aa6bcc94a", + "author-labels.json": "fbd0506f8e2790136386d0704e1b769a870d67d133726983d9c8407973782721", + "blind-review.json": "1772c206913d35f9b575010b5e61e556832212366903bc9f8ef47500ce07d674", + "review-history/blind-review-before-correction.json": "938f61f40414c0d8df05dd3f8e616fdae10ae0195c7096c998b593ce2e8f9be2", + "review-history/blind-review-before-precision-clarification.json": "a487313502e48db6b1ebd6bb2b615404f269d1d10cfed780472b1f0ed40c2770", + "review-history/blind-review-input-before-correction.json": "b417c45920b4564e07c159f7fd71df58f947eecb178963c1f0fda28ebaeb927f", + "review-history/blind-review-input-before-precision-clarification.json": "7054abc918f9ffbd7c52fa7f48a6108aee847cfe00861aa25511c4d533b8624d", + "review-history/corrections.json": "c858ffc84b9cfdf9510ec741ec33cbc976cc22bed78de77f855e875e5cf2569e", + "review-history/precision-clarifications.json": "981f2af94f04f55b49832423832d4fafec8c0724f2c8285cfbc08f520bf0671a" + } +} diff --git a/fixtures/relevance-v2/inventory.json b/fixtures/relevance-v2/inventory.json new file mode 100644 index 0000000..1a5b953 --- /dev/null +++ b/fixtures/relevance-v2/inventory.json @@ -0,0 +1,194 @@ +{ + "version": 2, + "assets": [ + { + "id": "code-pattern", + "path": "sources/BurntSushi__aho-corasick__src__packed__api.rs", + "kind": "code", + "split": "calibration", + "repository": "BurntSushi/aho-corasick", + "commit": "6c0abf5681bfc30bb9d8f7f52b68a350b436fffa", + "source_path": "src/packed/api.rs", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/src/packed/api.rs", + "sha256": "7bcb23b99bbf87e41348ef8d4db72a88dff744de503dcb684ac9d40659656f96", + "bytes": 23091, + "license": "MIT OR Unlicense", + "license_files": [ + { + "path": "licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt", + "sha256": "0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/LICENSE-MIT" + }, + { + "path": "licenses/BurntSushi__aho-corasick__UNLICENSE.txt", + "sha256": "7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/UNLICENSE" + }, + { + "path": "licenses/BurntSushi__aho-corasick__COPYING.txt", + "sha256": "01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/COPYING" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "code-version", + "path": "sources/dtolnay__semver__src__parse.rs", + "kind": "code", + "split": "held_out", + "repository": "dtolnay/semver", + "commit": "280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe", + "source_path": "src/parse.rs", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/src/parse.rs", + "sha256": "2d9cb28a72a813968c16da29a9690f8e53f1ce00727a1dbe67aec3ddb5ed59ed", + "bytes": 12187, + "license": "MIT OR Apache-2.0", + "license_files": [ + { + "path": "licenses/dtolnay__semver__LICENSE-MIT.txt", + "sha256": "23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-MIT" + }, + { + "path": "licenses/dtolnay__semver__LICENSE-APACHE.txt", + "sha256": "62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-APACHE" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "bicycle-a", + "path": "sources/bicycle-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "2d77a47673d5900784efa2eb7943efb29abcf36b19ef81e4291ce52dc47f1f70", + "bytes": 274, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bicycle-b", + "path": "sources/bicycle-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "6302d4a3832b65d25a46e8502cfa5dcaeb6256ef22cae9b7f6eda9d01e5d3375", + "bytes": 247, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-a", + "path": "sources/bakery-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "158ee5091f8c6cdb6775da7244441731869da3645059f10048c975504003484d", + "bytes": 267, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-b", + "path": "sources/bakery-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "c17ce0846c41b46b4346ed7e83815677dddd678cc6268297d865bca912df4920", + "bytes": 270, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-a", + "path": "sources/meter-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "ab41afc2781a045ab2eac305a68074830c9878cd951a8ee4fcd65335b4a91aab", + "bytes": 307, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-b", + "path": "sources/meter-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "6044b38f140d5302619f450fa6a7ad5ae08133e2d748a4279b325ca42b28fbb9", + "bytes": 255, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-a", + "path": "sources/museum-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "4e88213ad17ac4eb63f8acd13d9842ededebd6f211226876bd817bbd296246d0", + "bytes": 278, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-b", + "path": "sources/museum-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "51072d9e67336305851f74100583e748a4b9cbc817a83a4ec3575d5bdb792a15", + "bytes": 260, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-a", + "path": "sources/irrigation-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "e57ab03ca777a20f8a281ea700f1117d56b25439a12e05f08af5d3a928e78488", + "bytes": 306, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-b", + "path": "sources/irrigation-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "9a9b28cc09bc8f1468c6933f1d0969909e7f58478084fcbbda51b96dabb83c6c", + "bytes": 251, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-a", + "path": "sources/ferry-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "c88a26ac20a896b2f815861e2fc10d6ccee8a572ff3ee637b4eecdcac4adce86", + "bytes": 261, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-b", + "path": "sources/ferry-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "47c14d1b88e3f38167778347ec1978b4346555b66f81f321bf18e5d7ce868a41", + "bytes": 244, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + } + ] +} diff --git a/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__COPYING.txt b/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__COPYING.txt new file mode 100644 index 0000000..bb9c20a --- /dev/null +++ b/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__COPYING.txt @@ -0,0 +1,3 @@ +This project is dual-licensed under the Unlicense and MIT licenses. + +You may use this code under the terms of either license. diff --git a/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt b/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt new file mode 100644 index 0000000..3b0a5dc --- /dev/null +++ b/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Andrew Gallant + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__UNLICENSE.txt b/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__UNLICENSE.txt new file mode 100644 index 0000000..68a49da --- /dev/null +++ b/fixtures/relevance-v2/licenses/BurntSushi__aho-corasick__UNLICENSE.txt @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/fixtures/relevance-v2/licenses/dtolnay__semver__LICENSE-APACHE.txt b/fixtures/relevance-v2/licenses/dtolnay__semver__LICENSE-APACHE.txt new file mode 100644 index 0000000..1b5ec8b --- /dev/null +++ b/fixtures/relevance-v2/licenses/dtolnay__semver__LICENSE-APACHE.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/fixtures/relevance-v2/licenses/dtolnay__semver__LICENSE-MIT.txt b/fixtures/relevance-v2/licenses/dtolnay__semver__LICENSE-MIT.txt new file mode 100644 index 0000000..31aa793 --- /dev/null +++ b/fixtures/relevance-v2/licenses/dtolnay__semver__LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/fixtures/relevance-v2/review-history/blind-review-before-correction.json b/fixtures/relevance-v2/review-history/blind-review-before-correction.json new file mode 100644 index 0000000..067b513 --- /dev/null +++ b/fixtures/relevance-v2/review-history/blind-review-before-correction.json @@ -0,0 +1,575 @@ +{ + "version": 2, + "reviewer": "independent AI agent blind review; not human annotation", + "inputPath": "fixtures/relevance-v2/blind-review-input.json", + "inputSHA256": "b417c45920b4564e07c159f7fd71df58f947eecb178963c1f0fda28ebaeb927f", + "blindness": "No author labels, ranking results, model outputs or query runtime read. Required project instructions and input-listed local sources/licenses only.", + "assetSHA256Verified": true, + "queries": [ + { + "id": "bicycle-target-en", + "expectedIDs": [ + "bicycle-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-target-de", + "expectedIDs": [ + "bicycle-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "bicycle-contrast-en", + "expectedIDs": [ + "bicycle-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-contrast-de", + "expectedIDs": [ + "bicycle-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "bicycle-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "bakery-target-en", + "expectedIDs": [ + "bakery-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-target-de", + "expectedIDs": [ + "bakery-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "bakery-contrast-en", + "expectedIDs": [ + "bakery-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-contrast-de", + "expectedIDs": [ + "bakery-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "bakery-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "meter-target-en", + "expectedIDs": [ + "meter-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-target-de", + "expectedIDs": [ + "meter-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "meter-contrast-en", + "expectedIDs": [ + "meter-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-contrast-de", + "expectedIDs": [ + "meter-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "meter-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "museum-target-en", + "expectedIDs": [ + "museum-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Source states a loan rule, not a complete executed agreement; accepted under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-target-de", + "expectedIDs": [ + "museum-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Source states a loan rule, not a complete executed agreement; accepted under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "museum-contrast-en", + "expectedIDs": [ + "museum-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-contrast-de", + "expectedIDs": [ + "museum-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "museum-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "irrigation-target-en", + "expectedIDs": [ + "irrigation-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-target-de", + "expectedIDs": [ + "irrigation-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "irrigation-contrast-en", + "expectedIDs": [ + "irrigation-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-contrast-de", + "expectedIDs": [ + "irrigation-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "irrigation-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "ferry-target-en", + "expectedIDs": [ + "ferry-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-target-de", + "expectedIDs": [ + "ferry-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested cracked-weld warranty, almond batch-release, moving-day meter photo, return-transit insurance, low-tank pump shutdown, or missing-crew cancellation rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "ferry-contrast-en", + "expectedIDs": [ + "ferry-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-contrast-de", + "expectedIDs": [ + "ferry-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Source contains the requested tariff, delivery packing, November radiator, twice-daily humidity, winter hose storage, or bicycle ferry fare rule respectively.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "ferry-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "pattern-build-en", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Executable Builder::add/extend/build accumulates bytes and constructs configured Searcher state; Searcher::find_in caps the haystack at span.end and starts search at span.start.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-build-de", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Executable Builder::add/extend/build accumulates bytes and constructs configured Searcher state; Searcher::find_in caps the haystack at span.end and starts search at span.start.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "pattern-range-en", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "find_in returns the first match of any configured pattern; enumeration of all bounded matches is not implemented by this method.", + "reason": "Executable Builder::add/extend/build accumulates bytes and constructs configured Searcher state; Searcher::find_in caps the haystack at span.end and starts search at span.start.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-range-de", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "find_in returns the first match of any configured pattern; enumeration of all bounded matches is not implemented by this method.", + "reason": "Executable Builder::add/extend/build accumulates bytes and constructs configured Searcher state; Searcher::find_in caps the haystack at span.end and starts search at span.start.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "pattern-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "version-parse-en", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Version::from_str parses and validates numeric, prerelease and build components. VersionReq::from_str and recursive version_req contain executable WildcardNotTheOnlyComparator checks.", + "sourceQueryMismatch": [] + }, + { + "id": "version-parse-de", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Version::from_str parses and validates numeric, prerelease and build components. VersionReq::from_str and recursive version_req contain executable WildcardNotTheOnlyComparator checks.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "version-wildcard-en", + "expectedIDs": [ + "code-version" + ], + "confidence": "medium", + "label": "relevant_operative_content", + "ambiguityReason": "Standalone */x/X mixed with other comparators is rejected; numeric partial wildcard comparators are allowed.", + "reason": "Version::from_str parses and validates numeric, prerelease and build components. VersionReq::from_str and recursive version_req contain executable WildcardNotTheOnlyComparator checks.", + "sourceQueryMismatch": [ + "Confirm standalone wildcard intent; blanket wildcard rejection interpretation would be false." + ] + }, + { + "id": "version-wildcard-de", + "expectedIDs": [ + "code-version" + ], + "confidence": "medium", + "label": "relevant_operative_content", + "ambiguityReason": "Standalone */x/X mixed with other comparators is rejected; numeric partial wildcard comparators are allowed.", + "reason": "Version::from_str parses and validates numeric, prerelease and build components. VersionReq::from_str and recursive version_req contain executable WildcardNotTheOnlyComparator checks.", + "sourceQueryMismatch": [ + "Confirm standalone wildcard intent; blanket wildcard rejection interpretation would be false.", + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + }, + { + "id": "version-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "version-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [ + "Actual German input mojibake; labels infer intended recoverable German wording consistently with English pair. Repair encoding before inference." + ] + } + ], + "evaluationAssessment": { + "meaningfulTextAbstention": true, + "meaningfulCodeAbstention": true, + "limits": [ + "Small fictional corpus, unusually explicit rules and contrasts; not representative customer diversity.", + "Specific absent-artifact queries are distinct from broad-topic retrieval; no broad-topic queries are included.", + "Two real code files and far-away negatives do not cover near-miss implementations or overloaded symbols.", + "EN/DE pairs are correlated observations.", + "German mojibake requires repair and refreshed input provenance.", + "Provisional AI review; human annotation and inference remain unperformed." + ], + "humanReviewRemaining": [ + "Confirm German repair and pair parity.", + "Confirm standalone wildcard intent.", + "Confirm first-match rather than all-match interpretation of bounded pattern request.", + "Confirm museum operative-rule summary qualifies as requested agreement." + ] + } +} diff --git a/fixtures/relevance-v2/review-history/blind-review-before-precision-clarification.json b/fixtures/relevance-v2/review-history/blind-review-before-precision-clarification.json new file mode 100644 index 0000000..23fd70a --- /dev/null +++ b/fixtures/relevance-v2/review-history/blind-review-before-precision-clarification.json @@ -0,0 +1,523 @@ +{ + "version": 2, + "reviewer": "independent AI agent blind review; not human annotation", + "inputPath": "fixtures/relevance-v2/blind-review-input.json", + "inputSHA256": "7054abc918f9ffbd7c52fa7f48a6108aee847cfe00861aa25511c4d533b8624d", + "blindness": "No author labels, ranking results, model outputs or query runtime read. Required project instructions and input-listed local sources/licenses only.", + "assetSHA256Verified": true, + "queries": [ + { + "id": "bicycle-target-en", + "expectedIDs": [ + "bicycle-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-a: five-year cracked-weld warranty; submit photo, serial and receipt.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-target-de", + "expectedIDs": [ + "bicycle-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-a: five-year cracked-weld warranty; submit photo, serial and receipt.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-contrast-en", + "expectedIDs": [ + "bicycle-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-b: brake-pad replacement costs 24 euros; bicycle-a exclusions are not a tariff.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-contrast-de", + "expectedIDs": [ + "bicycle-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bicycle-b: brake-pad replacement costs 24 euros; bicycle-a exclusions are not a tariff.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bicycle-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-target-en", + "expectedIDs": [ + "bakery-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-a: second staff member verifies almond warning before release; record batch and initials.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-target-de", + "expectedIDs": [ + "bakery-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-a: second staff member verifies almond warning before release; record batch and initials.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-contrast-en", + "expectedIDs": [ + "bakery-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-b: pack sealed cartons in reusable crates and check address/count before loading.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-contrast-de", + "expectedIDs": [ + "bakery-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "bakery-b: pack sealed cartons in reusable crates and check address/count before loading.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "bakery-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-target-en", + "expectedIDs": [ + "meter-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-a: moving-day electricity-meter photo must show reading and identifier; send within three days.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-target-de", + "expectedIDs": [ + "meter-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-a: moving-day electricity-meter photo must show reading and identifier; send within three days.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-contrast-en", + "expectedIDs": [ + "meter-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-b: November inspection checks radiator valve leaks and air; access 09:00-15:00.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-contrast-de", + "expectedIDs": [ + "meter-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "meter-b: November inspection checks radiator valve leaks and air; access 09:00-15:00.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "meter-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-target-en", + "expectedIDs": [ + "museum-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Source states a loan rule, not a complete executed agreement; accepted under required_artifact operative-rule definition.", + "reason": "museum-a: insurance is required for both outward and return ceramic-bowl transport.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-target-de", + "expectedIDs": [ + "museum-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Source states a loan rule, not a complete executed agreement; accepted under required_artifact operative-rule definition.", + "reason": "museum-a: insurance is required for both outward and return ceramic-bowl transport.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-contrast-en", + "expectedIDs": [ + "museum-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "museum-b: conservators record relative humidity twice each day.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-contrast-de", + "expectedIDs": [ + "museum-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "museum-b: conservators record relative humidity twice each day.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "museum-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-target-en", + "expectedIDs": [ + "irrigation-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-a: stop pump below twelve centimetres, refill above twenty before reset.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-target-de", + "expectedIDs": [ + "irrigation-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-a: stop pump below twelve centimetres, refill above twenty before reset.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-contrast-en", + "expectedIDs": [ + "irrigation-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-b: drain hoses before frost, disconnect and store dry in shed.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-contrast-de", + "expectedIDs": [ + "irrigation-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "irrigation-b: drain hoses before frost, disconnect and store dry in shed.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "irrigation-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-target-en", + "expectedIDs": [ + "ferry-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-a: two qualified crew required Saturday; cancel and notify if either unavailable.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-target-de", + "expectedIDs": [ + "ferry-a" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-a: two qualified crew required Saturday; cancel and notify if either unavailable.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-contrast-en", + "expectedIDs": [ + "ferry-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-b: bicycle carriage costs one euro per crossing.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-contrast-de", + "expectedIDs": [ + "ferry-b" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "ferry-b: bicycle carriage costs one euro per crossing.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "ferry-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-build-en", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Builder::add/extend accumulates byte patterns; Builder::build constructs configured pattern and RabinKarp/Teddy state and returns Searcher. Searcher::new invokes construction. Actual executable implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-build-de", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Builder::add/extend accumulates byte patterns; Builder::build constructs configured pattern and RabinKarp/Teddy state and returns Searcher. Searcher::new invokes construction. Actual executable implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-range-en", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "find_in returns the first match of any configured pattern; enumeration of all bounded matches is not implemented by this method.", + "reason": "Searcher::find_in caps haystack at span.end and calls Teddy/RabinKarp at span.start, including short-span slow fallback. Actual executable span-constrained search is present.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-range-de", + "expectedIDs": [ + "code-pattern" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "find_in returns the first match of any configured pattern; enumeration of all bounded matches is not implemented by this method.", + "reason": "Searcher::find_in caps haystack at span.end and calls Teddy/RabinKarp at span.start, including short-span slow fallback. Actual executable span-constrained search is present.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "pattern-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "version-parse-en", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Version::from_str validates major/minor/patch and optional prerelease/build identifiers, then constructs Version. Actual parser implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "version-parse-de", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "Version::from_str validates major/minor/patch and optional prerelease/build identifiers, then constructs Version. Actual parser implementation is present.", + "sourceQueryMismatch": [] + }, + { + "id": "version-wildcard-en", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Clarified lone wildcard example matches implemented rejection; numeric partial wildcards are outside the request.", + "reason": "VersionReq::from_str rejects lone */x/X followed by a comma using WildcardNotTheOnlyComparator; recursive version_req also checks a later lone wildcard. Matches clarified *, >=1.0.0 example.", + "sourceQueryMismatch": [] + }, + { + "id": "version-wildcard-de", + "expectedIDs": [ + "code-version" + ], + "confidence": "high", + "label": "relevant_operative_content", + "ambiguityReason": "Clarified lone wildcard example matches implemented rejection; numeric partial wildcards are outside the request.", + "reason": "VersionReq::from_str rejects lone */x/X followed by a comma using WildcardNotTheOnlyComparator; recursive version_req also checks a later lone wildcard. Matches clarified *, >=1.0.0 example.", + "sourceQueryMismatch": [] + }, + { + "id": "version-absent-en", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + }, + { + "id": "version-absent-de", + "expectedIDs": [], + "confidence": "high", + "label": "clear_absent_artifact", + "ambiguityReason": "No material ambiguity under required_artifact operative-rule definition.", + "reason": "The requested specific artifact or implementation is absent from every inspected source; shared company/entity or topic does not satisfy the request.", + "sourceQueryMismatch": [] + } + ], + "evaluationAssessment": { + "meaningfulTextAbstention": true, + "meaningfulCodeAbstention": true, + "limits": [ + "Small fictional corpus, unusually explicit rules and contrasts; not representative customer diversity.", + "Specific absent-artifact queries are distinct from broad-topic retrieval; no broad-topic queries are included.", + "Two real code files and far-away negatives do not cover near-miss implementations or overloaded symbols.", + "EN/DE pairs are correlated observations.", + "Provisional AI review; human annotation and inference remain unperformed." + ], + "humanReviewRemaining": [ + "Confirm first-match rather than all-match interpretation of bounded pattern request.", + "Confirm museum operative-rule summary qualifies as requested agreement.", + "Human-adjudicate provisional labels before treating them as final reference data." + ] + }, + "correctedInputReview": "Independently reread all corrected queries: native German verified; EN/DE intent remains consistent; wildcard clarification resolves original caveat. Expected asset IDs unchanged. Original report preserved by coordinating agent in review-history/blind-review-before-correction.json." +} diff --git a/fixtures/relevance-v2/review-history/blind-review-input-before-correction.json b/fixtures/relevance-v2/review-history/blind-review-input-before-correction.json new file mode 100644 index 0000000..9d6d038 --- /dev/null +++ b/fixtures/relevance-v2/review-history/blind-review-input-before-correction.json @@ -0,0 +1,581 @@ +{ + "version": 2, + "scope": "text/code only; no inference performed", + "assets": [ + { + "id": "code-pattern", + "path": "sources/BurntSushi__aho-corasick__src__packed__api.rs", + "kind": "code", + "split": "calibration", + "repository": "BurntSushi/aho-corasick", + "commit": "6c0abf5681bfc30bb9d8f7f52b68a350b436fffa", + "source_path": "src/packed/api.rs", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/src/packed/api.rs", + "sha256": "7bcb23b99bbf87e41348ef8d4db72a88dff744de503dcb684ac9d40659656f96", + "bytes": 23091, + "license": "MIT OR Unlicense", + "license_files": [ + { + "path": "licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt", + "sha256": "0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/LICENSE-MIT" + }, + { + "path": "licenses/BurntSushi__aho-corasick__UNLICENSE.txt", + "sha256": "7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/UNLICENSE" + }, + { + "path": "licenses/BurntSushi__aho-corasick__COPYING.txt", + "sha256": "01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/COPYING" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "code-version", + "path": "sources/dtolnay__semver__src__parse.rs", + "kind": "code", + "split": "held_out", + "repository": "dtolnay/semver", + "commit": "280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe", + "source_path": "src/parse.rs", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/src/parse.rs", + "sha256": "2d9cb28a72a813968c16da29a9690f8e53f1ce00727a1dbe67aec3ddb5ed59ed", + "bytes": 12187, + "license": "MIT OR Apache-2.0", + "license_files": [ + { + "path": "licenses/dtolnay__semver__LICENSE-MIT.txt", + "sha256": "23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-MIT" + }, + { + "path": "licenses/dtolnay__semver__LICENSE-APACHE.txt", + "sha256": "62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-APACHE" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "bicycle-a", + "path": "sources/bicycle-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "2d77a47673d5900784efa2eb7943efb29abcf36b19ef81e4291ce52dc47f1f70", + "bytes": 274, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bicycle-b", + "path": "sources/bicycle-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "6302d4a3832b65d25a46e8502cfa5dcaeb6256ef22cae9b7f6eda9d01e5d3375", + "bytes": 247, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-a", + "path": "sources/bakery-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "158ee5091f8c6cdb6775da7244441731869da3645059f10048c975504003484d", + "bytes": 267, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-b", + "path": "sources/bakery-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "c17ce0846c41b46b4346ed7e83815677dddd678cc6268297d865bca912df4920", + "bytes": 270, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-a", + "path": "sources/meter-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "ab41afc2781a045ab2eac305a68074830c9878cd951a8ee4fcd65335b4a91aab", + "bytes": 307, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-b", + "path": "sources/meter-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "6044b38f140d5302619f450fa6a7ad5ae08133e2d748a4279b325ca42b28fbb9", + "bytes": 255, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-a", + "path": "sources/museum-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "4e88213ad17ac4eb63f8acd13d9842ededebd6f211226876bd817bbd296246d0", + "bytes": 278, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-b", + "path": "sources/museum-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "51072d9e67336305851f74100583e748a4b9cbc817a83a4ec3575d5bdb792a15", + "bytes": 260, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-a", + "path": "sources/irrigation-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "e57ab03ca777a20f8a281ea700f1117d56b25439a12e05f08af5d3a928e78488", + "bytes": 306, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-b", + "path": "sources/irrigation-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "9a9b28cc09bc8f1468c6933f1d0969909e7f58478084fcbbda51b96dabb83c6c", + "bytes": 251, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-a", + "path": "sources/ferry-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "c88a26ac20a896b2f815861e2fc10d6ccee8a572ff3ee637b4eecdcac4adce86", + "bytes": 261, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-b", + "path": "sources/ferry-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "47c14d1b88e3f38167778347ec1978b4346555b66f81f321bf18e5d7ce868a41", + "bytes": 244, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + } + ], + "queries": [ + { + "id": "bicycle-target-en", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "en", + "query": "warranty instructions for a cracked bicycle frame weld", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bicycle-target-de", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "de", + "query": "Garantieanleitung für eine gerissene Schweißnaht am Fahrradrahmen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bicycle-contrast-en", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "en", + "query": "price list for replacing bicycle brake pads", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bicycle-contrast-de", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "de", + "query": "Preisliste für den Austausch von Fahrradbremsbelägen", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bicycle-absent-en", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "en", + "query": "signed recall notice for Aster electric bicycle battery fires", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bicycle-absent-de", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "de", + "query": "unterschriebene Rückrufmitteilung zu Akkubränden bei Aster-Elektrofahrrädern", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bakery-target-en", + "pair_id": "bakery-target", + "split": "calibration", + "language": "en", + "query": "procedure for checking almond warnings before biscuit batches leave the kitchen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bakery-target-de", + "pair_id": "bakery-target", + "split": "calibration", + "language": "de", + "query": "Verfahren zur Prüfung von Mandelwarnungen vor der Freigabe von Keks-Chargen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bakery-contrast-en", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "en", + "query": "checklist for loading biscuit deliveries into reusable crates", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bakery-contrast-de", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "de", + "query": "Checkliste zum Verladen von Kekslieferungen in Mehrwegkisten", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bakery-absent-en", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "en", + "query": "laboratory certificate proving Juniper biscuits contain no gluten", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bakery-absent-de", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "de", + "query": "Laborzertifikat zum Nachweis glutenfreier Juniper-Kekse", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "meter-target-en", + "pair_id": "meter-target", + "split": "calibration", + "language": "en", + "query": "instructions for photographing an electricity meter when moving out", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "meter-target-de", + "pair_id": "meter-target", + "split": "calibration", + "language": "de", + "query": "Anleitung zum Fotografieren des Stromzählers beim Auszug", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "meter-contrast-en", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "en", + "query": "November schedule for checking leaking radiator valves", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "meter-contrast-de", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "de", + "query": "Novemberplan zur Prüfung undichter Heizkörperventile", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "meter-absent-en", + "pair_id": "meter-absent", + "split": "calibration", + "language": "en", + "query": "solar installation permit for the roof of Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "meter-absent-de", + "pair_id": "meter-absent", + "split": "calibration", + "language": "de", + "query": "Genehmigung für eine Solaranlage auf dem Dach von Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "museum-target-en", + "pair_id": "museum-target", + "split": "held_out", + "language": "en", + "query": "loan agreement requiring insurance for the return journey of a ceramic bowl", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "museum-target-de", + "pair_id": "museum-target", + "split": "held_out", + "language": "de", + "query": "Leihvertrag mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "museum-contrast-en", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "en", + "query": "log instructions for recording gallery humidity twice daily", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "museum-contrast-de", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "de", + "query": "Anleitung zur zweimal täglichen Erfassung der Luftfeuchtigkeit im Museumssaal", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "museum-absent-en", + "pair_id": "museum-absent", + "split": "held_out", + "language": "en", + "query": "customs export permit for the Elm Museum bronze statue", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "museum-absent-de", + "pair_id": "museum-absent", + "split": "held_out", + "language": "de", + "query": "Zollausfuhrgenehmigung für die Bronzestatue des Elm Museums", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "irrigation-target-en", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "en", + "query": "controller instructions that stop the irrigation pump when the tank is nearly empty", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "irrigation-target-de", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "de", + "query": "Steuerungsanleitung zum Abschalten der Bewässerungspumpe bei fast leerem Tank", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "irrigation-contrast-en", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "en", + "query": "winter checklist for draining and storing sprinkler hoses", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "irrigation-contrast-de", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "de", + "query": "Wintercheckliste zum Entleeren und Lagern von Beregnungsschläuchen", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "irrigation-absent-en", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "en", + "query": "water quality laboratory report certifying Linden tank water is safe to drink", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "irrigation-absent-de", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "de", + "query": "Laborbericht zur Trinkwassereignung des Wassers im Linden-Tank", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "ferry-target-en", + "pair_id": "ferry-target", + "split": "held_out", + "language": "en", + "query": "rota rules for cancelling Saturday ferry trips when a crew member is unavailable", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "ferry-target-de", + "pair_id": "ferry-target", + "split": "held_out", + "language": "de", + "query": "Dienstplanregeln zur Absage von Samstagsfahrten bei Ausfall eines Fährbesatzungsmitglieds", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "ferry-contrast-en", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "en", + "query": "fare sheet listing the cost of taking a bicycle on the ferry", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "ferry-contrast-de", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "de", + "query": "Tarifblatt mit den Kosten für die Fahrradmitnahme auf der Fähre", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "ferry-absent-en", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "en", + "query": "signed engineering certificate for replacing the Alder Ferry diesel engine", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "ferry-absent-de", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "de", + "query": "unterschriebenes Ingenieurzertifikat zum Austausch des Dieselmotors der Alder-Fähre", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "pattern-build-en", + "pair_id": "pattern-build", + "split": "calibration", + "language": "en", + "query": "implementation that builds a packed matcher from several byte patterns", + "required_artifact": "source implementation of packed matcher construction" + }, + { + "id": "pattern-build-de", + "pair_id": "pattern-build", + "split": "calibration", + "language": "de", + "query": "Implementierung zum Aufbau eines gepackten Suchers aus mehreren Byte-Mustern", + "required_artifact": "source implementation of packed matcher construction" + }, + { + "id": "pattern-range-en", + "pair_id": "pattern-range", + "split": "calibration", + "language": "en", + "query": "code that finds multiple patterns inside a bounded span of a byte string", + "required_artifact": "source implementation of bounded pattern search" + }, + { + "id": "pattern-range-de", + "pair_id": "pattern-range", + "split": "calibration", + "language": "de", + "query": "Code zur Suche nach mehreren Mustern innerhalb eines begrenzten Bytebereichs", + "required_artifact": "source implementation of bounded pattern search" + }, + { + "id": "pattern-absent-en", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "en", + "query": "implementation of TLS certificate hostname verification", + "required_artifact": "source implementation of TLS hostname verification" + }, + { + "id": "pattern-absent-de", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "de", + "query": "Implementierung der Hostnamenprüfung für TLS-Zertifikate", + "required_artifact": "source implementation of TLS hostname verification" + }, + { + "id": "version-parse-en", + "pair_id": "version-parse", + "split": "held_out", + "language": "en", + "query": "parser for semantic version numbers with prerelease and build metadata", + "required_artifact": "source implementation parsing SemVer components" + }, + { + "id": "version-parse-de", + "pair_id": "version-parse", + "split": "held_out", + "language": "de", + "query": "Parser für semantische Versionsnummern mit Vorabversion und Build-Metadaten", + "required_artifact": "source implementation parsing SemVer components" + }, + { + "id": "version-wildcard-en", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "en", + "query": "implementation rejecting a wildcard mixed with other version comparators", + "required_artifact": "source implementation checking wildcard comparator constraints" + }, + { + "id": "version-wildcard-de", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "de", + "query": "Implementierung zum Ablehnen eines Platzhalters zusammen mit weiteren Versionsvergleichern", + "required_artifact": "source implementation checking wildcard comparator constraints" + }, + { + "id": "version-absent-en", + "pair_id": "version-absent", + "split": "held_out", + "language": "en", + "query": "implementation that verifies an Ed25519 digital signature", + "required_artifact": "source implementation of Ed25519 verification" + }, + { + "id": "version-absent-de", + "pair_id": "version-absent", + "split": "held_out", + "language": "de", + "query": "Implementierung zur Prüfung einer digitalen Ed25519-Signatur", + "required_artifact": "source implementation of Ed25519 verification" + } + ] +} diff --git a/fixtures/relevance-v2/review-history/blind-review-input-before-precision-clarification.json b/fixtures/relevance-v2/review-history/blind-review-input-before-precision-clarification.json new file mode 100644 index 0000000..36e6ae2 --- /dev/null +++ b/fixtures/relevance-v2/review-history/blind-review-input-before-precision-clarification.json @@ -0,0 +1,581 @@ +{ + "version": 2, + "scope": "text/code only; no inference performed", + "assets": [ + { + "id": "code-pattern", + "path": "sources/BurntSushi__aho-corasick__src__packed__api.rs", + "kind": "code", + "split": "calibration", + "repository": "BurntSushi/aho-corasick", + "commit": "6c0abf5681bfc30bb9d8f7f52b68a350b436fffa", + "source_path": "src/packed/api.rs", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/src/packed/api.rs", + "sha256": "7bcb23b99bbf87e41348ef8d4db72a88dff744de503dcb684ac9d40659656f96", + "bytes": 23091, + "license": "MIT OR Unlicense", + "license_files": [ + { + "path": "licenses/BurntSushi__aho-corasick__LICENSE-MIT.txt", + "sha256": "0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/LICENSE-MIT" + }, + { + "path": "licenses/BurntSushi__aho-corasick__UNLICENSE.txt", + "sha256": "7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/UNLICENSE" + }, + { + "path": "licenses/BurntSushi__aho-corasick__COPYING.txt", + "sha256": "01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f", + "url": "https://raw.githubusercontent.com/BurntSushi/aho-corasick/6c0abf5681bfc30bb9d8f7f52b68a350b436fffa/COPYING" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "code-version", + "path": "sources/dtolnay__semver__src__parse.rs", + "kind": "code", + "split": "held_out", + "repository": "dtolnay/semver", + "commit": "280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe", + "source_path": "src/parse.rs", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/src/parse.rs", + "sha256": "2d9cb28a72a813968c16da29a9690f8e53f1ce00727a1dbe67aec3ddb5ed59ed", + "bytes": 12187, + "license": "MIT OR Apache-2.0", + "license_files": [ + { + "path": "licenses/dtolnay__semver__LICENSE-MIT.txt", + "sha256": "23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-MIT" + }, + { + "path": "licenses/dtolnay__semver__LICENSE-APACHE.txt", + "sha256": "62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a", + "url": "https://raw.githubusercontent.com/dtolnay/semver/280ebcb6edac3aa4cdc545dbff8a26c5ac4861fe/LICENSE-APACHE" + } + ], + "changes": "Exact upstream bytes; no edits" + }, + { + "id": "bicycle-a", + "path": "sources/bicycle-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "2d77a47673d5900784efa2eb7943efb29abcf36b19ef81e4291ce52dc47f1f70", + "bytes": 274, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bicycle-b", + "path": "sources/bicycle-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bicycle", + "sha256": "6302d4a3832b65d25a46e8502cfa5dcaeb6256ef22cae9b7f6eda9d01e5d3375", + "bytes": 247, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-a", + "path": "sources/bakery-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "158ee5091f8c6cdb6775da7244441731869da3645059f10048c975504003484d", + "bytes": 267, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "bakery-b", + "path": "sources/bakery-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "bakery", + "sha256": "c17ce0846c41b46b4346ed7e83815677dddd678cc6268297d865bca912df4920", + "bytes": 270, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-a", + "path": "sources/meter-a.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "ab41afc2781a045ab2eac305a68074830c9878cd951a8ee4fcd65335b4a91aab", + "bytes": 307, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "meter-b", + "path": "sources/meter-b.md", + "kind": "document", + "split": "calibration", + "topic_family": "meter", + "sha256": "6044b38f140d5302619f450fa6a7ad5ae08133e2d748a4279b325ca42b28fbb9", + "bytes": 255, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-a", + "path": "sources/museum-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "4e88213ad17ac4eb63f8acd13d9842ededebd6f211226876bd817bbd296246d0", + "bytes": 278, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "museum-b", + "path": "sources/museum-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "museum", + "sha256": "51072d9e67336305851f74100583e748a4b9cbc817a83a4ec3575d5bdb792a15", + "bytes": 260, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-a", + "path": "sources/irrigation-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "e57ab03ca777a20f8a281ea700f1117d56b25439a12e05f08af5d3a928e78488", + "bytes": 306, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "irrigation-b", + "path": "sources/irrigation-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "irrigation", + "sha256": "9a9b28cc09bc8f1468c6933f1d0969909e7f58478084fcbbda51b96dabb83c6c", + "bytes": 251, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-a", + "path": "sources/ferry-a.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "c88a26ac20a896b2f815861e2fc10d6ccee8a572ff3ee637b4eecdcac4adce86", + "bytes": 261, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + }, + { + "id": "ferry-b", + "path": "sources/ferry-b.md", + "kind": "document", + "split": "held_out", + "topic_family": "ferry", + "sha256": "47c14d1b88e3f38167778347ec1978b4346555b66f81f321bf18e5d7ce868a41", + "bytes": 244, + "license": "MIT; searchi repository LICENSE", + "provenance": "Explicitly authored fictional diagnostic; no real customer data" + } + ], + "queries": [ + { + "id": "bicycle-target-en", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "en", + "query": "warranty instructions for a cracked bicycle frame weld", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bicycle-target-de", + "pair_id": "bicycle-target", + "split": "calibration", + "language": "de", + "query": "Garantieanleitung für eine gerissene Schweißnaht am Fahrradrahmen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bicycle-contrast-en", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "en", + "query": "price list for replacing bicycle brake pads", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bicycle-contrast-de", + "pair_id": "bicycle-contrast", + "split": "calibration", + "language": "de", + "query": "Preisliste für den Austausch von Fahrradbremsbelägen", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bicycle-absent-en", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "en", + "query": "signed recall notice for Aster electric bicycle battery fires", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bicycle-absent-de", + "pair_id": "bicycle-absent", + "split": "calibration", + "language": "de", + "query": "unterschriebene Rückrufmitteilung zu Akkubränden bei Aster-Elektrofahrrädern", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bakery-target-en", + "pair_id": "bakery-target", + "split": "calibration", + "language": "en", + "query": "procedure for checking almond warnings before biscuit batches leave the kitchen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bakery-target-de", + "pair_id": "bakery-target", + "split": "calibration", + "language": "de", + "query": "Verfahren zur Prüfung von Mandelwarnungen vor der Freigabe von Keks-Chargen", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "bakery-contrast-en", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "en", + "query": "checklist for loading biscuit deliveries into reusable crates", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bakery-contrast-de", + "pair_id": "bakery-contrast", + "split": "calibration", + "language": "de", + "query": "Checkliste zum Verladen von Kekslieferungen in Mehrwegkisten", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "bakery-absent-en", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "en", + "query": "laboratory certificate proving Juniper biscuits contain no gluten", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "bakery-absent-de", + "pair_id": "bakery-absent", + "split": "calibration", + "language": "de", + "query": "Laborzertifikat zum Nachweis glutenfreier Juniper-Kekse", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "meter-target-en", + "pair_id": "meter-target", + "split": "calibration", + "language": "en", + "query": "instructions for photographing an electricity meter when moving out", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "meter-target-de", + "pair_id": "meter-target", + "split": "calibration", + "language": "de", + "query": "Anleitung zum Fotografieren des Stromzählers beim Auszug", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "meter-contrast-en", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "en", + "query": "November schedule for checking leaking radiator valves", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "meter-contrast-de", + "pair_id": "meter-contrast", + "split": "calibration", + "language": "de", + "query": "Novemberplan zur Prüfung undichter Heizkörperventile", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "meter-absent-en", + "pair_id": "meter-absent", + "split": "calibration", + "language": "en", + "query": "solar installation permit for the roof of Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "meter-absent-de", + "pair_id": "meter-absent", + "split": "calibration", + "language": "de", + "query": "Genehmigung für eine Solaranlage auf dem Dach von Rowan Court", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "museum-target-en", + "pair_id": "museum-target", + "split": "held_out", + "language": "en", + "query": "loan agreement requiring insurance for the return journey of a ceramic bowl", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "museum-target-de", + "pair_id": "museum-target", + "split": "held_out", + "language": "de", + "query": "Leihvertrag mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "museum-contrast-en", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "en", + "query": "log instructions for recording gallery humidity twice daily", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "museum-contrast-de", + "pair_id": "museum-contrast", + "split": "held_out", + "language": "de", + "query": "Anleitung zur zweimal täglichen Erfassung der Luftfeuchtigkeit im Museumssaal", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "museum-absent-en", + "pair_id": "museum-absent", + "split": "held_out", + "language": "en", + "query": "customs export permit for the Elm Museum bronze statue", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "museum-absent-de", + "pair_id": "museum-absent", + "split": "held_out", + "language": "de", + "query": "Zollausfuhrgenehmigung für die Bronzestatue des Elm Museums", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "irrigation-target-en", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "en", + "query": "controller instructions that stop the irrigation pump when the tank is nearly empty", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "irrigation-target-de", + "pair_id": "irrigation-target", + "split": "held_out", + "language": "de", + "query": "Steuerungsanleitung zum Abschalten der Bewässerungspumpe bei fast leerem Tank", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "irrigation-contrast-en", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "en", + "query": "winter checklist for draining and storing sprinkler hoses", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "irrigation-contrast-de", + "pair_id": "irrigation-contrast", + "split": "held_out", + "language": "de", + "query": "Wintercheckliste zum Entleeren und Lagern von Beregnungsschläuchen", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "irrigation-absent-en", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "en", + "query": "water quality laboratory report certifying Linden tank water is safe to drink", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "irrigation-absent-de", + "pair_id": "irrigation-absent", + "split": "held_out", + "language": "de", + "query": "Laborbericht zur Trinkwassereignung des Wassers im Linden-Tank", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "ferry-target-en", + "pair_id": "ferry-target", + "split": "held_out", + "language": "en", + "query": "rota rules for cancelling Saturday ferry trips when a crew member is unavailable", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "ferry-target-de", + "pair_id": "ferry-target", + "split": "held_out", + "language": "de", + "query": "Dienstplanregeln zur Absage von Samstagsfahrten bei Ausfall eines Fährbesatzungsmitglieds", + "required_artifact": "document with the requested operative rule" + }, + { + "id": "ferry-contrast-en", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "en", + "query": "fare sheet listing the cost of taking a bicycle on the ferry", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "ferry-contrast-de", + "pair_id": "ferry-contrast", + "split": "held_out", + "language": "de", + "query": "Tarifblatt mit den Kosten für die Fahrradmitnahme auf der Fähre", + "required_artifact": "document containing the requested procedure or tariff" + }, + { + "id": "ferry-absent-en", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "en", + "query": "signed engineering certificate for replacing the Alder Ferry diesel engine", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "ferry-absent-de", + "pair_id": "ferry-absent", + "split": "held_out", + "language": "de", + "query": "unterschriebenes Ingenieurzertifikat zum Austausch des Dieselmotors der Alder-Fähre", + "required_artifact": "specific certificate, permit or signed notice described in the query" + }, + { + "id": "pattern-build-en", + "pair_id": "pattern-build", + "split": "calibration", + "language": "en", + "query": "implementation that builds a packed matcher from several byte patterns", + "required_artifact": "source implementation of packed matcher construction" + }, + { + "id": "pattern-build-de", + "pair_id": "pattern-build", + "split": "calibration", + "language": "de", + "query": "Implementierung zum Aufbau eines gepackten Suchers aus mehreren Byte-Mustern", + "required_artifact": "source implementation of packed matcher construction" + }, + { + "id": "pattern-range-en", + "pair_id": "pattern-range", + "split": "calibration", + "language": "en", + "query": "code that finds multiple patterns inside a bounded span of a byte string", + "required_artifact": "source implementation of bounded pattern search" + }, + { + "id": "pattern-range-de", + "pair_id": "pattern-range", + "split": "calibration", + "language": "de", + "query": "Code zur Suche nach mehreren Mustern innerhalb eines begrenzten Bytebereichs", + "required_artifact": "source implementation of bounded pattern search" + }, + { + "id": "pattern-absent-en", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "en", + "query": "implementation of TLS certificate hostname verification", + "required_artifact": "source implementation of TLS hostname verification" + }, + { + "id": "pattern-absent-de", + "pair_id": "pattern-absent", + "split": "calibration", + "language": "de", + "query": "Implementierung der Hostnamenprüfung für TLS-Zertifikate", + "required_artifact": "source implementation of TLS hostname verification" + }, + { + "id": "version-parse-en", + "pair_id": "version-parse", + "split": "held_out", + "language": "en", + "query": "parser for semantic version numbers with prerelease and build metadata", + "required_artifact": "source implementation parsing SemVer components" + }, + { + "id": "version-parse-de", + "pair_id": "version-parse", + "split": "held_out", + "language": "de", + "query": "Parser für semantische Versionsnummern mit Vorabversion und Build-Metadaten", + "required_artifact": "source implementation parsing SemVer components" + }, + { + "id": "version-wildcard-en", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "en", + "query": "implementation rejecting a lone wildcard followed by additional version comparators, for example *, >=1.0.0", + "required_artifact": "source implementation checking wildcard comparator constraints" + }, + { + "id": "version-wildcard-de", + "pair_id": "version-wildcard", + "split": "held_out", + "language": "de", + "query": "Implementierung zum Ablehnen eines alleinstehenden Platzhalters mit weiteren Versionsvergleichern, zum Beispiel *, >=1.0.0", + "required_artifact": "source implementation checking wildcard comparator constraints" + }, + { + "id": "version-absent-en", + "pair_id": "version-absent", + "split": "held_out", + "language": "en", + "query": "implementation that verifies an Ed25519 digital signature", + "required_artifact": "source implementation of Ed25519 verification" + }, + { + "id": "version-absent-de", + "pair_id": "version-absent", + "split": "held_out", + "language": "de", + "query": "Implementierung zur Prüfung einer digitalen Ed25519-Signatur", + "required_artifact": "source implementation of Ed25519 verification" + } + ] +} diff --git a/fixtures/relevance-v2/review-history/corrections.json b/fixtures/relevance-v2/review-history/corrections.json new file mode 100644 index 0000000..4560719 --- /dev/null +++ b/fixtures/relevance-v2/review-history/corrections.json @@ -0,0 +1,128 @@ +{ + "before_sha256": "b417c45920b4564e07c159f7fd71df58f947eecb178963c1f0fda28ebaeb927f", + "after_sha256": "7054abc918f9ffbd7c52fa7f48a6108aee847cfe00861aa25511c4d533b8624d", + "phase": "before inference and before final freeze", + "changes": [ + { + "query_id": "bicycle-target-de", + "before": "Garantieanleitung für eine gerissene Schweißnaht am Fahrradrahmen", + "after": "Garantieanleitung für eine gerissene Schweißnaht am Fahrradrahmen", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "bicycle-contrast-de", + "before": "Preisliste für den Austausch von Fahrradbremsbelägen", + "after": "Preisliste für den Austausch von Fahrradbremsbelägen", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "bicycle-absent-de", + "before": "unterschriebene Rückrufmitteilung zu Akkubränden bei Aster-Elektrofahrrädern", + "after": "unterschriebene Rückrufmitteilung zu Akkubränden bei Aster-Elektrofahrrädern", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "bakery-target-de", + "before": "Verfahren zur Prüfung von Mandelwarnungen vor der Freigabe von Keks-Chargen", + "after": "Verfahren zur Prüfung von Mandelwarnungen vor der Freigabe von Keks-Chargen", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "meter-target-de", + "before": "Anleitung zum Fotografieren des Stromzählers beim Auszug", + "after": "Anleitung zum Fotografieren des Stromzählers beim Auszug", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "meter-contrast-de", + "before": "Novemberplan zur Prüfung undichter Heizkörperventile", + "after": "Novemberplan zur Prüfung undichter Heizkörperventile", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "meter-absent-de", + "before": "Genehmigung für eine Solaranlage auf dem Dach von Rowan Court", + "after": "Genehmigung für eine Solaranlage auf dem Dach von Rowan Court", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "museum-target-de", + "before": "Leihvertrag mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "after": "Leihvertrag mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "museum-contrast-de", + "before": "Anleitung zur zweimal täglichen Erfassung der Luftfeuchtigkeit im Museumssaal", + "after": "Anleitung zur zweimal täglichen Erfassung der Luftfeuchtigkeit im Museumssaal", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "museum-absent-de", + "before": "Zollausfuhrgenehmigung für die Bronzestatue des Elm Museums", + "after": "Zollausfuhrgenehmigung für die Bronzestatue des Elm Museums", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "irrigation-target-de", + "before": "Steuerungsanleitung zum Abschalten der Bewässerungspumpe bei fast leerem Tank", + "after": "Steuerungsanleitung zum Abschalten der Bewässerungspumpe bei fast leerem Tank", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "irrigation-contrast-de", + "before": "Wintercheckliste zum Entleeren und Lagern von Beregnungsschläuchen", + "after": "Wintercheckliste zum Entleeren und Lagern von Beregnungsschläuchen", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "ferry-target-de", + "before": "Dienstplanregeln zur Absage von Samstagsfahrten bei Ausfall eines Fährbesatzungsmitglieds", + "after": "Dienstplanregeln zur Absage von Samstagsfahrten bei Ausfall eines Fährbesatzungsmitglieds", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "ferry-contrast-de", + "before": "Tarifblatt mit den Kosten für die Fahrradmitnahme auf der Fähre", + "after": "Tarifblatt mit den Kosten für die Fahrradmitnahme auf der Fähre", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "ferry-absent-de", + "before": "unterschriebenes Ingenieurzertifikat zum Austausch des Dieselmotors der Alder-Fähre", + "after": "unterschriebenes Ingenieurzertifikat zum Austausch des Dieselmotors der Alder-Fähre", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "pattern-absent-de", + "before": "Implementierung der Hostnamenprüfung für TLS-Zertifikate", + "after": "Implementierung der Hostnamenprüfung für TLS-Zertifikate", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "version-parse-de", + "before": "Parser für semantische Versionsnummern mit Vorabversion und Build-Metadaten", + "after": "Parser für semantische Versionsnummern mit Vorabversion und Build-Metadaten", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + }, + { + "query_id": "version-wildcard-en", + "before": "implementation rejecting a wildcard mixed with other version comparators", + "after": "implementation rejecting a lone wildcard followed by additional version comparators, for example *, >=1.0.0", + "reason": "Clarify lone wildcard plus other comparators; numeric partial versions such as 1.* are not the stated rejection" + }, + { + "query_id": "version-wildcard-de", + "before": "Implementierung zum Ablehnen eines Platzhalters zusammen mit weiteren Versionsvergleichern", + "after": "Implementierung zum Ablehnen eines alleinstehenden Platzhalters mit weiteren Versionsvergleichern, zum Beispiel *, >=1.0.0", + "reason": "Clarify lone wildcard plus other comparators; numeric partial versions such as 1.* are not the stated rejection" + }, + { + "query_id": "version-absent-de", + "before": "Implementierung zur Prüfung einer digitalen Ed25519-Signatur", + "after": "Implementierung zur Prüfung einer digitalen Ed25519-Signatur", + "reason": "Repair UTF-8 bytes interpreted as Windows-1252 in authored German text" + } + ], + "source_and_license_bytes": "unchanged" +} diff --git a/fixtures/relevance-v2/review-history/precision-clarifications.json b/fixtures/relevance-v2/review-history/precision-clarifications.json new file mode 100644 index 0000000..2aef766 --- /dev/null +++ b/fixtures/relevance-v2/review-history/precision-clarifications.json @@ -0,0 +1,31 @@ +{ + "after_sha256": "d90a3b863c7985acfc93fce0b4c4b1325c109c80d012e81dda87e14aa6bcc94a", + "phase": "before inference and freezing", + "changes": [ + { + "query_id": "museum-target-en", + "before": "loan agreement requiring insurance for the return journey of a ceramic bowl", + "after": "loan terms requiring insurance for the return journey of a ceramic bowl", + "reason": "Request operative loan terms rather than implying an executed signed agreement" + }, + { + "query_id": "museum-target-de", + "before": "Leihvertrag mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "after": "Leihbedingungen mit Versicherungspflicht für den Rücktransport einer Keramikschale", + "reason": "Request operative loan terms rather than implying an executed signed agreement" + }, + { + "query_id": "pattern-range-en", + "before": "code that finds multiple patterns inside a bounded span of a byte string", + "after": "code that returns the first match among several byte patterns inside a bounded span of a byte string", + "reason": "Clarify first-match bounded-span semantics" + }, + { + "query_id": "pattern-range-de", + "before": "Code zur Suche nach mehreren Mustern innerhalb eines begrenzten Bytebereichs", + "after": "Code, der den ersten Treffer unter mehreren Byte-Mustern innerhalb eines begrenzten Bytebereichs zurückgibt", + "reason": "Clarify first-match bounded-span semantics" + } + ], + "source_expected_ids_required_artifact": "unchanged" +} diff --git a/fixtures/relevance-v2/sources/BurntSushi__aho-corasick__src__packed__api.rs b/fixtures/relevance-v2/sources/BurntSushi__aho-corasick__src__packed__api.rs new file mode 100644 index 0000000..7088b7d --- /dev/null +++ b/fixtures/relevance-v2/sources/BurntSushi__aho-corasick__src__packed__api.rs @@ -0,0 +1,691 @@ +use alloc::sync::Arc; + +use crate::{ + packed::{pattern::Patterns, rabinkarp::RabinKarp, teddy}, + util::search::{Match, Span}, +}; + +/// This is a limit placed on the total number of patterns we're willing to try +/// and match at once. As more sophisticated algorithms are added, this number +/// may be increased. +const PATTERN_LIMIT: usize = 128; + +/// A knob for controlling the match semantics of a packed multiple string +/// searcher. +/// +/// This differs from the [`MatchKind`](crate::MatchKind) type in the top-level +/// crate module in that it doesn't support "standard" match semantics, +/// and instead only supports leftmost-first or leftmost-longest. Namely, +/// "standard" semantics cannot be easily supported by packed searchers. +/// +/// For more information on the distinction between leftmost-first and +/// leftmost-longest, see the docs on the top-level `MatchKind` type. +/// +/// Unlike the top-level `MatchKind` type, the default match semantics for this +/// type are leftmost-first. +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[non_exhaustive] +pub enum MatchKind { + /// Use leftmost-first match semantics, which reports leftmost matches. + /// When there are multiple possible leftmost matches, the match + /// corresponding to the pattern that appeared earlier when constructing + /// the automaton is reported. + /// + /// This is the default. + LeftmostFirst, + /// Use leftmost-longest match semantics, which reports leftmost matches. + /// When there are multiple possible leftmost matches, the longest match + /// is chosen. + LeftmostLongest, +} + +impl Default for MatchKind { + fn default() -> MatchKind { + MatchKind::LeftmostFirst + } +} + +/// The configuration for a packed multiple pattern searcher. +/// +/// The configuration is currently limited only to being able to select the +/// match semantics (leftmost-first or leftmost-longest) of a searcher. In the +/// future, more knobs may be made available. +/// +/// A configuration produces a [`packed::Builder`](Builder), which in turn can +/// be used to construct a [`packed::Searcher`](Searcher) for searching. +/// +/// # Example +/// +/// This example shows how to use leftmost-longest semantics instead of the +/// default (leftmost-first). +/// +/// ``` +/// use aho_corasick::{packed::{Config, MatchKind}, PatternID}; +/// +/// # fn example() -> Option<()> { +/// let searcher = Config::new() +/// .match_kind(MatchKind::LeftmostLongest) +/// .builder() +/// .add("foo") +/// .add("foobar") +/// .build()?; +/// let matches: Vec = searcher +/// .find_iter("foobar") +/// .map(|mat| mat.pattern()) +/// .collect(); +/// assert_eq!(vec![PatternID::must(1)], matches); +/// # Some(()) } +/// # if cfg!(all(feature = "std", any( +/// # target_arch = "x86_64", target_arch = "aarch64", +/// # ))) { +/// # example().unwrap() +/// # } else { +/// # assert!(example().is_none()); +/// # } +/// ``` +#[derive(Clone, Debug)] +pub struct Config { + kind: MatchKind, + force: Option, + only_teddy_fat: Option, + only_teddy_256bit: Option, + heuristic_pattern_limits: bool, +} + +/// An internal option for forcing the use of a particular packed algorithm. +/// +/// When an algorithm is forced, if a searcher could not be constructed for it, +/// then no searcher will be returned even if an alternative algorithm would +/// work. +#[derive(Clone, Debug)] +enum ForceAlgorithm { + Teddy, + RabinKarp, +} + +impl Default for Config { + fn default() -> Config { + Config::new() + } +} + +impl Config { + /// Create a new default configuration. A default configuration uses + /// leftmost-first match semantics. + pub fn new() -> Config { + Config { + kind: MatchKind::LeftmostFirst, + force: None, + only_teddy_fat: None, + only_teddy_256bit: None, + heuristic_pattern_limits: true, + } + } + + /// Create a packed builder from this configuration. The builder can be + /// used to accumulate patterns and create a [`Searcher`] from them. + pub fn builder(&self) -> Builder { + Builder::from_config(self.clone()) + } + + /// Set the match semantics for this configuration. + pub fn match_kind(&mut self, kind: MatchKind) -> &mut Config { + self.kind = kind; + self + } + + /// An undocumented method for forcing the use of the Teddy algorithm. + /// + /// This is only exposed for more precise testing and benchmarks. Callers + /// should not use it as it is not part of the API stability guarantees of + /// this crate. + #[doc(hidden)] + pub fn only_teddy(&mut self, yes: bool) -> &mut Config { + if yes { + self.force = Some(ForceAlgorithm::Teddy); + } else { + self.force = None; + } + self + } + + /// An undocumented method for forcing the use of the Fat Teddy algorithm. + /// + /// This is only exposed for more precise testing and benchmarks. Callers + /// should not use it as it is not part of the API stability guarantees of + /// this crate. + #[doc(hidden)] + pub fn only_teddy_fat(&mut self, yes: Option) -> &mut Config { + self.only_teddy_fat = yes; + self + } + + /// An undocumented method for forcing the use of SSE (`Some(false)`) or + /// AVX (`Some(true)`) algorithms. + /// + /// This is only exposed for more precise testing and benchmarks. Callers + /// should not use it as it is not part of the API stability guarantees of + /// this crate. + #[doc(hidden)] + pub fn only_teddy_256bit(&mut self, yes: Option) -> &mut Config { + self.only_teddy_256bit = yes; + self + } + + /// An undocumented method for forcing the use of the Rabin-Karp algorithm. + /// + /// This is only exposed for more precise testing and benchmarks. Callers + /// should not use it as it is not part of the API stability guarantees of + /// this crate. + #[doc(hidden)] + pub fn only_rabin_karp(&mut self, yes: bool) -> &mut Config { + if yes { + self.force = Some(ForceAlgorithm::RabinKarp); + } else { + self.force = None; + } + self + } + + /// Request that heuristic limitations on the number of patterns be + /// employed. This useful to disable for benchmarking where one wants to + /// explore how Teddy performs on large number of patterns even if the + /// heuristics would otherwise refuse construction. + /// + /// This is enabled by default. + pub fn heuristic_pattern_limits(&mut self, yes: bool) -> &mut Config { + self.heuristic_pattern_limits = yes; + self + } +} + +/// A builder for constructing a packed searcher from a collection of patterns. +/// +/// # Example +/// +/// This example shows how to use a builder to construct a searcher. By +/// default, leftmost-first match semantics are used. +/// +/// ``` +/// use aho_corasick::{packed::{Builder, MatchKind}, PatternID}; +/// +/// # fn example() -> Option<()> { +/// let searcher = Builder::new() +/// .add("foobar") +/// .add("foo") +/// .build()?; +/// let matches: Vec = searcher +/// .find_iter("foobar") +/// .map(|mat| mat.pattern()) +/// .collect(); +/// assert_eq!(vec![PatternID::ZERO], matches); +/// # Some(()) } +/// # if cfg!(all(feature = "std", any( +/// # target_arch = "x86_64", target_arch = "aarch64", +/// # ))) { +/// # example().unwrap() +/// # } else { +/// # assert!(example().is_none()); +/// # } +/// ``` +#[derive(Clone, Debug)] +pub struct Builder { + /// The configuration of this builder and subsequent matcher. + config: Config, + /// Set to true if the builder detects that a matcher cannot be built. + inert: bool, + /// The patterns provided by the caller. + patterns: Patterns, +} + +impl Builder { + /// Create a new builder for constructing a multi-pattern searcher. This + /// constructor uses the default configuration. + pub fn new() -> Builder { + Builder::from_config(Config::new()) + } + + fn from_config(config: Config) -> Builder { + Builder { config, inert: false, patterns: Patterns::new() } + } + + /// Build a searcher from the patterns added to this builder so far. + pub fn build(&self) -> Option { + if self.inert || self.patterns.is_empty() { + return None; + } + let mut patterns = self.patterns.clone(); + patterns.set_match_kind(self.config.kind); + let patterns = Arc::new(patterns); + let rabinkarp = RabinKarp::new(&patterns); + // Effectively, we only want to return a searcher if we can use Teddy, + // since Teddy is our only fast packed searcher at the moment. + // Rabin-Karp is only used when searching haystacks smaller than what + // Teddy can support. Thus, the only way to get a Rabin-Karp searcher + // is to force it using undocumented APIs (for tests/benchmarks). + let (search_kind, minimum_len) = match self.config.force { + None | Some(ForceAlgorithm::Teddy) => { + debug!("trying to build Teddy packed matcher"); + let teddy = match self.build_teddy(Arc::clone(&patterns)) { + None => return None, + Some(teddy) => teddy, + }; + let minimum_len = teddy.minimum_len(); + (SearchKind::Teddy(teddy), minimum_len) + } + Some(ForceAlgorithm::RabinKarp) => { + debug!("using Rabin-Karp packed matcher"); + (SearchKind::RabinKarp, 0) + } + }; + Some(Searcher { patterns, rabinkarp, search_kind, minimum_len }) + } + + fn build_teddy(&self, patterns: Arc) -> Option { + teddy::Builder::new() + .only_256bit(self.config.only_teddy_256bit) + .only_fat(self.config.only_teddy_fat) + .heuristic_pattern_limits(self.config.heuristic_pattern_limits) + .build(patterns) + } + + /// Add the given pattern to this set to match. + /// + /// The order in which patterns are added is significant. Namely, when + /// using leftmost-first match semantics, then when multiple patterns can + /// match at a particular location, the pattern that was added first is + /// used as the match. + /// + /// If the number of patterns added exceeds the amount supported by packed + /// searchers, then the builder will stop accumulating patterns and render + /// itself inert. At this point, constructing a searcher will always return + /// `None`. + pub fn add>(&mut self, pattern: P) -> &mut Builder { + if self.inert { + return self; + } else if self.patterns.len() >= PATTERN_LIMIT { + self.inert = true; + self.patterns.reset(); + return self; + } + // Just in case PATTERN_LIMIT increases beyond u16::MAX. + assert!(self.patterns.len() <= u16::MAX as usize); + + let pattern = pattern.as_ref(); + if pattern.is_empty() { + self.inert = true; + self.patterns.reset(); + return self; + } + self.patterns.add(pattern); + self + } + + /// Add the given iterator of patterns to this set to match. + /// + /// The iterator must yield elements that can be converted into a `&[u8]`. + /// + /// The order in which patterns are added is significant. Namely, when + /// using leftmost-first match semantics, then when multiple patterns can + /// match at a particular location, the pattern that was added first is + /// used as the match. + /// + /// If the number of patterns added exceeds the amount supported by packed + /// searchers, then the builder will stop accumulating patterns and render + /// itself inert. At this point, constructing a searcher will always return + /// `None`. + pub fn extend(&mut self, patterns: I) -> &mut Builder + where + I: IntoIterator, + P: AsRef<[u8]>, + { + for p in patterns { + self.add(p); + } + self + } + + /// Returns the number of patterns added to this builder. + pub fn len(&self) -> usize { + self.patterns.len() + } + + /// Returns the length, in bytes, of the shortest pattern added. + pub fn minimum_len(&self) -> usize { + self.patterns.minimum_len() + } +} + +impl Default for Builder { + fn default() -> Builder { + Builder::new() + } +} + +/// A packed searcher for quickly finding occurrences of multiple patterns. +/// +/// If callers need more flexible construction, or if one wants to change the +/// match semantics (either leftmost-first or leftmost-longest), then one can +/// use the [`Config`] and/or [`Builder`] types for more fine grained control. +/// +/// # Example +/// +/// This example shows how to create a searcher from an iterator of patterns. +/// By default, leftmost-first match semantics are used. +/// +/// ``` +/// use aho_corasick::{packed::{MatchKind, Searcher}, PatternID}; +/// +/// # fn example() -> Option<()> { +/// let searcher = Searcher::new(["foobar", "foo"].iter().cloned())?; +/// let matches: Vec = searcher +/// .find_iter("foobar") +/// .map(|mat| mat.pattern()) +/// .collect(); +/// assert_eq!(vec![PatternID::ZERO], matches); +/// # Some(()) } +/// # if cfg!(all(feature = "std", any( +/// # target_arch = "x86_64", target_arch = "aarch64", +/// # ))) { +/// # example().unwrap() +/// # } else { +/// # assert!(example().is_none()); +/// # } +/// ``` +#[derive(Clone, Debug)] +pub struct Searcher { + patterns: Arc, + rabinkarp: RabinKarp, + search_kind: SearchKind, + minimum_len: usize, +} + +#[derive(Clone, Debug)] +enum SearchKind { + Teddy(teddy::Searcher), + RabinKarp, +} + +impl Searcher { + /// A convenience function for constructing a searcher from an iterator + /// of things that can be converted to a `&[u8]`. + /// + /// If a searcher could not be constructed (either because of an + /// unsupported CPU or because there are too many patterns), then `None` + /// is returned. + /// + /// # Example + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{packed::{MatchKind, Searcher}, PatternID}; + /// + /// # fn example() -> Option<()> { + /// let searcher = Searcher::new(["foobar", "foo"].iter().cloned())?; + /// let matches: Vec = searcher + /// .find_iter("foobar") + /// .map(|mat| mat.pattern()) + /// .collect(); + /// assert_eq!(vec![PatternID::ZERO], matches); + /// # Some(()) } + /// # if cfg!(all(feature = "std", any( + /// # target_arch = "x86_64", target_arch = "aarch64", + /// # ))) { + /// # example().unwrap() + /// # } else { + /// # assert!(example().is_none()); + /// # } + /// ``` + pub fn new(patterns: I) -> Option + where + I: IntoIterator, + P: AsRef<[u8]>, + { + Builder::new().extend(patterns).build() + } + + /// A convenience function for calling `Config::new()`. + /// + /// This is useful for avoiding an additional import. + pub fn config() -> Config { + Config::new() + } + + /// A convenience function for calling `Builder::new()`. + /// + /// This is useful for avoiding an additional import. + pub fn builder() -> Builder { + Builder::new() + } + + /// Return the first occurrence of any of the patterns in this searcher, + /// according to its match semantics, in the given haystack. The `Match` + /// returned will include the identifier of the pattern that matched, which + /// corresponds to the index of the pattern (starting from `0`) in which it + /// was added. + /// + /// # Example + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{packed::{MatchKind, Searcher}, PatternID}; + /// + /// # fn example() -> Option<()> { + /// let searcher = Searcher::new(["foobar", "foo"].iter().cloned())?; + /// let mat = searcher.find("foobar")?; + /// assert_eq!(PatternID::ZERO, mat.pattern()); + /// assert_eq!(0, mat.start()); + /// assert_eq!(6, mat.end()); + /// # Some(()) } + /// # if cfg!(all(feature = "std", any( + /// # target_arch = "x86_64", target_arch = "aarch64", + /// # ))) { + /// # example().unwrap() + /// # } else { + /// # assert!(example().is_none()); + /// # } + /// ``` + #[inline] + pub fn find>(&self, haystack: B) -> Option { + let haystack = haystack.as_ref(); + self.find_in(haystack, Span::from(0..haystack.len())) + } + + /// Return the first occurrence of any of the patterns in this searcher, + /// according to its match semantics, in the given haystack starting from + /// the given position. + /// + /// The `Match` returned will include the identifier of the pattern that + /// matched, which corresponds to the index of the pattern (starting from + /// `0`) in which it was added. The offsets in the `Match` will be relative + /// to the start of `haystack` (and not `at`). + /// + /// # Panics + /// + /// When `span` does not correspond to a valid range in `haystack`. + /// + /// # Example + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{packed::{MatchKind, Searcher}, PatternID, Span}; + /// + /// # fn example() -> Option<()> { + /// let haystack = "foofoobar"; + /// let searcher = Searcher::new(["foobar", "foo"].iter().cloned())?; + /// let mat = searcher.find_in(haystack, Span::from(3..haystack.len()))?; + /// assert_eq!(PatternID::ZERO, mat.pattern()); + /// assert_eq!(3, mat.start()); + /// assert_eq!(9, mat.end()); + /// # Some(()) } + /// # if cfg!(all(feature = "std", any( + /// # target_arch = "x86_64", target_arch = "aarch64", + /// # ))) { + /// # example().unwrap() + /// # } else { + /// # assert!(example().is_none()); + /// # } + /// ``` + #[inline] + pub fn find_in>( + &self, + haystack: B, + span: Span, + ) -> Option { + let haystack = haystack.as_ref(); + match self.search_kind { + SearchKind::Teddy(ref teddy) => { + if haystack[span].len() < teddy.minimum_len() { + return self.find_in_slow(haystack, span); + } + teddy.find(&haystack[..span.end], span.start) + } + SearchKind::RabinKarp => { + self.rabinkarp.find_at(&haystack[..span.end], span.start) + } + } + } + + /// Return an iterator of non-overlapping occurrences of the patterns in + /// this searcher, according to its match semantics, in the given haystack. + /// + /// # Example + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::{packed::{MatchKind, Searcher}, PatternID}; + /// + /// # fn example() -> Option<()> { + /// let searcher = Searcher::new(["foobar", "foo"].iter().cloned())?; + /// let matches: Vec = searcher + /// .find_iter("foobar fooba foofoo") + /// .map(|mat| mat.pattern()) + /// .collect(); + /// assert_eq!(vec![ + /// PatternID::must(0), + /// PatternID::must(1), + /// PatternID::must(1), + /// PatternID::must(1), + /// ], matches); + /// # Some(()) } + /// # if cfg!(all(feature = "std", any( + /// # target_arch = "x86_64", target_arch = "aarch64", + /// # ))) { + /// # example().unwrap() + /// # } else { + /// # assert!(example().is_none()); + /// # } + /// ``` + #[inline] + pub fn find_iter<'a, 'b, B: ?Sized + AsRef<[u8]>>( + &'a self, + haystack: &'b B, + ) -> FindIter<'a, 'b> { + let haystack = haystack.as_ref(); + let span = Span::from(0..haystack.len()); + FindIter { searcher: self, haystack, span } + } + + /// Returns the match kind used by this packed searcher. + /// + /// # Examples + /// + /// Basic usage: + /// + /// ``` + /// use aho_corasick::packed::{MatchKind, Searcher}; + /// + /// # fn example() -> Option<()> { + /// let searcher = Searcher::new(["foobar", "foo"].iter().cloned())?; + /// // leftmost-first is the default. + /// assert_eq!(&MatchKind::LeftmostFirst, searcher.match_kind()); + /// # Some(()) } + /// # if cfg!(all(feature = "std", any( + /// # target_arch = "x86_64", target_arch = "aarch64", + /// # ))) { + /// # example().unwrap() + /// # } else { + /// # assert!(example().is_none()); + /// # } + /// ``` + #[inline] + pub fn match_kind(&self) -> &MatchKind { + self.patterns.match_kind() + } + + /// Returns the minimum length of a haystack that is required in order for + /// packed searching to be effective. + /// + /// In some cases, the underlying packed searcher may not be able to search + /// very short haystacks. When that occurs, the implementation will defer + /// to a slower non-packed searcher (which is still generally faster than + /// Aho-Corasick for a small number of patterns). However, callers may + /// want to avoid ever using the slower variant, which one can do by + /// never passing a haystack shorter than the minimum length returned by + /// this method. + #[inline] + pub fn minimum_len(&self) -> usize { + self.minimum_len + } + + /// Returns the approximate total amount of heap used by this searcher, in + /// units of bytes. + #[inline] + pub fn memory_usage(&self) -> usize { + self.patterns.memory_usage() + + self.rabinkarp.memory_usage() + + self.search_kind.memory_usage() + } + + /// Use a slow (non-packed) searcher. + /// + /// This is useful when a packed searcher could be constructed, but could + /// not be used to search a specific haystack. For example, if Teddy was + /// built but the haystack is smaller than ~34 bytes, then Teddy might not + /// be able to run. + fn find_in_slow(&self, haystack: &[u8], span: Span) -> Option { + self.rabinkarp.find_at(&haystack[..span.end], span.start) + } +} + +impl SearchKind { + fn memory_usage(&self) -> usize { + match *self { + SearchKind::Teddy(ref ted) => ted.memory_usage(), + SearchKind::RabinKarp => 0, + } + } +} + +/// An iterator over non-overlapping matches from a packed searcher. +/// +/// The lifetime `'s` refers to the lifetime of the underlying [`Searcher`], +/// while the lifetime `'h` refers to the lifetime of the haystack being +/// searched. +#[derive(Debug)] +pub struct FindIter<'s, 'h> { + searcher: &'s Searcher, + haystack: &'h [u8], + span: Span, +} + +impl<'s, 'h> Iterator for FindIter<'s, 'h> { + type Item = Match; + + fn next(&mut self) -> Option { + if self.span.start > self.span.end { + return None; + } + match self.searcher.find_in(self.haystack, self.span) { + None => None, + Some(m) => { + self.span.start = m.end(); + Some(m) + } + } + } +} diff --git a/fixtures/relevance-v2/sources/bakery-a.md b/fixtures/relevance-v2/sources/bakery-a.md new file mode 100644 index 0000000..69d2d82 --- /dev/null +++ b/fixtures/relevance-v2/sources/bakery-a.md @@ -0,0 +1,3 @@ +# Batch label release + +Juniper Bakery prints an almond warning on its oat biscuits because they contain almond flour. A second staff member verifies the allergen label before a batch leaves the kitchen. Record the batch number and both initials on the release sheet. diff --git a/fixtures/relevance-v2/sources/bakery-b.md b/fixtures/relevance-v2/sources/bakery-b.md new file mode 100644 index 0000000..56fe42e --- /dev/null +++ b/fixtures/relevance-v2/sources/bakery-b.md @@ -0,0 +1,3 @@ +# Delivery packing checklist + +Juniper Bakery delivery drivers pack sealed biscuit cartons in reusable crates. Check the destination address and carton count before loading. Keep crates dry. The dispatch checklist records delivery counts rather than ingredient approval. diff --git a/fixtures/relevance-v2/sources/bicycle-a.md b/fixtures/relevance-v2/sources/bicycle-a.md new file mode 100644 index 0000000..df38f7d --- /dev/null +++ b/fixtures/relevance-v2/sources/bicycle-a.md @@ -0,0 +1,3 @@ +# Frame claim instructions + +Aster Cycles frame warranty covers cracked welds for five years after purchase. Send a photograph of the cracked weld and the frame serial number to the workshop. Retain the original receipt. Tyres and brake pads are wear items and are excluded. diff --git a/fixtures/relevance-v2/sources/bicycle-b.md b/fixtures/relevance-v2/sources/bicycle-b.md new file mode 100644 index 0000000..ccc97f7 --- /dev/null +++ b/fixtures/relevance-v2/sources/bicycle-b.md @@ -0,0 +1,3 @@ +# Wear-part service prices + +Aster Cycles routine maintenance prices: brake pad replacement costs 24 euros; tyre fitting costs 18 euros. The workshop checks tyre pressure during a service. These paid wear-part jobs do not require a warranty claim. diff --git a/fixtures/relevance-v2/sources/dtolnay__semver__src__parse.rs b/fixtures/relevance-v2/sources/dtolnay__semver__src__parse.rs new file mode 100644 index 0000000..12e8840 --- /dev/null +++ b/fixtures/relevance-v2/sources/dtolnay__semver__src__parse.rs @@ -0,0 +1,404 @@ +use crate::error::{ErrorKind, Position}; +use crate::identifier::Identifier; +use crate::{BuildMetadata, Comparator, Op, Prerelease, Version, VersionReq}; +use alloc::vec::Vec; +use core::str::FromStr; + +/// Error parsing a SemVer version or version requirement. +/// +/// # Example +/// +/// ``` +/// use semver::Version; +/// +/// fn main() { +/// let err = Version::parse("1.q.r").unwrap_err(); +/// +/// // "unexpected character 'q' while parsing minor version number" +/// eprintln!("{}", err); +/// } +/// ``` +pub struct Error { + pub(crate) kind: ErrorKind, +} + +impl FromStr for Version { + type Err = Error; + + fn from_str(text: &str) -> Result { + if text.is_empty() { + return Err(Error::new(ErrorKind::Empty)); + } + + let mut pos = Position::Major; + let (major, text) = numeric_identifier(text, pos)?; + let text = dot(text, pos)?; + + pos = Position::Minor; + let (minor, text) = numeric_identifier(text, pos)?; + let text = dot(text, pos)?; + + pos = Position::Patch; + let (patch, text) = numeric_identifier(text, pos)?; + + if text.is_empty() { + return Ok(Version::new(major, minor, patch)); + } + + let (pre, text) = if let Some(text) = text.strip_prefix('-') { + pos = Position::Pre; + let (pre, text) = prerelease_identifier(text)?; + if pre.is_empty() { + return Err(Error::new(ErrorKind::EmptySegment(pos))); + } + (pre, text) + } else { + (Prerelease::EMPTY, text) + }; + + let (build, text) = if let Some(text) = text.strip_prefix('+') { + pos = Position::Build; + let (build, text) = build_identifier(text)?; + if build.is_empty() { + return Err(Error::new(ErrorKind::EmptySegment(pos))); + } + (build, text) + } else { + (BuildMetadata::EMPTY, text) + }; + + if let Some(unexpected) = text.chars().next() { + return Err(Error::new(ErrorKind::UnexpectedCharAfter(pos, unexpected))); + } + + Ok(Version { + major, + minor, + patch, + pre, + build, + }) + } +} + +impl FromStr for VersionReq { + type Err = Error; + + fn from_str(text: &str) -> Result { + let text = text.trim_start_matches(' '); + if let Some((ch, text)) = wildcard(text) { + let rest = text.trim_start_matches(' '); + if rest.is_empty() { + return Ok(VersionReq::STAR); + } else if rest.starts_with(',') { + return Err(Error::new(ErrorKind::WildcardNotTheOnlyComparator(ch))); + } else { + return Err(Error::new(ErrorKind::UnexpectedAfterWildcard)); + } + } + + let depth = 0; + let mut comparators = Vec::new(); + let len = version_req(text, &mut comparators, depth)?; + unsafe { comparators.set_len(len) } + Ok(VersionReq { comparators }) + } +} + +impl FromStr for Comparator { + type Err = Error; + + fn from_str(text: &str) -> Result { + let text = text.trim_start_matches(' '); + let (comparator, pos, rest) = comparator(text)?; + if !rest.is_empty() { + let unexpected = rest.chars().next().unwrap(); + return Err(Error::new(ErrorKind::UnexpectedCharAfter(pos, unexpected))); + } + Ok(comparator) + } +} + +impl FromStr for Prerelease { + type Err = Error; + + fn from_str(text: &str) -> Result { + let (pre, rest) = prerelease_identifier(text)?; + if !rest.is_empty() { + return Err(Error::new(ErrorKind::IllegalCharacter(Position::Pre))); + } + Ok(pre) + } +} + +impl FromStr for BuildMetadata { + type Err = Error; + + fn from_str(text: &str) -> Result { + let (build, rest) = build_identifier(text)?; + if !rest.is_empty() { + return Err(Error::new(ErrorKind::IllegalCharacter(Position::Build))); + } + Ok(build) + } +} + +impl Error { + fn new(kind: ErrorKind) -> Self { + Error { kind } + } +} + +impl Op { + const DEFAULT: Self = Op::Caret; +} + +fn numeric_identifier(input: &str, pos: Position) -> Result<(u64, &str), Error> { + let mut len = 0; + let mut value = 0u64; + + while let Some(&digit) = input.as_bytes().get(len) { + if digit < b'0' || digit > b'9' { + break; + } + if value == 0 && len > 0 { + return Err(Error::new(ErrorKind::LeadingZero(pos))); + } + match value + .checked_mul(10) + .and_then(|value| value.checked_add((digit - b'0') as u64)) + { + Some(sum) => value = sum, + None => return Err(Error::new(ErrorKind::Overflow(pos))), + } + len += 1; + } + + if len > 0 { + Ok((value, &input[len..])) + } else if let Some(unexpected) = input[len..].chars().next() { + Err(Error::new(ErrorKind::UnexpectedChar(pos, unexpected))) + } else { + Err(Error::new(ErrorKind::UnexpectedEnd(pos))) + } +} + +fn wildcard(input: &str) -> Option<(char, &str)> { + if let Some(rest) = input.strip_prefix('*') { + Some(('*', rest)) + } else if let Some(rest) = input.strip_prefix('x') { + Some(('x', rest)) + } else if let Some(rest) = input.strip_prefix('X') { + Some(('X', rest)) + } else { + None + } +} + +fn dot(input: &str, pos: Position) -> Result<&str, Error> { + if let Some(rest) = input.strip_prefix('.') { + Ok(rest) + } else if let Some(unexpected) = input.chars().next() { + Err(Error::new(ErrorKind::UnexpectedCharAfter(pos, unexpected))) + } else { + Err(Error::new(ErrorKind::UnexpectedEnd(pos))) + } +} + +fn prerelease_identifier(input: &str) -> Result<(Prerelease, &str), Error> { + let (string, rest) = identifier(input, Position::Pre)?; + let identifier = unsafe { Identifier::new_unchecked(string) }; + Ok((Prerelease { identifier }, rest)) +} + +fn build_identifier(input: &str) -> Result<(BuildMetadata, &str), Error> { + let (string, rest) = identifier(input, Position::Build)?; + let identifier = unsafe { Identifier::new_unchecked(string) }; + Ok((BuildMetadata { identifier }, rest)) +} + +fn identifier(input: &str, pos: Position) -> Result<(&str, &str), Error> { + let mut accumulated_len = 0; + let mut segment_len = 0; + let mut segment_has_nondigit = false; + + loop { + match input.as_bytes().get(accumulated_len + segment_len) { + Some(b'A'..=b'Z') | Some(b'a'..=b'z') | Some(b'-') => { + segment_len += 1; + segment_has_nondigit = true; + } + Some(b'0'..=b'9') => { + segment_len += 1; + } + boundary => { + if segment_len == 0 { + if accumulated_len == 0 && boundary != Some(&b'.') { + return Ok(("", input)); + } else { + return Err(Error::new(ErrorKind::EmptySegment(pos))); + } + } + if pos == Position::Pre + && segment_len > 1 + && !segment_has_nondigit + && input[accumulated_len..].starts_with('0') + { + return Err(Error::new(ErrorKind::LeadingZero(pos))); + } + accumulated_len += segment_len; + if boundary == Some(&b'.') { + accumulated_len += 1; + segment_len = 0; + segment_has_nondigit = false; + } else { + return Ok(input.split_at(accumulated_len)); + } + } + } + } +} + +fn op(input: &str) -> (Op, &str) { + let bytes = input.as_bytes(); + if bytes.first() == Some(&b'=') { + (Op::Exact, &input[1..]) + } else if bytes.first() == Some(&b'>') { + if bytes.get(1) == Some(&b'=') { + (Op::GreaterEq, &input[2..]) + } else { + (Op::Greater, &input[1..]) + } + } else if bytes.first() == Some(&b'<') { + if bytes.get(1) == Some(&b'=') { + (Op::LessEq, &input[2..]) + } else { + (Op::Less, &input[1..]) + } + } else if bytes.first() == Some(&b'~') { + (Op::Tilde, &input[1..]) + } else if bytes.first() == Some(&b'^') { + (Op::Caret, &input[1..]) + } else { + (Op::DEFAULT, input) + } +} + +fn comparator(input: &str) -> Result<(Comparator, Position, &str), Error> { + let (mut op, text) = op(input); + let default_op = input.len() == text.len(); + let text = text.trim_start_matches(' '); + + let mut pos = Position::Major; + let (major, text) = numeric_identifier(text, pos)?; + let mut has_wildcard = false; + + let (minor, text) = if let Some(text) = text.strip_prefix('.') { + pos = Position::Minor; + if let Some((_, text)) = wildcard(text) { + has_wildcard = true; + if default_op { + op = Op::Wildcard; + } + (None, text) + } else { + let (minor, text) = numeric_identifier(text, pos)?; + (Some(minor), text) + } + } else { + (None, text) + }; + + let (patch, text) = if let Some(text) = text.strip_prefix('.') { + pos = Position::Patch; + if let Some((_, text)) = wildcard(text) { + if default_op { + op = Op::Wildcard; + } + (None, text) + } else if has_wildcard { + return Err(Error::new(ErrorKind::UnexpectedAfterWildcard)); + } else { + let (patch, text) = numeric_identifier(text, pos)?; + (Some(patch), text) + } + } else { + (None, text) + }; + + let (pre, text) = if patch.is_some() && text.starts_with('-') { + pos = Position::Pre; + let text = &text[1..]; + let (pre, text) = prerelease_identifier(text)?; + if pre.is_empty() { + return Err(Error::new(ErrorKind::EmptySegment(pos))); + } + (pre, text) + } else { + (Prerelease::EMPTY, text) + }; + + let text = if patch.is_some() && text.starts_with('+') { + pos = Position::Build; + let text = &text[1..]; + let (build, text) = build_identifier(text)?; + if build.is_empty() { + return Err(Error::new(ErrorKind::EmptySegment(pos))); + } + text + } else { + text + }; + + let text = text.trim_start_matches(' '); + + let comparator = Comparator { + op, + major, + minor, + patch, + pre, + }; + + Ok((comparator, pos, text)) +} + +fn version_req(input: &str, out: &mut Vec, depth: usize) -> Result { + let (comparator, pos, text) = match comparator(input) { + Ok(success) => success, + Err(mut error) => { + if let Some((ch, mut rest)) = wildcard(input) { + rest = rest.trim_start_matches(' '); + if rest.is_empty() || rest.starts_with(',') { + error.kind = ErrorKind::WildcardNotTheOnlyComparator(ch); + } + } + return Err(error); + } + }; + + if text.is_empty() { + out.reserve_exact(depth + 1); + unsafe { out.as_mut_ptr().add(depth).write(comparator) } + return Ok(depth + 1); + } + + let text = if let Some(text) = text.strip_prefix(',') { + text.trim_start_matches(' ') + } else { + let unexpected = text.chars().next().unwrap(); + return Err(Error::new(ErrorKind::ExpectedCommaFound(pos, unexpected))); + }; + + const MAX_COMPARATORS: usize = 32; + if depth + 1 == MAX_COMPARATORS { + return Err(Error::new(ErrorKind::ExcessiveComparators)); + } + + // Recurse to collect parsed Comparator objects on the stack. We perform a + // single allocation to allocate exactly the right sized Vec only once the + // total number of comparators is known. + let len = version_req(text, out, depth + 1)?; + unsafe { out.as_mut_ptr().add(depth).write(comparator) } + Ok(len) +} diff --git a/fixtures/relevance-v2/sources/ferry-a.md b/fixtures/relevance-v2/sources/ferry-a.md new file mode 100644 index 0000000..a6def85 --- /dev/null +++ b/fixtures/relevance-v2/sources/ferry-a.md @@ -0,0 +1,3 @@ +# Volunteer crossing rota + +The Alder Ferry volunteer rota assigns two qualified crew members to each Saturday crossing. The skipper confirms attendance by Thursday evening. If either crew member is unavailable, cancel the crossing and notify booked passengers. diff --git a/fixtures/relevance-v2/sources/ferry-b.md b/fixtures/relevance-v2/sources/ferry-b.md new file mode 100644 index 0000000..86edbb0 --- /dev/null +++ b/fixtures/relevance-v2/sources/ferry-b.md @@ -0,0 +1,3 @@ +# Passenger bicycle fares + +Alder Ferry charges passengers two euros and bicycles one euro per crossing. Children under six travel free with an adult. The fare sheet covers ticket prices and does not assign crew or confirm sailing availability. diff --git a/fixtures/relevance-v2/sources/irrigation-a.md b/fixtures/relevance-v2/sources/irrigation-a.md new file mode 100644 index 0000000..bee0af4 --- /dev/null +++ b/fixtures/relevance-v2/sources/irrigation-a.md @@ -0,0 +1,3 @@ +# Tank controller dry-run protection + +The Linden Garden rainwater controller stops the irrigation pump when the tank level falls below twelve centimetres. Refill above twenty centimetres before resetting the controller. This prevents the pump running dry. Record each low-water shutdown in the garden log. diff --git a/fixtures/relevance-v2/sources/irrigation-b.md b/fixtures/relevance-v2/sources/irrigation-b.md new file mode 100644 index 0000000..0d0b87f --- /dev/null +++ b/fixtures/relevance-v2/sources/irrigation-b.md @@ -0,0 +1,3 @@ +# Sprinkler winter storage + +Linden Garden volunteers drain sprinkler hoses before the first frost. Disconnect the hose couplings and store the dry hoses in the tool shed. This winter storage checklist does not configure the tank sensor or controller. diff --git a/fixtures/relevance-v2/sources/meter-a.md b/fixtures/relevance-v2/sources/meter-a.md new file mode 100644 index 0000000..6033250 --- /dev/null +++ b/fixtures/relevance-v2/sources/meter-a.md @@ -0,0 +1,3 @@ +# Moving-day meter record + +Residents of Rowan Court photograph the electricity meter on moving day. The photograph must show the reading and the meter identifier. Send it with the handover date to the property office within three days. The office uses the reading for the departing resident’s final bill. diff --git a/fixtures/relevance-v2/sources/meter-b.md b/fixtures/relevance-v2/sources/meter-b.md new file mode 100644 index 0000000..f635d78 --- /dev/null +++ b/fixtures/relevance-v2/sources/meter-b.md @@ -0,0 +1,3 @@ +# Annual radiator inspection + +Rowan Court schedules radiator inspections every November. A technician checks valves for leaks and trapped air. Residents arrange access between 09:00 and 15:00. The maintenance log records repairs, not electricity billing. diff --git a/fixtures/relevance-v2/sources/museum-a.md b/fixtures/relevance-v2/sources/museum-a.md new file mode 100644 index 0000000..1c4e93d --- /dev/null +++ b/fixtures/relevance-v2/sources/museum-a.md @@ -0,0 +1,3 @@ +# Loan transit cover + +The Elm Museum loan agreement requires insurance during both outward and return transport of the ceramic bowl. The borrower supplies an insurance certificate naming the museum before collection. Coverage is for the agreed replacement value of 12000 euros. diff --git a/fixtures/relevance-v2/sources/museum-b.md b/fixtures/relevance-v2/sources/museum-b.md new file mode 100644 index 0000000..0d4e91c --- /dev/null +++ b/fixtures/relevance-v2/sources/museum-b.md @@ -0,0 +1,3 @@ +# Gallery humidity record + +Elm Museum conservators record gallery relative humidity twice each day. Ceramic display shelves are checked for dust every Friday. The room log records measurements and cleaning; it is not the loan or transport insurance agreement. diff --git a/fixtures/relevance-v2/test_verify.py b/fixtures/relevance-v2/test_verify.py new file mode 100644 index 0000000..4b7027b --- /dev/null +++ b/fixtures/relevance-v2/test_verify.py @@ -0,0 +1,82 @@ +"""Integrity regressions use isolated copies and execute the verifier under -O.""" + +import hashlib +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + + +class IntegrityTests(unittest.TestCase): + def setUp(self): + self.temporary = tempfile.TemporaryDirectory(prefix="searchi-relevance-integrity-") + self.root = Path(self.temporary.name) / "fixture" + shutil.copytree(Path(__file__).resolve().parent, self.root) + + def tearDown(self): + self.temporary.cleanup() + + def write(self, name, data): + (self.root / name).write_text(json.dumps(data, ensure_ascii=False), encoding="utf-8") + + def read(self, name): + return json.loads((self.root / name).read_text(encoding="utf-8")) + + def run_verifier(self): + return subprocess.run([sys.executable, "-O", str(self.root / "verify.py")], + capture_output=True, text=True, timeout=10) + + def test_valid_frozen_fixture_under_optimization(self): + result = self.run_verifier() + self.assertEqual(result.returncode, 0, result.stderr) + + def test_git_preserves_all_locked_bytes_with_text_normalization(self): + repository = self.root.parent + (repository / ".gitattributes").write_text("* text=auto eol=lf\n", encoding="utf-8") + subprocess.run(["git", "init", "--quiet", str(repository)], check=True, + capture_output=True, timeout=10) + subprocess.run(["git", "-c", "core.autocrlf=true", "add", "."], cwd=repository, + check=True, capture_output=True, timeout=10) + for name, expected in self.read("fixture.lock.json")["sha256"].items(): + staged = subprocess.check_output(["git", "show", ":fixture/" + name], + cwd=repository, timeout=10) + self.assertEqual(hashlib.sha256(staged).hexdigest(), expected, name) + + def test_same_length_source_corruption_rejected(self): + source = self.root / "sources/bicycle-a.md" + original = source.read_bytes() + source.write_bytes(b"!" + original[1:]) + self.assertNotEqual(self.run_verifier().returncode, 0) + + def test_duplicate_asset_rejected(self): + for name in ["inventory.json", "blind-review-input.json"]: + data = self.read(name) + data["assets"].append(data["assets"][0]) + self.write(name, data) + self.assertNotEqual(self.run_verifier().returncode, 0) + + def test_bilingual_split_leak_rejected(self): + data = self.read("blind-review-input.json") + data["queries"][0]["split"] = "held_out" + self.write("blind-review-input.json", data) + self.assertNotEqual(self.run_verifier().returncode, 0) + + def test_repository_topic_split_leak_rejected(self): + for name in ["inventory.json", "blind-review-input.json"]: + data = self.read(name) + next(asset for asset in data["assets"] if asset["id"] == "bicycle-a")["split"] = "held_out" + self.write(name, data) + self.assertNotEqual(self.run_verifier().returncode, 0) + + def test_stale_lock_rejected(self): + lock = self.read("fixture.lock.json") + lock["sha256"]["fixture.json"] = "0" * 64 + self.write("fixture.lock.json", lock) + self.assertNotEqual(self.run_verifier().returncode, 0) + + +if __name__ == "__main__": + unittest.main() diff --git a/fixtures/relevance-v2/verify.py b/fixtures/relevance-v2/verify.py new file mode 100644 index 0000000..f92766d --- /dev/null +++ b/fixtures/relevance-v2/verify.py @@ -0,0 +1,78 @@ +"""Verify frozen-source integrity and bilingual split isolation; no inference.""" + +import hashlib +import json +from pathlib import Path + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def verify(root): + root = root.resolve() + inventory = json.loads((root / "inventory.json").read_text(encoding="utf-8")) + blind = json.loads((root / "blind-review-input.json").read_text(encoding="utf-8")) + require(blind["assets"] == inventory["assets"], "Fixture integrity invariant failed") + ids, groups, pairs = set(), {}, {} + for asset in inventory["assets"]: + require(asset["id"] not in ids, "Fixture integrity invariant failed") + ids.add(asset["id"]) + path = (root / asset["path"]).resolve() + require(path.is_relative_to(root), "Fixture integrity invariant failed") + data = path.read_bytes() + require(len(data) == asset["bytes"], "Fixture integrity invariant failed") + require(hashlib.sha256(data).hexdigest() == asset["sha256"], "Fixture integrity invariant failed") + group = asset.get("repository", asset.get("topic_family")) + require(groups.setdefault(group, asset["split"]) == asset["split"], "Fixture integrity invariant failed") + for license_file in asset.get("license_files", []): + license_path = (root / license_file["path"]).resolve() + require(license_path.is_relative_to(root), "Fixture integrity invariant failed") + require(hashlib.sha256(license_path.read_bytes()).hexdigest() == license_file["sha256"], "Fixture integrity invariant failed") + query_ids = set() + for query in blind["queries"]: + require(query["id"] not in query_ids, "Fixture integrity invariant failed") + query_ids.add(query["id"]) + require(query["required_artifact"], "Fixture integrity invariant failed") + if query["language"] == "de": + require(not any(marker in query["query"] for marker in ("\u00c3", "\u00c2", "\ufffd")), "Fixture integrity invariant failed") + pairs.setdefault(query["pair_id"], []).append(query) + for pair in pairs.values(): + require({q["language"] for q in pair} == {"en", "de"}, "Fixture integrity invariant failed") + require(len(pair) == 2, "Fixture integrity invariant failed") + require(len({q["split"] for q in pair}) == 1, "Fixture integrity invariant failed") + labels = json.loads((root / "author-labels.json").read_text(encoding="utf-8")) + require(len(labels["labels"]) == len(query_ids), "Fixture integrity invariant failed") + require({label["query_id"] for label in labels["labels"]} == query_ids, "Fixture integrity invariant failed") + for label in labels["labels"]: + require(set(label["expected_ids"]) <= ids, "Fixture integrity invariant failed") + fixture = json.loads((root / "fixture.json").read_text(encoding="utf-8")) + lock = json.loads((root / "fixture.lock.json").read_text(encoding="utf-8")) + require(fixture["assets"] == inventory["assets"], "Frozen inventory differs") + combined = [{**query, **next(label for label in labels["labels"] if label["query_id"] == query["id"])} for query in blind["queries"]] + require(fixture["queries"] == combined, "Frozen queries differ") + require(lock["frozen_at_utc"] == fixture["frozen_at_utc"], "Freeze timestamps differ") + for name, expected in lock["sha256"].items(): + path = (root / name).resolve() + require(path.is_relative_to(root), "Lock path escapes fixture") + require(hashlib.sha256(path.read_bytes()).hexdigest() == expected, "Frozen hash differs: " + name) + review = json.loads((root / "blind-review.json").read_text(encoding="utf-8")) + require(review["inputSHA256"] == hashlib.sha256((root / "blind-review-input.json").read_bytes()).hexdigest(), "Blind input hash differs") + reviewed = {row["id"]: set(row["expectedIDs"]) for row in review["queries"]} + require(len(review["queries"]) == len(query_ids) and set(reviewed) == query_ids, "Blind review coverage differs") + for query in fixture["queries"]: + require(reviewed[query["id"]] == set(query["expected_ids"]), "Blind disagreement unresolved") + for expected_id in query["expected_ids"]: + asset = next(asset for asset in fixture["assets"] if asset["id"] == expected_id) + require(asset["split"] == query["split"], "Expected artifact leaks between splits") + return len(ids), len(pairs) + + +def main(): + files, pairs = verify(Path(__file__).resolve().parent) + print(f"Verified {files} files and {pairs} bilingual pairs; no inference performed.") + + +if __name__ == "__main__": + main()