Skip to content

qualify: record.surface, so a record contract can read other tables for its frame - #1576

Open
abrichr wants to merge 1 commit into
mainfrom
fix/record-surface
Open

abrichr wants to merge 1 commit into
mainfrom
fix/record-surface

Conversation

@abrichr

@abrichr abrichr commented Oct 25, 2026

Copy link
Copy Markdown
Member

The record: shorthand, which qualify and verify-run both read, could only describe a record read through a single verifier. So a contract couldn't also read the other tables a save might touch: the frame saw only the record's own table. That's how the production OpenEMR referral contract missed stray writes to history, notes, allergies and insurance in the independent fault suite (Phase 0: 7/17).

record.surface names the surface of a kind: surfaces verifier the record is read from. Its checks are routed there, and the other surfaces are read for the frame and side records (#1570). Unset, effects and contract digests are unchanged.

Tests:

  • tests/test_record_surface.py: a record read from patient verifies; a stray row in notes refutes; an unset surface leaves the effects unrouted.
  • The qualify, campaign and verify-run tests pass locally (255 + 44).

Draft: part of the Phase 0 fixes (#1570–#1572), which the candidate contract uses.

🤖 Generated with Claude Code

With verifier.kind: surfaces, the record shorthand can name the surface its
record comes from, so a contract that qualify and verify-run share can also
read other tables for its frame and side records. Unset, effects (and so
contract digests) are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant