unaltraweb 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +29 -5
  3. data/README.md +2 -0
  4. data/docs/_documentation/en/33-reusable-workflows.md +1 -1
  5. data/docs/_documentation/en/43-workspace-path-policies.md +7 -0
  6. data/docs/_documentation/en/48-artifact-storage.md +152 -0
  7. data/docs/_documentation/en/49-practice-inputs-editions.md +170 -0
  8. data/docs/_documentation/en/50-practice-artifact-storage.md +383 -0
  9. data/docs/_documentation/en/51-retained-private-intake.md +292 -0
  10. data/docs/_documentation/en/52-selected-file-private-storage.md +194 -0
  11. data/docs/_documentation/en/53-original-private-archives.md +190 -0
  12. data/docs/agents/manual-context-release-081-121.md +76 -0
  13. data/docs/agents/mcp-contract.md +46 -1
  14. data/docs/agents/original-private-archive.md +101 -0
  15. data/docs/agents/practice-artifact-storage-review.md +90 -0
  16. data/docs/agents/retained-compatibility.md +99 -0
  17. data/docs/agents/retained-private-intake.md +117 -0
  18. data/docs/agents/retained-variant-batch.md +103 -0
  19. data/docs/agents/software-release-090.md +66 -0
  20. data/docs/agents/web-practices-reconciliation.md +88 -0
  21. data/docs/agents/web-s4-manuals-readiness.md +126 -0
  22. data/docs/agents/web-storage-followup.md +98 -0
  23. data/docs/agents/zip-only-flat-storage.md +79 -0
  24. data/scripts/manual/candidate-storage-s3-requirements.txt +8 -0
  25. data/scripts/test_candidate_transfer.py +52 -0
  26. data/scripts/test_wheel_install.py +36 -0
  27. data/scripts/unaltraweb-mcp-bootstrap.sh +1 -1
  28. data/scripts/validate_workflows.py +105 -10
  29. data/src/unaltraweb_mcp/component-contract.json +24 -20
  30. metadata +21 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc478612d85e4f4f43eb203c048bce25f105fa320a56e66e41922627c1f4b4b3
4
- data.tar.gz: 0d55b9e3743df94ae89dda1cf008d604873d6938ae3732a2b41edd8f03d64ea0
3
+ metadata.gz: 591fc4183465d4c58f7baf39df610fc5d622f7067b0d30e7daef459a63cfa86a
4
+ data.tar.gz: 2e788eefd762ba2694d0397eb7aa9db0bc64b029da17187a840ddabe3c56da16
5
5
  SHA512:
6
- metadata.gz: 2ee71521b81afc077773b375120d39ca2e00fbaa926f287ee6df2e2c6356c10524f4b67346298f0dd647ee182f2c0fb2e45940faadaf9a0e4c336eab697aa85a
7
- data.tar.gz: fc0f4072ce20853d839c46b0cab1c305f5dfc43bf61d83d58ebb13e552f708ad2d16e4473f4f454829c9206857b66b3279d38ba7f7e110845053fa0942d8497a
6
+ metadata.gz: 7d1c5afa8ec0d93a23128233887e246ff1921c59b96c647a9df3843b2484202781c7b715c0470ff97356dd9478476c35c0753901de7b799ec6e56d5b5746db05
7
+ data.tar.gz: 57809cdc744fb71e944b474487e192318fa842edd03630b841d144fa371933df37083fbd5664de8001060fdd8d211b8ae9c3d7bb530ac499c458a1fb455e323b
data/Makefile CHANGED
@@ -1,9 +1,9 @@
1
1
  PYTHON ?= python3
2
2
  override PROJECT := $${MCP_CONSUMER_WORKSPACE:?MCP_CONSUMER_WORKSPACE is required}
3
3
  override PROJECT_ROOT := $(PROJECT)
4
- MCP_RUNTIME_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb:0.8.1
5
- MCP_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-mcp:0.8.1
6
- MCP_RELEASE_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-mcp@sha256:8b41abacad9ca2894755db7f3587a6b47c8fa8f536d88a151bdfc4ae53ba7f08
4
+ MCP_RUNTIME_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb:0.9.0
5
+ MCP_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-mcp:0.9.0
6
+ MCP_RELEASE_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-mcp@sha256:a4f4f1b61f30bfef550f23a33ec3ef0aa789539adf3981a08e549ff2354d05ec
7
7
  MCP_DOCKER_BUILD_NETWORK ?= default
8
8
  INIT_SITE_PROFILE ?= unaltreselfie
9
9
  NEW_WEB_PROFILE ?= unaltreselfie
