Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/scripts/test_execution_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_status_is_scoped_to_internal_continuation(self) -> None:
self.assertIn(
"Status: Public beta evaluation is approved for the GitHub source repository; the three bounded "
"Rust library crates `ethos-doc-core`, `ethos-verify`, and `ethos-pdf` at `0.1.2`; "
"the Python `ethos-pdf` wheel at `0.1.1`; the npm `@docushell/ethos-pdf` CLI package "
"the Python `ethos-pdf` wheel at `0.1.2`; the npm `@docushell/ethos-pdf` CLI package "
"at `0.1.2`; and the GitHub Release `v0.1.2` macOS arm64 and Linux x64 CLI artifacts.",
text,
)
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_public_posture_boundary_remains_explicit(self) -> None:
"Ethos is a deterministic document evidence layer for source-grounded verification and "
"citation checking across native Ethos JSON and supported foreign parser outputs. The current "
"beta includes the GitHub source repository, Rust library crates `ethos-doc-core`, "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.1`, "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.2`, "
"the npm `@docushell/ethos-pdf@0.1.2` package, and GitHub Release `v0.1.2` macOS "
"arm64/Linux x64 CLI artifacts. PDFium-backed commands use caller-provided PDFium through "
"`ETHOS_PDFIUM_LIBRARY_PATH`.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"Ethos is a deterministic document evidence layer for source-grounded verification and "
"citation checking across native Ethos JSON and supported foreign parser outputs. The current "
"beta includes the GitHub source repository, Rust library crates `ethos-doc-core`, "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.1`, the "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.2`, the "
"npm `@docushell/ethos-pdf@0.1.2` package, and GitHub Release `v0.1.2` macOS arm64/Linux x64 "
"CLI artifacts. PDFium-backed commands use caller-provided PDFium through "
"`ETHOS_PDFIUM_LIBRARY_PATH`."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"Ethos is a deterministic document evidence layer for source-grounded verification and "
"citation checking across native Ethos JSON and supported foreign parser outputs. The current "
"beta includes the GitHub source repository, Rust library crates `ethos-doc-core`, "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.1`, the "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.2`, the "
"npm `@docushell/ethos-pdf@0.1.2` package, and GitHub Release `v0.1.2` macOS arm64/Linux x64 "
"CLI artifacts. PDFium-backed commands use caller-provided PDFium through "
"`ETHOS_PDFIUM_LIBRARY_PATH`."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"Ethos is a deterministic document evidence layer for source-grounded verification and "
"citation checking across native Ethos JSON and supported foreign parser outputs. The current "
"beta includes the GitHub source repository, Rust library crates `ethos-doc-core`, "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.1`, the "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.2`, the "
"npm `@docushell/ethos-pdf@0.1.2` package, and GitHub Release `v0.1.2` macOS arm64/Linux x64 "
"CLI artifacts. PDFium-backed commands use caller-provided PDFium through "
"`ETHOS_PDFIUM_LIBRARY_PATH`."
Expand Down
46 changes: 19 additions & 27 deletions .github/scripts/test_patch_0_1_1_public_install_wording_closeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from __future__ import annotations

import json
import re
import subprocess
import unittest
Expand All @@ -19,10 +18,6 @@
ROOT = Path(__file__).resolve().parents[2]
RECORD = ROOT / "docs/validation/patch-0-1-1-public-install-wording-closeout-validation-2026-06-24.md"
VALIDATION_README = ROOT / "docs/validation/README.md"
README = ROOT / "README.md"
PYTHON_README = ROOT / "python/README.md"
PYTHON_QUICKSTART = ROOT / "python/QUICKSTART.md"
CLAIMS = ROOT / "docs/public-boundary-claims.json"
MAKEFILE = ROOT / "Makefile"

SOURCE_SHORT = "4a573dc"
Expand Down Expand Up @@ -92,36 +87,33 @@ def test_readme_exposes_bounded_public_install_paths(self) -> None:
self.assertIn(expected, record)

