unaltraweb 0.8.1 → 0.9.1

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +29 -5
  3. data/README.md +2 -0
  4. data/docs/_documentation/en/06-github-web-editing.md +15 -0
  5. data/docs/_documentation/en/33-reusable-workflows.md +29 -1
  6. data/docs/_documentation/en/43-workspace-path-policies.md +7 -0
  7. data/docs/_documentation/en/47-private-practice-pdfs.md +47 -1
  8. data/docs/_documentation/en/48-artifact-storage.md +169 -0
  9. data/docs/_documentation/en/49-practice-inputs-editions.md +170 -0
  10. data/docs/_documentation/en/50-practice-artifact-storage.md +383 -0
  11. data/docs/_documentation/en/51-retained-private-intake.md +292 -0
  12. data/docs/_documentation/en/52-selected-file-private-storage.md +194 -0
  13. data/docs/_documentation/en/53-original-private-archives.md +190 -0
  14. data/docs/agents/manual-context-release-081-121.md +76 -0
  15. data/docs/agents/mcp-contract.md +46 -1
  16. data/docs/agents/original-private-archive.md +101 -0
  17. data/docs/agents/practice-artifact-storage-review.md +90 -0
  18. data/docs/agents/retained-compatibility.md +99 -0
  19. data/docs/agents/retained-private-intake.md +117 -0
  20. data/docs/agents/retained-variant-batch.md +103 -0
  21. data/docs/agents/software-release-090.md +147 -0
  22. data/docs/agents/software-release-091.md +110 -0
  23. data/docs/agents/web-practices-reconciliation.md +88 -0
  24. data/docs/agents/web-s4-manuals-readiness.md +126 -0
  25. data/docs/agents/web-storage-followup.md +98 -0
  26. data/docs/agents/zip-only-flat-storage.md +79 -0
  27. data/scripts/manual/candidate-storage-s3-requirements.txt +8 -0
  28. data/scripts/manual/templates/manual.tex +2 -1
  29. data/scripts/manual/templates/practice.tex +15 -1
  30. data/scripts/test_candidate_transfer.py +52 -0
  31. data/scripts/test_wheel_install.py +66 -15
  32. data/scripts/unaltraweb-mcp-bootstrap.sh +1 -1
  33. data/scripts/validate_workflows.py +235 -10
  34. data/src/unaltraweb_mcp/component-contract.json +28 -20
  35. metadata +22 -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: 5b29e1cee249f359b7e7c5da2e62c1be09c6f6f78f6acd345690da425f4f5217
4
+ data.tar.gz: b4a0d362e575a5c1a5392e127126ce240831f4104b71b8b7b55dcf02ca8301cd
5
5
  SHA512:
6
- metadata.gz: 2ee71521b81afc077773b375120d39ca2e00fbaa926f287ee6df2e2c6356c10524f4b67346298f0dd647ee182f2c0fb2e45940faadaf9a0e4c336eab697aa85a
7
- data.tar.gz: fc0f4072ce20853d839c46b0cab1c305f5dfc43bf61d83d58ebb13e552f708ad2d16e4473f4f454829c9206857b66b3279d38ba7f7e110845053fa0942d8497a
6
+ metadata.gz: 66484d7f3bcc3e96acf9fe83633a64490d73007f6fd66a659e2dcfdc315cc8502a2c3830d2a977cda3c1916f78fe376de6f247d8bd221d94a5860c35622cccc4
7
+ data.tar.gz: edb90b1c0ddb6b9b1debc3de9bff0450f74d68b7cf692dc6c55b2a58ea8acf98760bdb1f364cd099ee2da4ff0c27c8e9bba9313faa926c887e2f6d59a6c10e5c
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.1
5
+ MCP_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-mcp:0.9.1
6
+ MCP_RELEASE_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-mcp@sha256:29b1559b4e91b98247baf227039dc553da504e9df1972299bcbb20a2ed5b029c
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.1
44
+ MANUAL_PDF_IMAGE ?= ghcr.io/dosquartsdedocs/unaltraweb-manual-pdf@sha256:aa5b4bc16f6ce74142ee400cab43f8d18cbf315495bb2f203adf7e0ccec185a8
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.
@@ -82,6 +82,21 @@ After the editor requests review, the maintainer:
82
82
 
83
83
  Pushing a branch or merging to `main` does not publish a generated site. Local checks and renders do not deploy it either.
84
84
 
