Skip to content

Spot the flaws: an inter-agency eligibility integration

A design review exercise. Seven flaws are planted below. Read the whole document, note your concerns, then reveal the answers at the end.


Author: State integration office · Status: Ready for architecture review · Reviewers: you

Residents applying for health coverage, food assistance or childcare subsidies give the same information to several agencies, and caseworkers re-key it. Decisions are slowed by mismatched records, and residents miss deadlines because notices go to old addresses. Four agencies will share resident data through a central hub: the benefits agency, the health agency, the licensing agency and the county social services offices.

  • One current view of each resident, available to every participating agency.
  • Eligibility decisions based on the most recent information.
  • Every decision explainable at an appeal hearing.
  • Notices reach residents at their current address.

Non-goals: replacing any agency’s case management system.

Resident data hub Agency systems4 agencies County filesnightly snapshot Resident hubmatching, merge Resident storeone record each Change eventsto subscribers Notice serviceletters, email
Resident data hub Agencies send changes to the hub. The hub matches records to residents, keeps one current record per resident and publishes changes back to subscribing agencies.

4.1 Change messages. Each agency sends a message whenever it changes a resident’s data. Messages are validated against a JSON Schema published by the hub. Fields include residentName, dateOfBirth, mailingAddress, householdSize and income.amount, a number.

4.2 Resolving conflicts. When two agencies report different values for the same field, the hub keeps the value from the message it received most recently. This is simple, predictable and easy to explain.

4.3 Matching. Incoming records are matched to existing residents on name, date of birth and address similarity. Matches scoring above 0.85 are merged automatically: the records become one resident and the duplicate is removed, so caseworkers never see two records for one person.

4.4 County data. County systems can’t send change messages. Instead, each county sends a nightly file of all active cases. A case that was in the previous night’s file and is absent from tonight’s is marked closed in the hub.

4.5 Address history. The hub keeps each resident’s addresses with the date each became effective. When an agency reports a correction (for example, that a resident actually moved a month ago), the history is updated with the correct effective date.

4.6 Failed messages. Messages that fail processing five times go to a dead-letter queue. The on-call engineer reviews it each morning and redrives messages once the cause is fixed.

4.7 Decision records. When an agency makes an eligibility decision using hub data, it stores the decision, the reason codes and the resident ID.

5.1 Notices are generated in a nightly batch. The notice service reads each resident’s address from the hub when the notice is printed, so letters always go to the latest address.

6.1 Each agency sees only the fields its programs are permitted to use, enforced by the hub’s access policies. All access is logged.

6.2 Data is encrypted in transit and at rest; agencies authenticate with mutual TLS.

The benefits and health agencies go first, then licensing, then counties one at a time. Each agency runs in read-only mode for a month before its changes are applied.


Try to find all seven before opening these.

Flaw 1, in section 4.2

Last-received-wins lets the least authoritative source overwrite the most authoritative one. A licensing export with a months-old address, received after the benefits agency verified a new one, wins because it arrived later. Arrival time says nothing about when the fact changed or who is entitled to change it.

Ask for: an owner for each field, comparisons based on the source’s own revision rather than arrival time, and conflicting values kept as visible observations for the owning agency to resolve.

Learn it: The newest timestamp came from the least authoritative source · Check C-09

Flaw 2, in section 4.3

Automatic, destructive merges can’t be undone. At a 0.85 threshold, two people with the same name and date of birth will sometimes be merged, which is common in a large state. Once the duplicate is removed and agencies keep updating the merged record, nobody can tell which update belongs to whom.

Ask for: source records kept as they are, matches stored as reversible links with their score and method, provenance on every update, and a review queue for matches near the threshold.

Learn it: The records that could be merged but never separated · Check C-12

Flaw 3, in section 4.4

Absence in a nightly file closes cases. A truncated transfer, a failed export or a filter bug on the county side looks exactly like thousands of legitimate closures, and nothing checks that the file is complete.

Ask for: a manifest with row count and checksum written after the export, rejection of incomplete files, a cap on closures per night that needs approval above it, and, longer term, explicit closure records from counties.

Learn it: The missing record that closed a valid case · Check C-11

Flaw 4, in section 4.5

Corrections rewrite the address history. After a retroactive correction, the hub can no longer say which address an agency had when it made a decision. That breaks goal 3: at an appeal, the record will imply the agency knew something it didn’t.

Ask for: bitemporal history: each address with its effective period and the period during which the hub believed it, so both “what was true then” and “what did we know then” can be answered.

Learn it: The address correction that rewrote history · Check C-10

Flaw 5, in sections 4.7 and 5.1

Decisions and notices don’t record what they were based on. The decision record keeps a resident ID but not the data used, and the notice service reads the address at print time rather than recording where each notice actually went. Neither can be reconstructed for an appeal once the hub’s data changes.

Ask for: decisions that store their inputs and the hub version they read; notices that store their actual destination when generated. This also makes it possible to find every decision affected by a wrong merge (flaw 2).

Learn it: The replay that calculated a different invoice · Example Lending, ADR-004

Flaw 6, in section 4.1

income.amount is a number with no period. One agency sends monthly income, another annual, and both pass the schema. A household earning $2,400 a month reported as 2,400 is read by another program as $2,400 a year: eligible when it isn’t, or the reverse.

Ask for: units and periods in the contract (income.amount with income.period, or separate fields), worked examples in the published contract, and tests run by each consumer against those examples.

Learn it: The compatible schema that changed the meaning · Check C-06

Flaw 7, in section 4.6

Redriving dead-lettered messages without version checks reapplies old data. A household-size change that failed on Monday and is redriven on Thursday overwrites the newer change that arrived on Tuesday. The redrive reports success.

Ask for: a version or source revision on every message, consumers that skip and report stale messages, and a redrive report that explains each skip.

Learn it: The dead-letter redrive that reopened a canceled order · Check C-07

Looks wrong, but is fine
  • Non-goal: not replacing case management systems. Right for a first phase; a hub that tried to replace them would never ship.
  • Section 6.1, field-level access per program. Exactly what inter-agency sharing needs, and often missing.
  • Section 7, a read-only month per agency. A cautious, sensible way to find mismatches before they affect anyone.
  • Section 4.4, nightly files for counties. A real constraint, not a flaw; the problem is only how absence is interpreted (flaw 3).
Found What it suggests
6 or 7 You know where inter-agency data goes wrong.
3 to 5 Good. Several of these only show up at an appeal hearing, which is why they’re missed.
2 or fewer Read the four time and ownership stories, then try again.

Written and edited by Abhinav Taduka, enterprise software architect.