1- # SPDX-License-Identifier: PMPL-1.0-or-later
1+ # SPDX-License-Identifier: MPL-2.0
22# HYP-S005 — CRG Overclaim Detector
33# Flags repos self-declaring a CRG grade that lacks the evidence artefacts
44# required by CRG v2.0 (STRICT). Sibling rule to HYP-S001 (demotion detector):
@@ -162,7 +162,11 @@ sections:
162162#
163163# Contradiction rule: a repo cannot self-consistently claim C (or higher) if
164164# its own metadata says it is <50% complete and pre-0.5.0. Either the grade
165- # is wrong, the version is wrong, or the completion-percentage is wrong.
165+ # is wrong, the version is wrong, or the completion score is wrong.
166+ #
167+ # Canonical field: `overall-completion` in STATE.a2ml. A legacy
168+ # `completion-percentage` field may still appear in older snapshots, but it is
169+ # not the primary schema key and must not be required for modern repos.
166170# The audit convention is: trust version + completion, demote the grade.
167171#
168172# This fires BEFORE the file-tree evidence checks; if it fires, a full audit
@@ -173,8 +177,8 @@ grade_ge_c_but_early_stage:
173177 parse_state.crg-grade IN {"C", "B", "A"}
174178 AND parse_state.version < "0.5.0"
175179 AND (
176- parse_state.completion-percentage < 50
177- OR parse_state.completion-percentage IS empty_or_absent
180+ parse_state.overall-completion < 50
181+ OR parse_state.overall-completion IS empty_or_absent
178182 )
179183 AND parse_state.dogfooding-status IS empty_or_absent
180184 severity: high
@@ -194,13 +198,13 @@ grade_ge_c_but_missing_self_consistency_inputs:
194198 parse_state.crg-grade IN {"C", "B", "A"}
195199 AND (
196200 parse_state.version IS empty_or_absent
197- OR parse_state.completion-percentage IS empty_or_absent
201+ OR parse_state.overall-completion IS empty_or_absent
198202 )
199203 severity: high
200204 finding_kind: self-inconsistent-claim
201205 message: >-
202206 {component} claims {declared} but STATE.a2ml is missing version and/or
203- completion-percentage . The CRG self-consistency precheck cannot run
207+ overall-completion . The CRG self-consistency precheck cannot run
204208 without these keys — treat this as a structural overclaim until state
205209 metadata is completed.
206210
0 commit comments