@@ -40,8 +40,8 @@ WEB_CAPTURE_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-web-capture@sha256:0bf1b
40
40
  WEB_CAPTURE_DEV_IMAGE ?= unaltraweb-web-capture:dev
41
41
  WEB_CAPTURE_DOCKER_BUILD_NETWORK ?= default
42
42
  VEGAVISUALS_CLI ?=
43
- DOCKER_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb:0.8.1
44
- MANUAL_PDF_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-manual-pdf@sha256:1bb3f2dafd741e96c28639ec1cc8ccaeb81cbaa73e649f787c0b4ef59997bd4b
43
+ DOCKER_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb:0.9.0
44
+ MANUAL_PDF_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-manual-pdf@sha256:38f62cba21cd2b50a3512bd00743a3a8413c89b99f51b55d1bb47d1bb72bad3c
45
45
  MANUAL_PDF_DEV_IMAGE ?= unaltraweb-manual-pdf:dev
46
46
  MCP_SMOKE_MANUAL_PDF_IMAGE ?= $(MANUAL_PDF_IMAGE)
47
47
  MCP_SMOKE_PROJECT ?=
@@ -60,6 +60,22 @@ export PRACTICE_SOURCE PRACTICE_VERSION PRACTICE_RUN PRACTICE_DRY_RUN
60
60
  PRACTICE_EDITION_CONFIG ?=
61
61
  override PRACTICE_EDITION_CONFIG := $(value PRACTICE_EDITION_CONFIG)
62
62
  export PRACTICE_EDITION_CONFIG
63
+ INPUT_PREPARATION_CONFIG ?= .unaltraweb/input-preparation.json
64
+ INPUT_PREPARATION_SHA256 ?=
65
+ INPUT_PREPARATION_FETCH ?= 0
66
+ override INPUT_PREPARATION_CONFIG := $(value INPUT_PREPARATION_CONFIG)
67
+ override INPUT_PREPARATION_SHA256 := $(value INPUT_PREPARATION_SHA256)
68
+ override INPUT_PREPARATION_FETCH := $(value INPUT_PREPARATION_FETCH)
69
+ export INPUT_PREPARATION_CONFIG INPUT_PREPARATION_SHA256 INPUT_PREPARATION_FETCH
70
+ PRACTICE_ARTIFACT_CONFIG ?= .unaltraweb/practice-artifacts.json
71
+ PRACTICE_ARTIFACT_SHA256 ?=
72
+ PRACTICE_ARTIFACT_ID ?=
73
+ PRACTICE_ARTIFACT_STAGE ?=
74
+ override PRACTICE_ARTIFACT_CONFIG := $(value PRACTICE_ARTIFACT_CONFIG)
75
+ override PRACTICE_ARTIFACT_SHA256 := $(value PRACTICE_ARTIFACT_SHA256)
76
+ override PRACTICE_ARTIFACT_ID := $(value PRACTICE_ARTIFACT_ID)
77
+ override PRACTICE_ARTIFACT_STAGE := $(value PRACTICE_ARTIFACT_STAGE)
78
+ export PRACTICE_ARTIFACT_CONFIG PRACTICE_ARTIFACT_SHA256 PRACTICE_ARTIFACT_ID PRACTICE_ARTIFACT_STAGE
63
79
  MANUAL_PDF_PUBLISH_DRY_RUN ?= 1
64
80
  MANUAL_PDF_CONFIRM_PUBLISH ?= 0
65
81
  MANUAL_PDF_PUBLICATION_INTENT_SHA256 ?=
@@ -111,6 +127,8 @@ endif
111
127
  .PHONY: distribution-check distribution-release-check distribution-doctor workflow-check wheel-check gem-check reproducible-site-check docs-build docs-serve docs-publish docs-down metrics-scimago-fetch metrics-update metrics-update-all metrics-check manual-pdf-image manual-pdf-image-dev manual-pdf-preflight manual-pdf-status manual-pdf-check manual-pdf-build manual-pdf-publish manual-pdf-publish-worker manual-pdf-sync manual-release-status manual-release-check manual-release-prepare manual-compute-status manual-compute-check manual-compute-render manual-compute-render-figures manual-compute-image-python manual-compute-image-r manual-compute-images manual-compute-rstudio compute-base-image-python compute-base-image-r web-capture-status web-capture-check web-capture-render web-capture-image visualization-status visualization-check visualization-render
112
128
  .PHONY: manual-practice-pdf-build
113
129
  .PHONY: manual-practice-compose
