fix: reject modal P1 scope claims
This commit is contained in:
@@ -406,21 +406,35 @@ if not all(token in p1 for token in ("lexical URI", "Git tree", "same commit", "
|
||||
if not all(token in p6 for token in ("commit-addressed materialization", "realpath", "recursive containment", "nested-symlink", "race")):
|
||||
raise SystemExit("missing P6 materialization ownership")
|
||||
no_scope = "P1 performs no acquisition, extraction, preprocessing/indexing, embeddings, Qdrant writes, `ACTIVE` publication, retention, or GC."
|
||||
p1_adverbs = r"(?:\s+(?:also|then|now|directly|itself))*"
|
||||
p1_base_operation = r"""(?:
|
||||
acquire|materialize|extract|preprocess|index|retain|
|
||||
(?:create|generate)\s+embeddings?|
|
||||
write\s+(?:embeddings?\s+)?to\s+Qdrant|
|
||||
publish\s+`?ACTIVE\b`?|
|
||||
garbage[- ]collect|
|
||||
(?:run|perform)\s+(?:retention|GC|garbage[ -]collection)
|
||||
)"""
|
||||
p1_third_person_operation = r"""(?:
|
||||
acquires|materializes|extracts|preprocesses|indexes|retains|
|
||||
(?:creates|generates)\s+embeddings?|
|
||||
writes\s+(?:embeddings?\s+)?to\s+Qdrant|
|
||||
publishes\s+`?ACTIVE\b`?|
|
||||
garbage[- ]collects|
|
||||
(?:runs|performs)\s+(?:retention|GC|garbage[ -]collection)
|
||||
)"""
|
||||
p1_ownership = r"""(?:
|
||||
(?:owns|handles|performs)|is\s+responsible\s+for
|
||||
)\s+(?:Evidence\s+)?(?:
|
||||
acquisition|materialization|extraction|preprocessing|embeddings?|
|
||||
Qdrant\s+writes?|indexing|`?ACTIVE`?\s+publication|retention|GC|
|
||||
garbage[ -]collection
|
||||
)"""
|
||||
positive_p1_operation = re.compile(
|
||||
r"""\bP1\b(?:\s+(?:also|then|now|directly|itself))*\s+(?:
|
||||
(?:will\s+|must\s+|may\s+|can\s+)?(?:
|
||||
acquires?|materializes?|extracts?|preprocesses?|indexes?|retains?|
|
||||
(?:creates?|generates?)\s+embeddings?|
|
||||
writes?\s+(?:embeddings?\s+)?to\s+Qdrant|
|
||||
publishes?\s+`?ACTIVE\b`?|
|
||||
garbage[- ]collects?|
|
||||
(?:runs?|performs?)\s+(?:retention|GC|garbage[ -]collection)
|
||||
)|
|
||||
(?:owns?|handles?|performs?|is\s+responsible\s+for)\s+(?:Evidence\s+)?(?:
|
||||
acquisition|materialization|extraction|preprocessing|embeddings?|
|
||||
Qdrant\s+writes?|indexing|`?ACTIVE`?\s+publication|retention|GC|
|
||||
garbage[ -]collection
|
||||
)
|
||||
rf"""\bP1\b{p1_adverbs}\s+(?:
|
||||
(?:(?:can|may|must|will|should|does){p1_adverbs}\s+){p1_base_operation}|
|
||||
{p1_third_person_operation}|
|
||||
{p1_ownership}
|
||||
)\b""",
|
||||
re.IGNORECASE | re.VERBOSE,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user