85
+ **The existing local serve/preview is sufficient for rendered review.** Remote
86
+ HTTPS hosting, access/TTL decisions and a new preview backend are not required.
87
+ Diagnostic CI reports do not replace that review or approve publication.
88
+
89
+ ## Optional Local Compilation And Branch Layout
90
+
91
+ A maintainer can use the supported local Jekyll build/serve route for review,
92
+ or separately request a qualified GHA build. A possible publishing model keeps
93
+ sources and compiled web output in different branches, with the compiled branch
94
+ replaceable after review. This is only an option note, not an implemented migration
95
+ or a change to the generated manual Pages workflow and its reviewed-`main` gates.
96
+ Any branch replacement, push/force-push, deletion or Pages configuration change
97
+ requires a separate explicit decision. Local compilation or a two-branch layout
98
+ alone does not prove that GHA compilation, artifacts or other quota use stopped.
99
+
85
100
  ## unaltremanual Publishing
86
101
 
87
102
  - `latest` is a manual-only deployment from the reviewed `main` branch.
@@ -18,6 +18,34 @@ Child sites should keep workflow files thin and call reusable workflows from the
18
18
 
19
19
  These wrappers should normally be manual-only. Use `workflow_dispatch` so a push or Dependabot pull request does not start a deploy unless someone explicitly asks for it.
20
20
 
21
+ ## CI scheduling and retained reports
22
+
23
+ Core `ci.yml` runs automatically for pushes to `main` and all pull requests.
24
+ Use its input-free manual dispatch for a selected branch when a full GHA run is
25
+ wanted. A feature-branch push without a PR no longer starts this suite
26
+ automatically. Every admitted run keeps the same Python 3.10/3.13 matrix,
27
+ distribution, gem and dependent Docker jobs, including provenance, Ruby/PDF,
28
+ reproducibility, MCP smoke and docs checks. There is no reduced manual suite.
29
+ PR integration and source-head SHAs can differ; per-ref concurrency does not
30
+ merge push and PR runs. No measured quota saving is implied by this policy.
31
+ CodeQL remains separate, with all three languages and its existing triggers.
32
+
33
+ All four package profiles share one thin source-check control: PR plus manual,
34
+ source-only and read-only, without secrets or deployment. Its failure/coverage
35
+ reports and metrics diagnostics use explicit **seven-day triage retention**;
36
+ `always()` and report contents/paths are unchanged. Existing child sites are not
37
+ automatically migrated; authored workflow changes still require conflict review.
38
+ Package/release candidate windows, immutable artifact IDs and readback stay
39
+ unchanged. The synthetic transfer still retains one day and build records seven.
40
+
41
+ Runner computation, artifacts, caches and publication storage are different
42
+ cost planes; see [artifact storage]({{ '/artifact-storage/' | relative_url }}).
43
+ Changing candidate transport does not remove builds or redirect every CI upload.
44
+
45
+ The existing local build/serve is sufficient for rendered human review.
46
+ This scheduling and retention change does not require a remote-preview service,
47
+ new endpoint or hosting policy. Manual publication gates remain separate.
48
+
21
49
  ## Site deploy
22
50
 
23
51
  {% raw %}
@@ -76,7 +104,7 @@ without treating arbitrary custom workflow code as package-owned.
76
104
 
77
105
  ## Stable manual releases