130
+ .PHONY: manual-inputs-prepare
131
+ .PHONY: practice-artifact-plan practice-artifact-stage
114
132
  .PHONY: mcp-runtime-image mcp-image mcp-build mcp-check mcp-smoke mcp-smoke-prebuilt mcp-stdio mcp-down mcp-down-all mcp-list-tools mcp-starter-templates mcp-new-web mcp-initialize-site mcp-site-context mcp-profile-check mcp-manual-source-quality-check mcp-manual-editorial-quality-check mcp-manual-authoring-capabilities mcp-manual-computation-status mcp-manual-computation-check mcp-manual-computation-render mcp-manual-computation-render-figures mcp-web-capture-status mcp-web-capture-check mcp-web-capture-render mcp-manual-pdf-status mcp-manual-pdf-build mcp-manual-pdf-preview-prepare mcp-manual-pdf-preview-clean mcp-manual-pdf-publish mcp-manual-release-status mcp-manual-release-check mcp-manual-release-prepare mcp-profile-prune-plan mcp-profile-prune mcp-content-inventory mcp-language-policy mcp-content-approval-inventory mcp-translation-plan mcp-bibliography-inventory mcp-bibliometrics-check mcp-build-health
115
133
 
116
134
  REPOSITORY_CONTEXT_TARGETS := distribution-doctor manual-compute-status manual-compute-check manual-compute-render manual-compute-render-figures manual-compute-image-python manual-compute-image-r manual-compute-images manual-compute-rstudio web-capture-status web-capture-check web-capture-render visualization-status visualization-check visualization-render manual-pdf-preflight manual-pdf-status manual-pdf-check manual-pdf-build manual-pdf-publish manual-pdf-sync manual-release-status manual-release-check manual-release-prepare metrics-scimago-fetch metrics-update metrics-update-all metrics-check
@@ -120,6 +138,12 @@ $(REPOSITORY_CONTEXT_TARGETS): override PROJECT_ROOT = $${MCP_CONSUMER_WORKSPACE
120
138
  distribution-check: ## Validate component/version parity, release selections, and the wheel boundary
121
139
  @PYTHONPATH="$(CURDIR)/src" $(PYTHON) scripts/validate_distribution.py
122
140
 
141
+ manual-inputs-prepare: ## Explicit pinned input hydration/check; never render or run consumer scripts
142
+ @set --; case "$$INPUT_PREPARATION_FETCH" in 1) set -- --fetch;; 0) set -- --check;; *) printf '%s\n' 'INPUT_PREPARATION_FETCH must be 0 or 1' >&2; exit 1;; esac; PYTHONPATH="$(CURDIR)/src" $(PYTHON) -m unaltraweb_mcp.input_preparation --project "$(PROJECT)" --config "$$INPUT_PREPARATION_CONFIG" --sha256 "$$INPUT_PREPARATION_SHA256" "$$@"
143
+
144
+ practice-artifact-plan practice-artifact-stage: ## Plan/stage one explicitly routed practice artifact, offline
145
+ @set --; if test "$@" = practice-artifact-stage; then set -- --stage "$$PRACTICE_ARTIFACT_STAGE"; fi; PYTHONPATH="$(CURDIR)/src" $(PYTHON) -m unaltraweb_mcp.artifact_publication "$(@:practice-artifact-%=%)" --project "$(PROJECT)" --config "$$PRACTICE_ARTIFACT_CONFIG" --sha256 "$$PRACTICE_ARTIFACT_SHA256" --artifact "$$PRACTICE_ARTIFACT_ID" "$$@"
146
+
123
147
  distribution-release-check: ## Require every selected component to be ready for coordinated publication
124
148
  @PYTHONPATH="$(CURDIR)/src" $(PYTHON) scripts/validate_distribution.py --require-release-ready
125
149
 
data/README.md CHANGED
@@ -32,6 +32,8 @@ The default distribution is Docker-first. Generated sites run their normal build
32
32
 
33
33
  `unaltremanual` sites can also build language-specific PDF editions and matching web-cover images in an isolated Pandoc/XeLaTeX container. PDF status is offline; build and local review are available through Make and the MCP control plane. When PDF output is enabled, default generated PDF and cover outputs are not versioned. The selected `latest` or stable selector is rendered into both the website and PDF metadata.
34
34
 
35
+ The source interface also supports [per-artifact practice storage](docs/_documentation/en/50-practice-artifact-storage.md): individual sealed practice PDFs and data ZIPs select GitHub Releases or S3-compatible storage such as S4. Destinations and credentials are separate from product identity; one course can combine public GitHub artifacts with private S4 packets. Generated-site use requires a reviewed runtime containing the interface.
36
+
35
37
  ## Current Status
