feat(openimis): effect-verified insurance eligibility-check reference workflow + showcase#145
feat(openimis): effect-verified insurance eligibility-check reference workflow + showcase#145abrichr wants to merge 2 commits into
Conversation
…+ showcase Add the coverage/eligibility-check reference workflow to the openIMIS insurance environment: look up a policyholder in the Insuree Enquiry, ask the service-eligibility question, and certify the answer against the system of record with the effect-verifier kit (docs/EFFECT_KIT.md) -- never the screen. - benchmark/openimis_claims/fixture.py: two more synthetic policyholders (one LAPSED for the halt scenario, one in force so replay parameterizes onto a policyholder the demo never saw), a dedicated read-only SQL-oracle role (SELECT on three tables, default_transaction_read_only=on), and the shared eligibility oracle SELECT both the fixture and the deployment YAML use - compose.yml: loopback-only DB port for the read-only oracle - deployment.eligibility.yaml: SQL effect-verifier config, insurance_no run-parameter binding, secret via OPENIMIS_ORACLE_PASSWORD env ref - scripts/openimis_eligibility_demo.py: up / bootstrap / record / compile (binds record_written + field_equals contracts) / replay (SQL-verified; --expect-halt demonstrates the lapsed-coverage HALT) - docs/showcase-openimis: real run reports + unedited-footage gifs (replay CONFIRMED on an unseen policyholder; lapsed coverage -> field_equals REFUTED -> run HALTED) + stills - tests/test_openimis_eligibility.py: pins the deployment YAML, the fixture oracle SQL, and the bundle contracts to each other (no docker) Synthetic data only; contract-proven fixture demo, not a benchmark. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…truction tests build_effect_verifier imports the configured sql_driver BEFORE the secret-env and run-param checks, so on the fast CI suite (no PostgreSQL driver installed) the two fail-loud tests died with ModuleNotFoundError instead of reaching their ValueError assertions. Stub the driver module (as the construction test already did) so all three tests exercise the kit's own checks regardless of driver availability; the stub still proves construction never dials a connection. Verified locally with an import blocker emulating the CI environment. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Holding this PR in draft while the release boundary is repaired. The reference workflow is useful evidence, but this branch is based on the affected 1.14.0 line and directly overlaps the MIT-only PyPI source-distribution fix in #144. It must not merge or publish ahead of the independently verified 1.14.1 replacement. Next review:
No evidence is being discarded; draft status is a sequencing and package-boundary safeguard. |
|
Status refresh (2026-07-19): the MIT-only package boundary is restored and independently verified through v1.16.0; that historical release blocker is closed. This PR remains intentionally draft for the product boundary, not because evidence is being discarded. If resumed, rebase onto the then-current exact released main, keep every adapted openIMIS/AGPL benchmark file repository-only and excluded from wheel/sdist, re-run the archive validator and protected matrix, and connect the reference to the active sandbox/attended workflow rather than creating a second demo architecture. No merge is appropriate on the current head. |
E1 product proof: effect-verified insurance eligibility check on the openIMIS reference environment
Builds the runnable coverage / eligibility-check workflow on the just-merged openIMIS insurance environment (#141), wired to the effect-verifier kit (#134): look up a policyholder in openIMIS's Insuree Enquiry, ask the service-eligibility question, and certify the answer against openIMIS's own PostgreSQL policy tables — a read-only SQL contract, never the screen.
What's demonstrated (all runs real, on this fixture, synthetic data only)
scripts/openimis_eligibility_demo.py record): 6-step demonstration on insuree999000001; insuree number parameterized asinsurance_no.lintgreen (effect coverage: n/a (no consequential/irreversible steps), one benign vacuous-postcondition warn);certify --policy permissivePASS.clinical-writeaccurately flags the two unlabeled dialog clicks (confidence 0.70) and the typing step's vacuous postcondition — right findings for unattended writes, documented honestly in the README.999000003— a policyholder the demonstration never saw: 6/6 steps, template rung at confidence 1.00, typed input read back, 0 model calls, ~13 s. Both contracts CONFIRMED by the SQL verifier built from the committeddeployment.eligibility.yaml.999000002(policy lapsed 2026-05-31): the GUI lookup completes and the dialog still shows a service-eligibility thumbs-up — the misreadable screen — thenfield_equalsis REFUTED (coverage 'Inactive', expected 'Active') and the run HALTS with evidence instead of certifying eligibility.Effect contracts (bound to the run's
insurance_no)record_writtenfield_equalscoverage == 'Active'in the system of recordThe verifier runs ONE read-only SELECT (
fixture.py::ELIGIBILITY_ORACLE_SQL; a unit test pins the YAML copy to it) as a dedicated read-only role created by the bootstrap (SELECTon 3 tables,default_transaction_read_only=on— the role, not the kit's statement filter, is the enforcement). Secret viaOPENIMIS_ORACLE_PASSWORDenv reference; DB port published loopback-only.Changes
benchmark/openimis_claims/fixture.py— lapsed + second in-force synthetic policyholders, read-only oracle role, shared oracle SQL,bootstrap_eligibility(),coverage()oraclebenchmark/openimis_claims/compose.yml—127.0.0.1:9402:5432for the oraclebenchmark/openimis_claims/deployment.eligibility.yaml— the kit config (new)scripts/openimis_eligibility_demo.py— up / bootstrap / record / compile / replay (--expect-halt) (new)docs/showcase-openimis/— FINDINGS.md + both run reports (report.json, REPORT.md, step screenshots) + 2 gifs (unedited footage + closing card quoting the report) + stills (new)tests/test_openimis_eligibility.py— 11 no-docker contract tests pinning YAML ↔ fixture SQL ↔ bundle effects, secret-env fail-loud, param-binding, injection refusals (new)Media (in
docs/showcase-openimis/)eligibility_replay.gif(0.84 MB, 13 s) — green replay + CONFIRMED cardeligibility_halt.gif(1.54 MB, 17 s) — lapsed-coverage HALT + REFUTED cardstills/— active dialog, lapsed dialog (thumbs-up the DB refutes), verdict cardsHonest claims
Contract-proven fixture demo on synthetic data. Not a benchmark, not a customer deployment, no claim about commercial payer portals; a dental-office deployment would target the office's actual payer portal/clearinghouse with its own read-only oracle. openIMIS (AGPL-3.0) stands in as a real open-source insurance platform.
Frozen lanes untouched (no changes under backends/windows*, win_agent, replayer, resolver, macOS pixel, paper/, hosted).
ruff check+ruff format --checkclean on all touched files; full local pytest suite green.🤖 Generated with Claude Code