diff --git a/corpus/candidates/darwin-origin-species-rachinsky-1864-ru-var-provider-drift.md b/corpus/candidates/darwin-origin-species-rachinsky-1864-ru-var-provider-drift.md new file mode 100644 index 00000000..9d372c51 --- /dev/null +++ b/corpus/candidates/darwin-origin-species-rachinsky-1864-ru-var-provider-drift.md @@ -0,0 +1,17 @@ +# Darwin/Rachinsky 1864 — `{{ВАР}}` provider-drift guard + +This source-free companion records why Scriptorium does **not** silently bind whatever `Module:Header` happens to be live when replaying the unresolved `{{ВАР}}` shape. + +The previously reviewed evidence pins Russian Wikisource `Шаблон:ВАР/Документация@5711068` and `Модуль:Дореформенная орфография@5721277`. The latter delegates non-Page title classification to `Module:Header.parse_title(..., "isPRS")` and selects one of the two arguments from that result. + +Fresh provider evidence on 2026-09-24 shows `Модуль:Header@5746249`, last edited 2026-09-10 — later than the pinned VAR implementation module. A Russian Wikisource forum discussion on 2026-09-08 explicitly asked whether `{{ВАР}}` had broken after Header-related work and noted that the small orthography module depends on Header for page-title parsing. Scriptorium records that as a **drift risk**, not as proof that production Wikisource was broken. + +For the retained Darwin mainspace title `О происхождении видов (Дарвин; Рачинский)/1864 (ВТ:Ё)`, the observed Header rule at revision `5746249` parses the edition segment as `1864 (ВТ:Ё)` and yields `isPRS=false`. If the pinned VAR module's non-Page branch is reached under that observed rule, it therefore selects the **second (modern) argument**. + +That narrow classification replay is not a complete `{{ВАР}}` replay. The live `Шаблон:ВАР` root is still unbound; Header's MediaWiki SHA-1 and execution-relevant nested closure are not frozen; no offline/version-pinned MediaWiki runtime is established; historical transclusion is not inferred; and the render profile/backlog is unchanged. `ВАР` remains unresolved at **388** candidate invocations. + +The source-free evidence contract is [`source-edition-traces/darwin-origin-species-rachinsky-1864-ru.var-provider-drift-evidence.json`](source-edition-traces/darwin-origin-species-rachinsky-1864-ru.var-provider-drift-evidence.json), SHA-256 `6126adbc966c7120ca487fb940bd0e01aafa0d7350d332e6422edbf8b3846cb8`. + +The next bounded replay step must deliberately choose one coherent snapshot, freeze exact `Шаблон:ВАР`, `Модуль:Дореформенная орфография` and `Module:Header` identities including MediaWiki SHA-1 plus the execution-relevant nested closure, and only then replay the candidate invocation. A later live descendant must not be substituted as if it were historical provenance. + +No source text, Page wikitext, template argument values, rendered prose, OCR or scan bytes are published here. Renderer/body/>=300k/FantLab-input/M2 gates remain unchanged; M2 stays **0/5**. diff --git a/corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.var-provider-drift-evidence.json b/corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.var-provider-drift-evidence.json new file mode 100644 index 00000000..782e4d3e --- /dev/null +++ b/corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.var-provider-drift-evidence.json @@ -0,0 +1,67 @@ +{ + "admitted_for_calibration": false, + "candidate_id": "darwin-origin-species-rachinsky-1864-ru", + "dependency_boundary": { + "full_var_candidate_branch_replayed": false, + "historical_transclusion_proven": false, + "implementation_module_revision_frozen_for_this_chain": true, + "module_header_mediawiki_sha1_frozen": false, + "module_header_revision_observed": true, + "nested_dependency_closure_frozen": false, + "offline_version_pinned_runtime_proven": false, + "reason": "the Header revision and title-classification rule are observed, but the live template root, Header SHA-1 and complete replay-time closure are not yet bound into one executable snapshot", + "template_root_revision_frozen": false + }, + "diagnostic_ready": false, + "evidence_sha256": "6126adbc966c7120ca487fb940bd0e01aafa0d7350d332e6422edbf8b3846cb8", + "fantlab_source_edition_match": "unknown", + "inter_page_composition_frozen": false, + "literary_body_count_and_digests_frozen": false, + "m2_parity_admissible": false, + "minimum_300k_proved": false, + "observed_header_rule_replay": { + "candidate_namespace": "mainspace", + "candidate_title": "О происхождении видов (Дарвин; Рачинский)/1864 (ВТ:Ё)", + "edition_segment": "1864 (ВТ:Ё)", + "function": "parse_title(..., \"isPRS\")", + "header_revision_id": 5746249, + "isPRS": false, + "scope": "deterministic_replay_of_the_observed_Header_title_classification_rule_only", + "selected_variant_if_module_branch_is_reached": "second_parameter_modern" + }, + "prior_evidence": { + "documentation_revision_id": 5711068, + "evidence_sha256": "321ced32bb7ffc75829b6fbb5255bce3243641a80c21ad4e2b7bb7a25138502d", + "implementation_module_revision_id": 5721277, + "schema_version": "scriptorium-darwin-var-documentation-evidence-v1" + }, + "promotion_decision": { + "backlog_item_removed": false, + "effective_backlog_changed": false, + "next_evidence_required": "choose one explicit coherent replay snapshot, freeze exact Шаблон:ВАР plus Модуль:Дореформенная орфография plus Module:Header identities including MediaWiki SHA-1 and the execution-relevant nested closure, then replay the candidate mainspace invocation without substituting later live descendants", + "reason": "provider drift evidence narrows snapshot selection but does not prove a complete deterministic VAR invocation replay", + "render_profile_rule_promoted": false + }, + "provider_drift_observation": { + "community_warning": { + "claim_scope": "provider_drift_risk_not_a_proven_runtime_failure", + "discussion_date": "2026-09-08", + "forum_url": "https://ru.wikisource.org/wiki/Викитека:Форум", + "observation": "Wikisource editors explicitly raised whether template VAR had broken after Header-related changes and noted that the small pre-reform module delegates page-title parsing to Header." + }, + "decision_effect": "do_not_silently_bind_a_future_live_Header_as_replay_equivalence; select_and_record_an_explicit_coherent_snapshot_before_full_VAR_replay", + "observed_header": { + "permanent_url": "https://ru.wikisource.org/w/index.php?title=Модуль:Header&oldid=5746249", + "relationship_to_pinned_var_module": "later_revision", + "revision_date": "2026-09-10", + "revision_id": 5746249, + "title": "Модуль:Header" + }, + "provider": "Russian Wikisource" + }, + "renderer_implementation_ready": false, + "renderer_semantics_complete": false, + "researched_on": "2026-09-24", + "schema_version": "scriptorium-darwin-var-provider-drift-evidence-v1", + "source_text_included": false +} diff --git a/project/CHANGELOG.d/SCRIP-CORPUS-082.md b/project/CHANGELOG.d/SCRIP-CORPUS-082.md new file mode 100644 index 00000000..49542270 --- /dev/null +++ b/project/CHANGELOG.d/SCRIP-CORPUS-082.md @@ -0,0 +1,11 @@ +# SCRIP-CORPUS-082 — Darwin/Rachinsky `{{ВАР}}` provider-drift guard + +- Re-oriented from `master@bd291227733155672f8dd6d9d3a634348615cdbe`; no open review-ready PR or interrupted unit preempted normal P2 corpus/provenance selection. +- Fresh Russian Wikisource evidence materially changes the next `{{ВАР}}` replay decision: `Модуль:Header@5746249` is dated 2026-09-10, later than the already pinned `Модуль:Дореформенная орфография@5721277`, and a 2026-09-08 Wikisource forum discussion explicitly raised possible `{{ВАР}}` breakage after Header-related changes. This is recorded as provider-drift risk, not as proof of a runtime failure. +- Added deterministic source-free evidence `scriptorium-darwin-var-provider-drift-evidence-v1`, SHA-256 `6126adbc966c7120ca487fb940bd0e01aafa0d7350d332e6422edbf8b3846cb8`. +- Replayed only the observed Header title-classification rule for the retained Darwin mainspace title `О происхождении видов (Дарвин; Рачинский)/1864 (ВТ:Ё)`: edition segment `1864 (ВТ:Ё)` yields `isPRS=false`, therefore the pinned VAR module would select the second/modern argument if that non-Page branch is reached. +- Kept `Шаблон:ВАР` root identity, Header MediaWiki SHA-1, nested replay closure, full VAR invocation replay, historical transclusion and offline/version-pinned runtime explicitly unfrozen. No render-profile/backlog promotion occurs; `ВАР` stays unresolved at 388 occurrences and effective backlog counts do not change. +- Added focused regressions and a public source-free provider-drift companion. Renderer/body/>=300k/FantLab-input gates stay closed; M2 remains 0/5. +- Next evidence must deliberately select one coherent replay snapshot and freeze exact template/module/Header identities plus execution-relevant closure before a full candidate invocation replay. A later live descendant must not be substituted as historical provenance. + +Issue: #253. Draft PR: #254 (REVIEW_PENDING). diff --git a/project/STATE_AND_QUEUE.md b/project/STATE_AND_QUEUE.md index 08c61a09..fb83ea41 100644 --- a/project/STATE_AND_QUEUE.md +++ b/project/STATE_AND_QUEUE.md @@ -1,21 +1,22 @@ # STATE_AND_QUEUE — Scriptorium -STATE_REVISION: 276 +STATE_REVISION: 277 PHASE: M1 — Deterministic FantLab surface -LAST_COMMITTED_RUN_AT: 2026-09-24T08:25:00Z -LAST_RESULT: SCRIP-CORPUS-081 / Issue #251 / PR #252 independently reviewed and merged. Exact final authored head `c5e2c4c89ddf7d6f5090843ce1d546e5e7ad92e1` was re-read across all 8 changed files against unchanged `master@404a9b2c0b6c0153f315b09a8bbef5935c5bf879`; review `5301756253` found no merge blocker or open review thread. Current Russian Wikisource documentation independently corroborated the `ВАР` parameter roles/module relationship, and the module surface at oldid `5721277` corroborated Page/non-Page branching plus the direct `Module:Header` dependency. All 24 PR-triggered workflow runs for the exact head completed successfully. Dedicated run `35973919107` checked out the exact SHA, passed 8/8 focused regressions, rebuilt the evidence byte-for-byte and verified evidence SHA-256 `321ced32bb7ffc75829b6fbb5255bce3243641a80c21ad4e2b7bb7a25138502d`; artifact `10796629637` independently re-hashed to GitHub's ZIP digest `2c0a57380a94aa114c5c8e7bea340af59800f782108c070e50e3e5901d7db83a`, and its JSON self-digest independently recomputed to the committed value. Frozen diagnostic run `35973919110` and both replay jobs were green. PR #252 was marked Ready and squash-merged with expected-head protection as `9639f1bace28a4a7ddef84ff4e04390a9de23e23`; Issue #251 closed completed. `ВАР` remains unresolved and effective backlog totals remain unchanged. -LAST_VERIFIED_PROGRESS: M1 deterministic metric families remain executable inferred candidates. Public corpus/showcase evidence includes exact frozen/admitted works and source-free derived outputs, while no retained work has an independently established FantLab analyzer-input identity. Perelman retains independently reviewed exact PDF/DjVu identities, pagination, current Wikisource/FantLab surface boundaries, zero-PDF-PageLabels evidence, front-matter anchors, transition/tail anchors and bounded restored-page interior observations. Darwin/Rachinsky has independently reviewed v5 dependency closure, v6 zero-argument `{{ё}}` output evidence, canonical SCRIP-CORPUS-078 one-shape promotion, canonical SCRIP-CORPUS-079 388/388 `` noinclude-containment evidence, canonical SCRIP-CORPUS-080 candidate-local promotion/backlog reduction, and canonical SCRIP-CORPUS-081 revision-pinned `{{ВАР}}` documentation/module evidence with no promotion. M2 stays 0/5. +LAST_COMMITTED_RUN_AT: 2026-09-24T09:04:00Z +LAST_RESULT: SCRIP-CORPUS-082 / Issue #253 / Draft PR #254 authored a source-free Darwin/Rachinsky `{{ВАР}}` provider-drift guard from `master@bd291227733155672f8dd6d9d3a634348615cdbe`. Fresh Russian Wikisource evidence shows `Модуль:Header@5746249` (2026-09-10), later than the pinned `Модуль:Дореформенная орфография@5721277`, while a 2026-09-08 Wikisource forum discussion explicitly raised possible `{{ВАР}}` breakage after Header-related work. The unit records that as provider-drift risk rather than a proven runtime failure, and deterministically replays only the observed Header `parse_title(..., "isPRS")` classification for retained mainspace title `О происхождении видов (Дарвин; Рачинский)/1864 (ВТ:Ё)`: edition `1864 (ВТ:Ё)` yields `isPRS=false`, so the pinned module would select its second/modern argument if that non-Page branch is reached. Evidence SHA-256 is `6126adbc966c7120ca487fb940bd0e01aafa0d7350d332e6422edbf8b3846cb8`. The template root, Header MediaWiki SHA-1, nested closure, full invocation replay, historical transclusion and offline/version-pinned runtime remain unfrozen; no promotion or backlog-count change was made. Draft PR #254 is intentionally REVIEW_PENDING for independent exact-head judgement. +LAST_VERIFIED_PROGRESS: M1 deterministic metric families remain executable inferred candidates. Public corpus/showcase evidence includes exact frozen/admitted works and source-free derived outputs, while no retained work has an independently established FantLab analyzer-input identity. Perelman retains independently reviewed exact PDF/DjVu identities, pagination, current Wikisource/FantLab surface boundaries, zero-PDF-PageLabels evidence, front-matter anchors, transition/tail anchors and bounded restored-page interior observations. Darwin/Rachinsky has independently reviewed v5 dependency closure, v6 zero-argument `{{ё}}` output evidence, canonical SCRIP-CORPUS-078 one-shape promotion, canonical SCRIP-CORPUS-079 388/388 `` noinclude-containment evidence, canonical SCRIP-CORPUS-080 candidate-local promotion/backlog reduction, canonical SCRIP-CORPUS-081 revision-pinned `{{ВАР}}` documentation/module evidence with no promotion, and review-pending SCRIP-CORPUS-082 provider-drift evidence narrowing replay-snapshot selection without changing the effective backlog. M2 stays 0/5. ## Current unit ```text -UNIT_ID: SCRIP-CORPUS-081 -ISSUE: #251 (closed completed) -STATUS: COMPLETE -PR: #252 (squash-merged as 9639f1bace28a4a7ddef84ff4e04390a9de23e23) -NEXT_ACTION: Resume normal-flow P2 SCRIP-CORPUS selection. - For Darwin/Rachinsky, the next bounded `ВАР` evidence step must freeze exact `Шаблон:ВАР`, `Модуль:Дореформенная орфография`, `Module:Header` and nested replay-time identities for one chosen snapshot, then replay the candidate mainspace title/context before any promotion. - Keep historical-transclusion, offline-runtime, complete renderer/inter-page/body, >=300k, FantLab-input and M2 gates closed until separately evidenced. +UNIT_ID: SCRIP-CORPUS-082 +ISSUE: #253 (open) +STATUS: REVIEW_PENDING +PR: #254 (Draft) +NEXT_ACTION: Independently re-read all SCRIP-CORPUS-082 changed files and exact-head CI/evidence. + If clean, mark PR #254 Ready and merge with expected-head protection; then reconcile state/changelog/receipt on master. + For the subsequent Darwin/Rachinsky `ВАР` replay, deliberately choose one coherent snapshot and freeze exact `Шаблон:ВАР`, `Модуль:Дореформенная орфография`, `Module:Header` identities including MediaWiki SHA-1 plus the execution-relevant nested closure before replaying the candidate invocation. + Do not silently substitute a later live Header as historical/equivalent provenance. Keep complete renderer/inter-page/body, >=300k, FantLab-input and M2 gates closed until separately evidenced. ``` ## Current milestone gate @@ -30,6 +31,7 @@ Recovery/review-ready work and failing required checks preempt normal selection. | Priority | Unit | Mode | Deliverable | Gate / dependency | | --- | --- | --- | --- | --- | +| P0 | SCRIP-CORPUS-082 review | review / corpus provenance | Independently judge Draft PR #254 exact head and provider-drift boundary; merge only if evidence/checks are clean | Do not self-approve the authored unit; preserve all renderer/body/FantLab/M2 gates | | P2 | SCRIP-CORPUS continuation | corpus / provenance | Add or strengthen legally usable >=300k candidates, prioritizing diversity beyond 19th-century Russian classics; Petersburg, Perelman and Darwin/Rachinsky have candidate-specific extraction/renderer work available | Preserve translation/edition identity and legal provenance; renderer/OCR work must keep body/admission/FantLab/M2 gates closed until separately verified | ## Retained corpus / provenance orientation @@ -51,7 +53,7 @@ Detailed evidence is canonical in `corpus/candidates/`, `benchmarks/`, `project/ - **The Twelve Chairs** — exact Page/PDF surfaces retained; template/reference semantics and body identity remain unresolved. - **The Life of Klim Samgin** — source graph/extractor/body identities retained; historical renderer equivalence and FantLab input remain unresolved. - **Children of Captain Grant — Beketova translation** — exact 1,095,467-character body with reviewed source-free deterministic showcase; no FantLab result/input identity for this translation. -- **On the Origin of Species — Rachinsky translation** — exact Page set/scan/render contracts retained. Independently reviewed v5/v6 and SCRIP-CORPUS-078 canonically resolve zero-argument `{{ё}}` for the selected live-snapshot evidence. Independently reviewed SCRIP-CORPUS-079 proves all 388 frozen self-closing `` tokens are inside stripped `` regions. Independently reviewed SCRIP-CORPUS-080 consumes only that containment fact to remove the candidate-local shape from the effective provider-reference backlog. Independently reviewed SCRIP-CORPUS-081 canonically freezes revision-pinned documentation/module evidence for `ВАР` (388) without promoting it. Effective unresolved surface therefore remains 4 tag shapes / 130 tag tokens and 37 template shapes / 2,356 invocations. Historical transclusion, complete renderer, literary body/>=300k and FantLab gates remain open. +- **On the Origin of Species — Rachinsky translation** — exact Page set/scan/render contracts retained. Independently reviewed v5/v6 and SCRIP-CORPUS-078 canonically resolve zero-argument `{{ё}}` for the selected live-snapshot evidence. Independently reviewed SCRIP-CORPUS-079 proves all 388 frozen self-closing `` tokens are inside stripped `` regions. Independently reviewed SCRIP-CORPUS-080 consumes only that containment fact to remove the candidate-local shape from the effective provider-reference backlog. Independently reviewed SCRIP-CORPUS-081 canonically freezes revision-pinned documentation/module evidence for `ВАР` (388) without promoting it. SCRIP-CORPUS-082 is review-pending and records current Header/provider drift plus a narrow `isPRS=false` classification replay without binding a complete VAR runtime. Effective unresolved surface therefore remains 4 tag shapes / 130 tag tokens and 37 template shapes / 2,356 invocations. Historical transclusion, complete renderer, literary body/>=300k and FantLab gates remain open. - **Entertaining Physics, Book 1 — Perelman 1913** — exact PDF/DjVu carriers and reviewed pagination/facsimile boundaries retained. Complete interior mapping, global offset, PDF↔DjVu equivalence, OCR correctness, canonical carrier, literary body/>=300k, FantLab input identity and M2 remain open. ## Deterministic / morphology orientation @@ -65,7 +67,7 @@ Detailed evidence is canonical in `corpus/candidates/`, `benchmarks/`, `project/ ## Public repository representation -Public surfaces must remain source-free and synchronized with actual capability. Publish metadata, provenance, hashes and derived analysis only; never publish unlicensed source text. Perelman's transition/tail and restored-page interior companions are independently reviewed. Darwin's dependency and output-replay companions expose the selected `{{ё}}` live-snapshot evidence; SCRIP-CORPUS-078 canonically exposes that one-shape promotion; SCRIP-CORPUS-079 canonically exposes 388/388 `` noinclude containment; SCRIP-CORPUS-080 canonically exposes the separate candidate-local promotion/reduced effective backlog; SCRIP-CORPUS-081 now canonically exposes independently reviewed `{{ВАР}}` documentation/module semantics without changing the effective backlog. +Public surfaces must remain source-free and synchronized with actual capability. Publish metadata, provenance, hashes and derived analysis only; never publish unlicensed source text. Perelman's transition/tail and restored-page interior companions are independently reviewed. Darwin's dependency and output-replay companions expose the selected `{{ё}}` live-snapshot evidence; SCRIP-CORPUS-078 canonically exposes that one-shape promotion; SCRIP-CORPUS-079 canonically exposes 388/388 `` noinclude containment; SCRIP-CORPUS-080 canonically exposes the separate candidate-local promotion/reduced effective backlog; SCRIP-CORPUS-081 canonically exposes independently reviewed `{{ВАР}}` documentation/module semantics without changing the effective backlog. SCRIP-CORPUS-082 adds a review-pending source-free public companion that exposes the later Header revision, provider drift warning and narrow Darwin `isPRS=false` rule replay without implying a complete VAR replay. ## Known blockers / invariants @@ -73,5 +75,5 @@ Public surfaces must remain source-free and synchronized with actual capability. 2. FantLab corrective coefficients and several parser/tokenization/dialogue semantics remain partly unpublished. 3. No corpus or showcase evidence may be promoted to parity without source-edition/input matching and explicit benchmark tolerances. 4. Perelman complete exact-carrier mapping is still required; current facsimile anchors do not prove every interior page, global offset, PDF↔DjVu equivalence, OCR correctness, body identity or >=300k admission. -5. Darwin/Rachinsky SCRIP-CORPUS-081 is documentation/module evidence only. It does not freeze the live `Шаблон:ВАР` root, `Module:Header` or nested replay closure, replay the candidate mainspace branch, prove historical transclusion, or establish an offline/version-pinned MediaWiki runtime. Complete renderer/body/FantLab gates remain open. +5. Darwin/Rachinsky SCRIP-CORPUS-082 deliberately does not freeze the live `Шаблон:ВАР` root, Header MediaWiki SHA-1 or nested replay closure, replay the full candidate invocation, prove historical transclusion, or establish an offline/version-pinned MediaWiki runtime. The 2026-09-08 community warning is provider-drift risk evidence, not proof of a broken runtime. Complete renderer/body/FantLab gates remain open. 6. Live Pages deployment remains subject to repository policy/administration and must not be implied by static build success. diff --git a/project/run-receipts/SCRIP-CORPUS-082.md b/project/run-receipts/SCRIP-CORPUS-082.md new file mode 100644 index 00000000..ad6a805e --- /dev/null +++ b/project/run-receipts/SCRIP-CORPUS-082.md @@ -0,0 +1,38 @@ +# Run receipt — SCRIP-CORPUS-082 + +- Unit: SCRIP-CORPUS-082 +- Issue: #253 +- Draft PR: #254 +- Base: `master@bd291227733155672f8dd6d9d3a634348615cdbe` +- Status: `REVIEW_PENDING` +- Stream: corpus / provenance / renderer evidence +- Benchmark movement: none; M2 remains `0/5` + +## Bounded result + +Fresh Russian Wikisource research materially changed the replay-selection decision for the unresolved Darwin/Rachinsky `{{ВАР}}` shape. The already reviewed VAR implementation module is pinned at `Модуль:Дореформенная орфография@5721277` (2026-06-08). Current provider evidence observed `Модуль:Header@5746249` (2026-09-10), and a Wikisource forum discussion dated 2026-09-08 explicitly raised whether `{{ВАР}}` had broken after Header-related changes. This run records the discussion only as provider-drift risk; it does not assert a proven production failure. + +The source-free evidence contract `scriptorium-darwin-var-provider-drift-evidence-v1` has SHA-256 `6126adbc966c7120ca487fb940bd0e01aafa0d7350d332e6422edbf8b3846cb8`. It links prior evidence SHA-256 `321ced32bb7ffc75829b6fbb5255bce3243641a80c21ad4e2b7bb7a25138502d` to the observed Header revision and deterministically replays only the title-classification rule needed by retained mainspace title `О происхождении видов (Дарвин; Рачинский)/1864 (ВТ:Ё)`. The edition segment `1864 (ВТ:Ё)` yields `isPRS=false`, so `Модуль:Дореформенная орфография@5721277` would select its second/modern argument if its non-Page branch is reached under that observed Header rule. + +## Evidence boundary + +Not frozen/proven in this unit: +- live `Шаблон:ВАР` root revision identity; +- `Module:Header` MediaWiki SHA-1; +- execution-relevant nested dependency closure; +- complete `{{ВАР}}` invocation replay; +- historical transclusion identity; +- offline/version-pinned MediaWiki runtime; +- renderer promotion, literary-body identity, >=300k admission, FantLab analyzer-input identity or parity. + +The effective unresolved counts remain 4 tag shapes / 130 tokens and 37 template shapes / 2,356 invocations; `ВАР` remains unresolved at 388 invocations. + +## Verification authored in this unit + +Focused regressions rebuild the committed evidence deterministically, verify the retained title classifies as `isPRS=false`, cover positive ДО cases, assert all full-replay/promotion gates remain false, and ensure the community warning is retained as risk evidence rather than upgraded to a runtime-failure claim. + +Local deterministic builder/validator checks passed before commit. GitHub exact-head workflow evidence is intentionally left for CI and the next independent-review wake; PR #254 remains Draft. + +## Next trigger + +Independently review the exact final PR #254 head and CI. If clean, mark Ready and merge with expected-head protection. A subsequent VAR replay unit must choose one explicit coherent snapshot, freeze exact `Шаблон:ВАР`, `Модуль:Дореформенная орфография`, `Module:Header` identities including MediaWiki SHA-1 and execution-relevant nested closure, then replay the candidate invocation without silently substituting a later live descendant. diff --git a/scriptorium/darwin_var_provider_drift_evidence.py b/scriptorium/darwin_var_provider_drift_evidence.py new file mode 100644 index 00000000..3b6755b4 --- /dev/null +++ b/scriptorium/darwin_var_provider_drift_evidence.py @@ -0,0 +1,255 @@ +"""Freeze a source-free provider-drift guard for Darwin/Rachinsky ``{{ВАР}}``. + +The preceding VAR documentation unit pinned the documentation and implementation +module but intentionally left ``Module:Header`` and the live template root +unbound. Fresh provider evidence shows that Header changed after the pinned VAR +module and that Wikisource editors raised a possible VAR breakage in September +2026. This module records that drift boundary and replays only the deterministic +``parse_title(..., "isPRS")`` classification needed by the retained Darwin +mainspace title. It does not promote VAR or claim a complete MediaWiki runtime. +""" + +from __future__ import annotations + +import argparse +from hashlib import sha256 +import json +from pathlib import Path +from typing import Mapping, Sequence + + +EVIDENCE_VERSION = "scriptorium-darwin-var-provider-drift-evidence-v1" +CANDIDATE_ID = "darwin-origin-species-rachinsky-1864-ru" +PRIOR_EVIDENCE_VERSION = "scriptorium-darwin-var-documentation-evidence-v1" +PRIOR_EVIDENCE_SHA256 = "321ced32bb7ffc75829b6fbb5255bce3243641a80c21ad4e2b7bb7a25138502d" +CANDIDATE_MAINSPACE_TITLE = "О происхождении видов (Дарвин; Рачинский)/1864 (ВТ:Ё)" +DOCUMENTATION_REVISION_ID = 5711068 +VAR_MODULE_REVISION_ID = 5721277 +OBSERVED_HEADER_REVISION_ID = 5746249 +OBSERVED_HEADER_EDIT_DATE = "2026-09-10" +RESEARCH_DATE = "2026-09-24" +WIKISOURCE_FORUM_URL = "https://ru.wikisource.org/wiki/Викитека:Форум" + + +def _canonical_json(value: object) -> str: + return json.dumps(value, ensure_ascii=False, sort_keys=True, separators=(",", ":")) + + +def _sha256_json(value: object) -> str: + return sha256(_canonical_json(value).encode("utf-8")).hexdigest() + + +def parse_title_is_prs(title: str) -> bool: + """Replay the Header@5746249 isPRS rule for ordinary edition-style titles. + + The retained Darwin title follows Header's ordinary slash-separated path, so + this helper intentionally implements only the branch exercised by that + candidate and fails closed for malformed input. + """ + + if not isinstance(title, str) or not title or "/" not in title: + raise ValueError("candidate title must be a slash-separated mainspace title") + _root, name = title.split("/", 1) + if not name: + raise ValueError("candidate edition segment missing") + if "/" in name: + edition, _subpages = name.split("/", 1) + subpages1 = name + else: + edition = name + subpages1 = name + return ( + edition == "ДО" + or edition.endswith(" (ДО)") + or subpages1.endswith("/ДО") + ) + + +def _validate_prior(prior: Mapping[str, object]) -> None: + if prior.get("schema_version") != PRIOR_EVIDENCE_VERSION: + raise ValueError("Darwin VAR prior evidence schema drift") + if prior.get("candidate_id") != CANDIDATE_ID: + raise ValueError("Darwin VAR prior evidence candidate drift") + if prior.get("evidence_sha256") != PRIOR_EVIDENCE_SHA256: + raise ValueError("Darwin VAR prior evidence digest drift") + unsigned = dict(prior) + stored = unsigned.pop("evidence_sha256", None) + if _sha256_json(unsigned) != stored: + raise ValueError("Darwin VAR prior evidence self-digest drift") + + +def build_evidence(prior: Mapping[str, object]) -> dict[str, object]: + """Build deterministic source-free provider-drift evidence.""" + + _validate_prior(prior) + is_prs = parse_title_is_prs(CANDIDATE_MAINSPACE_TITLE) + + evidence: dict[str, object] = { + "schema_version": EVIDENCE_VERSION, + "candidate_id": CANDIDATE_ID, + "source_text_included": False, + "researched_on": RESEARCH_DATE, + "prior_evidence": { + "schema_version": PRIOR_EVIDENCE_VERSION, + "evidence_sha256": PRIOR_EVIDENCE_SHA256, + "documentation_revision_id": DOCUMENTATION_REVISION_ID, + "implementation_module_revision_id": VAR_MODULE_REVISION_ID, + }, + "provider_drift_observation": { + "provider": "Russian Wikisource", + "observed_header": { + "title": "Модуль:Header", + "revision_id": OBSERVED_HEADER_REVISION_ID, + "revision_date": OBSERVED_HEADER_EDIT_DATE, + "permanent_url": ( + "https://ru.wikisource.org/w/index.php?" + f"title=Модуль:Header&oldid={OBSERVED_HEADER_REVISION_ID}" + ), + "relationship_to_pinned_var_module": "later_revision", + }, + "community_warning": { + "forum_url": WIKISOURCE_FORUM_URL, + "discussion_date": "2026-09-08", + "observation": ( + "Wikisource editors explicitly raised whether template VAR had " + "broken after Header-related changes and noted that the small " + "pre-reform module delegates page-title parsing to Header." + ), + "claim_scope": "provider_drift_risk_not_a_proven_runtime_failure", + }, + "decision_effect": ( + "do_not_silently_bind_a_future_live_Header_as_replay_equivalence; " + "select_and_record_an_explicit_coherent_snapshot_before_full_VAR_replay" + ), + }, + "observed_header_rule_replay": { + "header_revision_id": OBSERVED_HEADER_REVISION_ID, + "function": 'parse_title(..., "isPRS")', + "candidate_title": CANDIDATE_MAINSPACE_TITLE, + "candidate_namespace": "mainspace", + "edition_segment": "1864 (ВТ:Ё)", + "isPRS": is_prs, + "selected_variant_if_module_branch_is_reached": ( + "second_parameter_modern" if not is_prs else "first_parameter_pre_reform" + ), + "scope": ( + "deterministic_replay_of_the_observed_Header_title_classification_rule_only" + ), + }, + "dependency_boundary": { + "template_root_revision_frozen": False, + "implementation_module_revision_frozen_for_this_chain": True, + "module_header_revision_observed": True, + "module_header_mediawiki_sha1_frozen": False, + "nested_dependency_closure_frozen": False, + "offline_version_pinned_runtime_proven": False, + "historical_transclusion_proven": False, + "full_var_candidate_branch_replayed": False, + "reason": ( + "the Header revision and title-classification rule are observed, but " + "the live template root, Header SHA-1 and complete replay-time closure " + "are not yet bound into one executable snapshot" + ), + }, + "promotion_decision": { + "render_profile_rule_promoted": False, + "backlog_item_removed": False, + "effective_backlog_changed": False, + "reason": ( + "provider drift evidence narrows snapshot selection but does not prove " + "a complete deterministic VAR invocation replay" + ), + "next_evidence_required": ( + "choose one explicit coherent replay snapshot, freeze exact Шаблон:ВАР " + "plus Модуль:Дореформенная орфография plus Module:Header identities " + "including MediaWiki SHA-1 and the execution-relevant nested closure, " + "then replay the candidate mainspace invocation without substituting " + "later live descendants" + ), + }, + "renderer_semantics_complete": False, + "renderer_implementation_ready": False, + "inter_page_composition_frozen": False, + "literary_body_count_and_digests_frozen": False, + "minimum_300k_proved": False, + "admitted_for_calibration": False, + "fantlab_source_edition_match": "unknown", + "diagnostic_ready": False, + "m2_parity_admissible": False, + } + evidence["evidence_sha256"] = _sha256_json(evidence) + return evidence + + +def validate_evidence( + evidence: Mapping[str, object], + prior: Mapping[str, object], +) -> None: + expected = build_evidence(prior) + if dict(evidence) != expected: + raise ValueError("Darwin VAR provider-drift evidence drift") + replay = evidence.get("observed_header_rule_replay") + if not isinstance(replay, dict) or replay.get("isPRS") is not False: + raise ValueError("Darwin mainspace title must classify as isPRS=false") + if replay.get("selected_variant_if_module_branch_is_reached") != "second_parameter_modern": + raise ValueError("Darwin observed Header branch must select modern VAR argument") + boundary = evidence.get("dependency_boundary") + if not isinstance(boundary, dict): + raise ValueError("Darwin VAR dependency boundary missing") + for key in ( + "template_root_revision_frozen", + "module_header_mediawiki_sha1_frozen", + "nested_dependency_closure_frozen", + "offline_version_pinned_runtime_proven", + "historical_transclusion_proven", + "full_var_candidate_branch_replayed", + ): + if boundary.get(key) is not False: + raise ValueError(f"{key} must remain false in provider-drift evidence") + decision = evidence.get("promotion_decision") + if ( + not isinstance(decision, dict) + or decision.get("render_profile_rule_promoted") is not False + or decision.get("backlog_item_removed") is not False + or decision.get("effective_backlog_changed") is not False + ): + raise ValueError("Darwin VAR promotion must remain closed") + for key in ( + "renderer_semantics_complete", + "renderer_implementation_ready", + "inter_page_composition_frozen", + "literary_body_count_and_digests_frozen", + "minimum_300k_proved", + "admitted_for_calibration", + "diagnostic_ready", + "m2_parity_admissible", + ): + if evidence.get(key) is not False: + raise ValueError(f"{key} must remain false in provider-drift evidence") + if evidence.get("fantlab_source_edition_match") != "unknown": + raise ValueError("FantLab source match must remain unknown") + forbidden = {"wikitext", "content", "body", "text", "source_text", "rendered_prose"} + if forbidden.intersection(evidence): + raise ValueError("source prose leaked into Darwin VAR provider-drift evidence") + + +def main(argv: Sequence[str] | None = None) -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--prior", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + args = parser.parse_args(argv) + prior = json.loads(args.prior.read_text(encoding="utf-8")) + if not isinstance(prior, dict): + raise ValueError("Darwin VAR prior evidence must be a JSON object") + evidence = build_evidence(prior) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text( + json.dumps(evidence, ensure_ascii=False, indent=2, sort_keys=True) + "\n", + encoding="utf-8", + ) + print(evidence["evidence_sha256"]) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tests/test_darwin_var_provider_drift_evidence.py b/tests/test_darwin_var_provider_drift_evidence.py new file mode 100644 index 00000000..37c6ae24 --- /dev/null +++ b/tests/test_darwin_var_provider_drift_evidence.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +import json +from pathlib import Path +import unittest + +from scriptorium.darwin_var_provider_drift_evidence import ( + CANDIDATE_MAINSPACE_TITLE, + OBSERVED_HEADER_REVISION_ID, + build_evidence, + parse_title_is_prs, + validate_evidence, +) + + +ROOT = Path(__file__).resolve().parents[1] +PRIOR = ROOT / "corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.var-documentation-evidence.json" +EVIDENCE = ROOT / "corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.var-provider-drift-evidence.json" + + +class DarwinVarProviderDriftEvidenceTests(unittest.TestCase): + def setUp(self) -> None: + self.prior = json.loads(PRIOR.read_text(encoding="utf-8")) + self.evidence = json.loads(EVIDENCE.read_text(encoding="utf-8")) + + def test_committed_evidence_rebuilds_byte_for_byte_semantically(self) -> None: + self.assertEqual(self.evidence, build_evidence(self.prior)) + validate_evidence(self.evidence, self.prior) + + def test_candidate_title_classifies_as_non_prs(self) -> None: + self.assertFalse(parse_title_is_prs(CANDIDATE_MAINSPACE_TITLE)) + replay = self.evidence["observed_header_rule_replay"] + self.assertEqual(replay["header_revision_id"], OBSERVED_HEADER_REVISION_ID) + self.assertFalse(replay["isPRS"]) + self.assertEqual( + replay["selected_variant_if_module_branch_is_reached"], + "second_parameter_modern", + ) + + def test_prs_examples_still_take_prs_branch(self) -> None: + self.assertTrue(parse_title_is_prs("Пример/ДО")) + self.assertTrue(parse_title_is_prs("Пример/1864 (ДО)")) + self.assertTrue(parse_title_is_prs("Пример/1864/ДО")) + self.assertFalse(parse_title_is_prs("Пример/1864 (ВТ:Ё)")) + + def test_full_replay_and_promotion_stay_closed(self) -> None: + boundary = self.evidence["dependency_boundary"] + self.assertFalse(boundary["template_root_revision_frozen"]) + self.assertFalse(boundary["module_header_mediawiki_sha1_frozen"]) + self.assertFalse(boundary["nested_dependency_closure_frozen"]) + self.assertFalse(boundary["full_var_candidate_branch_replayed"]) + self.assertFalse(boundary["historical_transclusion_proven"]) + self.assertFalse(boundary["offline_version_pinned_runtime_proven"]) + decision = self.evidence["promotion_decision"] + self.assertFalse(decision["render_profile_rule_promoted"]) + self.assertFalse(decision["backlog_item_removed"]) + self.assertFalse(decision["effective_backlog_changed"]) + + def test_provider_warning_is_not_promoted_to_runtime_failure(self) -> None: + warning = self.evidence["provider_drift_observation"]["community_warning"] + self.assertEqual(warning["discussion_date"], "2026-09-08") + self.assertEqual( + warning["claim_scope"], + "provider_drift_risk_not_a_proven_runtime_failure", + ) + + +if __name__ == "__main__": + unittest.main()