Skip to content

Commit 13fada3

Browse files
refactor(pcea): establish stack-local research boundary
- turn research/pcea into the mutable PCEA research workspace - preserve the exact pre-cleanup PCEA research snapshot by commit and Git blob identity - add deterministic legacy materializer for former pcea-ucns research/tests - record asynchronous gonol-key work as candidate research, not runtime or canon - leave BASE.json pinned honestly to the current libs/pcea snapshot
1 parent 19d1217 commit 13fada3

4 files changed

Lines changed: 284 additions & 8 deletions

File tree

research/pcea/ASYNC_GONOL_KEYS.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Asynchronous gonol-key research
2+
3+
**Standing:** candidate research. Not PCEA runtime, not UCNS canon, not a security claim.
4+
5+
## Observation to preserve
6+
7+
A gonol construction has produced the observed progression:
8+
9+
```text
10+
157 -> 2881 -> 54837698421
11+
```
12+
13+
The exact 157-position Public Gonol is established in current UCNS authority, while the recursive-scale transition law remains unresolved. Therefore the later values are preserved here as observed constructor outputs pending independent replay, not promoted as a mathematical law.
14+
15+
## Cryptographic placement
16+
17+
The useful candidate placement is a deterministic asynchronous key **schedule/state topology**, not an entropy source.
18+
19+
```text
20+
real shared secret / approved key establishment
21+
|
22+
v
23+
gonol-addressed ratchet
24+
|
25+
v
26+
one-use traffic keys
27+
```
28+
29+
A large gonol can provide sparse addressability, branching, bounded rendezvous, replay coordinates, and hierarchical ratchet state without materializing every possible key. Secret strength still comes from CSPRNG/KEM/pre-shared entropy and an approved KDF.
30+
31+
A candidate derivation shape is deliberately generic until the constructor is replayed:
32+
33+
```text
34+
traffic_key = KDF(root_secret,
35+
protocol_label,
36+
gonol_identity,
37+
recursive_path,
38+
position,
39+
epoch,
40+
message_counter,
41+
transcript)
42+
```
43+
44+
Public coordinates may identify where a receiver should derive; they must not substitute for the secret input.
45+
46+
## First falsification program
47+
48+
1. Freeze the exact gonol transition constructor and all source identities.
49+
2. Independently replay `157 -> 2881 -> 54837698421`.
50+
3. Compare the resulting topology against a conventional tree/ratchet with the same root entropy.
51+
4. Measure synchronization recovery, replay rejection, compromise containment, state/storage cost, and message reordering tolerance.
52+
5. Attack public positional metadata for state leakage and linkability.
53+
6. Credit gonol geometry only for properties that beat or simplify the control construction.
54+
55+
## Usage guidance
56+
57+
Do not implement this in `The-Interdependency/pcea` while it remains candidate research. Prototype and attack it here. If a bounded ratchet behavior survives and is useful, promote only that completed behavior to PCEA through an explicit owning-repository change.
58+
59+
## hmmm
60+
61+
The load-bearing unknown is the exact reproducible recursive transition operator. Until independent replay exists, gonol scale is an observed research coordinate, not cryptographic hardness, entropy, or canon.

research/pcea/MIGRATION.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"schema": "the-interdependency.pcea-research-migration",
3+
"version": "1.0.0",
4+
"source": {
5+
"repository": "The-Interdependency/pcea",
6+
"commit": "ecf2ca0dec38bef29382e02121b0edde66763aa9",
7+
"standing": "last-pre-cleanup-research-snapshot"
8+
},
9+
"destination": {
10+
"repository": "The-Interdependency/stack",
11+
"path": "research/pcea",
12+
"standing": "stack-local-research",
13+
"authority_transfer": false
14+
},
15+
"deprecated_at_source": {
16+
"directories": ["pcea-ucns/"],
17+
"files": ["rec.md"],
18+
"research_tests": [
19+
"tests/test_attack1_minkowski_break.py",
20+
"tests/test_attack_harness.py",
21+
"tests/test_factor_count_sweep.py",
22+
"tests/test_gonal_architecture.py",
23+
"tests/test_one_way_map_gate.py",
24+
"tests/test_option_d_ucns_map.py",
25+
"tests/test_option_family_specs.py",
26+
"tests/test_positional_attack.py",
27+
"tests/test_prefix_read_break.py",
28+
"tests/test_projection_action_candidate.py",
29+
"tests/test_pruning_scaling.py",
30+
"tests/test_quotient_attack.py",
31+
"tests/test_three_factor_attack.py",
32+
"tests/test_ucns_candidate_ledger.py"
33+
]
34+
},
35+
"replacement": {
36+
"materializer": "research/pcea/materialize_legacy.py",
37+
"materialized_root": "research/pcea/migrated",
38+
"source_files": 36,
39+
"rule": "mutating PCEA research occurs in stack; stable PCEA source receives only completed bounded behavior"
40+
},
41+
"boundaries": {
42+
"proof_status_transfer": false,
43+
"security_status_transfer": false,
44+
"measurement_status_transfer": false,
45+
"runtime_contract_changed": false,
46+
"hmmm": [
47+
"stack/libs/pcea refresh to the post-cleanup canonical commit is a separate fresh-making operation",
48+
"current gonol recursive-scale transition law remains unresolved until independently replayed"
49+
]
50+
}
51+
}

