Skip to content

fix(torghut): repair empty TigerBeetle stable refs#12871

Merged
gregkonush merged 1 commit into
mainfrom
codex/review-remediation-stable-ref-empty-object
Jul 21, 2026
Merged

fix(torghut): repair empty TigerBeetle stable refs#12871
gregkonush merged 1 commit into
mainfrom
codex/review-remediation-stable-ref-empty-object

Conversation

@gregkonush

@gregkonush gregkonush commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

  • classify missing, non-object, and exactly empty {} stable-reference payloads without unsupported PostgreSQL JSONB functions
  • use PostgreSQL JSONB equality and SQLite exact-object extraction rather than array-length semantics
  • replace empty Python mappings while preserving already-populated stable references
  • add a regression proving an empty stable reference is repaired and the missing count drains to zero
  • replace the prior patch-runner head with direct source commits rebased onto current main

Related Issues

Remediates the unresolved Codex finding on #12818 and the actionable findings introduced on this remediation PR.

Testing

  • env LD_LIBRARY_PATH=/workspace/runtime-libs .venv/bin/pytest tests/test_backfill_tigerbeetle_stable_refs.py -q (14 passed)
  • .venv/bin/ruff format --check app/trading/tigerbeetle_journal/stable_ref_backfill.py tests/test_backfill_tigerbeetle_stable_refs.py
  • .venv/bin/ruff check app/trading/tigerbeetle_journal/stable_ref_backfill.py tests/test_backfill_tigerbeetle_stable_refs.py
  • complete required GitHub CI remains blocking before merge

Rollout

This changes the Torghut runtime image. After merge, the multi-architecture image build, digest promotion PRs, Argo sync, migration and TigerBeetle smoke hooks, workload readiness, restarts, logs, and health endpoints must be verified before review threads are resolved.

Breaking Changes

None. Existing non-empty stable references remain immutable.

Checklist

  • Testing section documents exact commands and results.
  • Screenshots are not applicable; Breaking Changes is filled in.
  • Rollout requirements are documented.

@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: 591a6e353d

ℹ️ 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 .github/review-remediation.patch Outdated

@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: 417c085aa7

ℹ️ 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/app/trading/tigerbeetle_journal/stable_ref_backfill.py Outdated

@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: 10dea8b932

ℹ️ 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/app/trading/tigerbeetle_journal/stable_ref_backfill.py Outdated

Copy link
Copy Markdown
Member Author

@codex address all unresolved current-head review feedback end to end. The branch now uses typed JSONB equality instead of the nonexistent jsonb_object_length, and _backfill_ref must repair rather than skip an empty mapping. Verify and correct this implementation as needed, ensure the PostgreSQL predicate compiles without unsupported functions and the SQLite empty-object execution regression drains to completion, run the focused and full Torghut gates, and push any required fixes to this PR branch.

@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: cc170ff970

ℹ️ 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 .github/review-remediation.patch Outdated
Comment thread .github/review-remediation.patch Outdated

@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: 8c9aca4083

ℹ️ 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/test_backfill_tigerbeetle_stable_refs.py Outdated
@gregkonush
gregkonush force-pushed the codex/review-remediation-stable-ref-empty-object branch from 8c9aca4 to 2dcd041 Compare July 21, 2026 05:04
@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 marked this pull request as draft July 21, 2026 05:04
@gregkonush
gregkonush marked this pull request as ready for review July 21, 2026 05:04
@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 merged commit 7266722 into main Jul 21, 2026
21 of 23 checks passed
@gregkonush
gregkonush deleted the codex/review-remediation-stable-ref-empty-object branch July 21, 2026 05:13
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