Draft Pilot Local Migration Harness Review
Purpose
This page reviews the local validation harness that checks the draft pilot migration artifact, approved table names, prohibited names, prohibited fields, active migration isolation, and required safety labels.
It is validation-only. It creates no active migrations, no tables, no protected live routes, no protected API routes, no write endpoints, no draft storage, no staff decisions, and no live workflows.
Harness Status
Status
local-validation-only
Active
false
Executable SQL
false
SQL executed
false
D1 targeted
false
Wrangler used
false
Table creation
false
Writes enabled
false
Draft Artifact Location
docs/architecture/migration-drafts/draft-pilot-local-migration-draft.sql.md
The artifact remains a markdown draft outside the active migrations folder.
Validation Script Location
scripts/local/validate-draft-pilot-local-migration-draft.mjs
The script reads the draft artifact and prints a validation summary. It writes no report file and targets no database.
Approved Table Names
| Table | Status |
|---|---|
future_actor_refs | local-validation-only |
future_actor_ref_contexts | local-validation-only |
future_actor_ref_status_history | local-validation-only |
future_actor_ref_audit_events | local-validation-only |
future_actor_role_mappings | local-validation-only |
future_actor_permission_scopes | local-validation-only |
future_actor_role_status_history | local-validation-only |
future_actor_role_audit_events | local-validation-only |
future_pullup_pushup_drafts | local-validation-only |
future_pullup_pushup_draft_subject_refs | local-validation-only |
future_pullup_pushup_draft_status_history | local-validation-only |
future_pullup_pushup_draft_review_refs | local-validation-only |
future_pullup_pushup_draft_audit_events | local-validation-only |
future_morning_sheet_visibility_refs | local-validation-only |
future_retention_deletion_markers | local-validation-only |
future_draft_audit_events | local-validation-only |
Prohibited Table Names
Prohibited Fields
Validation Checks
- draft artifact exists
- draft artifact remains outside active migrations
- LOCAL-ONLY DRAFT label is present
- DO NOT RUN label is present
- Not an active migration label is present
- No D1 target label is present
- approved future_ table names only
- prohibited table name scan passes
- prohibited sensitive field scan passes
- SQL block contains no D1, wrangler, production, or preview target
- active migrations folder contains only approved active migrations
- no SQL execution is performed
Failure Modes And Stop Conditions
| Failure mode | Stop condition |
|---|---|
| draft artifact missing | do not continue if the draft is missing |
| draft artifact moved into active migrations | do not continue if the draft is inside migrations |
| required safety label missing | do not continue if safety labels are missing |
| unapproved table name found | do not continue if unapproved table names are present |
| prohibited table fragment found | do not continue if prohibited fields are present |
| prohibited field fragment found | do not continue if active migrations changed |
| D1, wrangler, production, or preview target found in SQL block | do not execute SQL as part of this harness |
| active migrations folder contains an unapproved migration | do not target D1, wrangler, production, or preview databases |
Activation Blockers
What Remains Blocked
No SQL execution, D1 targeting, wrangler execution, active schemas, active migrations, table creation, writes, protected live routes, protected API routes, draft storage, account storage, actor storage, identity capture, staff decisions, Morning Sheet placement, tracking, analytics, or scoring are active.
Recommended Next Phase
Phase 9.4 - Draft Pilot Protected Read Runtime Plan
After validating the local-only draft artifact, the next safe planning step is a protected read runtime plan that keeps writes, protected live routes, protected API routes, active migrations, SQL execution, D1 targeting, accounts, draft storage, identity capture, tracking, analytics, and scoring blocked.
Boundaries: no SQL execution; no D1 target; no wrangler execution; no table creation; no active migrations; no write endpoints; no protected live routes; no protected API routes; no draft storage; no accounts; no identity capture; no actor storage; no staff decisions; no Morning Sheet placement; no tracking; no analytics; no scoring.
recommended-next