research/pcea/README.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,52 @@
11
# PCEA research workspace
22

3-
Stack-local research against the pinned canonical PCEA view in [`../../libs/pcea/`](../../libs/pcea/).
3+
Mutable PCEA research lives here. The owning `The-Interdependency/pcea` repository is the stable/runtime authority; this workspace is noncanonical research and may change freely.
44

5-
Standing: **research, not canon**. Canonical PCEA authority remains `The-Interdependency/pcea` at the exact commit recorded in [`BASE.json`](BASE.json) and the root stack manifest.
5+
## Authority boundary
6+
7+
```text
8+
The-Interdependency/pcea = completed/stable PCEA implementation authority
9+
stack/libs/pcea/ = manifest-pinned read-only imported view
10+
stack/research/pcea/ = mutable PCEA research
11+
```
12+
13+
Research results do not become PCEA runtime claims merely by surviving here. Promotion requires an owning-repository change with its own review and release evidence.
14+
15+
`BASE.json` intentionally continues to identify the exact `libs/pcea` view currently pinned by the stack manifest. The research migration has a separate source identity because it captures the former PCEA proving ground immediately before source cleanup: `The-Interdependency/pcea@ecf2ca0dec38bef29382e02121b0edde66763aa9`. See `MIGRATION.json`.
16+
17+
## Legacy research migration
18+
19+
The former `pcea-ucns/`, its research-specific tests, and `rec.md` are deprecated at the PCEA source boundary. Git history remains permanent provenance; this workspace also carries an exact materializer so the last source snapshot can be reconstructed byte-for-byte when a lane needs continuation.
20+
21+
```bash
22+
cd research/pcea
23+
python materialize_legacy.py
24+
python materialize_legacy.py --check
25+
cd migrated
26+
python -m pytest -q tests/test_attack_harness.py tests/test_positional_attack.py
27+
```
28+
29+
The materializer verifies every downloaded file against its Git blob SHA before writing it. It uses only Python stdlib and the immutable source commit.
30+
31+
Do not edit `migrated/` as though it were current canon. Materialize a lane, then move or revise the specific active experiment in this workspace with explicit provenance.
32+
33+
## Current frontier
34+
35+
The current candidate line is asynchronous PCEA key orchestration over gonol state. The observed `157 -> 2881 -> 54837698421` progression is research evidence, not yet a cryptographic hardness claim or UCNS recursive-scale law. Before implementation, bind the exact UCNS authority and independently replay the transition constructor.
36+
37+
PCEA keys must still derive from real secret entropy; gonol state may organize, address, ratchet, or synchronize that entropy but must not be credited with entropy merely because the address space is large.
638

739
## Usage guidance
840

9-
1. Read `BASE.json` before beginning work.
10-
2. Treat `../../libs/pcea/` as read-only imported canon.
11-
3. Put experiments, candidate changes, measurements, and notes here rather than editing `libs/`.
12-
4. If work changes PCEA itself, route the accepted change upstream; after merge, refresh `libs/pcea/` and this workspace's base commit.
13-
5. If work becomes a distinct composed project, keep its authority separate rather than silently promoting this workspace.
41+
1. Read `BASE.json` and `MIGRATION.json` before starting a PCEA experiment.
42+
2. Resolve exact current PCEA/UCNS commits needed by the experiment; do not silently substitute `latest`.
43+
3. Materialize only legacy lanes you actually need.
44+
4. Put new or mutating research here, never back into the stable PCEA repo.
45+
5. Preserve negative results and attack harnesses; a passing harness grants permission for a harder attack, not a security claim.
46+
6. Graduate only completed, bounded behavior back to `The-Interdependency/pcea` through an explicit source-repo change.
1447

