GEN-1: add lethality rules + warning codes (SpSp lethal+renormalize, ReRe semi)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
16
gerbil-manager-web/src/genetics/warnings.ts
Normal file
16
gerbil-manager-web/src/genetics/warnings.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Warning codes emitted by the genetics engine. The engine is language-neutral:
|
||||
* it emits CODES only. German texts are mapped in de.ts (UI layer).
|
||||
*/
|
||||
export enum GeneticsWarningCode {
|
||||
/** Schecke × Schecke: SpSp embryos die in utero; ~25% fewer live young. */
|
||||
ScheckeLethal = 'SCHECKE_LETHAL',
|
||||
/** Rex × Rex: ReRe is semi-lethal; reduced viability of homozygous young. */
|
||||
RexSemiLethal = 'REX_SEMI_LETHAL',
|
||||
}
|
||||
|
||||
export interface GeneticsWarning {
|
||||
readonly code: GeneticsWarningCode
|
||||
/** Optional structured detail for the UI (e.g. fraction of young lost). */
|
||||
readonly detail?: Record<string, string | number>
|
||||
}
|
||||
Reference in New Issue
Block a user