Commit af4df98
committed
test(safety): pin that safety calls are identical across stereoisomers
Food-use status, the structural-alert screen and the Tox21 heads all key on
CONNECTIVITY, not stereochemistry — food-use listings key on the InChIKey skeleton
(first block), and the Morgan fingerprint the tox heads read is generated without
chirality. So a listing or a tox flag on carvone necessarily covers both (R)- and
(S)-carvone. That is correct — a regulator lists the substance, not one enantiomer —
but nothing pinned it, and chirality-aware reads (#218) would touch exactly this
machinery. Without a test, a future change could silently split safety by
stereochemistry and under-report a hazard.
Five assertions over three classic enantiomer pairs (carvone, limonene, menthol):
the pairs are genuinely distinct molecules that share a skeleton, and their food-use
status, structural alerts, per-assay tox probabilities and assembled safety block all
match. Verified the test actually bites — stubbing the lookup to key on the full
stereo-aware InChIKey makes it fail. The tox assertion no-ops when the heads are
absent, so it stays green in CI (no model artifacts) and exercises fully on the box.
Deliberate asymmetry, documented in the module docstring: SENSORY reads may legitimately
differ between enantiomers ((R)-carvone is spearmint, (S)- is caraway) — that difference
is documented, not predicted. Safety must not differ.
Closes #238.
Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>1 parent 5318831 commit af4df98
1 file changed
Lines changed: 76 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments