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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/darwin-render-surface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Darwin Rachinsky rendering surface

on:
pull_request:
paths:
- ".github/workflows/darwin-render-surface.yml"
- "scriptorium/darwin_render_surface.py"
- "scriptorium/darwin_render_surface_freeze.py"
- "scriptorium/darwin_body_contract.py"
- "scriptorium/darwin_page_freeze.py"
- "scriptorium/darwin_page_shards.py"
- "tests/test_darwin_render_surface.py"
- "tests/test_darwin_render_surface_freeze.py"
- "corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.page-revisions.*.json"
- "corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.render-surface.json"
workflow_dispatch:

permissions:
contents: read

jobs:
audit:
name: Audit 388 exact literary Page revisions
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout pull-request head
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false

- name: Set up Python 3.13
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"

- name: Run source-free audit tests
run: |
python -m unittest tests.test_darwin_render_surface -v
python -m unittest tests.test_darwin_render_surface_freeze -v

- name: Replay exact revisions and inventory markup surface
run: |
set -euo pipefail
mkdir -p build/repro
python -m scriptorium.darwin_render_surface \
--index corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.page-revisions.index.json \
--output build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.full.json

- name: Rebuild and compare durable source-free freeze
run: |
set -euo pipefail
python -m scriptorium.darwin_render_surface_freeze \
--input build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.full.json \
--output build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.json
cmp \
build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.json \
corpus/candidates/source-edition-traces/darwin-origin-species-rachinsky-1864-ru.render-surface.json

- name: Verify source and gate boundary
run: |
python - <<'PY'
import json
from pathlib import Path
path = Path("build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.json")
audit = json.loads(path.read_text(encoding="utf-8"))
assert audit["literary_dependency_count"] == 388
assert audit["page_surface_receipts_count"] == 388
assert audit["identity_replay_match"] is True
assert audit["source_text_included"] is False
assert audit["rendering_profile_frozen"] is False
assert audit["literary_body_count_and_digests_frozen"] is False
assert audit["minimum_300k_proved"] is False
assert audit["admitted_for_calibration"] is False
assert audit["fantlab_source_edition_match"] == "unknown"
assert audit["diagnostic_ready"] is False
assert audit["m2_parity_admissible"] is False
print("SCRIPTORIUM_DARWIN_RENDER_SURFACE_PAGES=388")
print("SCRIPTORIUM_DARWIN_RENDER_SURFACE_FREEZE_SHA256=" + audit["freeze_manifest_sha256"])
PY

- name: Print source-free durable freeze for evidence
run: cat build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.json

- name: Upload source-free audit evidence
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: darwin-rachinsky-render-surface
path: |
build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.full.json
build/repro/darwin-origin-species-rachinsky-1864-ru.render-surface.json
if-no-files-found: error
retention-days: 7
22 changes: 18 additions & 4 deletions corpus/candidates/darwin-origin-species-rachinsky-1864-ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ The implementation fails closed if the 418-Page identity inventory, identity-row

This is deliberately a composition/input freeze, **not yet a literary-body identity freeze**. The Page-wikitext-to-prose rendering profile and composite separator semantics remain unfrozen, so no body count or body digest is claimed by this unit.

## Source-free rendering-surface inventory

**SCRIP-CORPUS-036 / Draft PR #160** adds the bounded prerequisite needed before a renderer can be specified without guessing at MediaWiki/template behavior. The hosted audit replays the exact **388 already-frozen literary Page revisions**, verifies each title/revision/timestamp/MediaWiki SHA-1 identity before inspecting content, and reduces the transient wikitext to a source-free construct inventory.

The durable freeze contains **38 template name/arity shapes** and **18 HTML/ProofreadPage tag name/kind shapes**. Aggregate observations include **1,069 comments**, **776 `<noinclude>` blocks**, **8 wikilinks**, no external links, no headings, no table opens/closes, and no triple-brace template-parameter constructs on this exact literary surface. The inventory records construct identities/counts and cryptographic digests only; template arguments, lexical snippets, Page wikitext and rendered prose are not committed.

The full hosted audit covered all **388/388** literary dependencies with `identity_replay_match=true`. Its per-Page source-free receipt list is represented durably by SHA-256 `7c170f513bf21f2c9e0d7736bc9fc20b4c9a40fdfe942a7b1dd1b0ac048ba09b`; the compact deterministic freeze has SHA-256 `e5ae625fef6afb2e890de990e1ef3b9e108a409a2e0ea2136947c2c3e1cea44d`.

This **does not freeze the renderer**. It freezes only the set of markup constructs the future candidate-specific renderer must handle or explicitly reject. `rendering_profile_frozen=false` remains mandatory until a separate implementation proves deterministic semantics for this exact inventory.

## Provider-reported scan-file metadata

The retained source surface reports **27,368,263 bytes**, MIME `image/vnd.djvu`, dimensions **3744 × 5616**, **432 pages**, SHA-1 `75ef508588194ae74874272ce290f3ec1043ea9b`, current file-history display `11:45, 8 March 2016` by `Nonexyst`, and Archive.org locator `https://archive.org/details/oproiskhozhdenii00darw`.
Expand All @@ -81,13 +91,13 @@ The retained Wikisource work surface explicitly states that the work is in the p

## Corpus boundary

This candidate is still **not admitted** to the >=300,000-character calibration/profile corpus. The source family, route graph, 418-dependency topology, exact 418 Page revision identities and the 388/30 literary-versus-apparatus composition boundary are now source-free frozen, but the actual literary prose has not yet been deterministically rendered or counted.
This candidate is still **not admitted** to the >=300,000-character calibration/profile corpus. The source family, route graph, 418-dependency topology, exact 418 Page revision identities, the 388/30 literary-versus-apparatus composition boundary, and the exact 388-Page source-free markup-surface inventory are now frozen, but the actual literary prose has not yet been deterministically rendered or counted.

Still required before corpus admission:

- define and verify a candidate-specific fail-closed Page-wikitext-to-prose rendering profile over the 388 exact literary dependencies;
- define and verify a candidate-specific fail-closed Page-wikitext-to-prose rendering profile that covers the frozen construct inventory;
- freeze the rendered literary-body character count including spaces plus raw/normalized digests;
- verify that the frozen body itself, not nominal page count or topology, clears **300,000 characters**.
- verify that the frozen body itself, not nominal page count, topology or construct counts, clears **300,000 characters**.

Accordingly `admitted_for_calibration=false` remains mandatory.

Expand All @@ -100,8 +110,12 @@ FantLab work **`work969964`** identifies Darwin's 1859 English monograph. The cu
- [`source-edition-traces/darwin-origin-species-rachinsky-1864-ru.json`](source-edition-traces/darwin-origin-species-rachinsky-1864-ru.json) — retained translation/source identity and gate boundary from the earlier provenance stages.
- [`source-edition-traces/darwin-origin-species-rachinsky-1864-ru.source-graph.json`](source-edition-traces/darwin-origin-species-rachinsky-1864-ru.source-graph.json) — exact route/topology evidence and apparatus roles.
- [`source-edition-traces/darwin-origin-species-rachinsky-1864-ru.page-revisions.index.json`](source-edition-traces/darwin-origin-species-rachinsky-1864-ru.page-revisions.index.json) — authoritative source-free index for all 418 exact Page revision identities and four committed shards.
- [`source-edition-traces/darwin-origin-species-rachinsky-1864-ru.render-surface.json`](source-edition-traces/darwin-origin-species-rachinsky-1864-ru.render-surface.json) — deterministic source-free 388-Page construct inventory with no source payload.
- [`source-edition-traces/darwin-origin-species-rachinsky-1864-ru.render-surface.source-graph.json`](source-edition-traces/darwin-origin-species-rachinsky-1864-ru.render-surface.source-graph.json) — provenance edges from frozen Page identities through literary composition and hosted markup audit to the durable inventory.
- [`../../scriptorium/darwin_body_contract.py`](../../scriptorium/darwin_body_contract.py) — deterministic source-free 388/30 composition contract generator and fail-closed validator.
- [`../../scriptorium/darwin_render_surface.py`](../../scriptorium/darwin_render_surface.py) — exact-revision identity-verifying hosted construct audit.
- [`../../scriptorium/darwin_render_surface_freeze.py`](../../scriptorium/darwin_render_surface_freeze.py) — deterministic compact freeze reducer/validator.

## Next evidence

A later bounded unit should inspect the exact pinned Page wikitext shapes and freeze a candidate-specific fail-closed rendering profile for the 388 literary dependencies without persisting source prose. Only then should a separate identity/admission unit compute source-free counts/digests and independently prove the >=300,000-character threshold. FantLab parity remains a separate, stricter source-matching problem.
A later bounded unit should use the now-frozen template/tag surface to define and verify a candidate-specific fail-closed rendering profile for the 388 literary dependencies without persisting source prose. Only then should a separate identity/admission unit compute source-free counts/digests and independently prove the >=300,000-character threshold. FantLab parity remains a separate, stricter source-matching problem.
Loading
Loading