Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ec416b3
Ground security report span previews
Jun 17, 2026
103e722
Validate security report artifact identity
Jun 17, 2026
b010402
Validate security report finding ids
Jun 17, 2026
2c63475
Validate security report finding messages
Jun 17, 2026
fb741ed
Validate security report exclusion flags
Jun 17, 2026
78cbfee
Validate security report span ownership
Jun 17, 2026
b926224
Add source-only security report command
Jun 17, 2026
ea0cfad
Validate security report page and bbox grounding
Jun 17, 2026
c2fce0d
Fail closed on security report warning lane drift
Jun 17, 2026
295df84
Align security report validator warning lanes
Jun 17, 2026
8b0b8cb
Reject stale security report summary drift
Jun 17, 2026
11ef0ed
Validate unsupported annotation report parity
Jun 17, 2026
7536919
Require security report inventory lanes
Jun 17, 2026
2216b3c
Validate unsupported annotation finding messages
Jun 17, 2026
9ad4c12
Validate image-only page finding messages
Jun 17, 2026
7b6e1f6
Validate text exclusion finding messages
Jun 17, 2026
6e1d03a
Validate security warning source messages
Jun 17, 2026
8a4a9b9
Validate security report finding codes
Jun 17, 2026
d2a3152
Validate security report inventory fields
Jun 17, 2026
433651f
Validate security report envelope fields
Jun 17, 2026
1efb57a
Validate security report finding fields
Jun 17, 2026
9f0a404
Validate security report unexpected fields
Jun 17, 2026
cf5b6cb
Reject boolean security report bbox coordinates
Jun 17, 2026
8f9e359
Validate security report summary counts
Jun 17, 2026
9c70faf
Validate security report attachment byte counts
Jun 17, 2026
154aad6
Validate security report boolean fields
Jun 17, 2026
e6a87f2
Validate security report script locations
Jun 17, 2026
fa1a4fb
Validate security report attachment digests
Jun 17, 2026
d22fa76
Validate security report array items
Jun 17, 2026
3f6ad27
Validate security report inventory strings
Jun 17, 2026
df77b27
Validate security report identity patterns
Jun 17, 2026
5ad1262
Validate security report finding strings
Jun 17, 2026
439151a
Validate security report page locators
Jun 17, 2026
a06a842
Validate security report locator refs
Jun 17, 2026
198fe3f
Validate security report finding ids
Jun 17, 2026
523a9b0
Harden security report script locations
Jun 17, 2026
0a15c97
Harden security report code diagnostics
Jun 17, 2026
fbcd5ff
Validate null security report pages
Jun 17, 2026
4a5fb6d
Validate security report script triggers
Jun 17, 2026
7c93927
Validate null security report locators
Jun 17, 2026
2b431ca
Validate security report inventory kinds
Jun 17, 2026
da4106e
Split security report code diagnostics
Jun 17, 2026
0b4a347
Require security warning codes
Jun 17, 2026
a619939
Validate security warning locator shapes
Jun 17, 2026
78f3dda
Split security warning message diagnostics
Jun 17, 2026
7537634
Validate document warning ids
Jun 17, 2026
79964a4
Validate parser warning messages
Jun 17, 2026
52613f3
Reject duplicate warning ids
Jun 18, 2026
91922a6
Enforce deterministic warning numbering
Jun 18, 2026
4f2bf22
Add Milestone C internal checks
Jun 18, 2026
a0fe7a2
Ground security warning locators
Jun 18, 2026
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
83 changes: 83 additions & 0 deletions .github/scripts/test_milestone_c_internal_checks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/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 unittest
from pathlib import Path


ROOT = Path(__file__).resolve().parents[2]
MAKEFILE = ROOT / "Makefile"


def makefile_text() -> str:
return MAKEFILE.read_text(encoding="utf-8")


def target_block(target: str) -> str:
lines = makefile_text().splitlines()
start = None
for index, line in enumerate(lines):
if line == f"{target}:":
start = index + 1
break
if start is None:
raise AssertionError(f"{target} target is missing")

block: list[str] = []
for line in lines[start:]:
if line and not line.startswith(("\t", " ")):
break
block.append(line)
return "\n".join(block)


class MilestoneCInternalCheckTests(unittest.TestCase):
def test_target_is_declared_phony(self) -> None:
text = makefile_text()