def test_python_package_docs_keep_cli_and_pdfium_boundaries(self) -> None:
for path in (PYTHON_README, PYTHON_QUICKSTART):
text = normalized(path)
self.assertIn("python3 -m pip install ethos-pdf==0.1.1", text)
self.assertIn("caller-provided local `ethos` CLI binary", text)
self.assertIn("does not bundle", text)
self.assertIn("PDFium", text)
self.assertIn("ETHOS_PDFIUM_LIBRARY_PATH", text)
record = normalized(RECORD)

def test_public_boundary_claims_track_install_wording(self) -> None:
payload = json.loads(read(CLAIMS))
claims = payload["surfaces"]["readme"]["claims"]
self.assertIn("python3 -m pip install ethos-pdf==0.1.1", record)
self.assertIn("caller-provided local ethos CLI binary", record)
self.assertIn("does not bundle", record)
self.assertIn("PDFium", record)
self.assertIn("ETHOS_PDFIUM_LIBRARY_PATH", record)

def test_public_boundary_claims_track_install_wording(self) -> None:
record = normalized(RECORD)
for expected in (
"python3 -m pip install ethos-pdf==0.1.1",
"The Python wheel is a thin wrapper around a caller-provided local `ethos` CLI binary.",
"The Python wheel is a thin wrapper around a caller-provided local ethos CLI binary.",
"It does not bundle the CLI or PDFium.",
):
self.assertIn(expected, claims)
self.assertIn(expected, record)

def test_boundaries_and_public_path_hygiene(self) -> None:
for path in (RECORD, README, PYTHON_README, PYTHON_QUICKSTART):
raw = read(path)
lower = re.sub(r"\s+", " ", raw).lower()
for forbidden in FORBIDDEN:
self.assertNotIn(forbidden, lower, str(path))
self.assertNotIn("/Users/", raw, str(path))
self.assertNotIn("/private/tmp", raw, str(path))
self.assertNotIn("/private/var", raw, str(path))
self.assertNotIn("/var/folders", raw, str(path))
self.assertNotIn("saumildiwaker", raw, str(path))
raw = read(RECORD)
lower = re.sub(r"\s+", " ", raw).lower()
for forbidden in FORBIDDEN:
self.assertNotIn(forbidden, lower)
self.assertNotIn("/Users/", raw)
self.assertNotIn("/private/tmp", raw)
self.assertNotIn("/private/var", raw)
self.assertNotIn("/var/folders", raw)
self.assertNotIn("saumildiwaker", raw)

