unaltraweb 0.8.0 → 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.
- checksums.yaml +4 -4
- data/Makefile +29 -5
- data/README.md +2 -0
- data/docs/_documentation/en/33-reusable-workflows.md +1 -1
- data/docs/_documentation/en/43-workspace-path-policies.md +7 -0
- data/docs/_documentation/en/47-manual-context.md +19 -0
- data/docs/_documentation/en/48-artifact-storage.md +152 -0
- data/docs/_documentation/en/49-practice-inputs-editions.md +170 -0
- data/docs/_documentation/en/50-practice-artifact-storage.md +383 -0
- data/docs/_documentation/en/51-retained-private-intake.md +292 -0
- data/docs/_documentation/en/52-selected-file-private-storage.md +194 -0
- data/docs/_documentation/en/53-original-private-archives.md +190 -0
- data/docs/agents/manual-context-121.md +62 -5
- data/docs/agents/manual-context-fix-121.md +130 -0
- data/docs/agents/manual-context-pilot-review-121.md +277 -0
- data/docs/agents/manual-context-release-081-121.md +76 -0
- data/docs/agents/mcp-contract.md +51 -5
- data/docs/agents/original-private-archive.md +101 -0
- data/docs/agents/practice-artifact-storage-review.md +90 -0
- data/docs/agents/retained-compatibility.md +99 -0
- data/docs/agents/retained-private-intake.md +117 -0
- data/docs/agents/retained-variant-batch.md +103 -0
- data/docs/agents/software-release-090.md +66 -0
- data/docs/agents/web-practices-reconciliation.md +88 -0
- data/docs/agents/web-s4-manuals-readiness.md +126 -0
- data/docs/agents/web-storage-followup.md +98 -0
- data/docs/agents/zip-only-flat-storage.md +79 -0
- data/scripts/manual/candidate-storage-s3-requirements.txt +8 -0
- data/scripts/review_manual_context_pilots.py +287 -0
- data/scripts/test_candidate_transfer.py +52 -0
- data/scripts/test_manual_context_export.py +32 -2
- data/scripts/test_wheel_install.py +36 -0
- data/scripts/unaltraweb-mcp-bootstrap.sh +1 -1
- data/scripts/validate_workflows.py +105 -10
- data/src/unaltraweb_mcp/component-contract.json +24 -20
- metadata +24 -2
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Per-artifact practice storage
|
|
3
|
+
description: Route individual practice PDFs and data packets to GitHub Releases or S3-compatible storage, including S4.
|
|
4
|
+
lang: en
|
|
5
|
+
ref: practice_artifact_storage
|
|
6
|
+
profiles: [unaltredocs]
|
|
7
|
+
documentation_profiles: [core-developers]
|
|
8
|
+
section: Core Development
|
|
9
|
+
weight: 685
|
|
10
|
+
permalink: /practice-artifact-storage/
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Choose a destination for each artifact
|
|
14
|
+
|
|
15
|
+
One course can keep a student guide in a public GitHub Release, a large data ZIP
|
|
16
|
+
in S4, and the resolved teacher packet in private S4. Each logical artifact has
|
|
17
|
+
its own explicit target and audience. There is no automatic fallback between
|
|
18
|
+
destinations or routing inferred from a filename, recipient, size or extension.
|
|
19
|
+
|
|
20
|
+
This interface selects **durable practice outputs** already produced by
|
|
21
|
+
`manual_practice_compose`: independent PDF guides and ZIP packets, identified by
|
|
22
|
+
their exact native edition receipt. It is separate from temporary Actions
|
|
23
|
+
candidates and the stable manual/Pages publication protocol. Large practice
|
|
24
|
+
materials do not need to enter Git or the Jekyll site to be stored here.
|
|
25
|
+
|
|
26
|
+
For original self-contained ZIPs and plain private paths with **local-only
|
|
27
|
+
metadata**, select the explicit [route-v3 files-v1 profile](../selected-file-private-storage/).
|
|
28
|
+
The named-v1 routing and product identity described below remain readable in their
|
|
29
|
+
original format; changing route versions alone never flattens a retained stage.
|
|
30
|
+
|
|
31
|
+
## Project-owned policy
|
|
32
|
+
|
|
33
|
+
The scaffold includes `.unaltraweb/practice-artifacts.json` v2 with
|
|
34
|
+
`consumer_repository:null`, `publication:null` and an empty `artifacts` map.
|
|
35
|
+
A maintainer supplies the explicit native consumer repository and actual policy:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"kind": "unaltraweb.practice-artifact-storage",
|
|
40
|
+
"schema_version": 2,
|
|
41
|
+
"consumer_repository": {
|
|
42
|
+
"remote": "origin",
|
|
43
|
+
"host": "github.com",
|
|
44
|
+
"repository": "example/tigit"
|
|
45
|
+
},
|
|
46
|
+
"publication": {
|
|
47
|
+
"kind": "gacontext.publication-policy",
|
|
48
|
+
"schema_version": 1,
|
|
49
|
+
"project_id": "example-course",
|
|
50
|
+
"default_target": "github",
|
|
51
|
+
"targets": {
|
|
52
|
+
"github": {
|
|
53
|
+
"driver": "github-release",
|
|
54
|
+
"repository": "example/tigit",
|
|
55
|
+
"release": "practices-2026",
|
|
56
|
+
"visibility": "public",
|
|
57
|
+
"audiences": ["public", "student"],
|
|
58
|
+
"auth_ref": "course-ci"
|
|
59
|
+
},
|
|
60
|
+
"s4": {
|
|
61
|
+
"driver": "s3",
|
|
62
|
+
"endpoint": "https://s3.eu-barcelona-1.megas4.com",
|
|
63
|
+
"region": "eu-barcelona-1",
|
|
64
|
+
"bucket": "tigit",
|
|
65
|
+
"prefix": "practices/v1",
|
|
66
|
+
"visibility": "private",
|
|
67
|
+
"audiences": ["student", "teacher", "private"],
|
|
68
|
+
"auth_ref": "course-s4"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"artifacts": {
|
|
73
|
+
"table-ca-student-guide": {
|
|
74
|
+
"target": "github",
|
|
75
|
+
"storage_profile": "anonymous-delivery-v1",
|
|
76
|
+
"audience": "student",
|
|
77
|
+
"receipt": "dist/practiques/table/r1/ca/table-r1-ca.zip.receipt.json",
|
|
78
|
+
"receipt_sha256": "<exact native receipt SHA-256>",
|
|
79
|
+
"format": "pdf"
|
|
80
|
+
},
|
|
81
|
+
"table-ca-student-data": {
|
|
82
|
+
"target": "s4",
|
|
83
|
+
"storage_profile": "authenticated-private-v1",
|
|
84
|
+
"audience": "student",
|
|
85
|
+
"receipt": "dist/practiques/table/r1/ca/table-r1-ca.zip.receipt.json",
|
|
86
|
+
"receipt_sha256": "<exact native receipt SHA-256>",
|
|
87
|
+
"format": "zip"
|
|
88
|
+
},
|
|
89
|
+
"table-ca-teacher-data": {
|
|
90
|
+
"target": "s4",
|
|
91
|
+
"storage_profile": "authenticated-private-v1",
|
|
92
|
+
"audience": "teacher",
|
|
93
|
+
"receipt": "dist/practiques/table/r1/ca/table-docent-r1-ca.zip.receipt.json",
|
|
94
|
+
"receipt_sha256": "<exact native teacher receipt SHA-256>",
|
|
95
|
+
"format": "zip"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Replace the example repository, Release, bucket and receipt placeholders before
|
|
102
|
+
validation. Version the nonsecret configuration. `default_target` is part of the
|
|
103
|
+
shared project contract, but Web requires `target` on **every artifact**: changing
|
|
104
|
+
the default cannot redirect an existing artifact. A `student` audience can use
|
|
105
|
+
either public or private storage. Native `docent` outputs require `teacher` or
|
|
106
|
+
`private` and can never enter a public target, even after relabelling the route.
|
|
107
|
+
|
|
108
|
+
### One repository-named bucket per manual
|
|
109
|
+
|
|
110
|
+
Every selected S3/S4 bucket must **exactly equal the consumer Git repository
|
|
111
|
+
slug**: `tig`, `tigit`, or `geodisseny` for these manuals. The declared remote must
|
|
112
|
+
have one native local Git repository URL, and any explicit push URL must agree.
|
|
113
|
+
Standard GitHub/Bitbucket HTTPS and Git SSH URL forms are supported. Missing,
|
|
114
|
+
unsupported, conflicting or multiple identities are reported explicitly.
|
|
115
|
+
The official Bitbucket SSH endpoint `ssh.bitbucket.org` (scp or `ssh://git@`
|
|
116
|
+
with an omitted/default port 22) identifies the same logical `bitbucket.org`
|
|
117
|
+
repository as its web URL. Explicit default SSH port 22 is also supported on
|
|
118
|
+
the other admitted SSH hosts. HTTPS IDs/port rules stay unchanged. Workstation
|
|
119
|
+
aliases, lookalike hosts, password-bearing URLs and nondefault SSH ports fail;
|
|
120
|
+
repository/bucket spelling is preserved exactly. No remote is rewritten.
|
|
121
|
+
|
|
122
|
+
The implementation reuses the native confined Git/root helpers; it performs no
|
|
123
|
+
remote lookup, SSH repair or URL alias expansion. It does not derive the bucket
|
|
124
|
+
from a folder basename, `publication.project_id`, Pages baseurl, the public
|
|
125
|
+
artifact target repository, or the Web core. It never lowercases or substitutes
|
|
126
|
+
a bucket to make it fit. A prefix partitions artifacts **inside that manual's
|
|
127
|
+
bucket**; it cannot stand in for the required bucket identity.
|
|
128
|
+
|
|
129
|
+
The frozen common policy/product schemas remain v1. The Web route schema v1 is
|
|
130
|
+
retained for previous records and GitHub-only selections; new manual S3 selections
|
|
131
|
+
require explicit v2 repository metadata and capability selection.
|
|
132
|
+
|
|
133
|
+
### Explicit storage capability
|
|
134
|
+
|
|
135
|
+
- `authenticated-private-v1` is private S3/S4 **storage**. It requires actual
|
|
136
|
+
private bucket ACL/policy preflight, authenticated byte/size/MIME/filename
|
|
137
|
+
readback and each stored object's native private ACL. It does not probe or
|
|
138
|
+
construct a usable object URL. Receipts report `public_url:null`,
|
|
139
|
+
`object_url_published:false`, `anonymous_probe_performed:false` and
|
|
140
|
+
`anonymous_object_url_qualified:false` alongside the verified authenticated
|
|
141
|
+
and native-ACL evidence. The profile requires no MEGA account ID.
|
|
142
|
+
- `anonymous-delivery-v1` retains object-URL qualification. Public artifacts need
|
|
143
|
+
exact anonymous GET of the same bytes and, for named S3 objects, the same MIME
|
|
144
|
+
and download filename. A selected private URL needs actual 401/403/404 denial.
|
|
145
|
+
An API response **400 InvalidRequest / Signature Version 4 required is not
|
|
146
|
+
anonymous-denial or delivery evidence**. No error switches the selected profile.
|
|
147
|
+
|
|
148
|
+
The owner's already-qualified S4 API/object-URL distinction motivates the first
|
|
149
|
+
profile. Storing private bytes does not activate account-routed/public object
|
|
150
|
+
URLs, qualify a public link, or change bucket policy. Host and CI credentials
|
|
151
|
+
remain independently selected for this consumer project.
|
|
152
|
+
|
|
153
|
+
## Plan and stage locally
|
|
154
|
+
|
|
155
|
+
The public wheel supplies `unaltraweb-practice-artifacts`; it works without a
|
|
156
|
+
gaContExt checkout. From the core source, use
|
|
157
|
+
`PYTHONPATH=src python3 -m unaltraweb_mcp.artifact_publication` instead.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
unaltraweb-practice-artifacts plan \
|
|
161
|
+
--project /absolute/course \
|
|
162
|
+
--sha256 REVIEWED_CONFIG_SHA256 \
|
|
163
|
+
--artifact table-ca-student-data
|
|
164
|
+
|
|
165
|
+
unaltraweb-practice-artifacts stage \
|
|
166
|
+
--project /absolute/course \
|
|
167
|
+
--sha256 REVIEWED_CONFIG_SHA256 \
|
|
168
|
+
--artifact table-ca-student-data \
|
|
169
|
+
--stage sandbox/artifacts/table-ca-student-data/review-1
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`--sha256` binds the exact bytes of `.unaltraweb/practice-artifacts.json`; use
|
|
173
|
+
`--config` for another versioned project-relative path. Planning checks the native
|
|
174
|
+
receipt and output hash/size, project exclusions and audience, then returns the
|
|
175
|
+
destination, policy/destination hashes and backend-independent manifest hash.
|
|
176
|
+
It resolves no credentials and performs no network operation.
|
|
177
|
+
|
|
178
|
+
To review an existing stage after a control-plane upgrade, `plan` also accepts
|
|
179
|
+
the pair `--stage <retained-stage> --manifest-sha256 <original-manifest-hash>`.
|
|
180
|
+
It verifies the original manifest/files and their match to the selected native
|
|
181
|
+
receipt, preserving the old producer revision and **exact manifest bytes**.
|
|
182
|
+
`publish`/`verify` use the same retained identity. A v2 route/profile change never
|
|
183
|
+
reseals an older stage or changes its logical project/product identity.
|
|
184
|
+
|
|
185
|
+
Staging is create-only under ignored `sandbox/artifacts/<id>/<run>`. It copies
|
|
186
|
+
only the selected native PDF or ZIP, a source-free `artifact.json` sidecar and
|
|
187
|
+
the common `product.json` manifest. Native receipts, original source paths,
|
|
188
|
+
author Markdown, reconstruction controls and neighbouring files remain local.
|
|
189
|
+
The producer revision uses the existing bounded package-code/contract fingerprint,
|
|
190
|
+
separate from the consumer's data revision and the native output seals.
|
|
191
|
+
An existing stage is never replaced. This Web profile accepts outputs smaller
|
|
192
|
+
than 2 GiB, within the existing workspace total-byte budget; the shared schema
|
|
193
|
+
has broader limits for other producers.
|
|
194
|
+
|
|
195
|
+
The workspace contract classifies the routing file as versioned/never-cleanup
|
|
196
|
+
and `sandbox/artifacts` as ignored/explicit-cleanup. A successful upload does not
|
|
197
|
+
authorise removal of a local stage or a previously published version.
|
|
198
|
+
|
|
199
|
+
Generated sites expose offline Docker facades `make practice-artifact-plan` and
|
|
200
|
+
`make practice-artifact-stage`, using `PRACTICE_ARTIFACT_ID`,
|
|
201
|
+
`PRACTICE_ARTIFACT_SHA256` and, for staging, `PRACTICE_ARTIFACT_STAGE`.
|
|
202
|
+
Core-maintainer Make targets use the same variables plus an explicit inherited
|
|
203
|
+
`MCP_CONSUMER_WORKSPACE`. These commands require a reviewed image containing the
|
|
204
|
+
interface; editing a discovery checkout does not update an installed runtime.
|
|
205
|
+
|
|
206
|
+
## Explicit publication and readback
|
|
207
|
+
|
|
208
|
+
Create/select the project-owned GitHub Release or S3 bucket/prefix before use.
|
|
209
|
+
GitHub needs the project's own CI/host token, independently of S4. S3-compatible
|
|
210
|
+
publication uses the optional public SDK extra:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
python3 -m pip install 'unaltraweb-mcp[artifact-publication]'
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
The extra pins `botocore==1.40.75`. S4 uses the `s3` driver with its own endpoint;
|
|
217
|
+
it is not a required service for other projects. This durable interface uses
|
|
218
|
+
conditional writes and byte readback, without assuming AWS lifecycle, versioning,
|
|
219
|
+
Object Lock, public-access-block support or automatic SHA-256 checksums in S4.
|
|
220
|
+
|
|
221
|
+
Select a user-owned, mode-0600 authentication binding outside versioned sources:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"kind": "gacontext.publication-auth",
|
|
226
|
+
"schema_version": 1,
|
|
227
|
+
"project_id": "example-course",
|
|
228
|
+
"bindings": {
|
|
229
|
+
"course-ci": {
|
|
230
|
+
"driver": "github-release",
|
|
231
|
+
"destination_sha256": "<GitHub destination hash from plan>",
|
|
232
|
+
"token_env": "COURSE_GITHUB_TOKEN"
|
|
233
|
+
},
|
|
234
|
+
"course-s4": {
|
|
235
|
+
"driver": "s3",
|
|
236
|
+
"destination_sha256": "<S4 destination hash from plan>",
|
|
237
|
+
"access_key_env": "COURSE_S4_ACCESS_KEY",
|
|
238
|
+
"secret_key_env": "COURSE_S4_SECRET_KEY"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Set those named environment variables in the selected host/CI process. Optional
|
|
245
|
+
S3 `session_token_env` names an explicit temporary credential. The client does
|
|
246
|
+
not discover AWS profiles, instance metadata, `gh auth`, memory credentials or
|
|
247
|
+
another project's keys. Changing a target requires its matching destination hash.
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
unaltraweb-practice-artifacts publish \
|
|
251
|
+
--project /absolute/course \
|
|
252
|
+
--sha256 REVIEWED_CONFIG_SHA256 \
|
|
253
|
+
--artifact table-ca-student-data \
|
|
254
|
+
--stage sandbox/artifacts/table-ca-student-data/review-1 \
|
|
255
|
+
--manifest-sha256 REVIEWED_MANIFEST_SHA256 \
|
|
256
|
+
--auth-file /absolute/private/course-publication-auth.json
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Use `verify` with the same flags for remote read-only verification; it never
|
|
260
|
+
creates a missing object. The provider preflight checks actual repository/bucket
|
|
261
|
+
visibility. GitHub uses immutable hash-derived flat asset names in an existing
|
|
262
|
+
nondraft Release. S3 uses the shared named-v1 layout, preserving native filenames,
|
|
263
|
+
MIME and Content-Disposition, with the canonical common restore manifest:
|
|
264
|
+
|
|
265
|
+
```text
|
|
266
|
+
<prefix>/named/v1/<project-id>/<artifact-id>/<manifest-sha>/<filename>
|
|
267
|
+
<prefix>/manifests/<manifest-sha>.json
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Every output and the final manifest require exact authenticated SHA-256/size
|
|
271
|
+
readback. The explicitly selected capability adds native private-ACL proof or
|
|
272
|
+
strict anonymous delivery qualification as described above. A private physical
|
|
273
|
+
locator is not a public download link. S3 streams PUTs, uses 16-MiB multipart parts from
|
|
274
|
+
64 MiB upward and conditional completion, and attempts to abort only its own
|
|
275
|
+
failed multipart upload. There are no automatic write retries or provider
|
|
276
|
+
fallbacks. Failed/uncertain attempts preserve the local stage for explicit review.
|
|
277
|
+
|
|
278
|
+
The JSON result is a Web-owned verified receipt with logical identity, exact
|
|
279
|
+
configuration/destination/manifest hashes, locators and access evidence. It
|
|
280
|
+
reports `catalogue_updated:false`. Updating reader-facing links/catalogues remains
|
|
281
|
+
a separate owner action after qualification. Existing URLs and stored editions
|
|
282
|
+
are retained when choosing a new target; publication never deletes/reuploads an
|
|
283
|
+
old asset to emulate CAS or frees storage implicitly.
|
|
284
|
+
|
|
285
|
+
## Private local S3 attempt evidence
|
|
286
|
+
|
|
287
|
+
S3 `publish` and remote-read-only `verify` retain a new local attempt under
|
|
288
|
+
`sandbox/artifact-attempts/<random-id>/`, outside the immutable three-file product
|
|
289
|
+
stage. The user-owned directory is mode 0700; `intent.json` and append-only
|
|
290
|
+
`events.jsonl` are mode 0600, ignored and explicit-retention evidence. They are
|
|
291
|
+
never included in a ZIP, product manifest, upload list or remote record.
|
|
292
|
+
|
|
293
|
+
Before a mutating request, fsynced intent and observations bind the workspace,
|
|
294
|
+
operation, source hashes/size, reviewed config, destination/policy, original
|
|
295
|
+
manifest and exact object keys. An observed multipart UploadId is fsynced with
|
|
296
|
+
its **exact bucket/key/id tuple before sending any part**. Progress records
|
|
297
|
+
contain bounded acknowledged counts/bytes and phases, not source bodies,
|
|
298
|
+
credentials, auth-file contents or provider error/response bodies. The log is
|
|
299
|
+
bounded to 1 MiB/1024 observations with a hash chain; evidence and source/control
|
|
300
|
+
bindings are checked before mutations. Failures retain the last durable state.
|
|
301
|
+
|
|
302
|
+
- Lost create response: the UploadId is **unknown**; none is invented and no
|
|
303
|
+
guessed abort is sent.
|
|
304
|
+
- Failed part: the observed owned tuple is retained before an owned abort request.
|
|
305
|
+
An acknowledged abort is recorded as such, not as verified absence/cleanup.
|
|
306
|
+
A failed/lost abort keeps the exact tuple and `abort-uncertain` state.
|
|
307
|
+
- Failed/lost completion: final object bytes may already exist. Record
|
|
308
|
+
`completion-uncertain` and send no automatic abort, retry or resume.
|
|
309
|
+
- Readback failure: retain the acknowledged/uncertain write and exact readback key.
|
|
310
|
+
Readback failure never authorises overwrite, delete/reupload or another backend.
|
|
311
|
+
- Changed evidence or source/configuration/destination binding: stop further
|
|
312
|
+
mutation. A damaged/unsettled journal is not labelled intact or cleaned up.
|
|
313
|
+
|
|
314
|
+
Successful results and safe CLI failures include a `local_attempt` pointer with
|
|
315
|
+
the relative directory, intent hash, full event-log hash and last phase. Raw SDK
|
|
316
|
+
errors are replaced with a fixed message and pointer. Compare the hashes to the
|
|
317
|
+
retained result when inspecting the records; local evidence is not a provider
|
|
318
|
+
receipt, independent author approval or recovery authority.
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
unaltraweb-practice-artifacts inspect-attempt \
|
|
322
|
+
--project /absolute/course \
|
|
323
|
+
--attempt sandbox/artifact-attempts/EXACT_ATTEMPT_ID \
|
|
324
|
+
--intent-sha256 RETAINED_INTENT_SHA256 \
|
|
325
|
+
--attempt-sha256 RETAINED_EVENTS_SHA256
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
This inspection is confined and local-only: it reads the bound files/hashes and
|
|
329
|
+
observation chain, and never resolves credentials or connects to a provider.
|
|
330
|
+
It validates historical local evidence, not current source freshness or remote state.
|
|
331
|
+
`verify` with the original stage/manifest/config pins performs explicit remote
|
|
332
|
+
read-only inspection and retains its own new local evidence. If a completed
|
|
333
|
+
output exists but later product metadata is missing, its exact bytes can be
|
|
334
|
+
verified while the complete product remains refused; verification does not
|
|
335
|
+
repair it. Inspect the exact tuple/phase before any separately authorised action.
|
|
336
|
+
There is no autonomous recovery, registry, upload listing, retry/resume/abort
|
|
337
|
+
executor or blanket cleanup operation. Keep earlier attempts and old stages.
|
|
338
|
+
|
|
339
|
+
Interruption or local disk failure can leave an incomplete last observation;
|
|
340
|
+
no further mutation is admitted after an evidence write/check failure. Such a
|
|
341
|
+
record grants no ownership or cleanup claim beyond its actual durable observations.
|
|
342
|
+
The mechanism changes local/Web receipts only, preserving the original remote
|
|
343
|
+
product schema, manifest/producer identity and bytes, including old retained stages.
|
|
344
|
+
|
|
345
|
+
## Shared contract and adoption
|
|
346
|
+
|
|
347
|
+
The packaged product and publication schemas are byte-identical to gaContExt
|
|
348
|
+
revision `3c094009819785135bc8851b4fddd4723dbfe693`, from
|
|
349
|
+
[gaContExt #89](https://github.com/dosquartsdedocs/gacontext/issues/89). The Web-only
|
|
350
|
+
route map extends selection granularity without changing either common schema
|
|
351
|
+
or embedding destination information in `product.json`. A closed stage can also
|
|
352
|
+
be inspected/planned with the common CLI and a standalone copy of the inner
|
|
353
|
+
`publication` policy. S3 named delivery includes the common restore manifest.
|
|
354
|
+
The existing common authenticated named-v1 reader can reconstruct these exact
|
|
355
|
+
files/manifests using authenticated requests and download headers, without an
|
|
356
|
+
activated object URL. Web's CLI supplies planning/staging/publication/verification;
|
|
357
|
+
this slice does not add a second restore engine or claim common `files-v1` layout.
|
|
358
|
+
|
|
359
|
+
MCP discovery retains `web://practice-artifact-storage-schema` for v1 and adds
|
|
360
|
+
`web://practice-artifact-storage-v2-schema`, alongside
|
|
361
|
+
`web://product-publication-schema` and `web://publication-policy-schema`. Planning,
|
|
362
|
+
staging and explicit transfer are public Python/CLI interfaces; publication does
|
|
363
|
+
not become an automatic MCP session-start or Jekyll-build action.
|
|
364
|
+
|
|
365
|
+
Synthetic native ZIP/PDF fixtures, HTTP/S3 doubles and the real pinned SDK model
|
|
366
|
+
exercise mixed targets, recipient isolation, corruption/absence, no-clobber,
|
|
367
|
+
visibility, multipart failure and destination changes. Real practice storage
|
|
368
|
+
requires owner selection of the bucket/prefix or Release, scoped credentials,
|
|
369
|
+
provider qualification and a reviewed runtime/workflow adoption. The core source
|
|
370
|
+
does not select or upload actual course materials merely by adding this interface.
|
|
371
|
+
|
|
372
|
+
## Existing manual intake
|
|
373
|
+
|
|
374
|
+
Read-only observation of TIGIT, TIG and Geodisseny is recorded in
|
|
375
|
+
[the owner readiness report](../../agents/web-s4-manuals-readiness.md). All three
|
|
376
|
+
still require deliberate runtime/configuration adoption. TIGIT/TIG need a closed
|
|
377
|
+
native practice product before upload. Geodisseny's existing simple local
|
|
378
|
+
`manifest.json` is not a typed Web edition receipt: preserve its exact files and
|
|
379
|
+
proofs. The additional [retained paired-output private intake](../retained-private-intake/)
|
|
380
|
+
can plan/admit this class locally for private archive only, emitting a new honest
|
|
381
|
+
receipt without relabelling the original manifest or approving teaching material.
|
|
382
|
+
Actual owner request/evidence selection and containing source/runtime adoption
|
|
383
|
+
remain separate gates; `human_approved:false` stays false.
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Retained paired-output private intake
|
|
3
|
+
description: Read-only admission planning and byte-preserving private snapshots of existing paired practice handoffs.
|
|
4
|
+
lang: en
|
|
5
|
+
ref: retained_private_intake
|
|
6
|
+
profiles: [unaltredocs]
|
|
7
|
+
documentation_profiles: [core-developers]
|
|
8
|
+
section: Core Development
|
|
9
|
+
weight: 690
|
|
10
|
+
permalink: /retained-private-intake/
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Private archive first
|
|
14
|
+
|
|
15
|
+
This producer-owned local interface admits a bounded, explicitly selected
|
|
16
|
+
**retained paired-output handoff** for private archival storage. It preserves the
|
|
17
|
+
actual editorial state, including `human_approved:false` or unknown approval.
|
|
18
|
+
It supplies neither a new scientific/native certificate nor public/Moodle/author
|
|
19
|
+
approval. Planning and snapshotting perform no network, credential, transport,
|
|
20
|
+
rendering, runtime selection, catalogue or link operation.
|
|
21
|
+
|
|
22
|
+
It complements the native versioned edition workflow. An original project-local
|
|
23
|
+
`manifest.json` is retained as original evidence, never relabelled as
|
|
24
|
+
`unaltraweb-practice-edition-receipt`. One current handoff is selected at a time;
|
|
25
|
+
the API does not snapshot a whole course or export source trees.
|
|
26
|
+
|
|
27
|
+
## Explicit request v1
|
|
28
|
+
|
|
29
|
+
Version a project-owned request, for example `.unaltraweb/retained-intake.json`.
|
|
30
|
+
The public wheel packages `retained-private-intake-v1.schema.json`; MCP discovery
|
|
31
|
+
exposes the same bytes through `web://retained-private-intake-schema`.
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"kind": "unaltraweb.retained-private-intake",
|
|
36
|
+
"schema_version": 1,
|
|
37
|
+
"purpose": "private-archive",
|
|
38
|
+
"consumer_repository": {
|
|
39
|
+
"remote": "origin",
|
|
40
|
+
"host": "github.com",
|
|
41
|
+
"repository": "example/manual"
|
|
42
|
+
},
|
|
43
|
+
"handoff": {
|
|
44
|
+
"slug": "retained-handoff",
|
|
45
|
+
"activity": "different-activity",
|
|
46
|
+
"language": "ca",
|
|
47
|
+
"manifest": {
|
|
48
|
+
"path": "dist/practiques/retained-handoff/ca/manifest.json",
|
|
49
|
+
"sha256": "<exact original manifest SHA-256>",
|
|
50
|
+
"bytes": 1234
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"snapshot": "sandbox/retained-handoffs/retained-handoff/pilot-1",
|
|
54
|
+
"packages": [{
|
|
55
|
+
"recipient": "alumnat",
|
|
56
|
+
"archive": {
|
|
57
|
+
"path": "dist/practiques/retained-handoff/ca/retained-handoff.zip",
|
|
58
|
+
"sha256": "<exact original ZIP SHA-256>",
|
|
59
|
+
"bytes": 1234
|
|
60
|
+
},
|
|
61
|
+
"pdf": {
|
|
62
|
+
"path": "dist/practiques/retained-handoff/ca/LLEGIU-ME.pdf",
|
|
63
|
+
"sha256": "<exact original PDF SHA-256>",
|
|
64
|
+
"bytes": 1234
|
|
65
|
+
},
|
|
66
|
+
"pdf_receipt": {
|
|
67
|
+
"path": "<exact retained PDF worker receipt path>",
|
|
68
|
+
"sha256": "<exact original worker receipt SHA-256>",
|
|
69
|
+
"bytes": 1234
|
|
70
|
+
},
|
|
71
|
+
"pdf_artifact": "<exact outputs/...pdf key in worker artifacts>",
|
|
72
|
+
"reading_member": "<exact PDF member name in the original ZIP>",
|
|
73
|
+
"selected": [{"id": "student-guide", "format": "pdf"}]
|
|
74
|
+
}],
|
|
75
|
+
"evidence": [],
|
|
76
|
+
"sources": []
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Replace every example pin/count/path with independently inspected exact values.
|
|
81
|
+
The handoff slug and manifest activity are separate identities: declare both,
|
|
82
|
+
even when they differ. Language, original version/run, recipient and output
|
|
83
|
+
selection are not inferred from filenames. The original flat source layout
|
|
84
|
+
`dist/practiques/<handoff-slug>/<language>/` keeps its filenames and internal ZIP
|
|
85
|
+
roots; no version folder or renamed deliverable is imposed on it.
|
|
86
|
+
|
|
87
|
+
Each package explicitly selects its original ZIP, standalone PDF, worker receipt,
|
|
88
|
+
worker PDF artifact key and ZIP reading member. The original manifest's recipient,
|
|
89
|
+
archive SHA, reading source/hash and worker-receipt path/hash must agree through
|
|
90
|
+
one of the two original reference families below. The
|
|
91
|
+
PDF's exact hash must match both the ZIP reading member declaration and the
|
|
92
|
+
original `private-practice-pdf` schema-1 artifact seal. Select PDF and/or ZIP with
|
|
93
|
+
independent IDs. `docent` remains teacher/private; role conflicts and duplicate
|
|
94
|
+
IDs/formats/paths are refused.
|
|
95
|
+
|
|
96
|
+
`evidence` contains explicitly pinned local files with role `proof`,
|
|
97
|
+
`current-handoff` or `checksums` and a `file:{path,sha256,bytes}` pin. JSON metadata
|
|
98
|
+
may be selected from retained `sandbox/`, `tmp/`, `context/` or practice deliveries;
|
|
99
|
+
checksums belong to the selected original handoff. These finite local copies are
|
|
100
|
+
not a source export. Stronger current-handoff records/proofs stay separately
|
|
101
|
+
selected; they do not silently replace an inherited manifest reference.
|
|
102
|
+
|
|
103
|
+
`sources` contains optional explicit bounded reading-Markdown pins, never copied
|
|
104
|
+
into the snapshot or remote product. A selected source must match a declared
|
|
105
|
+
reading hash; exact original-path matches are labelled fresh. Unselected or
|
|
106
|
+
historically relocated source references remain inherited rather than guessed.
|
|
107
|
+
Hash-only/missing old proof paths remain unresolved in the new receipt. A missing
|
|
108
|
+
`sealed.json` is not fabricated or required as an invented dependency.
|
|
109
|
+
|
|
110
|
+
### Original manifest reference families
|
|
111
|
+
|
|
112
|
+
The request schema/fields stay identical for these original reference families
|
|
113
|
+
and their explicit package-field variants:
|
|
114
|
+
|
|
115
|
+
- **Package-local reading references:** original packages declare `archive`,
|
|
116
|
+
`sha256`, `members`, `reading_source`, `reading_sha256`, `pdf_receipt` and
|
|
117
|
+
`pdf_receipt_sha256`. These original manifest fields bind the pinned worker and
|
|
118
|
+
its `original_inputs[source]`/selected output artifact hashes.
|
|
119
|
+
- **File plus root reading receipts:** original packages declare `file`, `sha256`
|
|
120
|
+
and `members`; root `reading_receipts` contains original build metadata with
|
|
121
|
+
`role`, `audience`, `language`, `source`, `receipt`, `receipt_sha256`, `pdf` and
|
|
122
|
+
`pdf_sha256`. Exactly one row anchored to the selected worker receipt path or
|
|
123
|
+
declared worker PDF output path must match the explicit recipient/language,
|
|
124
|
+
receipt path/hash, PDF hash, source and optional original `job`. The Markdown
|
|
125
|
+
SHA comes from that **original pinned worker** `original_inputs[source]`, not a
|
|
126
|
+
fabricated manifest field. The ZIP member, standalone PDF and selected worker
|
|
127
|
+
artifact must bind the same exact bytes.
|
|
128
|
+
|
|
129
|
+
Original package variants may instead declare `role` (rather than `recipient`),
|
|
130
|
+
`reading_receipt` (rather than `pdf_receipt`) and either
|
|
131
|
+
`reading_receipt_sha256` or `receipt_sha256`. Those are original field names,
|
|
132
|
+
not instructions to rewrite the manifest. Present recipient/role aliases must
|
|
133
|
+
agree exactly and be `alumnat`/`docent`; all present worker path/hash aliases must
|
|
134
|
+
match the exact selected worker pin. Missing/conflicting aliases refuse. When
|
|
135
|
+
these original packages contain no reading source/hash declaration, the original
|
|
136
|
+
pinned worker's `source` and `original_inputs[source]` supply that reference with
|
|
137
|
+
their worker origin explicitly recorded locally.
|
|
138
|
+
|
|
139
|
+
An original package's `reading_sha256` is not assumed to mean Markdown. It must
|
|
140
|
+
match exactly one of the independently sealed PDF or worker Markdown hashes.
|
|
141
|
+
The PDF must already match the selected original PDF, ZIP member and worker
|
|
142
|
+
artifact. If the field denotes PDF, its exact original value/pointer/semantics
|
|
143
|
+
remain `delivered-pdf` while the separate source SHA retains its original worker
|
|
144
|
+
`original_inputs` origin. Neither value replaces the other. A hash matching
|
|
145
|
+
neither or ambiguously both refuses as `retained-reading-hash-reference`; using
|
|
146
|
+
the PDF hash as a source pin does not bypass actual source verification.
|
|
147
|
+
|
|
148
|
+
New variant projections retain original JSON field origins and the independent
|
|
149
|
+
PDF/source values. Existing canonical package-local Markdown and root-reading
|
|
150
|
+
projections stay byte-exact, so retained receipts/staged producer/manifest identity
|
|
151
|
+
do not change merely because more original shapes are now understood. Raw
|
|
152
|
+
manifests, folders and delivery names are never normalized or renamed. Handoff
|
|
153
|
+
slug and activity remain explicitly separate, including true historical aliases.
|
|
154
|
+
|
|
155
|
+
An original `archive`/`file` alias may coexist only when both spell the same
|
|
156
|
+
selected filename. Partial/mixed package-local reference fields, conflicting
|
|
157
|
+
aliases, duplicate/conflicting selected reading rows, incorrect role/language or
|
|
158
|
+
worker/source/PDF/member mappings fail. Other teacher/case reading rows stay
|
|
159
|
+
opaque original data: they do not become new audiences, require their payloads
|
|
160
|
+
in a student-only request, or select a different/latest run by inference.
|
|
161
|
+
|
|
162
|
+
New plan/admission `original_references` records the selected family and exact
|
|
163
|
+
original JSON-pointer/worker-hash origins; `original_declarations` distinguishes
|
|
164
|
+
absent declarations from declared null/false/value. An absent original `run`
|
|
165
|
+
stays absent in historical identity; a snapshot run label is not provenance.
|
|
166
|
+
Absent `local_candidate` remains unknown. Original `publishes:false` remains an
|
|
167
|
+
original declaration and conveys neither content approval nor a cloud operation.
|
|
168
|
+
Original commands/stdout/renderer/proof claims are retained as bounded local
|
|
169
|
+
**data**, never executed or interpreted as instructions or approval. The original
|
|
170
|
+
manifest and receipts are copied unchanged, without normalising their shape.
|
|
171
|
+
|
|
172
|
+
Format/reference diagnostics are fixed safe `{code,message}` objects. Codes
|
|
173
|
+
include `retained-manifest-format`, `retained-archive-reference`,
|
|
174
|
+
`retained-reading-ambiguous`, `retained-reading-reference`,
|
|
175
|
+
`retained-recipient-mismatch`, `retained-language-mismatch`,
|
|
176
|
+
`retained-worker-reference`, `retained-source-reference`,
|
|
177
|
+
`retained-output-reference`, `retained-input-changed` and
|
|
178
|
+
`retained-admission-lineage`, plus `retained-reading-hash-reference`; other bounded refusals use
|
|
179
|
+
`retained-intake-refused`. Messages contain no original teacher/provider bodies,
|
|
180
|
+
opaque command/stdout text or credential material.
|
|
181
|
+
|
|
182
|
+
## Read-only plan, then explicit admission
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
unaltraweb-retained-intake plan \
|
|
186
|
+
--project /absolute/manual \
|
|
187
|
+
--request .unaltraweb/retained-intake.json \
|
|
188
|
+
--sha256 REVIEWED_REQUEST_SHA256
|
|
189
|
+
|
|
190
|
+
unaltraweb-retained-intake snapshot \
|
|
191
|
+
--project /absolute/manual \
|
|
192
|
+
--request .unaltraweb/retained-intake.json \
|
|
193
|
+
--sha256 REVIEWED_REQUEST_SHA256 \
|
|
194
|
+
--expected-plan-sha256 REVIEWED_PLAN_SHA256
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
From this core source use `PYTHONPATH=src python3 -m
|
|
198
|
+
unaltraweb_mcp.retained_intake`. Python APIs are `plan(project, request, sha256)`
|
|
199
|
+
and `snapshot(project, request, sha256, expected_plan_sha256)`; the public wheel
|
|
200
|
+
works without a private hub, MEGA account or companion renderer.
|
|
201
|
+
|
|
202
|
+
The stable plan digest binds the exact request, native-Git-verified consumer
|
|
203
|
+
repository, site privacy controls, source/output/evidence pins, explicit selected
|
|
204
|
+
outputs, snapshot destination and producer code identity. No inode/timestamp or
|
|
205
|
+
random destination is substituted into the review identity. A changed request,
|
|
206
|
+
source, evidence, file, role or implementation requires a new review digest.
|
|
207
|
+
|
|
208
|
+
Fresh checks cover original compressed-byte hashes/sizes, bounded complete ZIP
|
|
209
|
+
file-member inventories/content hashes/CRC, the selected PDF header/worker hash,
|
|
210
|
+
and selected original worker/source references. ZIPs are read without extraction;
|
|
211
|
+
unsafe paths, aliases, links, duplicates, encryption, unsupported compression or
|
|
212
|
+
byte limits fail. An untrusted ZIP's single-disk non-ZIP64 end record bounds its
|
|
213
|
+
entry count and 16-MiB central-directory allocation before parsing; unsupported
|
|
214
|
+
containers fail without rewriting them. This adds fresh byte checks beyond a prior central-directory
|
|
215
|
+
inventory, **not** a GIS/native/scientific rerun. PDF structure/semantics and
|
|
216
|
+
renderer/effective-source/factory provenance remain inherited, not recertified.
|
|
217
|
+
|
|
218
|
+
Current bounds are one handoff, up to two recipients/four selected outputs,
|
|
219
|
+
512 MiB per input and the existing 2-GiB aggregate workspace/expanded-ZIP budgets.
|
|
220
|
+
Selected JSON/checksum evidence is at most 1 MiB/file and 16 MiB per snapshot;
|
|
221
|
+
optional reading-source pins are at most 2 MiB each. Unsupported old inputs are
|
|
222
|
+
reported; the planner never normalises or repackages them to pass.
|
|
223
|
+
|
|
224
|
+
The separately explicit snapshot rechecks the expected digest and unchanged
|
|
225
|
+
inputs, streams only selected PDF/ZIP bytes plus bounded necessary local request/
|
|
226
|
+
manifest/worker/evidence copies, and installs a new private ignored directory
|
|
227
|
+
atomically without replacement. Original files/receipts/sources are not moved,
|
|
228
|
+
renamed or rewritten. Partial failed candidates are retained for inspection.
|
|
229
|
+
The `sandbox/retained-handoffs` policy is ignored/explicit-retention, not cleanup
|
|
230
|
+
permission; request creation and consumer/scaffold/runtime migration are separate.
|
|
231
|
+
|
|
232
|
+
## New honest private receipts
|
|
233
|
+
|
|
234
|
+
`admission.json` is a new
|
|
235
|
+
`unaltraweb-retained-private-handoff-admission` v1 record containing the reviewed
|
|
236
|
+
plan, original identities and pinned local lineage. Each selected output gets a
|
|
237
|
+
new `receipts/<id>.json` of kind
|
|
238
|
+
`unaltraweb-retained-private-artifact-receipt` v1, bound to that admission hash.
|
|
239
|
+
These receipts identify the new private byte/provenance admission, not an
|
|
240
|
+
approved native teaching edition.
|
|
241
|
+
|
|
242
|
+
The new records preserve false/unknown editorial values, local-candidate and
|
|
243
|
+
historical-bundle declarations with their original origin. Fresh byte/reference
|
|
244
|
+
checks are distinguished from inherited renderer/effective-source/factory/proof
|
|
245
|
+
claims; source/evidence hashes and unresolved references stay local. Snapshotting
|
|
246
|
+
grants no author/scientific approval and selects no runtime or cloud credentials.
|
|
247
|
+
|
|
248
|
+
## Existing per-artifact private archive
|
|
249
|
+
|
|
250
|
+
Use the returned **per-output receipt path/SHA** in the existing route-v2
|
|
251
|
+
configuration, with its explicit format and recipient audience. The retained
|
|
252
|
+
class requires `driver:s3`, `visibility:private` and
|
|
253
|
+
`storage_profile:authenticated-private-v1`; student output is student/private,
|
|
254
|
+
teacher output teacher/private. GitHub/public or audience laundering is refused,
|
|
255
|
+
even if the original manifest declared human approval.
|
|
256
|
+
|
|
257
|
+
```json
|
|
258
|
+
{
|
|
259
|
+
"target": "manual-private",
|
|
260
|
+
"storage_profile": "authenticated-private-v1",
|
|
261
|
+
"audience": "student",
|
|
262
|
+
"receipt": "sandbox/retained-handoffs/retained-handoff/pilot-1/receipts/student-guide.json",
|
|
263
|
+
"receipt_sha256": "<exact returned per-output receipt SHA-256>",
|
|
264
|
+
"format": "pdf"
|
|
265
|
+
}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
The existing `unaltraweb-practice-artifacts plan/stage` verifies the new receipt,
|
|
269
|
+
retained closure, original request/manifest/worker lineage, consumer identity and
|
|
270
|
+
selected bytes. It emits the same common product/policy v1 and named-v1 layout.
|
|
271
|
+
Its new source-free native sidecar format is
|
|
272
|
+
`unaltraweb-retained-private-artifact-v1`: safe handoff/activity/version/language/
|
|
273
|
+
recipient/format, original approval values and explicit no-intake-approval/no-
|
|
274
|
+
scientific-validation status. Private paths, source Markdown, raw original
|
|
275
|
+
receipts, evidence bodies and renderer details never enter the remote sidecar.
|
|
276
|
+
When originally declared, the safe `original_publishes` scalar preserves that
|
|
277
|
+
claim without confusing it with the later transport's `publication_performed`.
|
|
278
|
+
Earlier PR134 package-local admissions/stages remain readable with their exact
|
|
279
|
+
original receipt/sidecar/manifest and producer identity; missing additive origin
|
|
280
|
+
projections are not retroactively inserted into retained products.
|
|
281
|
+
|
|
282
|
+
Original typed edition-v1 composition, ordinary artifact stages and retained
|
|
283
|
+
original manifest/producer identities keep their separate formats. This admission
|
|
284
|
+
and stage do not call publish or auth. Later actual publication still requires a
|
|
285
|
+
separately explicit project-scoped binding, exact repository-named bucket,
|
|
286
|
+
reviewed stage/manifest, private authenticated byte/header/ACL readback and
|
|
287
|
+
restore qualification. Current sources may disappear after a complete local
|
|
288
|
+
snapshot without changing its archived bytes or making old approval fresh.
|
|
289
|
+
|
|
290
|
+
Source/CI support is not a containing released runtime or actual pilot. Geodisseny
|
|
291
|
+
owner preparation, exact original evidence selection and the first small private
|
|
292
|
+
archive plan are recorded in the producer's retained-intake owner return.
|