Skip to content

Migrate legacy research record status columns#83

Merged
Techris93 merged 1 commit into
mainfrom
codex/research-legacy-schema-migration
Jul 22, 2026
Merged

Migrate legacy research record status columns#83
Techris93 merged 1 commit into
mainfrom
codex/research-legacy-schema-migration

Conversation

@Techris93

Copy link
Copy Markdown
Owner

Summary

  • migrate long-lived research_subjects, research_evidence, and research_iocs tables to the active/retracted lifecycle
  • preserve all existing rows with active as the non-null default
  • restore Mission Control Research Cases reads on the pilot SQLite database
  • add an exact legacy-schema regression fixture and checkpoint documentation

Verification

  • 394 Core tests passed, 14 existing warnings, 4 subtests passed
  • MkDocs strict build passed
  • live Research Cases endpoint returns HTTP 200
  • all eight scoped registry monitors completed with zero failures

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 70a0bd4
Status: ✅  Deploy successful!
Preview URL: https://bc9b6e83.website-bks.pages.dev
Branch Preview URL: https://codex-research-legacy-schema.website-bks.pages.dev

View logs

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying secopsai with  Cloudflare Pages  Cloudflare Pages

Latest commit: 70a0bd4
Status: ✅  Deploy successful!
Preview URL: https://89fd87ef.secopsai.pages.dev
Branch Preview URL: https://codex-research-legacy-schema.secopsai.pages.dev

View logs

@Techris93
Techris93 merged commit 8487d99 into main Jul 22, 2026
16 checks passed
@Techris93
Techris93 deleted the codex/research-legacy-schema-migration branch July 22, 2026 17:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70a0bd42c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread soc_store.py
ON registry_snapshots (collector_id, created_at DESC);
"""
)
for table in ("research_subjects", "research_evidence", "research_iocs"):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Migrate legacy research_rules before indexing status

For a long-lived database that already has a legacy research_rules table without the lifecycle status column, init_db() still fails before reaching this loop because the earlier CREATE INDEX idx_research_rules_case_type ON research_rules (case_id, rule_type, status) references the missing column. This leaves Research Cases broken for legacy deployments with detection rules; include research_rules.status in the migration and run that migration before creating indexes that depend on it.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant