Assistant: codex Assistant-Model: gpt-6.1-sol Assistant-Session: 01a10391-6355-7b41-b0fa-3e14e874f091
90 lines
3.5 KiB
Python
90 lines
3.5 KiB
Python
"""Exact closed source bindings predating canonical Forge identity.
|
|
|
|
These are frozen historical source views, not aliases or UUID allocation rules.
|
|
An altered/missing source requires explicit owner review; generic source UUIDs
|
|
remain untrusted. Shared Activity views represent the one archived parent.
|
|
"""
|
|
from pathlib import Path
|
|
from hashlib import sha256
|
|
import json
|
|
|
|
BINDINGS = json.loads(r'''[
|
|
{
|
|
"repo": "activity-core",
|
|
"path": "workplans/archived/260707-custodian-WP-0003-event-bridge.md",
|
|
"sha256": "83ea8bcb151e003419b73c59dbd028f4a1ce3d1120a82e4a128a772503ff3b76",
|
|
"record_id": "custodian-WP-0003",
|
|
"uuid": "b4eb45a9-69e3-4ab0-b00c-67a53c3117c5",
|
|
"parent_record_id": "custodian-WP-0003"
|
|
},
|
|
{
|
|
"repo": "activity-core",
|
|
"path": "workplans/custodian-WP-0001-temporal-backbone.md",
|
|
"sha256": "020e2eac973f2daa41c1687f8e867da9d521f945547e6aa82c87993b3ff6fc64",
|
|
"record_id": "custodian-WP-0001",
|
|
"uuid": "e22516cc-4fdf-4dad-a928-a9e04a9fa7c7",
|
|
"parent_record_id": "custodian-WP-0001"
|
|
},
|
|
{
|
|
"repo": "activity-core",
|
|
"path": "workplans/custodian-WP-0002-triggers-ops.md",
|
|
"sha256": "d8cbc61631c01b6f11a03a63f2fb6275fc853ff7f7459ce65973ed1a233daa01",
|
|
"record_id": "custodian-WP-0002",
|
|
"uuid": "3a4f47d9-8bc1-434e-acb4-bed5d4dacda0",
|
|
"parent_record_id": "custodian-WP-0002"
|
|
},
|
|
{
|
|
"repo": "activity-core",
|
|
"path": "workplans/custodian-WP-0003a-event-bridge-model-rules-registry.md",
|
|
"sha256": "ffa6682e9ba3aaf559bd44203d561c90dea69bcf1b1e778209a7b209e6e5cdd3",
|
|
"record_id": "custodian-WP-0003a",
|
|
"uuid": "b4eb45a9-69e3-4ab0-b00c-67a53c3117c5",
|
|
"parent_record_id": "custodian-WP-0003"
|
|
},
|
|
{
|
|
"repo": "activity-core",
|
|
"path": "workplans/custodian-WP-0003b-event-bridge-parser-workflow-triggers.md",
|
|
"sha256": "4fc34e0f821e2df51e5c08c7ab34da35b65690381d01f0cfdf55d00c970b414c",
|
|
"record_id": "custodian-WP-0003b",
|
|
"uuid": "b4eb45a9-69e3-4ab0-b00c-67a53c3117c5",
|
|
"parent_record_id": "custodian-WP-0003"
|
|
},
|
|
{
|
|
"repo": "activity-core",
|
|
"path": "workplans/custodian-WP-0003c-event-bridge-context-integration.md",
|
|
"sha256": "b6cd62b26515e509670ca39736b6bcec9633beedd46c9bd8f7598c06bac7276b",
|
|
"record_id": "custodian-WP-0003c",
|
|
"uuid": "b4eb45a9-69e3-4ab0-b00c-67a53c3117c5",
|
|
"parent_record_id": "custodian-WP-0003"
|
|
},
|
|
{
|
|
"repo": "activity-core",
|
|
"path": "workplans/custodian-WP-0004-railiance-ops.md",
|
|
"sha256": "20df02eea740e109c937130e7f8801a636fc0990ed8c6d2ced55659f8957adb1",
|
|
"record_id": "custodian-WP-0004",
|
|
"uuid": "759b1255-aa78-42b5-8fab-c5fcf168f5f4",
|
|
"parent_record_id": "custodian-WP-0004"
|
|
},
|
|
{
|
|
"repo": "the-custodian",
|
|
"path": "workplans/ADHOC-2026-08-25-retired.md",
|
|
"sha256": "344a1293dbb3a67a944eb34ca4a0337487d8f047226027a2107922346fbab2dd",
|
|
"record_id": "CUST-WP-ADHOC-2026-08-25-RETIRED",
|
|
"uuid": "1c53d3db-6633-5e2d-987f-10706d73be9e",
|
|
"parent_record_id": "CUST-WP-ADHOC-2026-08-25-RETIRED"
|
|
}
|
|
]''')
|
|
|
|
|
|
def bound_sources(repo_root: Path, repo_slug: str):
|
|
entries = [entry for entry in BINDINGS if entry["repo"] == repo_slug]
|
|
result = []
|
|
for entry in entries:
|
|
path = repo_root / entry["path"]
|
|
if path.is_symlink() or not path.is_file():
|
|
raise ValueError("Historical source binding missing or symlinked: " + entry["path"])
|
|
data = path.read_bytes()
|
|
if sha256(data).hexdigest() != entry["sha256"]:
|
|
raise ValueError("Historical source binding changed: " + entry["path"])
|
|
result.append((entry, data.decode("utf-8")))
|
|
return result
|