-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
189 lines (158 loc) · 8.02 KB
/
Copy pathMakefile
File metadata and controls
189 lines (158 loc) · 8.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
ROOT := $(CURDIR)
PYTHON ?= python3
CARGO_DENY ?= cargo deny
CARGO_DENY_ADVISORY ?= $(CARGO_DENY)
ADVISORY_RUSTUP_TOOLCHAIN ?= stable
THIRD_PARTY_MANIFEST_OUT ?= $(ROOT)/target/release-third-party/cargo-third-party-licenses.json
RELEASE_NOTICE_OUT ?= $(ROOT)/target/release-notice-draft
RELEASE_ARTIFACT_NAME ?= ethos-cli-draft
ETHOS_BIN ?= $(ROOT)/target/debug/ethos
VERIFY_ALPHA_OUT ?= $(ROOT)/target/verify-alpha
VERIFY_RENDERED_CROPS_OUT ?= $(ROOT)/target/verify-rendered-crops
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 evidence-anchor-v1-contract citation-emission-v1-contract rag-framework-examples trust-benchmark-corpus ethos-full-candidate-contract windows-verify-candidate-contract ethos-verify-action-contract light-check package-publication-dry-run-smoke verify-rendered-crops compare-rendered-crops layout-evaluator-alpha python-surface-test release-hygiene release-advisory third-party-license-manifest release-notice-draft
.PHONY: app-answer-release-contract app-answer-release-demo
.PHONY: frozen-record-guards release-state-check release-live-state-check registry-surface-check
.PHONY: validator-ceiling-check
.PHONY: release-gates
$(ETHOS_BIN):
cargo build --locked -p ethos-cli
# Publication gates. Parked out of CI during stealth (docs/ci-scope.md) because nothing
# is being published; run this before any real publish. Keep every parked gate reachable
# from here so nothing rots unnoticed.
release-gates:
$(MAKE) light-check
$(MAKE) registry-surface-check
$(MAKE) release-state-check
$(MAKE) frozen-record-guards
$(MAKE) release-hygiene
$(MAKE) ethos-full-candidate-contract
$(MAKE) windows-verify-candidate-contract
$(MAKE) package-publication-dry-run-smoke
$(PYTHON) .github/scripts/test_readiness_gate.py
$(PYTHON) .github/scripts/test_execution_status.py
$(PYTHON) .github/scripts/test_validation_record_source.py
$(PYTHON) .github/scripts/test_v0_6_0_version_activation.py
verify-alpha-tree:
cargo check --locked -p ethos-verify
cargo check --locked -p ethos-grounding-opendataloader-json
$(PYTHON) .github/scripts/check_verify_dependency_boundary.py
# Runs BOTH ceiling tests: the cheap `capabilities` all-false shape and the expensive
# spans + char_offsets shape. Release profile, because the ceiling describes that profile.
validator-ceiling-check:
ETHOS_CHECK_VALIDATOR_CEILING=1 cargo test --locked --release -p ethos-doc-core ceiling
verify-alpha: $(ETHOS_BIN)
cargo test --locked -p ethos-verify
cargo test --locked -p ethos-grounding-opendataloader-json
cargo test --locked -p ethos-cli --test verify
$(MAKE) verify-alpha-tree
$(PYTHON) schemas/validate_examples.py
$(PYTHON) examples/verify/check_verify_alpha.py --repo-root $(ROOT) --ethos-bin $(ETHOS_BIN) --out-dir $(VERIFY_ALPHA_OUT)
git diff --check
rag-chunk-alpha:
cargo test --locked -p ethos-cli --test rag
$(PYTHON) schemas/validate_examples.py
$(PYTHON) .github/scripts/test_rag_chunk_alpha.py
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
git diff --check
evidence-anchor-v1-contract:
cargo test --locked -p ethos-cli --test evidence_anchor
cargo test --locked -p ethos-grounding-opendataloader-json
$(PYTHON) schemas/validate_examples.py
$(PYTHON) .github/scripts/test_execution_status.py
$(PYTHON) .github/scripts/test_evidence_anchor_v1_contract.py
git diff --check
citation-emission-v1-contract:
cargo build --locked -p ethos-cli
$(PYTHON) schemas/validate_examples.py
$(PYTHON) .github/scripts/test_citation_emission_v1_contract.py
git diff --check
rag-framework-examples:
cargo build --locked -p ethos-cli
$(PYTHON) .github/scripts/test_rag_framework_examples.py
git diff --check
trust-benchmark-corpus: $(ETHOS_BIN)
$(PYTHON) .github/scripts/test_trust_benchmark_corpus.py --ethos $(ETHOS_BIN)
git diff --check
ethos-full-candidate-contract:
$(PYTHON) .github/scripts/test_ethos_full_candidate.py
windows-verify-candidate-contract:
$(PYTHON) .github/scripts/test_windows_verify_candidate.py
$(PYTHON) .github/scripts/test_release_artifact_workflow_prep.py
$(PYTHON) .github/scripts/test_release_reproducibility_scaffold.py
ethos-verify-action-contract:
$(PYTHON) -m unittest discover -s actions/verify/tests -p 'test_*.py'
app-answer-release-contract:
cargo test --locked -p ethos-doc-core --no-default-features --features verify-types app_answer_release
$(MAKE) python-surface-test PYTHON=$(PYTHON)
$(PYTHON) schemas/validate_examples.py
$(PYTHON) .github/scripts/test_app_answer_release_contract.py
$(PYTHON) .github/scripts/test_app_answer_release_demo.py
$(PYTHON) .github/scripts/claims_gate.py
$(PYTHON) .github/scripts/public_boundary_claims_gate.py
git diff --check
app-answer-release-demo:
$(PYTHON) .github/scripts/test_app_answer_release_demo.py
git diff --check
light-check:
$(PYTHON) .github/scripts/claims_gate.py
$(PYTHON) .github/scripts/public_boundary_claims_gate.py
$(PYTHON) .github/scripts/test_package_registry_source_consistency.py
$(PYTHON) .github/scripts/check_release_state.py --check
$(PYTHON) .github/scripts/test_public_surface_posture.py
$(PYTHON) .github/scripts/check_release_boundary_paths.py
$(PYTHON) .github/scripts/check_golden_change_rationale.py
$(PYTHON) .github/scripts/validation_record_integrity.py
git diff --check
registry-surface-check:
npm test --prefix packages/npm/ethos-pdf
$(PYTHON) .github/scripts/test_package_registry_source_consistency.py
$(PYTHON) .github/scripts/test_claims_gate_registry_surfaces.py
$(PYTHON) .github/scripts/claims_gate.py
$(PYTHON) .github/scripts/public_boundary_claims_gate.py
release-state-check:
$(PYTHON) .github/scripts/test_release_state.py
$(PYTHON) .github/scripts/test_github_release_metadata.py
$(PYTHON) .github/scripts/check_release_state.py --check
release-live-state-check: release-state-check
$(PYTHON) .github/scripts/check_github_release_metadata.py --repo docushell/ethos
frozen-record-guards:
$(PYTHON) .github/scripts/run_frozen_record_guards.py --python $(PYTHON)
package-publication-dry-run-smoke:
cargo package --locked --offline -p ethos-doc-core --allow-dirty --no-verify
cargo package --list --locked --offline -p ethos-doc-core --allow-dirty
cargo check --locked --offline -p ethos-verify
cargo check --locked --offline -p ethos-pdf
git diff --check
verify-rendered-crops: $(ETHOS_BIN)
$(PYTHON) examples/verify/check_rendered_crops.py --repo-root $(ROOT) --ethos-bin $(ETHOS_BIN) --out-dir $(VERIFY_RENDERED_CROPS_OUT)
git diff --check
compare-rendered-crops:
$(PYTHON) examples/verify/compare_rendered_crop_runs.py --left-run $(COMPARE_RENDERED_CROPS_LEFT) --right-run $(COMPARE_RENDERED_CROPS_RIGHT)
layout-evaluator-alpha:
$(PYTHON) fixtures/evaluate_layout_alpha.py --out $(LAYOUT_EVALUATOR_OUT)/report.json
$(PYTHON) fixtures/test_evaluate_layout_alpha.py
python-surface-test:
PYTHONPATH=$(ROOT)/python $(PYTHON) -m unittest discover -s python/tests
release-hygiene:
cargo metadata --locked --offline --format-version 1 --no-deps >/dev/null
$(CARGO_DENY) --version
$(CARGO_DENY) check licenses bans sources
git diff --check
release-advisory:
cargo +$(ADVISORY_RUSTUP_TOOLCHAIN) metadata --locked --offline --format-version 1 --no-deps >/dev/null
RUSTUP_TOOLCHAIN=$(ADVISORY_RUSTUP_TOOLCHAIN) $(CARGO_DENY_ADVISORY) --version
RUSTUP_TOOLCHAIN=$(ADVISORY_RUSTUP_TOOLCHAIN) $(CARGO_DENY_ADVISORY) check
git diff --check
third-party-license-manifest:
$(PYTHON) .github/scripts/generate_third_party_manifest.py --out $(THIRD_PARTY_MANIFEST_OUT)
release-notice-draft:
$(MAKE) third-party-license-manifest THIRD_PARTY_MANIFEST_OUT=$(THIRD_PARTY_MANIFEST_OUT)
$(PYTHON) .github/scripts/generate_release_notice_bundle.py --cargo-manifest $(THIRD_PARTY_MANIFEST_OUT) --out-dir $(RELEASE_NOTICE_OUT) --artifact-name $(RELEASE_ARTIFACT_NAME)