docs: lead IP records with attribution answer

This commit is contained in:
2026-07-22 19:34:44 +00:00
parent 052306bafe
commit 652bd652d8
11 changed files with 111 additions and 6 deletions
+18
View File
@@ -119,8 +119,10 @@ def main() -> int:
ROOT / "docs" / "02-first-round-investigation.md",
ROOT / "address-book" / "README.md",
ROOT / "address-book" / "ip-addresses.md",
ROOT / "address-book" / "ip" / "TEMPLATE.md",
ROOT / "docs" / "04-ip-address-model.md",
ROOT / "registry-ips" / "README.md",
ROOT / "registry-ips" / "TEMPLATE.md",
ROOT / "registry-ips" / "000-000-000-000--08--iana.md",
ROOT / "registry-ips" / "001-000-000-000--16--placeholder.md",
ROOT / "registry-ips" / "001-001-000-000--24--placeholder.md",
@@ -131,6 +133,22 @@ def main() -> int:
if not path.is_file():
errors.append(f"missing required document: {path.relative_to(ROOT)}")
range_records = sorted((ROOT / "registry-ips").glob("*.md"))
for path in range_records:
if path.name in {"README.md", "TEMPLATE.md"}:
continue
headings = [line.strip() for line in path.read_text(encoding="utf-8").splitlines() if line.startswith("## ")]
if not headings or headings[0] != "## Who is this IP range?":
errors.append(f"{path.relative_to(ROOT)}: first section must be '## Who is this IP range?'")
address_records = sorted((ROOT / "address-book" / "ip").glob("*.md"))
for path in address_records:
if path.name == "TEMPLATE.md":
continue
headings = [line.strip() for line in path.read_text(encoding="utf-8").splitlines() if line.startswith("## ")]
if not headings or headings[0] != "## Who is this IP?":
errors.append(f"{path.relative_to(ROOT)}: first section must be '## Who is this IP?'")
if errors:
print("Validation failed:")
for error in errors: