Skip to content

fix(proxy): fence clean-close bridge replacements - #1710

Open
hansu650 wants to merge 5 commits into
Soju06:mainfrom
hansu650:fix/http-bridge-clean-close-race
Open

fix(proxy): fence clean-close bridge replacements#1710
hansu650 wants to merge 5 commits into
Soju06:mainfrom
hansu650:fix/http-bridge-clean-close-race

Conversation

@hansu650

@hansu650 hansu650 commented Aug 13, 2026

Copy link
Copy Markdown

Fixes #1695

Summary

  • advance the durable owner epoch when a fresh local HTTP bridge session replaces an unrepresented generation still owned by this instance
  • fence the retiring generation's late durable release so it cannot clear the replacement owner
  • keep epoch advancement separate from takeover authorization, so a newly active remote owner remains protected
  • preserve ordinary in-process session reuse and cross-instance owner checks
  • add deterministic product-path, call-layer, and durable-repository regressions

Verification

  • regression fails deterministically with 409 bridge_instance_mismatch before the fix
  • clean-close regression passes 20 consecutive runs after the fix
  • related HTTP bridge and durable-session suites: 183 passed
  • ruff check and ruff format --check on changed Python files
  • targeted ty check on changed Python files
  • OpenSpec delta added under fence-clean-close-local-replacement

The OpenSpec CLI is not available in the local Python-only task environment, so strict OpenSpec validation is left to the repository CI.

Copy link
Copy Markdown
Author

@codex review

@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: 0dcb9e7dc0

ℹ️ 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 app/modules/proxy/_service/http_bridge/mixin.py Outdated

Copy link
Copy Markdown
Author

@codex review

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

ℹ️ 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 app/modules/proxy/_service/http_bridge/mixin.py Outdated
@hansu650

Copy link
Copy Markdown
Author

@codex review

@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: 4177fc2a95

ℹ️ 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 app/modules/proxy/_service/http_bridge/mixin.py Outdated
@hansu650

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 2fbb83e1e5

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

@Komzpa Komzpa added the needs rebase Needs rebase or conflict repair against current main label Aug 14, 2026
@Komzpa
Komzpa force-pushed the fix/http-bridge-clean-close-race branch from 2fbb83e to 6a8086a Compare August 14, 2026 17:37
@Komzpa Komzpa added needs rebase Needs rebase or conflict repair against current main and removed needs rebase Needs rebase or conflict repair against current main labels Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Needs rebase or conflict repair against current main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky: test_v1_responses_http_bridge_reconnects_after_clean_upstream_close intermittently fails with 409 on CI

2 participants