fix(codex-link): omit opaque execution state on provider switches
Preserve visible history with omission notes and original encrypted state on native return. Ship IDE beta.45.
This commit is contained in:
1 parent
21a8f3b8e9
commit
db46a470ea
8 files changed
+94
-68
No files matched your search
@@ -35,7 +35,7 @@ import gecis_context
|
||||
import terminal_stream
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
SURUM = "22" # AITURK IDE'nin bekledigi kopru surumu (codex-link-config.ts CODEX_BRIDGE_VERSION)
|
||||
SURUM = "23" # AITURK IDE'nin bekledigi kopru surumu (codex-link-config.ts CODEX_BRIDGE_VERSION)
|
||||
try:
|
||||
with open(os.path.abspath(__file__), "rb") as _f:
|
||||
KOD = hashlib.sha256(_f.read()).hexdigest()[:8]
|
||||
@@ -521,16 +521,6 @@ class H(http.server.BaseHTTPRequestHandler):
|
||||
except Exception:
|
||||
req = {}
|
||||
if external:
|
||||
# Opaque peer tasks cannot be sent to another provider. Detect
|
||||
# this permanent transfer error before committing SSE headers:
|
||||
# stock Codex retries unknown response.failed stream errors.
|
||||
# Projection validates a copy; the saved/request history stays
|
||||
# intact and no task is dropped or sent to the worker.
|
||||
try:
|
||||
gecis_context.portable_reasoning(req)
|
||||
except gecis_context.TransferError as e:
|
||||
return self._json(400, {"error": {"type": "invalid_request_error",
|
||||
"code": "aiturk_transfer_failed", "message": str(e), "retryable": False}})
|
||||
self._failure_key = terminal_stream.request_key(req or {"raw": govde.hex()}, self.headers)
|
||||
previous_failure = self.server.failure_replays.take(self._failure_key)
|
||||
if previous_failure:
|
||||
@@ -547,6 +537,8 @@ class H(http.server.BaseHTTPRequestHandler):
|
||||
if external or mixed or gecis_context.foreign(req):
|
||||
try:
|
||||
normalized = gecis_context.normalize(req)
|
||||
if external:
|
||||
normalized = gecis_context.portable_reasoning(normalized)
|
||||
except gecis_context.TransferError as e:
|
||||
self._transfer_begin()
|
||||
return self._transfer_fail(str(e))
|
||||
|
||||
Reference in new issue
Block a user