For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Connect the existing PostgreSQL/MySQL data-source runtime to the data-research ingestion control plane so a configured enterprise database can be registered, collected repeatedly, diagnosed, retried, and traced to an immutable catalog snapshot and field evidence.
Architecture: Keep app/core/data_source as the credential-safe connection boundary and app/core/data_research as the ingestion control plane. Database collection runs synchronously behind an explicit job execution endpoint for the demonstration release, while persisted job state, attempt numbers, catalog snapshots, and evidence make later worker extraction possible without changing the API contract.
Tech Stack: Flask, SQLAlchemy, PostgreSQL JSONB, Neo4j-backed data-source definitions, Vue 2, Vuetify, pytest.
metadata_collection connection purpose.force_rerun.codex/dataops-phase1-equipment-governance; no push or deployment is authorized.Files:
app/core/data_research/sources.pyapp/core/data_research/repository.pyapp/api/data_development/routes.pytests/data_research/test_database_source_registration.pytests/data_research/test_development_api.pyInterfaces:
DataSourceConnectionManager.definitions.get(uid) and IngestionSource.Produces: DatabaseSourceRegistrationService.ensure(data_source_uid, actor_uid).
[x] Step 1: Write failing tests
Cover successful PostgreSQL/MySQL registration, idempotent refresh, disabled or unsupported definitions, secret-free stored config, and automatic registration before a catalog_collect job is created.
Run:
PYTHONPATH=. .venv/bin/pytest -q tests/data_research/test_database_source_registration.py tests/data_research/test_development_api.py
Expected: failure because the registration service and route integration do not exist.
Store only database type, database name, and default schema. Reuse the external data-source UID as the ingestion source UID so jobs, connection pools, audit records, and evidence share one stable identifier.
Run the Task 1 test command and expect all tests to pass.
Files:
app/core/data_research/catalog/execution.pyapp/core/data_research/catalog/models.pyapp/core/data_research/ingestion.pyapp/core/data_research/models.pyapp/core/data_research/repository.pyapp/core/data_research/artifacts.pyapp/models/data_research.pymigrations/versions/20260729_280_catalog_ingestion_execution.pytests/data_research/test_catalog_execution.pytests/data_research/test_ingestion_service.pytests/data_research/test_ingestion_models.pytests/test_database_migrations.pyInterfaces:
CatalogCollectionService.collect(data_source_uid, CatalogScope) and IngestionService.transition.Produces: CatalogIngestionExecutor.execute(job_uid), CatalogSnapshotRecord, and SqlAlchemyCatalogSnapshotRepository.
[x] Step 1: Write failing tests
Cover attempt incrementing, failure-stage capture, sanitized errors, valid scope parsing, successful state progression, immutable per-attempt snapshots, field evidence locators, failed collection, retry, and same-attempt resume.
Run:
PYTHONPATH=. .venv/bin/pytest -q tests/data_research/test_catalog_execution.py tests/data_research/test_ingestion_service.py tests/data_research/test_ingestion_models.py tests/test_database_migrations.py
Expected: failure because execution, snapshot persistence, and attempt fields do not exist.
Move jobs through queued → extracting → normalizing → matching → awaiting_review, increment attempts at extraction start, persist one catalog snapshot per job attempt, and persist one evidence fragment per collected field. On failure, persist the sanitized diagnostic and the stage that failed before returning an error.
Run the Task 2 test command and expect all tests to pass.
Files:
app/api/data_development/routes.pyapp/core/system/permissions.pyfrontend/src/api/dataDevelopment.jsfrontend/src/views/dataGovernance/development/ingestion.vuefrontend/src/views/dataGovernance/development/tasks.vuetests/data_research/test_development_api.pytests/data_research/test_development_frontend_contract.pytests/test_permission_matrix.pyInterfaces:
Produces: POST /api/development/v1/ingestion-jobs/{job_uid}/execute, GET /api/development/v1/ingestion-jobs/{job_uid}/catalog-snapshots, and GET /api/development/v1/ingestion-jobs/{job_uid}/evidence.
[x] Step 1: Write failing tests
Cover permission classification, execution response, snapshot/evidence responses, secret-free serialization, selectable configured data sources, deliberate rerun, attempt/failure diagnostics, and retry controls.
Run:
PYTHONPATH=. .venv/bin/pytest -q tests/data_research/test_development_api.py tests/data_research/test_development_frontend_contract.py tests/test_permission_matrix.py
Expected: failure because the endpoints and UI contract do not exist.
Use the existing configured data-source list rather than requiring users to type a UID. Execute a newly created database catalog job explicitly, expose progress and diagnostic fields in the task list, and keep evidence/snapshot reads available to viewers.
Run the Task 3 test command and expect all tests to pass.
Files:
docs/architecture/OPENAPI.yamldocs/architecture/DATA_MODEL.mddocs/FUNCTION_MODULE_CENSUS_20260726.mddocs/DATAOPS_PHASE1_3_MONTH_WORK_PLAN_20260729.mdInterfaces:
Produces: generated API inventory, current data model, and an evidence-backed WP-03 status that separates engineering completion from enterprise connectivity acceptance.
[x] Step 1: Regenerate and verify contracts
Run:
.venv/bin/python scripts/generate_openapi.py
PYTHONPATH=. .venv/bin/pytest -q tests/test_architecture_artifacts.py
Record engineering evidence and leave the two real enterprise source connections as externally blocked until customer inputs are supplied.
Run the focused integration tests, full backend suite, frontend production build, migration upgrade, browser flow, and git diff --check.
Verification evidence:
20260729_280 (head).awaiting_review task with attempt count 1; browser console reported zero errors and zero warnings.deployment/app matches the canonical file under app; the historical full release-copy reconciliation remains WP-13 scope.Hygiene: git diff --check completed without findings.
[x] Step 4: Commit
Create one independently reversible WP-03 engineering commit. Do not push.