1548
## hmmm
1649

17-
No active PCEA-specific stack research has been materialized here yet.
50+
- `libs/pcea` remains pinned to the stack manifest's older canonical source until a separate fresh-making refresh imports the post-cleanup PCEA commit; `BASE.json` therefore remains unchanged rather than lying about the local imported view.
51+
- The exact UCNS recursive transition operator producing `157 -> 2881 -> 54837698421` is not yet independently replayed here.
52+
- No independent cryptographic/security review is implied by this migration.
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
#!/usr/bin/env python3
2+
"""Materialize the last pre-cleanup PCEA research snapshot into ./migrated.
3+
4+
Usage:
5+
python materialize_legacy.py
6+
python materialize_legacy.py --check
7+
python materialize_legacy.py --force
8+
9+
The source commit is immutable. Every file is verified using Git's blob SHA-1
10+
before it is written. This script is research/provenance tooling, never PCEA
11+
runtime code.
12+
"""
13+
from __future__ import annotations
14+
15+
import argparse
16+
import hashlib
17+
import pathlib
18+
import sys
19+
import urllib.parse
20+
import urllib.request
21+
22+
SOURCE_REPO = "The-Interdependency/pcea"
23+
SOURCE_COMMIT = "ecf2ca0dec38bef29382e02121b0edde66763aa9"
24+
FILES = {
25+
"pcea-ucns/PLAN.md": "174018de5208397e191ed4b10aaa00c3cff43e84",
26+
"pcea-ucns/README.md": "fc1187dbaffd0a542287392e4e64a9553e3e42df",
27+
"pcea-ucns/asymmetric-paths-assessment.md": "708e68c4e00cc884c616333eae3df552981ac58f",
28+
"pcea-ucns/attack1_minkowski_break.py": "4378a28fdac9b59aa6bf2be1f11d0f2b5a359e84",
29+
"pcea-ucns/attack_harness.py": "79d70b4d3520a949bb75893fed7c30f41f972f38",
30+
"pcea-ucns/avenues.md": "d5ab74a84644b4e19095339ec5e5e8c2bdcf79bf",
31+
"pcea-ucns/candidate-ledger.json": "e0965b4b7fb24e83db5369dd16af29ff86c5bef6",
32+
"pcea-ucns/factor_count_sweep.py": "48ea5e802a660228733ec06f29cff6c99c437128",
33+
"pcea-ucns/feasibility-investigation.md": "2e2d7b6845990fd69e0f0989f9440cf6625dffbd",
34+
"pcea-ucns/gonal_architecture.py": "a24e31110521b30ca941bf151b99458a06c910af",
35+
"pcea-ucns/one_way_map_gate.py": "1cc2c3637dc93475a3f7edc19b7ecca68362d0ab",
36+
"pcea-ucns/option_d_ucns_map.py": "3bdc91e4975f3122cbfd3b6f5338049d4676d73c",
37+
"pcea-ucns/option_family_specs.py": "d5e7bcae866003c413119869d7be2ebd339892e3",
38+
"pcea-ucns/positional_attack.py": "30fce01b51bcb855105de7dc904a8ea7ed739919",
39+
"pcea-ucns/prefix_read_break.py": "2acd92b9fdd43f8b81662a154f76795664baf33c",
40+
"pcea-ucns/projection_action_candidate.py": "e9cdaa612c7c71b26456fcb9c2be908803e8f136",
41+
"pcea-ucns/pruning_scaling.py": "f820f87e4440a807739b8e948e629b13c1475671",
42+
"pcea-ucns/quotient_attack.py": "00d54912f14f0df52a16887671cf1759b155080d",
43+
"pcea-ucns/three_factor_attack.py": "e24a9618415316a1a9977d2cb9a9fdfe742e56e9",
44+
"pcea-ucns/ucns-crypto-domain-v0.md": "ffa79dc459e424a5f5654454b208bf1bc23a0b4d",
45+
"pcea-ucns/ucns_compat.py": "cdf8ee4996c390e5753003c1fc1b3b5e622a2fdb",
46+
"rec.md": "c2f576d7fb1077d78535d17672f05ac441114bce",
47+
"tests/test_attack1_minkowski_break.py": "291c392608f4acced36e31987b08aa1dd0cfc074",
48+
"tests/test_attack_harness.py": "06b776119d898ed7d0374ba3861a84a885310a9a",
49+
"tests/test_factor_count_sweep.py": "a6dd2fc8fb33cf179a57963b52075a8bc9472b58",
50+
"tests/test_gonal_architecture.py": "d622fc6e85543ad99ce3f374b4fbbc1971d82812",
51+
"tests/test_one_way_map_gate.py": "9e61ed890c53e4550100bade6f86b7f928b564c8",
52+
"tests/test_option_d_ucns_map.py": "641c08579ed34a769e43d4d199f331072b00ff7c",
53+
"tests/test_option_family_specs.py": "38922acd951468884b181d4f53ab0d42d4717374",
54+
"tests/test_positional_attack.py": "05b52ad0e6a791c70974d08e1ebc59d738d7ca11",
55+
"tests/test_prefix_read_break.py": "bcf4d57e32edf3669841948b92968372275b6e5c",
56+
"tests/test_projection_action_candidate.py": "1f841c57aff58b1a3ea0df5dd277add8d6dec677",
57+
"tests/test_pruning_scaling.py": "8db8d55799f1c050de2a6fb72625d0980b78bc4c",
58+
"tests/test_quotient_attack.py": "cb82d85de13e20d3ff14b5692164b0213a692c37",
59+
"tests/test_three_factor_attack.py": "7ed6d70c448630d2759a644547deeb1895e0108d",
60+
"tests/test_ucns_candidate_ledger.py": "3167d980fbeb5e285a056da59a595463f729b556",
61+
}
62+
63+
64+
def git_blob_sha(data: bytes) -> str:
65+
header = f"blob {len(data)}\0".encode("ascii")
66+
return hashlib.sha1(header + data).hexdigest()
67+
68+
69+
def raw_url(path: str) -> str:
70+
quoted = urllib.parse.quote(path)
71+
return f"https://raw.githubusercontent.com/{SOURCE_REPO}/{SOURCE_COMMIT}/{quoted}"
72+
73+
74+
def fetch(path: str) -> bytes:
75+
request = urllib.request.Request(raw_url(path), headers={"User-Agent": "stack-pcea-research-migration/1"})
76+
with urllib.request.urlopen(request, timeout=30) as response:
77+
return response.read()
78+
79+
80+
def verify(path: pathlib.Path, expected: str) -> tuple[bool, str]:
81+
if not path.is_file():
82+
return False, "missing"
83+
actual = git_blob_sha(path.read_bytes())
84+
return actual == expected, actual
85+
86+
87+
def main() -> int:
88+
parser = argparse.ArgumentParser()
89+
parser.add_argument("--target", default="migrated", help="materialization root relative to this script")
90+
parser.add_argument("--check", action="store_true", help="verify existing files; do not access network")
91+
parser.add_argument("--force", action="store_true", help="overwrite an existing mismatched file")
92+
args = parser.parse_args()
93+
94+
root = pathlib.Path(__file__).resolve().parent / args.target
95+
failures: list[str] = []
96+
97+
for source_path, expected in FILES.items():
98+
destination = root / source_path
99+
ok, observed = verify(destination, expected)
100+
if args.check:
101+
if not ok:
102+
failures.append(f"{source_path}: expected {expected}, observed {observed}")
103+
continue
104+
if ok:
105+
print(f"ok {source_path}")
106+
continue
107+
if destination.exists() and not args.force:
108+
failures.append(f"{source_path}: local file differs ({observed}); use --force to replace")
109+
continue
110+
data = fetch(source_path)
111+
actual = git_blob_sha(data)
112+
if actual != expected:
113+
failures.append(f"{source_path}: downloaded blob {actual}, expected {expected}")
114+
continue
115+
destination.parent.mkdir(parents=True, exist_ok=True)
116+
destination.write_bytes(data)
117+
print(f"written {source_path}")
118+
119+
if failures:
120+
print("hmmm: materialization incomplete", file=sys.stderr)
121+
for failure in failures:
122+
print(f"- {failure}", file=sys.stderr)
123+
return 1
124+
print(f"verified {len(FILES)} files from {SOURCE_REPO}@{SOURCE_COMMIT}")
125+
return 0
126+
127+
128+
if __name__ == "__main__":
129+
raise SystemExit(main())

0 commit comments

Comments
 (0)