Skip to content

perf: index owner-scoped email timelines#591

Merged
seonghobae merged 2 commits into
developfrom
fix/email-owner-date-index-20260619
Jun 19, 2026
Merged

perf: index owner-scoped email timelines#591
seonghobae merged 2 commits into
developfrom
fix/email-owner-date-index-20260619

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • add ix_email_records_owner_date on (user_id, organization_id, date)
  • keep SQLAlchemy model metadata and bootstrap backfill SQL aligned
  • add bootstrap/model regression coverage for the composite index

Supersedes the useful database-performance slice of #574. The older #574 branch is based on master and also carries stale Python/dependency/workflow churn that is already present or newer on develop.

Verification

  • python3 -m pytest backend/tests/test_bootstrap_db.py -q (22 passed, 1 skipped; pytest emitted pre-existing warning text from the current harness)

Security Notes

  • No new input, URL, subprocess, IPC, WebView, model, or export boundary is introduced.
  • The change is a database index only; tenant/user scoping semantics remain unchanged.
  • Bootstrap SQL uses CREATE INDEX IF NOT EXISTS for safe repeat execution.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current status for head 50217d38d0842b2a1fe47bf3063833272c31d8f9:

  • Reviewed the PR perf: index owner-scoped email timelines #591 diff for the owner-scoped email timeline index. The change is limited to the SQLAlchemy model index, bootstrap backfill SQL, regression tests, and .jules/bolt.md guidance.
  • GitHub GraphQL reports unresolved_threads=0, reviewDecision=null, and mergeStateStatus=BLOCKED.
  • Local verification passed on the PR branch:
    • python3 -m pytest backend/tests/test_bootstrap_db.py -q (22 passed, 1 skipped)
    • python3 -m ruff check backend/db/models.py backend/scripts/bootstrap_db.py backend/tests/test_bootstrap_db.py
    • git diff --check origin/develop...HEAD
  • I intentionally did not include black --check as PR evidence because the same command fails on untouched origin/develop for these files; formatting drift is pre-existing, not introduced by this PR.
  • Current-head GitHub Actions jobs do not start runner steps. Check-run annotations report: The job was not started because your account is locked due to a billing issue.

@seonghobae seonghobae merged commit 56e2821 into develop Jun 19, 2026
14 of 17 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

PR governance metadata gate is not ready for 65ee0eb5043c94618f82d67f64cd22a4a04b9896:

  • Merge state is UNKNOWN; resolve conflicts or refresh mergeability.
  • Required check metadata could not be read: no required checks reported on the 'fix/email-owner-date-index-20260619' branch.

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