Merge nucleic/sleek-ember-seal-uady into dev

This commit is contained in:
2026-07-30 05:04:34 -07:00
parent 9c43be6df1
commit 93e9c838bb
17 changed files with 1802 additions and 83 deletions
+20
View File
@@ -84,6 +84,26 @@ class CurationTests(unittest.TestCase):
near_duplicate_threshold=0.92,
)
def test_reviewed_semantic_exclusions_fail_closed_on_corpus_drift(self):
first = source(example(0, prompt="Plan the cache migration", purpose="planning"), 1)
second = source(
example(1, prompt="Propose a cache migration plan", purpose="planning"), 2
)
decision = {
"droppedPromptHash": purpose_data.prompt_hash(second.value["prompt"]),
"matchedPromptHash": purpose_data.prompt_hash(first.value["prompt"]),
"similarity": 0.98,
}
result = purpose_data.exclude_reviewed_duplicates(
[first, second], [decision]
)
self.assertEqual([first], result.records)
self.assertEqual("semantic-reviewed", result.duplicates[0].kind)
with self.assertRaisesRegex(
purpose_data.DataError, "no longer matches the curated corpus"
):
purpose_data.exclude_reviewed_duplicates([first], [decision])
class SplitTests(unittest.TestCase):
def test_split_is_deterministic_stratified_and_keeps_vague_out_of_train(self):