Not planned
Description
Fail-closed, but unusable on a real schema. scaffold-verifier --db (record_check_synthesis) on a SQLite copy of the pinned OpenEMR fixture's real baseline (283 tables, 256,044 rows) cannot produce a check that passes a correct save.
Measured with the independent verification-coverage suite (draft, benchmark/verification_coverage/independent/run.py, synthesize_check). The demonstration was one correct New Patient save, emulating the side rows the pinned app writes.
- Coincidental "saved rows". A table counts as holding the saved row when any column equals any parameter. A provider id of
5matchedgacl_aro_groups.lft,layout_options.seq,lang_languages.lang_id,log_comment_encrypt.log_idand others.Malematchedlist_optionsandrule_filter. On the full schema, 22 tables were taken as holding the saved row (21 of them by coincidence:categories,codes,globals,list_options, ...), giving 580 effects over 304 reads. On a 24-table clinical slice,log_comment_encryptstill was. Each becomes arecord_writteneffect that a real run can't satisfy. - The gate picks the first such table.
gate_on_databasetakes the first target surface alphabetically with anid(categorieson the full schema) as the save target and raisesGateError: the clean save left no record the copy can find. - Bookkeeping refutes every correct save. The proposed check guards every table with "no row added" and applies the default frame without attribution. OpenEMR writes
log,log_comment_encrypt,uuid_registry,contact,recent_patientsanduser_settingson every save, so the clean save isreconciliation_required(8 addedlog_comment_encryptrows on the slice). Two legitimate concurrent edits by another user are flagged too. Its 15/15 "catches" in the suite carry no information. - Coverage numbers next to a failed clean save. The gate's record reads
killed 7 / applicable 7withclean_pass: false. Admission refuses it, but the totals read like full coverage. - Runtime. The recorded-state fault proof judges every surface against every fault: 189 surfaces and 12.7M
stable_idcalls. On the full schema, synthesis plus the gate ran for more than 30 minutes.
What would close it
- Require a target row to bind more than one parameter, or one identity-like parameter, and rank candidate tables by the number of bound fields. Make single-field coincidental tables guards, not targets.
- Let the person (or a witnessed save) declare bookkeeping tables that may grow, and give the default frame attribution where the app has an audit log.
- Report the gate's totals as
n/awhen the clean save fails. - Compare by row identity, not by pairwise
stable_idover every row, inprove_against_faults.
Metadata
Metadata
Assignees
Labels
No labels
Activity
benchmark: independent verification coverage, stand-in harness and fi…
abrichr commentedon Nov 25, 2026
Legacy
scaffold-verifier --dbitem on the 283-table OpenEMR SQLite dump; superseded by entity-scoped frames (#2425) andopenadapt onboard(#2538).abrichr commentedon Nov 25, 2026
Legacy
scaffold-verifier --dbitem on the 283-table OpenEMR SQLite dump; superseded by entity-scoped frames (#2425) andopenadapt onboard(#2538).