Skip to content

fix(core): ship safe failure diagnostics and manual continuation via beta - #26

Merged
sam2tom merged 13 commits into
betafrom
codex/beta-failure-diagnostics
Oct 11, 2026
Merged

sam2tom merged 13 commits into
betafrom
codex/beta-failure-diagnostics

Conversation

@sam2tom

@sam2tom sam2tom commented Oct 11, 2026 •

Copy link
Copy Markdown

Project applications can now inspect safe failure categories and determine whether a failed Session accepts a new manual Turn. Runtime billing failures preserve HTTP 402 as a typed category; Core administration clients and Web explain this category without native error text. Diagnostics reads create no Turns, and successful manual continuation preserves the failed Turn.

This integration preserves the current beta architecture while merging a production-base backport through normal merge commits. The requested production release is the ancestor 51fa68f640f7e4fb05eec6279dd521a0f2122f3d, based on deployed 11956c3c78d84e3edfabf43d13bc8497f4f59c25, not this PR's beta HEAD. The release ancestor adds no migrations. Current beta already contains eight unrelated migrations that this narrow release deliberately does not deploy. The beta ledger records this source selection and the matching Runtime template requirement.

Validation: focused Go/API/Runtime contracts, real local PostgreSQL failure-to-new-Turn/history/isolation/metrics regression, client and Web diagnostics tests, TypeScript, generated schemas and translations. Complete release CI is running for the fixed production ancestor; this PR also requires its integration CI. Independent review covered both adaptations and the release candidate. Production activation and actual live model execution are separate from these checks.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T07:06:15.598443Z 86304f3 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 86304f3ca3

ℹ️ 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".

result.Buckets[buckets[row.BucketNumber]] = &row.P95Ms
}
}
terminal, err := tx.Query(ctx, `SELECT status, outcome->>'error_code', outcome->>'engine_error_code', outcome->'engine_http_status', count(*) FROM turns WHERE completed_at >= $1 AND completed_at < $2 AND status IN ('completed','failed','cancelled') GROUP BY 1,2,3,4`, start, end)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Index the terminal-turn time range before querying it

On deployments with substantial retained Turn history, every Core metrics read will sequentially scan the entire turns table because no migration indexes terminal rows by completed_at: 000068_core_metrics_indexes.sql only provides a started_at index and an execution_interrupted-specific partial index that cannot satisfy this predicate. Since Sessions deleted from public access retain their Turns and the metrics service gives the whole history read a three-second budget, this new query will eventually time out, make terminal_turns null, and mark the service degraded; add an appropriate bounded/partial completed_at index and validate the query against representative history volume.

AGENTS.md reference: AGENTS.md:L17-L17

Useful? React with 👍 / 👎.

@sam2tom
sam2tom merged commit ac2d1d9 into beta Oct 11, 2026
48 of 50 checks passed
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