D5 — compliance flags
Traced at commit fd938cc ·
libs/contracts/src/lib/vector-resolution.ts lines 218–230 and 376–388 ·
libs/contracts/src/lib/{compliance,canonicalization,scrub}.ts ·
libs/temporal/src/activities/openai-provider.ts
Summary
- D5 is a list of flags. The other six dimensions each hold one value.
- D5 uses a union. The other six use a waterfall, where the first source wins.
- Two sources work today. They are not equal.
- The voice provider can raise exactly one flag:
DNC_REQUEST. - The platform’s own phrase list can raise any of the seven.
- One source alone is enough. Neither source can cancel the other.
- A third source exists in the code. Nothing calls it.
- Every flag stops the cadence. Six also write a stop record that reaches every client.
Workflow 1 — the two sources
What the voice provider contributes
- The provider returns two boolean fields on the call analysis.
opt_out_sensitive_data_storageis a field the provider fills by itself.requested_do_not_callis a field the platform asked the agent to fill.- The platform reads the first from the analysis and the second from the custom data.
- If either field is true, the platform adds
DNC_REQUEST. - The provider cannot raise any other flag.
- If two analysis messages arrive, the platform combines the booleans with OR.
What the phrase list contributes
- The platform reads the transcript with a word-boundary match.
- The list holds 83 phrases across the seven flags.
- A match raises the flag for that phrase.
- The list can raise any of the seven flags.
- The list cannot infer. It matches the words or it does not.
- The list does not change between calls, so two identical transcripts give the same flags.
The asymmetry is the part people miss. The provider understands meaning but reports only one flag. The phrase list understands nothing but reports all seven. Each one covers the weakness of the other, which is why the platform keeps both.
How the platform combines them
- The platform puts every flag into one set.
- A set removes duplicates, so two sources raising the same flag give one flag.
- The platform does not compare confidence between the sources.
- The platform does not let one source overrule the other.
- One source alone is enough to raise a flag.
- The result is a list. An attempt can carry several flags at once.
The third source
- The code contains a language-model second net for D5.
- It has an interface, a prompt and a provider that implements it.
- No code path calls it.
- It therefore contributes nothing today.
- Read a D5 flag as the output of two sources, not three.
Workflow 2 — what each flag does
Reading the table
- Every flag halts the cadence for that lead.
- Six flags also write a stop record.
- Each of those six records a different reason.
- All six reach every client on the platform.
- Three flags also keep the recording for an audit.
- Two of those three also alert an administrator.
LANGUAGE_BARRIERwrites no stop record.- The person did not ask the platform to stop. The platform cannot proceed in that language.
Why the six reach every client. Each one records a fact about the person or the number, not a fact about one client’s campaign. A person who died is dead for every client. A litigator is a litigator for every client. See Multi-tenancy and isolation for the two places the platform crosses client boundaries on purpose.
Limits worth knowing
- The phrase list is the whole vocabulary of the second source.
- A request phrased outside those 83 phrases reaches D5 only through the provider field.
- The provider field covers only
DNC_REQUEST. - So a request outside the phrase list, for any other flag, reaches D5 through nothing.
- The platform measures this gap in the evaluation harness, not in production.
- See Observability for what production does and does not measure.
Opt-outs — what happens after DNC_REQUEST,
which is the flag with the most consequence.
Outcome resolution — how D5 differs from the six
dimensions around it.