Skip to content

Commit c184f20

Browse files
Document verified WWPGD runtime commit pins
1 parent b1d7936 commit c184f20

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

docs/WWPGD_COMMIT_PIN.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Optional WW-PGD runtime commit verification
2+
3+
The repository continues to install WW-PGD from a floating Git dependency:
4+
5+
```text
6+
ww-pgd @ git+https://github.com/CalculatedContent/WW_PGD.git
7+
```
8+
9+
For a frozen or jointly reproduced experiment, require the installed package to resolve to a particular Git commit by setting:
10+
11+
```bash
12+
export WWPGD_COMMIT_PIN=<full_sha_or_hex_prefix>
13+
```
14+
15+
The value must be a hexadecimal Git SHA prefix containing at least 12 and at most 64 characters. A full SHA is accepted. Matching is one-directional: the installed PEP 610 `commit_id` must start with the requested value.
16+
17+
## Enforcement
18+
19+
Verification occurs at the shared pip adapter boundary used by:
20+
21+
- the main scientific Level 0–2 runner;
22+
- the isolated Level Zero WW-PGD runner;
23+
- Experiment 2 adaptive WW-PGD;
24+
- direct callers of the common WW-PGD configuration or candidate functions.
25+
26+
A requested pin is checked before constructing a WW-PGD configuration and again before invoking the installed projector. A mismatch, malformed pin, or installation without a PEP 610 VCS commit fails loudly before a projection is accepted.
27+
28+
When the environment variable is unset or empty, behavior is unchanged and the floating installation is allowed.
29+
30+
## Manifest fields
31+
32+
WW-PGD manifests distinguish the installation specification from runtime verification:
33+
34+
- `wwpgd_resolved_commit`: installed PEP 610 VCS commit;
35+
- `wwpgd_commit_pin_requested`: normalized requested SHA or `null`;
36+
- `wwpgd_commit_pin_verified`: `true` only after a successful comparison;
37+
- `wwpgd_commit_pin_status`: `floating` or `verified`;
38+
- `wwpgd_dependency_pinned`: always `false` while `pyproject.toml` remains floating.
39+
40+
The provenance mapping evaluates the environment when the manifest is built rather than only when Python imports `wwgpt.ww`. This prevents notebooks and long-lived processes from verifying one pin state while recording stale import-time metadata.
41+
42+
This feature changes no spectral target, dose, trust-region rule, optimizer update, model weight, or default training behavior.

0 commit comments

Comments
 (0)