Expand deterministic symptom escalation regression suite #62
Open
rockachopa
wants to merge 3 commits from
timmy/21-escalation-regression-suite into main
pull from: timmy/21-escalation-regression-suite
merge into: stackchain:main
stackchain:main
stackchain:timmy/11-mobile-capture-recovery
stackchain:free/hy3-timmy-16
stackchain:timmy/35-version-ledger-migrations
stackchain:timmy/41-release-observability-dashboard
stackchain:free/step-timmy-14
stackchain:timmy/17-bounded-inference-queue
stackchain:timmy/58-strict-csp-runtime-config
stackchain:timmy/55-staging-deployment-tooling
stackchain:timmy/53-private-subpage-staging
stackchain:timmy/10-reproducible-smolvlm-bootstrap
stackchain:timmy/48-vomiting-phrase-hotfix
stackchain:timmy/48-server-safety-override
stackchain:timmy/47-sleek-hermes-agent
stackchain:timmy/9-product-boundary-decisions
stackchain:timmy/8-ci-gates
3 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| 693e023758 |
fix: replace urgent regex patches with auditable expression grammar
All checks were successful
Quality gates / quality (pull_request) Successful in 3m31s
Second hostile review of
|
|||
| 1aadca91c6 |
fix: escalate ordinary fever and pain phrasing without allowlist narrowing
All checks were successful
Quality gates / quality (pull_request) Successful in 1m59s
Hostile verification of the fever continuation-word allowlist found ordinary symptom false negatives at the authoritative zero-Hermes-call boundary: 'I have a fever right now', 'my fever is 103', 'fever started this morning', plus 'severe pain in/around the abdomen' against the hard-coded 'my' in the pain pattern. - fever: drop the continuation-word allowlist entirely; the bare clinical word escalates with any continuation. Nonclinical controls become structured exclusions (malaria/yellow/dengue/cabin compounds, fever tree, figurative 'feverish about'/'feverish with excitement'), so future natural symptom wording can never be narrowed again. - severePain: accept any determiner or none plus location qualifiers (lower/upper/left/right) between preposition and organ. - blood: differential audit against origin/main caught the same regression class in the PR's rewrite: 'poop/stool with blood' (escalated on main) was lost while 'my stool has been normal' / 'the poop contains seeds' became false positives. Restored explicit blood shapes with bounded verbs. RED regressions first: matrix grows 56 -> 82 pinned positives (fever +20, severePain +6 with case/punctuation/contraction variants), a pinned preserved-behavior list for main's blood shapes, and two boundary suites proving every review phrase and variant escalates at the detector AND intercepts chat at the service layer with exactly zero Hermes calls. Gates: npm test 90/90, staging-deploy 20/20 OK, test:ui/test:photo/ test:sleek pass, check:syntax clean, check:diff clean, npm audit 0 vulnerabilities, diff secret scan clean. |
|||
| e05d7d1e1a |
test: expand deterministic symptom escalation regression suite
All checks were successful
Quality gates / quality (pull_request) Successful in 1m28s
Issue #21 (epic #5). Prove model behavior can never suppress or soften urgent symptom handling. - Pin the six authoritative red flags, their canonical order, and the exact urgent copy as read-only exports; hostile provider output cannot reassemble it. - Grow the positive text matrix from 24 to 56 pinned clinical phrases across all flags (bloody stool, dark-red/black descriptions, severe abdominal pain variants, vomiting tenses/slang, fever phrasings, inability to pass gas) and pin 27 idiomatic negatives that must not escalate (threw up my hands, yellow fever history class, black tea). - Authoritative boundary suite: every red-flag phrase and confirmed ledger symptom/note intercepts chat with zero Hermes calls; malicious/missing provider replies cannot weaken the deterministic response; truthy junk symptoms can neither fabricate nor suppress escalation. - Wiring suite: the single chat gate screens urgency before any agent turn in both service and browser code; detection stays centralized in the frozen domain pattern table. RED evidence: URGENT_MESSAGE unexported, 9 matrix misses (bleeding from my rectum, bloody stool/poop, severe pain in my abdomen), 8 false positives (I threw up my hands, feverish about the election). GREEN: 87/87 npm test, syntax/diff gates clean, 0 vulnerabilities, browser suites pass with zero /api/agent/chat calls on urgent input. Closes #21 |