78
106
 
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.
107
+ `.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
108
 
81
109
  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
110
 
@@ -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 |
@@ -17,7 +17,53 @@ The `manual_practice_pdf_build` tool creates a private A4-landscape reading from
17
17
  one Markdown source. It uses the manual's typography and site metadata, including
18
18
  the course name, degree, instructors and configured logos. The first page includes
19
19
  the course codes in parentheses beside the subject and the practice version.
20
- The academic year is omitted. Logos appear only on the first page.
20
+ The academic year is omitted. Logos appear only on the first page. This default
21
+ layout is unchanged unless an individual reading selects title-only mode.
22
+
23
+ ## A title without a metadata banner
24
+
25
+ For a reading whose only opening title should be “Llegiu-me”, select the layout
26
+ in that document's front matter:
27
+
28
+ ```yaml
29
+ title: Llegiu-me
30
+ short_title: Llegiu-me
31
+ practice_title_only: true
32
+ ```
33
+
34
+ `practice_title_only` is optional and must be a YAML boolean, not a quoted
35
+ string or a number. Absent or `false` preserves the default layout. When `true`,
36
+ the authored title appears once before the body, without the series, audience,
37
+ course, codes, degrees, institution, author, logos or version banner. Running
38
+ headers and the version/language footer are omitted; page numbering and a
39
+ discreet draft-status footer remain.
40
+
41
+ This is a per-reading presentation choice, not a global metadata override:
42
+ shared course metadata remains unchanged internally. Keep any pedagogically
43
+ useful course context in the body rather than inventing a subtitle. The practice
44
+ wrapper and front matter participate in the existing input fingerprint; changed
45
+ readings retain a separate run without replacing an earlier PDF. This layout
46
+ does not require a full-manual build or a new worker image.
47
+
48
+ An editable Markdown reading may also begin with the same plain H1:
49
+
50
+ ```markdown
51
+ # Llegiu-me
52
+
53
+ ## Open the project
54
+ ```
55
+
56
+ In title-only mode, one matching opening H1 owns the visible title: the wrapper
57
+ does not print a second copy. The body, heading and internal anchors remain
58
+ unchanged. Without an H1, the wrapper prints the front-matter title once.
59
+ Use H2 or deeper for sections; a different, repeated or non-opening top-level
60
+ H1 is refused rather than silently removed. Formatted H1 titles are not
61
+ supported in this mode. Headings are unnumbered in title-only mode, so neither
62
+ the main title nor its sections acquire a numeric prefix. The default layout
63
+ and numbering remain unchanged when the flag is absent or false.
64
+
65
+ Keep appropriate teaching attribution in the reading body; hiding the banner
66
+ does not remove the internal author or course metadata.
21
67
 
22
68
  ## Prepare a reading
23
69
 
@@ -0,0 +1,169 @@
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
+ ## Compute, reports and cache are separate
28
+
29
+ | Resource | Existing scope and cost driver |
30
+ | --- | --- |
31
+ | Runner computation | Workflow frequency, matrices and build/test/render/analyse steps; retention or S3/S4 transport does not remove these operations. |
32
+ | CI artifacts | Uploaded byte counts, frequency and retained days; metrics/source-check triage reports retain seven days, without dropping failure evidence. |
33
+ | Cache | Pip, Bundler and Buildx GHA caches; not selected by `release_candidate` policy. Disabling cache can increase rebuild work. |
34
+ | Published outputs | GHCR images, durable Release assets and native Pages delivery are distinct from triage reports and candidate transport. |
35
+
36
+ The selector does not redirect generic CI reports, package intermediates, Pages
37
+ artifacts or caches. Synthetic Actions transfer retention remains one day,
38
+ Buildx records seven, package candidates fourteen and verified package
39
+ intermediates seven. Stable candidates keep their selected 1–14-day window
40
+ (default fourteen), exact IDs, receipts, readback and native publication gates.
41
+ No cleanup, provider provisioning or billing measurement follows from changing
42
+ this local policy. A different transport is not a promise of zero quota.
43
+
44
+ ## Project-owned policy
45
+
46
+ New package scaffolds include `.unaltraweb/artifact-storage.json`. This is an
47
+ editable project selection, not a managed pin and not a `publication.json` file.
48
+ Existing sites without this file retain the same GitHub default without installing
49
+ an S3 SDK or configuring an S3 account:
50
+
51
+ ```json
52
+ {
53
+ "schema_version": 1,
54
+ "release_candidate": {
55
+ "transport": "github-actions",
56
+ "retention_days": 14
57
+ }
58
+ }
59
+ ```
60
+
61
+ The package owns `artifact-storage-v1.schema.json` and the
62
+ `unaltraweb-candidate-storage` CLI (`plan`, `seal`, `verify`, `receive`,
63
+ `s3-upload`, `s3-download`). The shared workflow freezes the reviewed project's
64
+ selection before executing builds, then passes that frozen policy to the
65
+ publisher. Unknown schema versions, classes, fields and transports fail closed.
66
+ The MCP inventory and existing consumer runtime/image pins are unchanged.
67
+
68
+ ## Private S3-compatible selection
69
+
70
+ ```json
71
+ {
72
+ "schema_version": 1,
73
+ "release_candidate": {
74
+ "transport": "s3-private",
75
+ "retention_days": 14,
76
+ "s3": {
77
+ "profile": "s3",
78
+ "endpoint_url": "https://s3.example.invalid",
79
+ "region": "example-1",
80
+ "bucket": "project-private",
81
+ "prefix": "web-candidates",
82
+ "addressing_style": "path",
83
+ "lifecycle_rule_id": "expire-candidates"
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ `profile: s4` selects the same S3 API and byte format; it does not create a new
90
+ artifact format or make S4 a dependency of other sites. HTTPS origins cannot
91
+ contain embedded credentials. No project account or destination is selected by
92
+ this example.
93
+
94
+ Before using S3, the project owner must provision and qualify:
95
+
96
+ 1. A private bucket/prefix and CI-scoped credentials, preferably short-lived.
97
+ Pass only the reusable workflow's optional `candidate_s3_access_key_id`,
98
+ `candidate_s3_secret_access_key`, and `candidate_s3_session_token` secrets.
99
+ The adapter accepts their corresponding `UNALTRAWEB_S3_*` environment variables
100
+ for explicit CI/native use. It never consults personal profiles, host files,
101
+ instance metadata, a private hub repository, or MEGA credentials.
102
+ 2. Permission to read the bucket public-access-block/lifecycle/versioning configuration and to
103
+ `PutObject`/`GetObject` only in the selected candidate namespace. The publisher
104
+ needs read access there; neither role needs delete, ACL or lifecycle-write
105
+ authority. All four bucket public-access-block settings must be enabled and
106
+ observable through the S3 API; an endpoint without this proof is unqualified
107
+ and refused, including an S4 profile. No public-read ACL is requested.
108
+ 3. An enabled lifecycle rule with the exact ID and isolated `<prefix>/` filter,
109
+ `Expiration.Days` no greater than the selected retention. Versioned or suspended
110
+ buckets must also bound `NoncurrentVersionExpiration.NoncurrentDays`. The
111
+ adapter verifies these rules; it never edits bucket policy or deletes editions.
112
+ Service lifecycle expiration is asynchronous, so expired candidates are also
113
+ refused by the reader at the exact envelope deadline.
114
+ 4. HTTPS/private-access, conditional `If-None-Match: *` writes, real readback,
115
+ lifecycle and CI credential qualification against the chosen provider. S3
116
+ compatibility is not inferred from an endpoint's name. OIDC trust/role setup
117
+ and token exchange are project CI responsibilities; pass the resulting
118
+ temporary credentials. This unit does not provision an OIDC trust or host key.
119
+
120
+ The optional public SDK closure is pinned in
121
+ `scripts/manual/candidate-storage-s3-requirements.txt` (Boto3/Botocore 1.40.75,
122
+ urllib3 2.8.0).
123
+ It is installed only for S3 workflow steps. The public wheel offers the
124
+ `artifact-storage` extra for native integrations. No private code is copied into
125
+ consumer sites.
126
+
127
+ ## Exact bytes, identity and verification
128
+
129
+ Both transports carry the same `release-transfer/` directory: a separate
130
+ `candidate-transfer.json` v1 envelope and untouched `release-assets/` containing
131
+ PDFs, the deterministic site tar.gz, `release-manifest.json`, the **native schema2
132
+ `publication.json`**, and `SHA256SUMS`. The envelope inventories every filename,
133
+ SHA-256 and byte count, including the checksums file. Its hash and size are
134
+ prepare-job outputs, not selected by the receiving storage service.
135
+
136
+ The envelope binds repository, selector, full source SHA, run ID, run attempt,
137
+ policy digest and expiration. The GitHub artifact name retains all those build
138
+ selectors; transfer/readback requires its exact positive numeric artifact ID,
139
+ `merge-multiple: true` to retain the package root for ID downloads, and
140
+ `overwrite: false`. The Python 3.13 CI lane performs an actual synthetic v4
141
+ upload/download followed by envelope and native-format verification. S3 uses:
142
+
143
+ ```text
144
+ <prefix>/release_candidate/<owner>/<repo>/<selector>/<source-sha>/<run-id>/<run-attempt>/<asset-name>
145
+ ```
146
+
147
+ S3 publishes the envelope last, uses conditional create-only writes and reads
148
+ back every uploaded object to verify size and SHA. It streams large files rather
149
+ than buffering the site archive in RAM. Retries are bounded to three attempts for
150
+ transient server/network errors; absent objects, permission failures, corruption,
151
+ conflicts and expired evidence do not trigger another backend, public URL, older
152
+ attempt or different build. A failed/uncertain upload may leave a partial prefix;
153
+ it is not publication authority and remains bounded by lifecycle retention.
154
+
155
+ After download, the same envelope verifier checks the complete package and only
156
+ then copies native assets to the publisher. The existing native release verifier
157
+ still validates formats, site/PDF hashes, reviewed source and runtime identities.
158
+ Its privileged Release readback/byte comparison and final publication gates are
159
+ unchanged. Storage configuration can never replace native publication metadata.
160
+
161
+ ## Adoption gates
162
+
163
+ The source change is reviewable without selecting S3. Synthetic tests exercise
164
+ both transports, exact native-verifier acceptance, hash/size failures, absence,
165
+ authentication denial, retries, no-clobber and retention. They do not qualify a
166
+ real private endpoint. Consumers must explicitly select the reviewed workflow
167
+ commit after its CI/review, retain their accepted runtime/helper pins, and test
168
+ their chosen transport. No release, tag, image publication, Pages deployment or
169
+ 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.