The frontier-model boundary — what may be submitted, and what we ask back
Status: draft for review. Date: 2026-08-01. Supersedes a framing error: an earlier diagram drew the control at the device/console edge. That was wrong, and this document exists partly to correct it.
1. The boundary is not where the last diagram put it
The handset and the console are one environment inside one company. A ticket moving from
a phone to esg.cogneris.com has not left anything — it has moved between two rooms of the
same building. Drawing that hop as a data-protection control was a category error: it makes
an ordinary internal transfer look like an egress, and it hides the transfer that genuinely
is one.
There are three tiers, and only the last is a trust boundary:
| Tier | Where | Who can read it | Is this a control boundary? |
|---|---|---|---|
| On-device / edge | the handset — capture, on-device STT, the append-only log, the report render | us | no |
| Company cloud | Cloudflare Workers, D1, R2, the console | us | no |
| External model processing | any third-party inference service — a frontier model, a hosted LLM, a cloud STT | them | yes — this is the only one |
Everything upstream of tier 3 is a completeness question: did the record get where it was going. Tier 3 is a confidentiality question: what did we hand to somebody else, and can we live with them having it.
The two questions need separate answers and separate diagrams. Conflating them produced a picture that argued for the wrong thing.
2. What is actually at stake when something crosses tier 3
Not "data left the device". Four distinct exposures, which need distinct handling:
| Exposure | Example in this product | Why it matters |
|---|---|---|
| Client confidentiality | ONxpress CJV, Metrolinx, Aecon; project names; site addresses | contractual; naming a client's non-conformance to a third party is a disclosure we were not given the right to make |
| Personal data | raisedBy names, a GPS trace of one worker's movements through a shift, a voice recording | a recording is the person's voice; a fix sequence is their location history |
| Legal exposure | a non-conformance, an incident, a notifiable event | potentially discoverable. A finding narrated to an outside service is a statement about the client's conduct made outside privilege |
| Proprietary methodology | the checklists, the grading ladder, the obligation logic, the status rules, the accumulated memory of how this organisation reasons | this is the actual asset. The facts age; the method is the product |
The fourth is the one most easily given away by accident, because it leaks through the shape of a prompt rather than through its content. A prompt that says "given these nine sections and these four grades, apply our rule that a major raises a ticket and an observation must not" has handed over the methodology while carefully redacting the names.
3. What crosses tier 3 today — the honest inventory
Assessed against the repository on 2026-08-01.
| Path | External? | What it sends | Verdict |
|---|---|---|---|
Device STT (lib/audio, sherpa / whisper) | no | nothing — inference is on the handset | compliant |
lib/audio/cloudWhisper.ts | no | neutralized; every method fails loudly. The class survives only to keep the engine-factory seam intact | compliant, deliberately |
esg-memory retrieval | no | embeddings are a self-contained deterministic hash; no inference service is called | compliant |
| The four certified workers — compliance, projection, export, report | no | forbidden from coupling to a model at all, enforced by scripts/guard-no-llm-in-proof-chain.mjs | compliant, and mechanically enforced |
app/api/summarize | YES | raw field transcripts, verbatim, as • [category · severity] transcript, to Cloudflare Workers AI (@cf/meta/llama-3.1-8b-instruct) | violates every rule below |
Cloud TTS (esg-voice-gw) | yes | text to be spoken aloud | needs the same treatment; not yet assessed |
The one live external-model call in the product sends unredacted dictated speech. It is
gated only on CF_ACCOUNT_ID and CF_API_TOKEN being present, and falls back to a
deterministic local summary when they are not — so today it is usually off, which is luck
rather than design. Nothing anonymizes it, nothing records that it happened, and nothing
marks the answer as unverified.
That is the gap this policy closes.
4. Classification — what may cross, and in what form
Four classes. The test is applied to the submission, not to the source record.
Class N — never crosses, in any form
- Evidence bytes: photos, audio recordings, signature images.
- Identity: names, device ids, signer ids, actor ids.
- Precise location: any coordinate, any address, any chainage that identifies a site.
- Client and project identity: names, contract references, permit numbers.
- Anything from the certified proof chain: signed events, hash-chain heads, the register's asserted statuses.
Class G — crosses only generalized
The substance of a finding may cross once it can no longer be tied to a person, a client or a place, and once it carries no figure precise enough to re-identify one.
*"Silt fence undermined about twelve metres at the Black Creek outfall on the ONxpress Woodbine site, found by M. Michaud on 29 July"*
becomes
*"A sediment-control barrier was found undermined along a watercourse crossing on a linear construction site."*
What survives: the environmental mechanism, the control type, the severity band, the site archetype. What does not: who, where, which client, when, how much.
Class P — crosses freely
- Public regulatory text and standards.
- The company's own generalized questions.
- Synthetic or worked examples that describe no real site.
Class M — never crosses, and never as shape either
The methodology: our checklists, our grading ladder, our obligation logic, our status rules, our accumulated memory. Not as content, and not smuggled into the structure of a prompt.
Where a submission would need Class M to make sense, that is the signal not to submit it. Ask the general question instead and apply the method here.
5. The process — decomposing a real situation into a submittable one
Given any real situation, separate it into five parts before writing anything to send. Only two of them ever leave.
| Part | What it is | Crosses? |
|---|---|---|
| Purpose | why we are asking at all — "we need to know whether this class of control failure has a recognised remediation sequence" | yes, generalized |
| Intent | what decision the answer serves — "it will inform a corrective action a human will then author" | yes, and it should be stated explicitly to the model |
| Facts | the particulars — who, where, which client, what was measured | no — generalize to Class G or drop |
| Methodology / rules | how we reason, grade, and decide | never (Class M) |
| Memory | what this organisation has learned across sites and years | never (Class M) |
The submission is then constructed from purpose + intent + generalized facts, and nothing else. It is built, not redacted: a redaction pass over a real record is the wrong shape, because it starts from something that must not be sent and hopes to have removed enough. We start from nothing and add only what has passed the test.
Every submission is authored, not derived. No code path may take a stored record and
turn it into a prompt automatically. That is precisely what app/api/summarize does today.
6. The return contract — what we want back, and what we must refuse
State the intent of the request to the model, and constrain the shape of the answer.
What we want:
- General domain knowledge — how this class of control behaves, what commonly causes it to fail.
- Regulatory interpretation possibilities, framed as possibilities.
- Candidate reasoning we may not have considered — alternatives, failure modes, questions to ask.
- Drafting assistance over text we supply.
What we must never accept as an output, regardless of what the model offers:
- A determination. Not compliant / non-compliant, not a grade, not a status.
- A severity, a due date, or an owner.
- Anything that reads as a fact about a real site.
The reason is already law in this codebase: BR-P2 / FR-SEC-5 — no model in the certified proof chain. A model's output is an input to a person, never a record. It enters the system the way every other AI contribution does — as classify-in, human-confirmed before it reaches the deterministic path, or as narrate-out, a draft reviewed before release.
Consequently every response carries, structurally and not by convention:
unverified: trueuntil a named person confirms it,- the identity of the model and the time it answered,
- a copy of exactly what was submitted, so the answer can be re-read against its question.
7. Enforcement — the mechanism, not the intention
A policy that relies on remembering it is a policy that has already failed. Three mechanisms:
- One gate. Every external-model call goes through a single module that accepts a typed generalized submission — never a record, never a free string assembled from one. If a caller cannot express its request in that type, the request does not go.
- Extend the existing guard.
guard-no-llm-in-proof-chain.mjsalready fails the build if the four certified workers touch a model. Extend it to fail on any direct provider fetch anywhere outside the gate — which today would fail onapp/api/summarize, correctly. - A submission log. Every crossing is recorded: what was sent, when, to which model, by whom, and what came back. If we cannot say what we have disclosed, we have no policy — only an opinion.
8. Decisions this needs from the business
| # | Decision | Why it matters |
|---|---|---|
| FM-1 | Is Cloudflare Workers AI "external"? | It is our infrastructure vendor and a third-party inference service. Same contract, different exposure — this decision sets whether tier 3 begins inside or outside Cloudflare |
| FM-2 | Does an environmental finding, fully generalized, remain client-confidential? | If yes, Class G collapses and almost nothing may be submitted |
| FM-3 | Who may authorize a crossing, and is it per-request or per-category? | Determines whether the gate needs a human in the loop every time |
| FM-4 | Retention — do we require a zero-retention or no-training commitment from the provider? | Changes which providers are usable at all |
| FM-5 | Is app/api/summarize disabled now, or rebuilt behind the gate? | It is live in the codebase today and unredacted |
9. What this document does not do
It does not implement any of it. Nothing here is enforced in code yet — the gate does not exist, the guard has not been extended, and the submission log does not exist. The only mechanism that is real today is the proof-chain guard, which protects the four certified workers and nothing else.
Related: BRD-field-processes.md for BR-P2 and the honesty rules,
scripts/guard-no-llm-in-proof-chain.mjs for the one enforced control.