From 5079f74652f46c433cc1f5a2840008b19e6d531b Mon Sep 17 00:00:00 2001 From: docushell-admin Date: Wed, 24 Jun 2026 11:06:38 +0530 Subject: [PATCH] Request patch 0.1.1 deterministic Python wheel approval Signed-off-by: docushell-admin --- ...on_deterministic_wheel_approval_request.py | 141 ++++++++++++++++ .../scripts/test_release_candidate_prep.py | 1 + CHANGELOG.md | 1 + Makefile | 1 + docs/validation/README.md | 5 + ...-approval-request-validation-2026-06-24.md | 156 ++++++++++++++++++ 6 files changed, 305 insertions(+) create mode 100644 .github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py create mode 100644 docs/validation/patch-0-1-1-python-deterministic-wheel-approval-request-validation-2026-06-24.md diff --git a/.github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py b/.github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py new file mode 100644 index 0000000..85f9a7b --- /dev/null +++ b/.github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py @@ -0,0 +1,141 @@ +#!/usr/bin/env python3 +# +# Copyright 2026 The Ethos maintainers +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# + +from __future__ import annotations + +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-1-python-deterministic-wheel-approval-request-validation-2026-06-24.md" +BLOCKER = ROOT / "docs/validation/patch-0-1-1-python-wheel-reproducibility-blocker-validation-2026-06-24.md" +VALIDATION_README = ROOT / "docs/validation/README.md" +MAKEFILE = ROOT / "Makefile" + +SOURCE_SHORT = "d3e3953" +SOURCE_COMMIT = "d3e3953b99fbc74669f82ee56b753de7db6e63e4" +SOURCE_TREE = "8920cbc9bc6ae05ec0c417533513637eda12658d" +PACKAGE = "ethos-pdf==0.1.1" +WHEEL = "ethos_pdf-0.1.1-py3-none-any.whl" +DETERMINISTIC_SHA256 = "e0292276e711e75d4f7e1bb8c2c6137c6e89d4c343dd308943eb9b22094ea451" +PRIOR_APPROVED_SHA256 = "faa6c4751341b603b986ad3cf65d3c0c2f574e5df1d7232f76c3afd0221dac14" +FRESH_STANDARD_SHA256 = "52cc738637a84aa084b776db8be866e7af7438d580f3d564801a2ce94492a950" +FORBIDDEN = ( + "pypi upload approved", + "pypi publication approved", + "python package is published", + "wheel is published", + "twine upload approved", + "production-ready", + "hosted surfaces approved", + "windows packaged artifacts approved", + "bundled pdfium 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 git(*args: str) -> str: + return subprocess.check_output( + ["git", *args], + cwd=ROOT, + encoding="utf-8", + stderr=subprocess.DEVNULL, + ).strip() + + +class Patch011PythonDeterministicWheelApprovalRequestTests(unittest.TestCase): + def test_request_record_is_source_bound_and_indexed(self) -> None: + record = normalized(RECORD) + readme = normalized(VALIDATION_README) + + self.assertIn(RECORD.name, readme) + self.assertIn("patch 0.1.1 Python deterministic wheel approval request", readme) + self.assertIn(f"Validated source HEAD before this record: `{SOURCE_SHORT}`", read(RECORD)) + self.assertIn(f"Patch 0.1.1 Python deterministic wheel approval request source commit: `{SOURCE_COMMIT}`", record) + self.assertIn(f"Patch 0.1.1 Python deterministic wheel approval request 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_request_names_exact_deterministic_candidate_and_metadata(self) -> None: + record = normalized(RECORD) + + for expected in ( + BLOCKER.name, + PACKAGE, + WHEEL, + DETERMINISTIC_SHA256, + PRIOR_APPROVED_SHA256, + FRESH_STANDARD_SHA256, + "SOURCE_DATE_EPOCH=0", + "Name: `ethos-pdf`", + "Version: `0.1.1`", + "License-Expression: `Apache-2.0`", + "Requires-Python: `>=3.8`", + "Wheel-Version: `1.0`", + "Root-Is-Purelib: `true`", + "Tag: `py3-none-any`", + "member timestamps: `1980-01-01 00:00:00`", + "version `0.1.1`", + "EthosCli", + "EthosCommandError", + ): + self.assertIn(expected, record) + + def test_request_requires_decision_and_keeps_upload_blocked(self) -> None: + raw = read(RECORD) + record = normalized(RECORD) + lower = record.lower() + + for expected in ( + "Manual action is required before any PyPI upload.", + "A decider must accept or reject this exact deterministic request packet.", + "This request record does not approve PyPI upload.", + "This request record does not upload any Python distribution.", + "This request record does not approve the deterministic wheel hash.", + "Actual PyPI upload remains blocked pending explicit decider approval.", + "Public installation wording remains blocked pending PyPI availability closeout.", + "PDFium remains caller-provided through `ETHOS_PDFIUM_LIBRARY_PATH`.", + ): + self.assertIn(expected, record) + for forbidden in FORBIDDEN: + self.assertNotIn(forbidden, lower) + self.assertNotIn("/Users/", raw) + self.assertNotIn("/tmp", 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_request_guard_after_blocker_guard(self) -> None: + makefile = read(MAKEFILE) + blocker_guard = "$(PYTHON) .github/scripts/test_patch_0_1_1_python_wheel_reproducibility_blocker.py" + guard = "$(PYTHON) .github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py" + npm_guard = "$(PYTHON) .github/scripts/test_npm_binary_package_scaffold.py" + block = target_block("release-candidate-prep") + + self.assertIn(guard, block) + self.assertEqual(1, makefile.count(guard)) + self.assertLess(block.index(blocker_guard), block.index(guard)) + self.assertLess(block.index(guard), block.index(npm_guard)) + + +if __name__ == "__main__": + unittest.main() diff --git a/.github/scripts/test_release_candidate_prep.py b/.github/scripts/test_release_candidate_prep.py index 47c8a91..825efa5 100644 --- a/.github/scripts/test_release_candidate_prep.py +++ b/.github/scripts/test_release_candidate_prep.py @@ -33,6 +33,7 @@ "$(PYTHON) .github/scripts/test_patch_0_1_1_python_publication_approval_request.py", "$(PYTHON) .github/scripts/test_patch_0_1_1_python_publication_approval_decision.py", "$(PYTHON) .github/scripts/test_patch_0_1_1_python_wheel_reproducibility_blocker.py", + "$(PYTHON) .github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py", "$(PYTHON) .github/scripts/test_npm_binary_package_scaffold.py", "npm test --prefix packages/npm/ethos-pdf", "$(PYTHON) .github/scripts/test_npm_vendor_binary_payload_strategy.py", diff --git a/CHANGELOG.md b/CHANGELOG.md index 4feec82..0c0b9c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- boundary-exception: request exact patch `0.1.1` deterministic Python PyPI wheel approval for decider review; no PyPI upload or support-boundary change. - boundary-exception: record patch `0.1.1` Python wheel reproducibility blocker after pre-upload hash mismatch; no PyPI upload or support-boundary change. - boundary-exception: approve exact patch `0.1.1` Python PyPI wheel publication decision for later operator upload; no PyPI upload or support-boundary change. - boundary-exception: request exact patch `0.1.1` Python PyPI wheel publication approval for decider review; no PyPI upload or support-boundary change. diff --git a/Makefile b/Makefile index 2b24f1b..098106c 100644 --- a/Makefile +++ b/Makefile @@ -275,6 +275,7 @@ release-candidate-prep: $(PYTHON) .github/scripts/test_patch_0_1_1_python_publication_approval_request.py $(PYTHON) .github/scripts/test_patch_0_1_1_python_publication_approval_decision.py $(PYTHON) .github/scripts/test_patch_0_1_1_python_wheel_reproducibility_blocker.py + $(PYTHON) .github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py $(PYTHON) .github/scripts/test_npm_binary_package_scaffold.py npm test --prefix packages/npm/ethos-pdf $(PYTHON) .github/scripts/test_npm_vendor_binary_payload_strategy.py diff --git a/docs/validation/README.md b/docs/validation/README.md index 1dcdffd..b5b0e2f 100644 --- a/docs/validation/README.md +++ b/docs/validation/README.md @@ -627,6 +627,11 @@ recording the exact current-main source candidate and required follow-up evidenc Python wheel reproducibility blocker validation records that a fresh standard pre-upload rebuild did not match the approved wheel SHA256 because generated ZIP timestamps drifted; PyPI upload remains blocked pending a deterministic wheel approval request and decision. +- `patch-0-1-1-python-deterministic-wheel-approval-request-validation-2026-06-24.md` - patch + 0.1.1 Python deterministic wheel approval request validation binds the exact + `SOURCE_DATE_EPOCH=0` `ethos-pdf==0.1.1` wheel candidate, source commit, wheel metadata, + deterministic SHA256, local install/import smoke, and retained blockers for decider review; PyPI + upload remains blocked. - `milestone-e-validation-command-index-validation-2026-06-20.md` - internal Milestone E validation-command index validation passed through command-alignment checks, schema enum checks, row-record checks, public-surface posture checks, `make milestone-e-prep`, and diff hygiene; the diff --git a/docs/validation/patch-0-1-1-python-deterministic-wheel-approval-request-validation-2026-06-24.md b/docs/validation/patch-0-1-1-python-deterministic-wheel-approval-request-validation-2026-06-24.md new file mode 100644 index 0000000..24f4c1e --- /dev/null +++ b/docs/validation/patch-0-1-1-python-deterministic-wheel-approval-request-validation-2026-06-24.md @@ -0,0 +1,156 @@ +# Patch 0.1.1 Python Deterministic Wheel Approval Request Validation - 2026-06-24 + +Validated source HEAD before this record: `d3e3953`. + +Patch 0.1.1 Python deterministic wheel approval request source commit: +`d3e3953b99fbc74669f82ee56b753de7db6e63e4`. + +Patch 0.1.1 Python deterministic wheel approval request source tree: +`8920cbc9bc6ae05ec0c417533513637eda12658d`. + +Status: **patch 0.1.1 Python deterministic wheel approval request recorded; PyPI upload remains blocked** + +This record requests decider review for publishing exactly the deterministic patch `0.1.1` Ethos +Python wheel to PyPI. It replaces the timestamp-sensitive wheel hash from the prior request with a +wheel built using `SOURCE_DATE_EPOCH=0`. It does not approve or perform PyPI upload, create package +tags, change public wording, approve hosted surfaces, approve production positioning, approve +Windows packaged artifacts, approve bundled project-maintained PDFium builds, approve `ethos-doc`, +approve `ethos-rag`, or approve public benchmark reports or claims. + +## Subject + +- Repository: `docushell/ethos` +- Lane: Python PyPI deterministic wheel publication +- Prior blocker record: + `docs/validation/patch-0-1-1-python-wheel-reproducibility-blocker-validation-2026-06-24.md` +- Candidate package: `ethos-pdf==0.1.1` +- Import package: `ethos_pdf` +- Candidate wheel: `ethos_pdf-0.1.1-py3-none-any.whl` +- Deterministic build input: `SOURCE_DATE_EPOCH=0` +- Deterministic candidate wheel SHA256: + `e0292276e711e75d4f7e1bb8c2c6137c6e89d4c343dd308943eb9b22094ea451` + +## Superseded Hash Context + +- Prior timestamp-sensitive approved wheel SHA256: + `faa6c4751341b603b986ad3cf65d3c0c2f574e5df1d7232f76c3afd0221dac14` +- Fresh standard pre-upload rebuild SHA256: + `52cc738637a84aa084b776db8be866e7af7438d580f3d564801a2ce94492a950` +- The blocker record classified the difference as generated ZIP timestamp drift with identical + wheel member bytes. + +## Exact Request Fields + +- Decision requested: approve exact deterministic patch `0.1.1` Python PyPI wheel publication + preparation inputs for later operator execution. +- Approver requested: `docushell-admin` acting as decider. +- Date requested: 2026-06-24. +- Exact package requested: `ethos-pdf==0.1.1`. +- Exact distribution requested: `ethos_pdf-0.1.1-py3-none-any.whl` only. +- Exact deterministic build input requested: `SOURCE_DATE_EPOCH=0`. +- Exact source commit requested: `d3e3953b99fbc74669f82ee56b753de7db6e63e4`. +- Exact source tree requested: `8920cbc9bc6ae05ec0c417533513637eda12658d`. +- Exact deterministic wheel SHA256 requested: + `e0292276e711e75d4f7e1bb8c2c6137c6e89d4c343dd308943eb9b22094ea451`. + +## Wheel Metadata Bound To This Request + +- Name: `ethos-pdf` +- Version: `0.1.1` +- Summary: `Python wrapper for the Ethos document evidence CLI.` +- License-Expression: `Apache-2.0` +- Requires-Python: `>=3.8` +- Wheel-Version: `1.0` +- Root-Is-Purelib: `true` +- Tag: `py3-none-any` +- Wheel member timestamps: `1980-01-01 00:00:00` + +Wheel file list: + +- `ethos_pdf/__init__.py` +- `ethos_pdf/_cli.py` +- `ethos_pdf-0.1.1.dist-info/METADATA` +- `ethos_pdf-0.1.1.dist-info/RECORD` +- `ethos_pdf-0.1.1.dist-info/WHEEL` +- `ethos_pdf-0.1.1.dist-info/licenses/LICENSE` +- `ethos_pdf-0.1.1.dist-info/licenses/NOTICE` +- `ethos_pdf-0.1.1.dist-info/top_level.txt` + +## Local Evidence Bound To This Request + +- `SOURCE_DATE_EPOCH=0 python3 -m build --wheel --outdir ` built + `ethos_pdf-0.1.1-py3-none-any.whl` twice in isolated build environments. +- Both deterministic builds produced SHA256 + `e0292276e711e75d4f7e1bb8c2c6137c6e89d4c343dd308943eb9b22094ea451`. +- Wheel metadata inspection reported `Name: ethos-pdf`, `Version: 0.1.1`, + `License-Expression: Apache-2.0`, `Requires-Python: >=3.8`, and `Tag: py3-none-any`. +- Wheel ZIP member timestamp inspection reported `1980-01-01 00:00:00` for every member. +- Local install smoke used `python3 -m pip install --no-deps --force-reinstall `. +- Import smoke reported version `0.1.1`. +- Import smoke resolved `EthosCli`. +- Import smoke resolved `EthosCommandError`. + +## Manual Decision Gate + +Manual action is required before any PyPI upload. A decider must accept or reject this exact +deterministic request packet. Only after that decision record passes may an operator upload the +exact deterministic wheel named above with the exact SHA256 named above. + +This request does not select an sdist, alternate wheel, additional package name, additional Python +module, or broad package-publication class. If any artifact filename, version, hash, source commit, +source tree, metadata, build input, public wording, or blocker set changes, this request must be +replaced by a new evidence record and a new decider review. + +## Non-Approvals + +- This request record does not approve PyPI upload. +- This request record does not upload any Python distribution. +- This request record does not approve the deterministic wheel hash. +- This request record does not approve an sdist. +- This request record does not approve another wheel. +- This request record does not approve package tags. +- This request record does not approve public installation wording. +- This request record does not approve hosted surfaces. +- This request record does not approve production positioning. +- This request record does not approve Windows packaged artifacts. +- This request record does not approve bundled project-maintained PDFium builds. +- This request record does not approve public benchmark reports. +- This request record does not approve public benchmark claims. +- This request record does not approve `ethos-doc`. +- This request record does not approve `ethos-rag`. + +## Retained Blockers + +- Actual PyPI upload remains blocked pending explicit decider approval. +- Public installation wording remains blocked pending PyPI availability closeout. +- Package tag creation remains blocked pending explicit decider approval. +- Hosted surfaces remain blocked. +- Production positioning remains blocked. +- Public benchmark reports remain blocked. +- Public benchmark claims remain blocked. +- Windows packaged artifacts remain blocked. +- Bundled project-maintained PDFium builds remain blocked. +- `ethos-doc` remains blocked. +- `ethos-rag` remains blocked. +- PDFium remains caller-provided through `ETHOS_PDFIUM_LIBRARY_PATH`. + +## Commands + +```sh +SOURCE_DATE_EPOCH=0 python3 -m build --wheel --outdir +shasum -a 256 /ethos_pdf-0.1.1-py3-none-any.whl +python3 .github/scripts/test_patch_0_1_1_python_deterministic_wheel_approval_request.py +python3 .github/scripts/test_patch_0_1_1_python_wheel_reproducibility_blocker.py +python3 .github/scripts/test_python_public_api_policy.py +PYTHONPATH=python python3 -m unittest discover -s python/tests +make release-candidate-prep PYTHON=python3 +git diff --check +``` + +## Result + +```text +patch 0.1.1 Python deterministic wheel approval request recorded +Exact deterministic wheel, build input, source binding, metadata, SHA256, local install/import smoke, and retained blockers were recorded +PyPI upload remains blocked pending explicit decider approval and later operator action +```