Skip to content

chore: merge prod into staging to clear PR #1304 conflicts#1308

Merged
joelorzet merged 111 commits into
stagingfrom
chore/merge-prod-into-staging-pr1304
May 19, 2026
Merged

chore: merge prod into staging to clear PR #1304 conflicts#1308
joelorzet merged 111 commits into
stagingfrom
chore/merge-prod-into-staging-pr1304

Conversation

@joelorzet

Copy link
Copy Markdown

Summary

  • Merges prod into staging to resolve the CONFLICTING state on the staging->prod release PR release: to prod #1304.
  • Two files conflicted (lib/errors/classify.ts and its test). Staging's version is a strict superset of prod's (added classifier rules for token transfer/approval, ABI function lookup, generic HTTP status, DATABASE_URL, Para session expiry, etc.). Staging's version is kept; no prod rules are lost.
  • No other tree changes: prod's direct hotfixes had already been incorporated into staging via independent paths, so the merge contributes only the second parent pointer needed to make staging a descendant of prod.

Once this lands on staging, PR #1304 will fast-forward cleanly.

zdumitru and others added 30 commits March 25, 2026 18:51
release: deploy staging to prod
release: deploy staging to prod
release: fix drizzle migration timestamps and deploy to prod
release: consolidate prod deploy config with OAUTH_JWT_SECRET
fix: patch MCP Accept header for clients that omit text/event-stream
fix: mark reconstructed MCP sessions as initialized
eskp and others added 19 commits May 8, 2026 15:24
release: to prod - 20260512
Post-incident additive index migration. Adds an index on
workflow_execution_logs(started_at) to close the seq-scan path used by
the per-org gas-usage analytics query that caused the 2026-05-05 RDS
CPU incident, plus the 11 missing FK indexes Postgres does not
auto-create.

Migration uses plain CREATE INDEX IF NOT EXISTS. On dev / PR-env DBs
the tables are small / empty so drizzle-kit migrate creates them
inline without user-visible impact. On real staging / prod the same
indexes must be applied as CREATE INDEX CONCURRENTLY BEFORE merge -
plain CREATE INDEX would take an ACCESS EXCLUSIVE lock on
workflow_execution_logs (1.9 GB on prod) for the duration of the build,
which is the multi-minute lock this PR exists to avoid.

Enforcement of that pre-step is a new merge gate:

- New workflow .github/workflows/db-prep-check.yml inspects each newly-
  added drizzle/*.sql for the directive `-- @requires-db-prep` near the
  top. If present, it requires the `db-prepped-<base-branch>` label on
  the PR before reporting success.
- New labels db-prepped-staging and db-prepped-prod (green) are flipped
  by the operator after they apply the indexes to the real target DB.
- The existing branch-protection ruleset for staging / prod / main has
  db-prep-check added as a required status check, so a missing label
  blocks merge at the branch-protection level - not by runbook trust.

Indexes are declared in lib/db/schema.ts and
lib/db/schema-extensions.ts via index() helpers so future drizzle-kit
generate runs do not see them as drift.

Composite (status, started_at DESC) on workflow_executions and an FK
index on para_wallets are intentionally NOT included; see PR
description and Linear KEEP-432 for the reasoning.
perf(db): KEEP-432 cherry-pick db-indexes migration to prod
Co-authored-by: nick <nickkounz@gmail.com>
Resolves CONFLICTING state on staging->prod release PR #1304.

The two conflicting files (lib/errors/classify.ts and its test) had
staging additions that are strict supersets of prod's version (newer
classifier rules for token transfer/approval, ABI lookup, HTTP status,
DATABASE_URL, Para session). Taking staging's version preserves those
rules; the merge contributes no other tree changes since prod's
hotfixes had already landed on staging via independent paths.
@joelorzet joelorzet requested review from a team, OleksandrUA, eskp and suisuss and removed request for a team May 19, 2026 23:38
@joelorzet joelorzet merged commit fcbca40 into staging May 19, 2026
31 checks passed
@joelorzet joelorzet deleted the chore/merge-prod-into-staging-pr1304 branch May 19, 2026 23:47
@github-actions

Copy link
Copy Markdown

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-1308
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

@github-actions

Copy link
Copy Markdown

ℹ️ No PR Environment to Clean Up

No PR environment was found for this PR. This is expected if:

  • The PR never had the deploy-pr-environment label
  • The environment was already cleaned up
  • The deployment never completed successfully

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.

5 participants