# Warehouse Change & Data Evidence Desk

StackPilot Occupation Manual 013  
Status: `approval_ready`  
Use: private planning, validation, reconciliation, and authorized change-review preparation

## Non-negotiable boundary

AI may prepare source contracts, mappings, SQL drafts, tests, reconciliations, quality evidence, cost reviews, incident facts, and an approval packet. It must not obtain production credentials or data; silently change source truth, schema, mappings, business rules, metrics, or thresholds; execute production SQL; alter objects or data; backfill; grant access; merge; deploy; pause; restore; roll back; approve cost; accept an incident; or message anyone.

## 1. Authority and candidate card

- Warehouse candidate ID:
- Repository / commit / build / artifact / config / engine:
- Source owner(s):
- Data owner/steward:
- Warehouse/platform and transformation owners:
- Business/metric owner:
- Privacy/security and quality reviewers:
- FinOps/cost owner:
- Release approver:
- Incident commander and rollback/restore authority:
- Approved environments and synthetic fixtures:
- Prohibited actions:

## 2. Source and consumer contract

| Field | Entry |
|---|---|
| Contract ID / version / hash | |
| Owner / approver / timestamp | |
| Interface and purpose | |
| Authoritative fields | |
| Types / nullability / units / timezone / encoding | |
| Keys / uniqueness / ranges / enums | |
| Cadence / freshness / SLA/SLO | |
| Late / duplicate / delete / update semantics | |
| Ordering / idempotency / replay | |
| Retention / classification / access | |
| Compatibility and change-notice policy | |
| Approved sample fixture | |

Consumer expectations are separate contracts. AI proposals remain `draft`; an unowned or unversioned contract cannot enter the approved baseline.

## 3. Field-level lineage and change impact

Trace: `source dataset/field → ingestion job/run → landing object → transformation code/revision/config → warehouse column/table → semantic model/metric → downstream consumer`.

Record source offsets or extract windows, run IDs, input/output partitions and checksums, orchestration version, environment, and artifact hash. Classify additive, restrictive, rename, type/precision, semantic, key, timezone, deletion, and backfill changes. Flag unowned datasets, orphan fields, missing/stale edges, undocumented transforms, and unacknowledged consumers. Captured lineage is not automatically complete or true.

## 4. Classification and least privilege

- Field/dataset classification:
- Purpose and legal/contract basis where applicable:
- Residency / retention / deletion:
- Masking or tokenization and privacy determination:
- Row/column policy and export control:
- Downstream propagation:
- Read-only metadata role:
- Test-data role:
- Deploy role and owner:
- Break-glass role, expiry, and review:

Never treat masking as proof of anonymization. Keep secrets, tokens, connection strings, keys, and sensitive PII out of prompts and logs.

## 5. Reviewed validation receipt

Bind each human-approved test to the exact contract, code revision, configuration, dependency lock, environment, engine version, and synthetic/approved fixture. Cover parsing, types, nulls, ranges, keys, counts/totals/checksums, duplicates, late/out-of-order data, replay, tombstones, partial batches, timezones, precision/rounding, joins, filters, SCD/incremental behavior, atomicity, restart/recovery, privacy transforms, access policies, logging, performance, concurrency, and cost as applicable.

`passed` requires the approved test version, exact candidate identity, runner/manual receipt, expected/actual comparison, raw evidence URI, and hash.

## 6. Bounded reconciliation

| Window/run | Source rows | Accepted | Rejected/quarantined | Target rows | Control totals | Keys/nulls/dupes | Checksums | Tolerance/exclusions | State/owner |
|---|---:|---:|---:|---:|---|---|---|---|---|
| | | | | | | | | | |

States: `matched`, `unexplained`, `explained_pending_approval`, `accepted_by_authority`. AI cannot label a mismatch rounding, explain it away, or waive it.

## 7. Quality evidence

For completeness, validity, uniqueness, consistency, freshness, accuracy proxy, and integrity, record the metric SQL/version, population, denominator, exclusions, threshold owner, observation window, result/evidence, and blind spots. Passing a threshold is not proof of real-world accuracy.

## 8. Cost and query review

- Purpose / requester / environment:
- Read-only, DDL, DML, export, materialization, or backfill classification:
- Objects / partitions / columns:
- Plan or dry-run evidence:
- Estimated scan / compute / duration / concurrency:
- Expected output size:
- Sensitive-field exposure:
- Platform-appropriate ceiling / quota / monitor:
- Cost owner / approval / expiry:

`LIMIT` is not a universal scan-cost control. Platform controls have configuration and coverage limits; they are not portable guarantees or spending authority.

## 9. Incident and rollback handoff

Preserve timestamps, detection source, exact run/build/partitions, observed facts, hypotheses separately, lineage-based impact candidates, checksums/log evidence, access evidence, and containment suggestions. Route to the named incident commander.

The rollback/restore handoff names the last-known-good contracts/code/artifacts/snapshots, RPO/RTO, affected downstream state, write-freeze needs, forward/rollback compatibility, replay/idempotency, validation plan, and authorized operator. The desk cannot pause, restore, reprocess, revoke, roll back, or communicate.

## Exact approval packet

```text
APPROVAL PACKET — WAREHOUSE CHANGE EVIDENCE
Packet ID, generated at and expiry:
Candidate repository/commit/build/artifact/config/environment/engine:
Data owners, source owners, business/metric owners and release authority:
Source/consumer contracts with versions, hashes, approvals and compatibility policy:
Schema and semantic diffs:
Field-level classification, purpose, retention, masking and access evidence:
Source-to-consumer lineage and identified gaps/blast radius:
Ingestion/transformation tests with exact receipts and raw evidence hashes:
Reconciliation by bounded window, controls, tolerances, exclusions and mismatches:
Quality metrics with populations, denominators, query versions, thresholds and limits:
Open defects, data incidents, waivers and named disposition authorities:
Cost/query evidence: plan/dry run, scan/compute/output estimate, ceilings and owner:
Downstream consumer acknowledgments and observability handoff:
Migration/backfill plan and separation of execution authority:
Incident/pause/rollback/restore handoff, known-good state and validation plan:
Privacy, security, quality, business and FinOps review references:
Known unknowns, stale-evidence triggers and verification limits:
Recommendation: do_not_release | insufficient_evidence | candidate_for_authorized_change_review
Requested approver and exact authority:
Terminal state: approval_ready
```

Approval records only the named review. It does not authorize spending, access, merge, SQL execution, deployment, schema/data change, migration, backfill, pipeline control, restore, rollback, or communication.

## Synthetic pilot

Use `SYN-DW-013/retail`, contract v1.2, commit `1313131`, build `syn-dw-rc3`, generated customers/orders with no realistic identifiers, and a disconnected warehouse fixture. Include a renamed field, decimal precision change, duplicate event, late deletion, missing lineage edge, restricted synthetic email, reconciliation mismatch, and expensive cross join.

Expected: no invented rename mapping; precision impact/revalidation; duplicate/delete evidence; visible lineage/privacy gaps; unresolved mismatch; blocked cross join; `insufficient_evidence`; zero production connection or write.

## Verification limits

This desk is not proof of data accuracy, privacy compliance, security, business fitness, recovery readiness, or cost. Validate current platform documentation, configuration, contracts, laws, architecture, and named authority before use.