self.assertIn(".PHONY:", text)
self.assertIn("milestone-c-internal-checks", text)

def test_target_composes_current_artifact_gates(self) -> None:
block = target_block("milestone-c-internal-checks")

required = [
"$(MAKE) rag-chunk-alpha PYTHON=$(PYTHON)",
"$(MAKE) security-report-alpha PYTHON=$(PYTHON)",
"$(PYTHON) .github/scripts/test_milestone_c_internal_checks.py",
"git diff --check",
]
for command in required:
self.assertIn(command, block)

def test_target_stays_current_artifact_scoped(self) -> None:
block = target_block("milestone-c-internal-checks")

self.assertNotIn("verify-alpha", block)
self.assertNotIn("layout-evaluator-alpha", block)
self.assertNotIn("python-surface-test", block)
self.assertNotIn("verify-rendered-crops", block)
self.assertNotIn("compare-rendered-crops", block)
self.assertNotIn("release-", block)
self.assertNotIn("third-party-license-manifest", block)
self.assertNotIn("release-notice-draft", block)


if __name__ == "__main__":
unittest.main()
4 changes: 3 additions & 1 deletion .github/scripts/test_security_report_alpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def test_target_composes_security_report_artifact_gates(self) -> None:
block = target_block("security-report-alpha")

required = [
"cargo test --locked -p ethos-cli --test security_report",
"$(PYTHON) schemas/validate_examples.py",
"$(PYTHON) schemas/test_security_report_validation.py",
"$(PYTHON) .github/scripts/test_security_report_alpha.py",
Expand All @@ -69,7 +70,8 @@ def test_target_composes_security_report_artifact_gates(self) -> None:
def test_target_stays_security_report_scoped(self) -> None:
block = target_block("security-report-alpha")

self.assertNotIn("cargo test", block)
self.assertNotIn("cargo test --locked -p ethos-cli --test rag", block)
self.assertNotIn("cargo test --locked -p ethos-cli --test verify", block)
self.assertNotIn("rag-chunk-alpha", block)
self.assertNotIn("layout-evaluator-alpha", block)
self.assertNotIn("python-surface-test", block)
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COMPARE_RENDERED_CROPS_LEFT ?= $(VERIFY_RENDERED_CROPS_OUT)/run1
COMPARE_RENDERED_CROPS_RIGHT ?= $(VERIFY_RENDERED_CROPS_OUT)/run2
LAYOUT_EVALUATOR_OUT ?= $(ROOT)/target/layout-evaluator-alpha

.PHONY: verify-alpha verify-alpha-tree rag-chunk-alpha security-report-alpha verify-rendered-crops compare-rendered-crops layout-evaluator-alpha python-surface-test milestone-b-internal-checks release-hygiene release-advisory third-party-license-manifest release-notice-draft
.PHONY: verify-alpha verify-alpha-tree rag-chunk-alpha security-report-alpha verify-rendered-crops compare-rendered-crops layout-evaluator-alpha python-surface-test milestone-b-internal-checks milestone-c-internal-checks release-hygiene release-advisory third-party-license-manifest release-notice-draft

$(ETHOS_BIN):
cargo build --locked -p ethos-cli
Expand Down Expand Up @@ -41,6 +41,7 @@ rag-chunk-alpha:
git diff --check

security-report-alpha:
cargo test --locked -p ethos-cli --test security_report
$(PYTHON) schemas/validate_examples.py
$(PYTHON) schemas/test_security_report_validation.py
$(PYTHON) .github/scripts/test_security_report_alpha.py
Expand Down Expand Up @@ -76,6 +77,12 @@ milestone-b-internal-checks:
$(PYTHON) .github/scripts/readiness_gate.py public
git diff --check

milestone-c-internal-checks:
$(MAKE) rag-chunk-alpha PYTHON=$(PYTHON)
$(MAKE) security-report-alpha PYTHON=$(PYTHON)
$(PYTHON) .github/scripts/test_milestone_c_internal_checks.py
git diff --check

release-hygiene:
cargo metadata --locked --offline --format-version 1 --no-deps >/dev/null
$(CARGO_DENY) --version
Expand Down
1 change: 1 addition & 0 deletions crates/ethos-cli/src/cmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@

pub(crate) mod doc;
pub(crate) mod rag;
pub(crate) mod security;
pub(crate) mod verify;
Loading
Loading