Skip to content

fix(torghut): bound loop status postgres reads#12287

Open
gregkonush wants to merge 2 commits into
mainfrom
codex/torghut-loop-status-indexes-main
Open

fix(torghut): bound loop status postgres reads#12287
gregkonush wants to merge 2 commits into
mainfrom
codex/torghut-loop-status-indexes-main

Conversation

@gregkonush

Copy link
Copy Markdown
Member

Summary

  • add concurrent, time-first PostgreSQL indexes for the three loop-status reads that exceeded the production 1500 ms statement timeout
  • repair interrupted invalid concurrent-index residues before rebuilding while leaving valid indexes untouched
  • cover revision behavior, realistic PostgreSQL 18 plans and timeouts, symmetric downgrade, and required CI wiring

Related Issues

None

Testing

  • uv sync --frozen --extra dev
  • uv run --frozen pytest -q tests/test_loop_status_read_indexes_migration.py (7 passed)
  • TORGHUT_TEST_POSTGRES_DSN=postgresql+psycopg://torghut:torghut@127.0.0.1:55432/torghut_test uv run --frozen pytest -q tests/execution/test_loop_status_read_indexes_postgres.py against postgres:18-trixie (1 passed)
  • uv run --frozen python scripts/check_migration_graph.py
  • uv run --frozen ruff format --check migrations/versions/0062_loop_status_read_indexes.py tests/test_loop_status_read_indexes_migration.py tests/execution/test_loop_status_read_indexes_postgres.py
  • uv run --frozen ruff check migrations/versions/0062_loop_status_read_indexes.py tests/test_loop_status_read_indexes_migration.py tests/execution/test_loop_status_read_indexes_postgres.py
  • uv run --frozen ruff check migrations/versions/0062_loop_status_read_indexes.py tests/test_loop_status_read_indexes_migration.py tests/execution/test_loop_status_read_indexes_postgres.py --select F401 --preview
  • uv run --frozen pyright --project pyrightconfig.json
  • uv run --frozen pyright --project pyrightconfig.alpha.json
  • uv run --frozen pyright --project pyrightconfig.scripts.json
  • uv run --frozen python scripts/run_pylint_torghut_quality_diff_gate.py --base origin/main migrations/versions/0062_loop_status_read_indexes.py tests/test_loop_status_read_indexes_migration.py tests/execution/test_loop_status_read_indexes_postgres.py
  • uv run --frozen python scripts/run_pylint_torghut_file_length_gate.py --base origin/main migrations/versions/0062_loop_status_read_indexes.py tests/test_loop_status_read_indexes_migration.py tests/execution/test_loop_status_read_indexes_postgres.py
  • uv run --frozen python scripts/measure_torghut_tech_debt.py --baseline config/quality/tech-debt-baseline.json --enforce-ratchet --format markdown
  • bun test packages/scripts/src/torghut/__tests__/build-push-workflow.test.ts (22 passed)

Screenshots (if applicable)

N/A; this is a PostgreSQL migration and CI-only change.

Breaking Changes

None. Alembic applies revision 0062_loop_status_read_indexes after 0061_linked_submission_terminal; index creation and removal use PostgreSQL concurrent operations.

Checklist

  • Testing section documents the exact validation performed (or N/A with justification).
  • Screenshots and Breaking Changes sections are handled appropriately (removed or filled in).
  • Documentation, release notes, and follow-ups are updated or tracked. No separate documentation or release-note update is required for this narrow operational migration.

@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: 001f6e0592

ℹ️ 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 services/torghut/tests/execution/test_loop_status_read_indexes_postgres.py Outdated
Comment thread services/torghut/tests/execution/test_loop_status_read_indexes_postgres.py Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gregkonush
gregkonush force-pushed the codex/torghut-loop-status-indexes-main branch 2 times, most recently from 57af111 to 99ef567 Compare July 13, 2026 00:45
@gregkonush

Copy link
Copy Markdown
Member Author

:shipit:

@gregkonush
gregkonush force-pushed the codex/torghut-loop-status-indexes-main branch from 99ef567 to a377030 Compare July 13, 2026 01:04
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