prospector/migrations
Natalie 4b3bc3d5c6
Some checks failed
CI / verify (push) Failing after 4m17s
fix(migrations): widen settings.mode + tasks.status CHECKs for DRAFT mode
DRAFT mode shipped in code (ProspectorMode/PROSPECTOR_MODES, the
UpdateSettingsDto guard, advanceDraft's pending_review staging, the review
endpoints) but two DB CHECK constraints were never widened to match, so the
feature was unreachable on a live DB:

- 0017: prospector_settings_mode_check (inline in 0001) only allowed
  GO/PAUSE/AWAY, so PUT /prospector/settings {mode:DRAFT} 500'd
  (violates prospector_settings_mode_check) — DRAFT could not be entered.
- 0018: prospector_tasks_status_check (inline in 0007) lacked
  'pending_review', so advanceDraft's markStatus(processing->pending_review)
  threw and the task aborted before any reply could be reviewed. 0015's
  header wrongly claimed task status had "no check constraint".

Both are additive, idempotent (drop-by-name then re-add the widened
predicate). Verified live end-to-end after applying: inbound -> draft_review
-> pending_review (body staged, no send child) -> approve -> send child
(actor=human) + structured correction; and a wrong-price draft body is HELD
spec_conflict by the alignment gate. Gates green: 353 tests, typecheck,
backend+web+ai-harness build, web smoke.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 12:36:45 -04:00
..
0001_prospector.sql docs: correct deploy target (black dead -> DO droplet) + on-demand GPU lifecycle 2026-06-29 07:22:29 -04:00
0002_drafts.sql docs: correct deploy target (black dead -> DO droplet) + on-demand GPU lifecycle 2026-06-29 07:22:29 -04:00
0003_corrections.sql docs: correct deploy target (black dead -> DO droplet) + on-demand GPU lifecycle 2026-06-29 07:22:29 -04:00
0004_booking.sql feat(prospector): enhance backend+MCP per MISSING_REQUIREMENTS.md (P0 gaps: real raw classify, booking triad+takeover verdict, composition+confidence, send safety floors incl vendor/human/known, structured returns; add /prospector/classify + mcp tool; richer inbound+runner+gate+people signals; update docs). Builds/tests green. Per PLAN.md + docs/features/mcp/MISSING_REQUIREMENTS.md. 2026-06-29 07:30:08 -04:00
0005_campaigns.sql feat(service): outbound campaign builder (facets / preview / launch) 2026-06-29 07:49:42 -04:00
0006_bilingual.sql feat(bilingual): add columns + audit/prospects capture + Triage/Detail toggle+dual render (designs/ + LP parity; UI unification foundation). Per MIGRATION-PLAN Phase 1. 2026-06-29 09:22:00 -04:00
0007_tasks.sql feat(prospector): auto-runner task queue + peer-network backend 2026-06-29 15:24:42 -04:00
0008_peers.sql feat(prospector): auto-runner task queue + peer-network backend 2026-06-29 15:24:42 -04:00
0009_provider_attestations.sql feat(prospector): auto-runner task queue + peer-network backend 2026-06-29 15:24:42 -04:00
0010_warm_intros.sql feat(prospector): auto-runner task queue + peer-network backend 2026-06-29 15:24:42 -04:00
0011_marketplace_routings.sql feat(prospector): auto-runner task queue + peer-network backend 2026-06-29 15:24:42 -04:00
0012_gpu_droplet.sql feat(prospector): on-demand DO GPU fleet + model-boss enrich (Hosts) 2026-06-29 15:59:01 -04:00
0013_gpu_idle_config.sql feat(prospector): runtime config for GPU idle auto-teardown 2026-06-29 18:24:47 -04:00
0014_specs.sql feat(specs): FACTS/specs config singleton — the alignment oracle 2026-06-30 12:02:37 -04:00
0015_draft_actor.sql feat(draft-mode): DRAFT runner mode stages replies for operator review 2026-06-30 11:40:26 -04:00
0016_correction_feedback.sql feat(corrections): DRAFT review endpoints + structured training pairs 2026-06-30 11:45:20 -04:00
0017_draft_mode_constraint.sql fix(migrations): widen settings.mode + tasks.status CHECKs for DRAFT mode 2026-06-30 12:36:45 -04:00
0018_pending_review_status.sql fix(migrations): widen settings.mode + tasks.status CHECKs for DRAFT mode 2026-06-30 12:36:45 -04:00