36
38
 
37
39
  - Published releases provide receipt-bound Docker images, Ruby gems and Python wheels. The 0.7.4 source unit corrects the native core/gem tuple and adds reviewed scaffold conflict resolution; see [the acceptance and migration record](docs/agents/scaffold-closeout-118.md) for publication status and exact boundaries.
@@ -76,7 +76,7 @@ without treating arbitrary custom workflow code as package-owned.
76
76
 
77
77
  ## Stable manual releases
78
78
 
79
- `.github/workflows/site-release.yml` is a separate `workflow_call`-only boundary for future `vYYYY.MM` and `vYYYY.MM.N` releases. Its preparation job has only `contents: read`: it checks the reviewed `main` SHA, checks out an immutable core revision, requires digest-pinned manual PDF and MCP site-build images, records the Python runtime from the site-build image, derives `SOURCE_DATE_EPOCH` from the reviewed consumer commit, and runs Jekyll offline inside the same MCP image used for local candidate review. When `.vegavisuals.yml` exists, the job runs the freshness check from the exact reviewed vegavisuals checkout rather than merely recording its SHA. It then requires the rebuilt version-2 `release-manifest.json` SHA-256 to equal the locally reviewed candidate digest supplied by the caller, assembles a deterministic web archive, writes checksums, and uploads a same-run Actions artifact. Only the dependent `publish` job receives `contents: write`. That job requires the `stable-release` GitHub environment and consists only of pinned artifact download, immutable verifier checkout, exact Python setup, and the reviewed publisher. The publisher verifies the asset allowlist, source/runtime identity, site tree fingerprint and PDF hashes, creates a lightweight tag at the reviewed source SHA, and addresses one matching draft by numeric release ID. A retry resets that draft's canonical metadata and assets, downloads them, compares every byte with the prepared candidate, confirms that the remote asset inventory and tag have not changed, and publishes the draft last.
79
+ `.github/workflows/site-release.yml` is a separate `workflow_call`-only boundary for future `vYYYY.MM` and `vYYYY.MM.N` releases. Its preparation job has only `contents: read`: it checks the reviewed `main` SHA, checks out an immutable core revision, requires digest-pinned manual PDF and MCP site-build images, records the Python runtime from the site-build image, derives `SOURCE_DATE_EPOCH` from the reviewed consumer commit, and runs Jekyll offline inside the same MCP image used for local candidate review. When `.vegavisuals.yml` exists, the job runs the freshness check from the exact reviewed vegavisuals checkout rather than merely recording its SHA. It then requires the rebuilt version-2 `release-manifest.json` SHA-256 to equal the locally reviewed candidate digest supplied by the caller, assembles a deterministic web archive, and writes checksums. The [project artifact-storage policy]({{ '/artifact-storage/' | relative_url }}) selects bounded same-run Actions v4 transport by default or optional private S3. A separate envelope binds identical native asset bytes to the exact selector/source/run/attempt; native schema2 `publication.json` is preserved. Both paths verify transfer readback before the publisher receives assets. Only the dependent `publish` job receives `contents: write`. That job requires the `stable-release` GitHub environment and consists only of immutable verifier checkout, exact Python setup, selected transport download/verification, and the reviewed publisher. Optional S3 credentials are scoped to its transfer steps. The publisher verifies the asset allowlist, source/runtime identity, site tree fingerprint and PDF hashes, creates a lightweight tag at the reviewed source SHA, and addresses one matching draft by numeric release ID. A retry resets that draft's canonical metadata and assets, downloads them, compares every byte with the prepared candidate, confirms that the remote asset inventory and tag have not changed, and publishes the draft last.
80
80
 
81
81
  Prepare and check the stable candidate locally from the exact clean `main` commit, then obtain the caller input with `sha256sum tmp/manual-release/<selector>/release-manifest.json`. CI is the authoritative offline rebuild; any network-dependent local difference changes the manifest digest and fails before any job has publication authority. Before enabling a stable caller, protect `main` against direct changes, enable immutable releases in repository settings, protect `v*` tags while allowing only the approved release workflow to create them, and configure required reviewers with self-review and bypass disabled for the repository's `stable-release` environment. Restrict that environment to protected `main`. No stable caller is installed by the current scaffold because the reusable workflow must first exist at a reviewed immutable commit. Use two commits:
82
82
 
@@ -46,6 +46,13 @@ which is not evidence that a future Git repository is compliant.
46
46
  | `practiques` | directory | private-practice-sources | versioned | never |
47
47
  | `sandbox/practiques` | directory | retained-private-practice-jobs | ignored | explicit |