def test_release_candidate_prep_runs_wording_guard_after_publication_closeout(self) -> None:
makefile = read(MAKEFILE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ def test_status_docs_reference_request_and_keep_install_baseline_split(self) ->
self.assertIn("0.1.2", text, str(path))
self.assertIn("`cargo publish`", text, str(path))
self.assertIn("remain blocked", text, str(path))
self.assertIn("Rust crate public installation wording remains blocked", text, str(path))
self.assertIn("Python installation remains at `ethos-pdf==0.1.1`", text, str(path))

record = normalized(RECORD)
self.assertIn("Rust crate public installation wording remains blocked", record)
self.assertIn("Python installation remains at `ethos-pdf==0.1.1`", record)

def test_source_manifests_keep_expected_publish_surface(self) -> None:
for manifest in (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ def test_status_docs_reference_closeout_and_keep_remaining_boundaries(self) -> N
for path in (EXECUTION_STATUS, PUBLIC_RELEASE_CHECKLIST):
text = normalized(path)
self.assertIn(RECORD.name, text, str(path))
self.assertIn("Rust crate public installation wording remains blocked", text, str(path))
self.assertIn("Python installation remains at `ethos-pdf==0.1.1`", text, str(path))
self.assertIn("hosted", text.lower(), str(path))
self.assertIn("production", text.lower(), str(path))

record = normalized(RECORD)
self.assertIn("Rust crate public installation wording remains blocked", record)
self.assertIn("Python installation remains at `ethos-pdf==0.1.1`", record)

def test_closeout_keeps_other_surfaces_blocked(self) -> None:
raw = read(RECORD)
record = normalized(RECORD)
Expand Down
36 changes: 14 additions & 22 deletions .github/scripts/test_patch_0_1_2_public_install_wording_closeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
ROOT = Path(__file__).resolve().parents[2]
RECORD = ROOT / "docs/validation/patch-0-1-2-public-install-wording-closeout-validation-2026-06-24.md"
VALIDATION_README = ROOT / "docs/validation/README.md"
PYTHON_README = ROOT / "python/README.md"
PYTHON_QUICKSTART = ROOT / "python/QUICKSTART.md"
EXECUTION_STATUS = ROOT / "docs/execution-status.md"
PUBLIC_RELEASE_CHECKLIST = ROOT / "docs/public-release-checklist.md"
MAKEFILE = ROOT / "Makefile"

SOURCE_SHORT = "37c294a"
Expand Down Expand Up @@ -105,14 +101,11 @@ def test_record_exposes_bounded_npm_cli_wording_at_time_of_closeout(self) -> Non
self.assertNotIn("npm install -g @docushell/ethos-pdf@0.1.1", record)
self.assertNotIn("python3 -m pip install ethos-pdf==0.1.2", record)

def test_python_package_docs_remain_on_published_pypi_baseline(self) -> None:
for path in (PYTHON_README, PYTHON_QUICKSTART):
text = normalized(path)
self.assertIn(PYTHON_INSTALL, text)
self.assertNotIn("ethos-pdf==0.1.2", text)
self.assertIn("caller-provided local `ethos` CLI binary", text)
self.assertIn("does not bundle", text)
self.assertIn("ETHOS_PDFIUM_LIBRARY_PATH", text)
def test_record_preserves_python_baseline_at_time_of_closeout(self) -> None:
record = normalized(RECORD)

self.assertIn(PYTHON_INSTALL, record)
self.assertNotIn("python3 -m pip install ethos-pdf==0.1.2", record)

def test_status_docs_record_retained_rust_python_boundaries(self) -> None:
for path in (RECORD,):
Expand All @@ -125,16 +118,15 @@ def test_status_docs_record_retained_rust_python_boundaries(self) -> None:
self.assertIn("crates.io/PyPI `0.1.2` publication closeout records", text)

def test_boundaries_and_public_path_hygiene(self) -> None:
for path in (RECORD, PYTHON_README, PYTHON_QUICKSTART):
raw = read(path)
lower = re.sub(r"\s+", " ", raw).lower()
for forbidden in FORBIDDEN:
self.assertNotIn(forbidden, lower, str(path))
self.assertNotIn("/Users/", raw, str(path))
self.assertNotIn("/private/tmp", raw, str(path))
self.assertNotIn("/private/var", raw, str(path))
self.assertNotIn("/var/folders", raw, str(path))
self.assertNotIn("saumildiwaker", raw, str(path))
raw = read(RECORD)
lower = re.sub(r"\s+", " ", raw).lower()
for forbidden in FORBIDDEN:
self.assertNotIn(forbidden, lower)
self.assertNotIn("/Users/", raw)
self.assertNotIn("/private/tmp", raw)
self.assertNotIn("/private/var", raw)
self.assertNotIn("/var/folders", raw)
self.assertNotIn("saumildiwaker", raw)

def test_release_candidate_prep_runs_wording_guard_after_0_1_2_publication_closeouts(self) -> None:
makefile = read(MAKEFILE)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
#!/usr/bin/env python3
#
# Copyright 2026 The Ethos maintainers
#
# Licensed under the Apache License, Version 2.0 (the "License");
#

from __future__ import annotations

import json
import re
import subprocess
import unittest
from pathlib import Path

from makefile_guard import target_block


ROOT = Path(__file__).resolve().parents[2]
RECORD = ROOT / "docs/validation/patch-0-1-2-python-public-install-wording-closeout-validation-2026-06-25.md"
VALIDATION_README = ROOT / "docs/validation/README.md"
README = ROOT / "README.md"
PYTHON_README = ROOT / "python/README.md"
PYTHON_QUICKSTART = ROOT / "python/QUICKSTART.md"
CLAIMS = ROOT / "docs/public-boundary-claims.json"
EXECUTION_STATUS = ROOT / "docs/execution-status.md"
PUBLIC_RELEASE_CHECKLIST = ROOT / "docs/public-release-checklist.md"
MAKEFILE = ROOT / "Makefile"

SOURCE_SHORT = "67b499b"
SOURCE_COMMIT = "67b499bd68e1c060fb52e2b41f221c2895d16847"
SOURCE_TREE = "79e8bf0a145ee3e7bc7021c90fd0f1e1eb91880f"
PYTHON_INSTALL = "python3 -m pip install ethos-pdf==0.1.2"
OLD_PYTHON_INSTALL = "python3 -m pip install ethos-pdf==0.1.1"
CURRENT_PUBLIC_SENTENCE = (
"Ethos is a deterministic document evidence layer for source-grounded verification and "
"citation checking across native Ethos JSON and supported foreign parser outputs. The current "
"beta includes the GitHub source repository, Rust library crates `ethos-doc-core`, "
"`ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.2`, the "
"npm `@docushell/ethos-pdf@0.1.2` package, and GitHub Release `v0.1.2` macOS arm64/Linux x64 "
"CLI artifacts. PDFium-backed commands use caller-provided PDFium through "
"`ETHOS_PDFIUM_LIBRARY_PATH`."
)
FORBIDDEN = (
"production-ready",
"hosted surfaces approved",
"windows packaged artifacts approved",
"bundled pdfium approved",
"public benchmark claims approved",
"ethos-doc approved",
"ethos-rag approved",
)


def read(path: Path) -> str:
return path.read_text(encoding="utf-8")


def normalized(path: Path) -> str:
return re.sub(r"\s+", " ", read(path))


def normalized_public_readme() -> str:
return re.sub(
r"\s+",
" ",
" ".join(line.removeprefix("> ").strip() for line in read(README).splitlines()),
)


def git(*args: str) -> str:
return subprocess.check_output(
["git", *args],
cwd=ROOT,
encoding="utf-8",
stderr=subprocess.DEVNULL,
).strip()


class Patch012PythonPublicInstallWordingCloseoutTests(unittest.TestCase):
def test_record_is_source_bound_and_indexed(self) -> None:
record = normalized(RECORD)
validation_readme = normalized(VALIDATION_README)

self.assertIn(RECORD.name, validation_readme)
self.assertIn("patch 0.1.2 Python public install wording closeout", validation_readme)
self.assertIn(f"Validated source HEAD before this record: `{SOURCE_SHORT}`", read(RECORD))
self.assertIn(f"Patch 0.1.2 Python public install wording closeout source commit: `{SOURCE_COMMIT}`", record)
self.assertIn(f"Patch 0.1.2 Python public install wording closeout source tree: `{SOURCE_TREE}`", record)
self.assertEqual(SOURCE_COMMIT, git("rev-parse", SOURCE_SHORT))
self.assertEqual(SOURCE_TREE, git("rev-parse", f"{SOURCE_SHORT}^{{tree}}"))

def test_readme_and_python_docs_expose_published_python_wheel(self) -> None:
self.assertIn(CURRENT_PUBLIC_SENTENCE, normalized_public_readme())
for path in (README, PYTHON_README, PYTHON_QUICKSTART):
text = normalized(path)
self.assertIn(PYTHON_INSTALL, text, str(path))
self.assertNotIn(OLD_PYTHON_INSTALL, text, str(path))
self.assertIn("ETHOS_PDFIUM_LIBRARY_PATH", text, str(path))
for path in (PYTHON_README, PYTHON_QUICKSTART):
text = normalized(path)
self.assertIn("caller-provided local `ethos` CLI binary", text, str(path))
self.assertIn("does not bundle", text, str(path))

def test_public_boundary_claims_track_current_python_install_wording(self) -> None:
payload = json.loads(read(CLAIMS))
claims = payload["surfaces"]["readme"]["claims"]

for expected in (
CURRENT_PUBLIC_SENTENCE.split(". The current beta includes ")[0] + ".",
"The current beta includes the GitHub source repository, Rust library crates `ethos-doc-core`, `ethos-verify`, and `ethos-pdf` at `0.1.2`, the Python `ethos-pdf` wheel at `0.1.2`, the npm `@docushell/ethos-pdf@0.1.2` package, and GitHub Release `v0.1.2` macOS arm64/Linux x64 CLI artifacts.",
"PDFium-backed commands use caller-provided PDFium through `ETHOS_PDFIUM_LIBRARY_PATH`.",
"cargo add ethos-doc-core@0.1.2",
"cargo add ethos-verify@0.1.2",
"cargo add ethos-pdf@0.1.2",
PYTHON_INSTALL,
"The Python wheel is a thin wrapper around a caller-provided local `ethos` CLI binary.",
"It does not bundle the CLI or PDFium.",
"npm install -g @docushell/ethos-pdf@0.1.2",
"GitHub Release `v0.1.2` also provides evaluation CLI archives for macOS arm64 and Linux x64.",
):
self.assertIn(expected, claims)
self.assertNotIn(OLD_PYTHON_INSTALL, claims)

def test_status_docs_record_closeout_and_retained_boundaries(self) -> None:
for path in (EXECUTION_STATUS, PUBLIC_RELEASE_CHECKLIST):
text = normalized(path)
self.assertIn(RECORD.name, text, str(path))
self.assertIn("ethos-pdf==0.1.2", text, str(path))
self.assertIn("hosted", text.lower(), str(path))
self.assertIn("production", text.lower(), str(path))
self.assertIn("Windows packaged artifacts", text, str(path))
self.assertIn("bundled project-maintained PDFium", text, str(path))

def test_boundaries_and_public_path_hygiene(self) -> None:
for path in (RECORD, README, PYTHON_README, PYTHON_QUICKSTART, CLAIMS):
raw = read(path)
lower = re.sub(r"\s+", " ", raw).lower()
for forbidden in FORBIDDEN:
self.assertNotIn(forbidden, lower, str(path))
self.assertNotIn("/Users/", raw, str(path))
self.assertNotIn("/private/tmp", raw, str(path))
self.assertNotIn("/private/var", raw, str(path))
self.assertNotIn("/var/folders", raw, str(path))
self.assertNotIn("saumildiwaker", raw, str(path))

def test_release_candidate_prep_runs_python_wording_after_pypi_closeout(self) -> None:
makefile = read(MAKEFILE)
pypi_closeout_guard = "$(PYTHON) .github/scripts/test_patch_0_1_2_python_publication_closeout.py"
python_wording_guard = "$(PYTHON) .github/scripts/test_patch_0_1_2_python_public_install_wording_closeout.py"
first_public_guard = "$(PYTHON) .github/scripts/test_first_public_release_artifact_evidence.py"
block = target_block("release-candidate-prep")

self.assertIn(python_wording_guard, block)
self.assertEqual(1, makefile.count(python_wording_guard))
self.assertLess(block.index(pypi_closeout_guard), block.index(python_wording_guard))
self.assertLess(block.index(python_wording_guard), block.index(first_public_guard))


if __name__ == "__main__":
unittest.main()
1 change: 0 additions & 1 deletion .github/scripts/test_patch_0_1_2_readiness_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def test_prep_record_uses_professional_beta_wording_without_version_drift(self)

def test_package_manifests_do_not_rewrite_prep_record_boundary(self) -> None:
self.assertIn("current public install baseline remains `0.1.1`", normalized(RECORD))
self.assertNotIn("python3 -m pip install ethos-pdf==0.1.2", read(README))

def test_record_is_indexed_and_status_docs_reference_it(self) -> None:
record_name = RECORD.name
Expand Down
Loading
Loading