Repository navigation
94 lines (84 loc) · 4.11 KB
/
Copy pathdarwin-render-surface.yml
File metadata and controls
94 lines (84 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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