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
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
#!/usr/bin/env python3
#
# Copyright 2026 The Ethos maintainers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under 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]
PREP = ROOT / "docs/milestone-e-package-publication-approval-prep.json"
RECORD = (
ROOT
/ "docs/validation/"
"milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md"
)
VALIDATION_README = ROOT / "docs/validation/README.md"
PREP_SCOPE = ROOT / "docs/milestone-e-prep-scope.md"
ROADMAP = ROOT / "docs/roadmap.md"
EXECUTION_STATUS = ROOT / "docs/execution-status.md"
CI_WORKFLOW = ROOT / ".github/workflows/ci.yml"

SOURCE_COMMIT = "66979ccce3585c6e99ace484350ea6f84816d046"
SOURCE_SHORT = "66979cc"
SOURCE_TREE = "58ef15e1cac8ce7df35a7e88da2044e57eb66c10"
REQUIRED_DECISION_FIELDS = [
"Decision: approve or reject.",
"Approver: named decider.",
"Date.",
"Exact candidate crate list.",
"Exact SemVer package version or exact per-crate version map.",
"Exact package tag name set.",
"Exact package tag source commit and source tree.",
"Exact package-name migration diff for `ethos-doc-core`.",
"Exact dependency manifest activation diff for `ethos-verify` and `ethos-pdf`.",
"Exact registry-backed dependent package assembly evidence after manifest activation.",
"Exact public installation wording.",
"Public-surface posture check result after exact wording changes.",
"Claims gate result after exact wording changes.",
"Milestone E prep result after the exact decision record.",
]
FORBIDDEN_SCOPE_EXPANSION = [
"public reports are approved",
"public result wording approved",
"release-ready",
"release artifact approved",
"package-ready",
"package publication is approved",
"package publication approved",
"packages are published",
"published packages",
"production-ready",
"production positioning approved",
"benchmark-validated",
"public benchmark pass",
"speed validated",
"fastest",
"launch-ready",
"hosted surface approved",
"hosted demo approved",
"demo-ready",
"performance validated",
"quality validated",
"footprint validated",
"table-quality validated",
"parser-quality validated",
]


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 load_json(path: Path) -> dict:
return json.loads(path.read_text(encoding="utf-8"))


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


class MilestoneEPackagePublicationApprovalDecisionTemplateTests(unittest.TestCase):
def test_decision_template_record_is_indexed_and_source_bound(self) -> None:
prep = load_json(PREP)
readme = read(VALIDATION_README)
record = normalized(RECORD)