48
48
  | `dist/practiques` | directory | private-practice-deliveries | ignored | explicit |
49
+ | `.unaltraweb/practice-artifacts.json` | file | per-artifact-practice-storage-policy | versioned | never |
50
+ | `sandbox/artifacts` | directory | retained-practice-artifact-stages | ignored | explicit |
51
+ | `sandbox/artifact-attempts` | directory | private-local-artifact-attempt-evidence | ignored | explicit |
52
+ | `.unaltraweb/retained-intake.json` | file | explicit-retained-private-intake-request | versioned | never |
53
+ | `sandbox/retained-handoffs` | directory | retained-private-handoff-admissions | ignored | explicit |
54
+ | `.unaltraweb/original-archive.json` | file | explicit-original-private-archive-request | versioned | never |
55
+ | `sandbox/original-archives` | directory | original-private-archive-admissions | ignored | explicit |
49
56
  | `.cache/scimago` | directory | external-bibliometrics-input-cache | ignored | explicit |
50
57
  | `.cache/unaltraweb/manual-pdf-publication-intent.json` | file | pdf-publication-recovery-intent | ignored | explicit |
51
58
  | `.cache/unaltraweb/manual-pdf-publication.json` | file | pdf-publication-provenance | ignored | explicit |
@@ -0,0 +1,152 @@
1
+ ---
2
+ title: Project artifact storage
3
+ description: Select bounded temporary candidate transport without changing native publication or Pages formats.
4
+ lang: en
5
+ ref: artifact_storage
6
+ profiles: [unaltredocs]
7
+ documentation_profiles: [core-developers]
8
+ section: Core Development
9
+ weight: 675
10
+ permalink: /artifact-storage/
11
+ ---
12
+
13
+ ## Separate artifact classes
14
+
15
+ The version-1 storage selector controls **temporary `release_candidate` transport**
16
+ between `site-release.yml`'s prepare and publish jobs. It does not select a public
17
+ delivery destination. A candidate expires; a published edition remains available
18
+ at its published URLs while those URLs are referenced.
19
+
20
+ | Class | Delivery and lifetime |
21
+ | --- | --- |
22
+ | Temporary release candidate/evidence | GitHub Actions v4 by default, or project-selected private S3; 1–14 days. |
23
+ | Durable stable manual | Existing reviewed GitHub Release assets; no latest-only deletion or renaming. Public S3 delivery requires a separate explicitly selected and qualified contract. |
24
+ | Private practice packet | Existing ignored, retained practice editions for the named recipient; never made public by this selector. |
25
+ | GitHub Pages site | Native `upload-pages-artifact` / `deploy-pages` protocol, unchanged. |
26
+
27
+ ## Project-owned policy
28
+
29
+ New package scaffolds include `.unaltraweb/artifact-storage.json`. This is an
30
+ editable project selection, not a managed pin and not a `publication.json` file.
31
+ Existing sites without this file retain the same GitHub default without installing
32
+ an S3 SDK or configuring an S3 account:
33
+
34
+ ```json
35
+ {
36
+ "schema_version": 1,
37
+ "release_candidate": {
38
+ "transport": "github-actions",
39
+ "retention_days": 14
40
+ }
41
+ }
42
+ ```
43
+
44
+ The package owns `artifact-storage-v1.schema.json` and the
45
+ `unaltraweb-candidate-storage` CLI (`plan`, `seal`, `verify`, `receive`,
46
+ `s3-upload`, `s3-download`). The shared workflow freezes the reviewed project's
47
+ selection before executing builds, then passes that frozen policy to the
48
+ publisher. Unknown schema versions, classes, fields and transports fail closed.
49
+ The MCP inventory and existing consumer runtime/image pins are unchanged.
50
+
51
+ ## Private S3-compatible selection
52
+
53
+ ```json
54
+ {
55
+ "schema_version": 1,
56
+ "release_candidate": {
57
+ "transport": "s3-private",
58
+ "retention_days": 14,
59
+ "s3": {
60
+ "profile": "s3",
61
+ "endpoint_url": "https://s3.example.invalid",
62
+ "region": "example-1",
63
+ "bucket": "project-private",
64
+ "prefix": "web-candidates",
65
+ "addressing_style": "path",
66
+ "lifecycle_rule_id": "expire-candidates"
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ `profile: s4` selects the same S3 API and byte format; it does not create a new
73
+ artifact format or make S4 a dependency of other sites. HTTPS origins cannot
74
+ contain embedded credentials. No project account or destination is selected by
75
+ this example.
76
+
77
+ Before using S3, the project owner must provision and qualify:
78
+
79
+ 1. A private bucket/prefix and CI-scoped credentials, preferably short-lived.
80
+ Pass only the reusable workflow's optional `candidate_s3_access_key_id`,
81
+ `candidate_s3_secret_access_key`, and `candidate_s3_session_token` secrets.
82
+ The adapter accepts their corresponding `UNALTRAWEB_S3_*` environment variables
83
+ for explicit CI/native use. It never consults personal profiles, host files,
84
+ instance metadata, a private hub repository, or MEGA credentials.
85
+ 2. Permission to read the bucket public-access-block/lifecycle/versioning configuration and to
86
+ `PutObject`/`GetObject` only in the selected candidate namespace. The publisher
87
+ needs read access there; neither role needs delete, ACL or lifecycle-write
88
+ authority. All four bucket public-access-block settings must be enabled and
89
+ observable through the S3 API; an endpoint without this proof is unqualified
90
+ and refused, including an S4 profile. No public-read ACL is requested.
91
+ 3. An enabled lifecycle rule with the exact ID and isolated `<prefix>/` filter,
92
+ `Expiration.Days` no greater than the selected retention. Versioned or suspended
93
+ buckets must also bound `NoncurrentVersionExpiration.NoncurrentDays`. The
94
+ adapter verifies these rules; it never edits bucket policy or deletes editions.
95
+ Service lifecycle expiration is asynchronous, so expired candidates are also
96
+ refused by the reader at the exact envelope deadline.
97
+ 4. HTTPS/private-access, conditional `If-None-Match: *` writes, real readback,
98
+ lifecycle and CI credential qualification against the chosen provider. S3
99
+ compatibility is not inferred from an endpoint's name. OIDC trust/role setup
100
+ and token exchange are project CI responsibilities; pass the resulting
101
+ temporary credentials. This unit does not provision an OIDC trust or host key.
102
+
103
+ The optional public SDK closure is pinned in
104
+ `scripts/manual/candidate-storage-s3-requirements.txt` (Boto3/Botocore 1.40.75,
105
+ urllib3 2.8.0).
106
+ It is installed only for S3 workflow steps. The public wheel offers the
107
+ `artifact-storage` extra for native integrations. No private code is copied into
108
+ consumer sites.
109
+
110
+ ## Exact bytes, identity and verification
111
+
112
+ Both transports carry the same `release-transfer/` directory: a separate
113
+ `candidate-transfer.json` v1 envelope and untouched `release-assets/` containing
114
+ PDFs, the deterministic site tar.gz, `release-manifest.json`, the **native schema2
115
+ `publication.json`**, and `SHA256SUMS`. The envelope inventories every filename,
116
+ SHA-256 and byte count, including the checksums file. Its hash and size are
117
+ prepare-job outputs, not selected by the receiving storage service.
118
+
119
+ The envelope binds repository, selector, full source SHA, run ID, run attempt,
120
+ policy digest and expiration. The GitHub artifact name retains all those build
121
+ selectors; transfer/readback requires its exact positive numeric artifact ID,
122
+ `merge-multiple: true` to retain the package root for ID downloads, and
123
+ `overwrite: false`. The Python 3.13 CI lane performs an actual synthetic v4
124
+ upload/download followed by envelope and native-format verification. S3 uses:
125
+
126
+ ```text
127
+ <prefix>/release_candidate/<owner>/<repo>/<selector>/<source-sha>/<run-id>/<run-attempt>/<asset-name>
128
+ ```
129
+
130
+ S3 publishes the envelope last, uses conditional create-only writes and reads
131
+ back every uploaded object to verify size and SHA. It streams large files rather
132
+ than buffering the site archive in RAM. Retries are bounded to three attempts for
133
+ transient server/network errors; absent objects, permission failures, corruption,
134
+ conflicts and expired evidence do not trigger another backend, public URL, older
135
+ attempt or different build. A failed/uncertain upload may leave a partial prefix;
136
+ it is not publication authority and remains bounded by lifecycle retention.
137
+
138
+ After download, the same envelope verifier checks the complete package and only
139
+ then copies native assets to the publisher. The existing native release verifier
140
+ still validates formats, site/PDF hashes, reviewed source and runtime identities.
141
+ Its privileged Release readback/byte comparison and final publication gates are
142
+ unchanged. Storage configuration can never replace native publication metadata.
143
+
144
+ ## Adoption gates
145
+
146
+ The source change is reviewable without selecting S3. Synthetic tests exercise
147
+ both transports, exact native-verifier acceptance, hash/size failures, absence,
148
+ authentication denial, retries, no-clobber and retention. They do not qualify a
149
+ real private endpoint. Consumers must explicitly select the reviewed workflow
150
+ commit after its CI/review, retain their accepted runtime/helper pins, and test
151
+ their chosen transport. No release, tag, image publication, Pages deployment or
152
+ manual content adoption is performed by this implementation.
@@ -0,0 +1,170 @@
1
+ ---
2
+ title: Practice inputs and editions
3
+ description: Prepare immutable inputs before freshness and compose explicit tabular or native GIS private editions.
4
+ lang: en
5
+ ref: practice_inputs_editions
6
+ profiles: [unaltredocs]
7
+ documentation_profiles: [core-developers]
8
+ section: Core Development
9
+ weight: 680
10
+ permalink: /practice-inputs-editions/
11
+ ---
12
+
13
+ ## Existing practice paths stay stable
14
+
15
+ Editable sources stay in `practiques/<slug>/`. Retained data and attempts stay in
16
+ ignored `sandbox/practiques/<slug>/<run>/`; final private deliveries stay in
17
+ ignored `dist/practiques/<slug>/<version>/<lang>/`. Exclude `practiques/`,
18
+ `sandbox/` and `dist/` from Jekyll. An ignore or exclusion grants no cleanup or
19
+ publication permission.
20
+
21
+ Use `ca/<alumnat|docent>/LLEGIU-ME.md`,
22
+ `es/<alumnat|docent>/LEEME.md`, or `en/<alumnat|docent>/README.md` beneath the
23
+ practice. Existing explicit `unaltraweb.practices.readings` mappings remain
24
+ available for legacy sources. See [private practice PDFs]({{ '/private-practice-pdfs/' | relative_url }})
25
+ for metadata, approvals, the retained PDF worker and reading bindings.
26
+
27
+ ## Prepare pinned data before freshness
28
+
29
+ `site-deploy.yml` checks generated computation, Vega and PDF freshness **before**
30
+ `build-command`. Data hydration belongs in the new optional `prepare-inputs` and
31
+ `prepare-inputs-sha256` inputs, not in that late build command. Stable
32
+ `site-release.yml` accepts the same pair as `prepare_inputs` and
33
+ `prepare_inputs_sha256`. Both fields must be selected together; omitted fields
34
+ retain existing behavior.
35
+
36
+ The provider-owned helper runs from the immutable workflow revision before the
37
+ checks. It does not render, run a project script, disable checks, copy data to
38
+ `_site`, or access a private hub. Source-only CI is unchanged and never hydrates
39
+ datasets or renders a manual.
40
+
41
+ New scaffolds include a project-owned `.unaltraweb/input-preparation.json` with
42
+ an empty `resources` list. To select an existing versioned resource inventory:
43
+
44
+ ```json
45
+ {
46
+ "schema_version": 1,
47
+ "resources": [
48
+ {
49
+ "profile": "immutable-github-files-v1",
50
+ "manifest": "practiques/example/recursos.yml",
51
+ "sha256": "<reviewed resource-manifest SHA-256>"
52
+ }
53
+ ]
54
+ }
55
+ ```
56
+
57
+ The resource manifest is YAML or JSON with this exact shape. This profile reuses
58
+ the existing TIGIT inventory vocabulary instead of invoking or copying its
59
+ domain-specific preparer:
60
+
61
+ ```yaml
62
+ schema_version: 1
63
+ kind: unaltraweb-prepared-inputs
64
+ version: 2026-11-r1
65
+ source_commit: <full immutable Git commit>
66
+ source_prefix: archived-inputs/example/
67
+ source_url: https://raw.githubusercontent.com/owner/repository/<same-commit>/archived-inputs/example/
68
+ snapshot: sandbox/practiques/example/inputs/2026-11-r1
69
+ files:
70
+ - path: data/table.csv
71
+ sha256: <exact file SHA-256>
72
+ bytes: 1234
73
+ ```
74
+
75
+ `kind` is retained provenance, not a claim that Web produced those domain bytes.
76
+ The top plan and resource manifests must be versioned, non-ignored files. The
77
+ reviewed SHA of the top plan is an explicit invocation/workflow input. The only
78
+ network origin in this profile is HTTPS GitHub raw at the exact full commit and
79
+ prefix; moving refs, redirects, live statistical queries and embedded credentials
80
+ are refused. Other providers/private input acquisition require a separately
81
+ qualified profile; they are not inferred from arbitrary URLs.
82
+
83
+ ```bash
84
+ unaltraweb-prepare-inputs --project "$PWD" \
85
+ --config .unaltraweb/input-preparation.json \
86
+ --sha256 "$REVIEWED_INPUT_PLAN_SHA256" --fetch
87
+
88
+ unaltraweb-prepare-inputs --project "$PWD" \
89
+ --config .unaltraweb/input-preparation.json \
90
+ --sha256 "$REVIEWED_INPUT_PLAN_SHA256" --check
91
+ ```
92
+
93
+ For an adopted generated Docker runtime, the explicit local equivalent is:
94
+
95
+ ```bash
96
+ make manual-inputs-prepare \
97
+ INPUT_PREPARATION_SHA256=<reviewed-hash> INPUT_PREPARATION_FETCH=1
98
+ ```
99
+
100
+ Omit `INPUT_PREPARATION_FETCH=1` for a readonly check. Normal source checks and
101
+ build targets never imply fetch. A new snapshot is create-only and independently
102
+ read back. Existing exact bytes are reused without rewriting receipts; a changed
103
+ or partial snapshot is preserved and refused. Partial attempts remain retained.
104
+ The data can be reconstructed from its pinned origin outside Git; the helper does
105
+ not execute workbook/GIS models or recalculate a statistical source.
106
+
107
+ ## Explicit tabular editions
108
+
109
+ The original edition v1 schema remains the GIS contract, including native
110
+ producer verification and its accepted profiles. To compose spreadsheet/table
111
+ materials without GIS, explicitly select `schema_version: 2, mode: tabular`.
112
+ `web://practice-tabular-edition-schema` exposes this separate package-owned schema;
113
+ the existing `manual_practice_compose` tool/CLI dispatches by declared version.
114
+
115
+ ```yaml
116
+ schema_version: 2
117
+ kind: unaltraweb-practice-edition
118
+ mode: tabular
119
+ slug: example
120
+ version: 2026-11-r1
121
+ language: ca
122
+ materials:
123
+ - id: initial
124
+ path: sandbox/practiques/example/inputs/2026-11-r1/data/table.csv
125
+ destination: resources/table.csv
126
+ sha256: <exact file SHA-256>
127
+ bytes: 1234
128
+ role: initial-data
129
+ recipients: [alumnat, docent]
130
+ selection:
131
+ alumnat: [initial]
132
+ docent: [initial]
133
+ readings:
134
+ alumnat:
135
+ source: practiques/example/ca/alumnat/LLEGIU-ME.md
136
+ approved_sha256: <approved reading SHA-256>
137
+ docent:
138
+ source: practiques/example/ca/docent/LLEGIU-ME.md
139
+ approved_sha256: <approved reading SHA-256>
140
+ ```
141
+
142
+ Tabular roles are `initial-data` (CSV/CSVT/TSV), `initial-workbook`,
143
+ `resolved-workbook`, `demonstration-workbook` (XLSX/ODS), and
144
+ `reference-document` (PDF/PNG/JPEG). Resolved workbooks are teacher-only;
145
+ demonstrations shared with students must be explicitly selected and labelled as
146
+ such. Scripts, caches, logs, arbitrary job trees and GIS files are not tabular
147
+ classroom materials. Editable SVGs still use the existing explicit `resources`
148
+ and dependency closure contract. No neighbouring file is inferred.
149
+
150
+ The composer verifies selected hashes, sizes, destinations and recipients. It
151
+ does not calculate or semantically validate a workbook and does not fabricate a
152
+ GIS bundle. Both schemas use approved reading hashes, the native PDF build/seal,
153
+ portable resource links and the same create-only ZIP/PDF copy and receipt path.
154
+
155
+ Output names stay `<slug>[-docent]-<version>-<lang>.pdf` and `.zip`, with external
156
+ receipts. Inside each ZIP the reading is `LLEGIU-ME.pdf`, `LEEME.pdf` or
157
+ `README.pdf`; the independent PDF has exactly those sealed bytes. Reusing a
158
+ version never overwrites an edition. The operation always reports
159
+ `publishes: false`; Moodle and public-site publication remain separate decisions.
160
+
161
+ ## Adoption and qualification
162
+
163
+ Consumers adopt reviewed workflow/runtime pins explicitly. Synchronizing a
164
+ scaffold does not upgrade an accepted image or QGIS helper. Owners then bind
165
+ their exact manifests/approved readings, reproduce hydration from a clean source
166
+ checkout, run existing freshness/PDF/build checks, and qualify the final extracted
167
+ packet with its native producer. Synthetic core tests do not replace those gates.
168
+ The technical requirement audit is retained in
169
+ `docs/agents/web-practices-reconciliation.md`; it distinguishes implemented paths
170
+ from consumer migration, provider qualification and teaching review still pending.