# Receive a scoped data export

Use this prepared eighty-minute session for an employee team or FDE pair preparing
to receive a client's data integration. [Preview the team agenda](/training/guides?starter=scoped-export-receiving#guide-session-title)
before choosing whether to replace your current local plan. Previewing changes no
agenda; applying the starter creates no assignment or attendance record. Setup,
reading and breaks are outside the planned timebox. Carry unfinished work forward.

Download the [complete offline workshop folder](/templates/fde-scoped-export-kit.zip)
for the program, local reading, agenda and blank individual notes in one ZIP.
Install the approved runtime separately; the interactive web diagram and planner
are not included. Individual downloads below remain available.

## Prepare the people and local files

Prepare Python 3.11+ through your organization's approved route. Each participant
downloads the [continuation program](/templates/fde-pagination-scope.py) into a
separate working folder and keeps their own [blank receiving record](/templates/fde-pagination-scope-receiving.md).
The program needs only the standard library; it does not consume the worksheet.
No model, account or network is needed after preparation. Each command resets its
own fictional SQLite database; participants do not share a live grant or tenant.

Read [the scope and current-authority explanation](/training/guides/pagination#6a-continue-a-query-without-borrowing-authority)
before the session, and record that exposure. These published cases are practice,
not an unseen test. Use invented aliases and retain first predictions, commands,
actual outputs, assistance and later corrections. A copied report is shared
evidence, not the recipient's execution. If someone can only observe, record that
mode and leave their own execution unrun.

Assign A and B to the first builder/receiver round and swap them later. Assign a
facilitator or pod lead to keep time and unresolved questions. A pair can combine
that role, recording the overlap. API, security and data responsibilities below
are roles to assign to real people later, not a claim that a staffed team exists.

Before facilitating, independently run the comparisons and locate the SQL,
parameters, current grant and whether a second-page SELECT ran. Be able to explain
why plausible IDs or a successful command cannot settle a receiving decision.
Request a technical co-facilitator if that explanation still needs support; retain
the support used rather than treating this preparation as a trainer credential.

## Minutes 0–15: retain an individual starting account

The original request is east/open. East and west deliberately reuse numeric IDs,
and the fictional caller initially has both grants. Before comparing accounts,
each person predicts the unchanged second page, the changed-tenant result and the
effect of revoking east's grant. Then each runs their own baseline:

```sh
python3 fde-pagination-scope.py same-query --page-size 2 > my-baseline.json
```

Retain the original population and next window separately from the observed
rows. At size two, east/10 and east/20 precede east/30 and east/40. Record the
actual result and what you had already read. A matching local baseline establishes
neither a complete production export nor an authenticated real caller.

## Minutes 15–35: receive a tenant change

A hands over the exact program copy, baseline command and report. B predicts and
runs the two tenant conditions without A taking over:

```sh
python3 fde-pagination-scope.py tenant-unbound --page-size 2 > receiving-tenant.json
python3 fde-pagination-scope.py tenant-bound --page-size 2 > receiving-bound.json
```

B locates `saved_continuation`, `second_request`, `current_grant_observation`,
`combined_scoped_keys` and `second_page_query`. Numeric IDs 10, 20, 30, 40 can hide
east/10, east/20, west/30, west/40. Both tenant grants are current, so permission to
read west does not establish a valid continuation of east. In the bound case,
the changed scope is refused and the second query is null. That differs from an
executed query returning an empty page. Keep B's first explanation before feedback.

## Minutes 35–60: swap who receives revoked access

B now hands over; A receives and writes a prediction before executing:

```sh
python3 fde-pagination-scope.py authority-cached --page-size 2 > receiving-cached.json
python3 fde-pagination-scope.py authority-current --page-size 2 > receiving-current.json
```

A locates the committed grant update, `authority_used_for_decision` and
`released_without_current_grant_keys`. The cached case releases east/30 and
east/40 even though the current grant observation is false. The current-read case
withholds them. Preserve first-page rows in the account: they were delivered
before revocation. Do not relabel that earlier delivery as the later release.

If time allows, A predicts and runs one changed page boundary, preserving the
earlier reports. Otherwise record this step as unrun:

```sh
python3 fde-pagination-scope.py tenant-unbound --page-size 1 > changed-tenant.json
```

The original next window is now east/20, while the received next row is west/20.
Compare tenant-qualified identities rather than rewriting the first prediction
or reference. The changed page size applies to both requests in this fresh run.
No mid-traversal resizing, token expiry or concurrent revocation race is tested.

## Minutes 60–80: agree who receives the remaining work

Each person defends one observation from their own record. The facilitator keeps
disagreement, assistance and missing work visible. Completed lab observations exit
0 even for unsafe cases and deliberate refusals; record the actual decision and
query, rather than using exit 0 as a learner result. An interpreter failure or
missing report is a different observation.

| Accountable role | Receiving responsibility and next evidence |
| --- | --- |
| API owner | Define query binding, refusal responses, expiry, retry, cancellation and the completion signal. Supply an actual consumer contract test. |
| Security owner | Verify the trusted caller and current permission, including the check-to-release race absent from this sequential fixture. |
| Data owner | Define the approved population and handling of data delivered before a grant changes. |
| Receiving engineer | Exercise the real consumer's scope and error handling; do not turn refused access into “export complete.” |
| Pod lead | Assign each unresolved decision to an actual owner, bounded next test and agreed review point. |

Add these fields to each person's receiving record:

```text
Actual role / prior reading or revealed examples:
Prediction before running / exact command / report reference:
My tenant-qualified observation / current grant / read or refusal:
My first explanation / later correction and reason:
Action I personally executed / observed only / help or takeover:
Unrun step / unresolved owner question / next test and review point:
```

An agreed group explanation does not replace the two individual accounts. Keep
solo or combined roles explicit. Continue in the full [pagination guide](/training/guides/pagination)
or the related protected Academy lesson for further study. This practice confers
no production permission, independence, qualification or client placement.