self.assertIn(RECORD.name, readme)
self.assertIn("package publication approval decision template validation", readme)
self.assertEqual(
"docs/validation/"
"milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md",
prep["follow_up_records"]["package_approval_decision_template"],
)
self.assertIn(f"Validated source HEAD before this record: `{SOURCE_SHORT}`", read(RECORD))
self.assertIn(f"Approval decision template source commit: `{SOURCE_COMMIT}`", record)
self.assertIn(f"Approval decision template 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_template_requires_exact_decider_inputs_without_approval(self) -> None:
record = normalized(RECORD)

self.assertIn("Decision: **not approved pending exact decider input**", record)
for field in REQUIRED_DECISION_FIELDS:
self.assertIn(field, record)
self.assertIn("Candidate crate surface: `ethos-doc-core`, `ethos-verify`, and `ethos-pdf`", record)
self.assertIn("Candidate version map: `0.1.0`", record)
self.assertIn("Candidate public installation wording: reviewed for later approval only, not approved", record)
self.assertIn("this approval decision template does not approve package publication", record)
self.assertIn("this approval decision template does not approve public installation", record)
self.assertIn("exact decider approval remains required", record)
self.assertIn("package publication remains blocked", record)
self.assertIn("public installation remains blocked", record)

def test_current_manifests_tags_and_registry_state_stay_unactivated(self) -> None:
packet = load_json(PREP)["package_publication_decision_input_packet"]
core_manifest = read(ROOT / "crates/ethos-core/Cargo.toml")
verify_manifest = read(ROOT / "crates/ethos-verify/Cargo.toml")
pdf_manifest = read(ROOT / "crates/ethos-pdf/Cargo.toml")

for value in packet["candidate_package_tag_names"]:
tag = value.split(": ", maxsplit=1)[1].split(";", maxsplit=1)[0]
self.assertEqual("", git("tag", "--list", tag))
self.assertIn('name = "ethos-core"', core_manifest)
self.assertIn("publish = false", core_manifest)
self.assertIn("publish = false", verify_manifest)
self.assertIn("publish = false", pdf_manifest)
self.assertNotIn('package = "ethos-doc-core"', verify_manifest)
self.assertNotIn('package = "ethos-doc-core"', pdf_manifest)
self.assertFalse((ROOT / ".cargo/config.toml").exists())
self.assertFalse((ROOT / "target/package-registry").exists())

def test_docs_reference_template_and_retained_blockers(self) -> None:
for path in (PREP_SCOPE, ROADMAP, EXECUTION_STATUS, VALIDATION_README):
doc = normalized(path)

self.assertIn(RECORD.name, doc, str(path))
self.assertIn("approval decision template", doc.lower(), str(path))
self.assertIn("package publication remains blocked", doc, str(path))
self.assertIn("public installation remains blocked", doc, str(path))

def test_make_and_ci_run_template_after_wording_review(self) -> None:
make_block = target_block("milestone-e-prep")
ci = read(CI_WORKFLOW)
wording_guard = "test_milestone_e_package_publication_public_installation_wording_review.py"
template_guard = "test_milestone_e_package_publication_approval_decision_template.py"
public_facing_guard = "test_milestone_e_public_facing_readiness_ledger.py"

for text, prefix in ((make_block, "$(PYTHON) .github/scripts/"), (ci, "python3 .github/scripts/")):
self.assertIn(prefix + template_guard, text)
self.assertEqual(1, text.count(prefix + template_guard))
self.assertLess(text.index(prefix + wording_guard), text.index(prefix + template_guard))
self.assertLess(text.index(prefix + template_guard), text.index(prefix + public_facing_guard))

def test_record_avoids_scope_expansion_language_or_private_paths(self) -> None:
lower = normalized(RECORD).lower()
raw = read(RECORD)

for phrase in FORBIDDEN_SCOPE_EXPANSION:
self.assertNotIn(phrase, lower)
self.assertNotIn("/Users/", raw)
self.assertNotIn("/private/tmp", raw)
self.assertNotIn("/private/var", raw)
self.assertNotIn("/var/folders", raw)
self.assertNotIn("saumildiwaker", raw)
self.assertNotIn("Desktop/Stuff", raw)
self.assertNotIn("project/repo/ethos", raw)
self.assertNotIn("docs/.roadmap.md.swp", raw)
self.assertNotIn("web/", raw)


if __name__ == "__main__":
unittest.main()
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"package_manifest_activation_diff_review": "docs/validation/milestone-e-package-publication-manifest-activation-diff-review-validation-2026-06-21.md",
"package_registry_assembly_evidence_review": "docs/validation/milestone-e-package-publication-registry-assembly-evidence-review-validation-2026-06-21.md",
"package_public_installation_wording_review": "docs/validation/milestone-e-package-publication-public-installation-wording-review-validation-2026-06-21.md",
"package_approval_decision_template": "docs/validation/milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md",
}
EXPECTED_PUBLICATION_DECISION_INPUTS = {
"decision_status": "not_approved_pending_exact_decision",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_manifest_activation_diff_review.py",
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_registry_assembly_evidence_review.py",
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_public_installation_wording_review.py",
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_approval_decision_template.py",
"$(PYTHON) .github/scripts/test_milestone_e_public_facing_readiness_ledger.py",
"$(PYTHON) .github/scripts/test_milestone_e_public_beta_current_main_refresh_prep.py",
"$(PYTHON) .github/scripts/test_milestone_e_public_beta_current_main_source_only_approval.py",
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/test_milestone_e_prep_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ def test_make_target_is_narrow_and_guarded(self) -> None:
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_manifest_activation_diff_review.py",
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_registry_assembly_evidence_review.py",
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_public_installation_wording_review.py",
"$(PYTHON) .github/scripts/test_milestone_e_package_publication_approval_decision_template.py",
"$(PYTHON) .github/scripts/test_milestone_e_public_facing_readiness_ledger.py",
"$(PYTHON) .github/scripts/test_milestone_e_public_beta_current_main_refresh_prep.py",
"$(PYTHON) .github/scripts/test_milestone_e_public_beta_current_main_source_only_approval.py",
Expand Down
19 changes: 19 additions & 0 deletions .github/scripts/test_milestone_e_validation_record_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ class RecordCoverage:
"milestone-e-package-publication-public-installation-wording-review-validation-2026-06-21.md",
"test_milestone_e_package_publication_public_installation_wording_review.py",
),
RecordCoverage(
"milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md",
"test_milestone_e_package_publication_approval_decision_template.py",
),
RecordCoverage(
"milestone-e-public-facing-readiness-ledger-validation-2026-06-21.md",
"test_milestone_e_public_facing_readiness_ledger.py",
Expand Down Expand Up @@ -411,6 +415,9 @@ def test_index_guards_run_after_row_and_schema_records(self) -> None:
package_public_installation_wording_guard = (
"test_milestone_e_package_publication_public_installation_wording_review.py"
)
package_approval_decision_template_guard = (
"test_milestone_e_package_publication_approval_decision_template.py"
)
readiness_guard = "test_milestone_e_public_facing_readiness_ledger.py"
beta_refresh_guard = "test_milestone_e_public_beta_current_main_refresh_prep.py"
command_guard = "test_milestone_e_validation_command_index_validation_record.py"
Expand Down Expand Up @@ -495,6 +502,10 @@ def test_index_guards_run_after_row_and_schema_records(self) -> None:
)
self.assertLess(
text.index(prefix + package_public_installation_wording_guard),
text.index(prefix + package_approval_decision_template_guard),
)
self.assertLess(
text.index(prefix + package_approval_decision_template_guard),
text.index(prefix + readiness_guard),
)
self.assertLess(text.index(prefix + readiness_guard), text.index(prefix + beta_refresh_guard))
Expand All @@ -508,6 +519,14 @@ def test_index_guards_run_after_row_and_schema_records(self) -> None:
text.index(prefix + package_public_installation_wording_guard),
text.index(prefix + index_guard),
)
self.assertLess(
text.index(prefix + package_approval_decision_template_guard),
text.index(prefix + command_guard),
)
self.assertLess(
text.index(prefix + package_approval_decision_template_guard),
text.index(prefix + index_guard),
)
self.assertLess(
text.index(prefix + package_registry_evidence_review_guard),
text.index(prefix + command_guard),
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ jobs:
run: python3 .github/scripts/test_milestone_e_package_publication_registry_assembly_evidence_review.py
- name: Milestone E package publication public installation wording review tests
run: python3 .github/scripts/test_milestone_e_package_publication_public_installation_wording_review.py
- name: Milestone E package publication approval decision template tests
run: python3 .github/scripts/test_milestone_e_package_publication_approval_decision_template.py
- name: Milestone E public-facing readiness ledger tests
run: python3 .github/scripts/test_milestone_e_public_facing_readiness_ledger.py
- name: Milestone E public beta current-main refresh prep tests
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ milestone-e-prep:
$(PYTHON) .github/scripts/test_milestone_e_package_publication_manifest_activation_diff_review.py
$(PYTHON) .github/scripts/test_milestone_e_package_publication_registry_assembly_evidence_review.py
$(PYTHON) .github/scripts/test_milestone_e_package_publication_public_installation_wording_review.py
$(PYTHON) .github/scripts/test_milestone_e_package_publication_approval_decision_template.py
$(PYTHON) .github/scripts/test_milestone_e_public_facing_readiness_ledger.py
$(PYTHON) .github/scripts/test_milestone_e_public_beta_current_main_refresh_prep.py
$(PYTHON) .github/scripts/test_milestone_e_public_beta_current_main_source_only_approval.py
Expand Down
2 changes: 2 additions & 0 deletions docs/execution-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ The package publication registry-assembly evidence review in `docs/validation/mi

The package publication public installation wording review in `docs/validation/milestone-e-package-publication-public-installation-wording-review-validation-2026-06-21.md` records candidate wording and explicit exclusions against source commit `8b446e3` / tree `385dd7799cf898fc850555ce13d6d74e8ee15196`. The wording is not approved, package publication remains blocked, and public installation remains blocked.

The package publication approval decision template in `docs/validation/milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md` records exact future decider inputs against source commit `66979cc` / tree `58ef15e1cac8ce7df35a7e88da2044e57eb66c10`. No decision is approved, package publication remains blocked, and public installation remains blocked.

| Work item | Current status | Remaining blocker |
| --- | --- | --- |
| PDFium Phase 1 profile | Landed: pinned profile, V8/XFA-disabled state, platform hashes, runtime library hashes, and provenance are recorded | Phase 2 project-maintained builds still block Public Beta |
Expand Down
3 changes: 2 additions & 1 deletion docs/milestone-e-package-publication-approval-prep.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
"package_approval_readiness_review": "docs/validation/milestone-e-package-publication-approval-readiness-review-validation-2026-06-21.md",
"package_manifest_activation_diff_review": "docs/validation/milestone-e-package-publication-manifest-activation-diff-review-validation-2026-06-21.md",
"package_registry_assembly_evidence_review": "docs/validation/milestone-e-package-publication-registry-assembly-evidence-review-validation-2026-06-21.md",
"package_public_installation_wording_review": "docs/validation/milestone-e-package-publication-public-installation-wording-review-validation-2026-06-21.md"
"package_public_installation_wording_review": "docs/validation/milestone-e-package-publication-public-installation-wording-review-validation-2026-06-21.md",
"package_approval_decision_template": "docs/validation/milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md"
},
"publication_approval_decision_inputs": {
"decision_status": "not_approved_pending_exact_decision",
Expand Down
5 changes: 5 additions & 0 deletions docs/milestone-e-prep-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ The package publication public installation wording review is recorded in
It records candidate public installation wording and explicit exclusions for source commit
`8b446e3` / tree `385dd7799cf898fc850555ce13d6d74e8ee15196` while the wording is not approved,
package publication remains blocked, and public installation remains blocked.
The package publication approval decision template is recorded in
`docs/validation/milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md`.
It records the exact future decider inputs required after the wording review for source commit
`66979cc` / tree `58ef15e1cac8ce7df35a7e88da2044e57eb66c10` while no decision is approved,
package publication remains blocked, and public installation remains blocked.
The metadata-readiness follow-up record under `docs/validation/` covers README, NOTICE, manifest
metadata, and include-list readiness for `ethos-core`, `ethos-verify`, and `ethos-pdf` only.
`ethos-doc` and `ethos-rag` remain reserved placeholders without in-tree package manifests, and
Expand Down
5 changes: 5 additions & 0 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ The package publication public installation wording review is recorded in
for source commit `8b446e3` / tree `385dd7799cf898fc850555ce13d6d74e8ee15196`. Candidate
wording and explicit exclusions are recorded for later approval review only while package
publication remains blocked and public installation remains blocked.
The package publication approval decision template is recorded in
[`docs/validation/milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md`](validation/milestone-e-package-publication-approval-decision-template-validation-2026-06-21.md)
for source commit `66979cc` / tree `58ef15e1cac8ce7df35a7e88da2044e57eb66c10`. The template
lists the exact future decider inputs required after the wording review while package publication
remains blocked and public installation remains blocked.
This prep only identifies tracked trust-loop fixture candidates and guard wiring for internal
continuation; blocked-output alignment keeps the current trust-loop protocol, rehearsal/evidence
matrix, blocker ledger, and matching schemas on the same explicit blockers, while evidence-lane
Expand Down
Loading
Loading