Repository navigation
fix(proxy): use DEFAULT_HOME_DIR for oversized response.create dumps - #575
Merged
Merged
Conversation
The oversized response.create payload dump dir was hardcoded to `/var/lib/codex-lb/debug/response-create-dumps`. That path is correct inside the container image (where DEFAULT_HOME_DIR resolves to /var/lib/codex-lb), but on macOS `uv tool` / LaunchAgent installs the process has no writable access to /var/lib/codex-lb and the dump path silently fails when the proxy tries to write a guarded oversized payload (originally reported in #556). Resolve the dump dir from DEFAULT_HOME_DIR so the path tracks the deploy's data directory: - inside the container image: `/var/lib/codex-lb/debug/response-create-dumps` (unchanged) - macOS `uv tool` install: `~/.codex-lb/debug/response-create-dumps` This is the dump-path slice of the reverted #560 (#569). It does not include any of the history-slimming changes from #560 -- only the portable dump path, which has no transport-layer interaction and only fires when the proxy is *guarding* against an oversized request that already exceeds the upstream WebSocket frame budget. Verified against the dev container: DEFAULT_HOME_DIR resolves to `/var/lib/codex-lb`, dump_dir resolves to `/var/lib/codex-lb/debug/response-create-dumps`, smoke test on /v1/responses returns 'OK', and the existing test suite passes (1493 passed, 3 skipped, 4 warnings).
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This was referenced May 10, 2026
Soju06
added a commit
that referenced
this pull request
May 10, 2026
xirothedev
added a commit
to xirothedev/codex-lb
that referenced
this pull request
May 10, 2026
…l fetch timeouts, image rewrite) Upstream batch v1.16.0 highlights: - proxy: expose drain status for graceful deploys (Soju06#564) - proxy: narrow budget-safe gate to primary usage (Soju06#561) - proxy: handle model fetch timeouts (Soju06#541) - proxy: inline-rewrite input_image file references (Soju06#571) - proxy: retry transient stream timeouts (Soju06#551) - proxy: use DEFAULT_HOME_DIR for oversized response.create dumps (Soju06#575) - accounts: split compact quota row + recover quota status (Soju06#562, Soju06#559) - db: size background pool for burst traffic (Soju06#563) - upstream: drop top_p for gpt-5 (Soju06#538) Conflict resolved: - app/modules/proxy/service.py: kept fork's multi-line import + FailurePhase (used by deterministic failover at line 8294). Merge cleanup: - app/main.py: removed pre-existing duplicate InFlightMiddleware class + duplicate _is_benign_metrics_bind_failure helper that shadowed canonical versions and broke new upstream test (test_in_flight_middleware_does_not_count_drain_status). Verification: - pytest tests/unit: 1459 passed, 17 failed (all pre-existing on backup branch backup/pre-upstream-merge-20260511 — date-bound API key tests, test_db_migrate.py SQLite env, settings duplicate validators). - openspec validate --specs: 19/19 passed. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced May 10, 2026
vitalNohj
pushed a commit
to vitalNohj/codex-lb
that referenced
this pull request
Jul 17, 2026
…oju06#575) The oversized response.create payload dump dir was hardcoded to `/var/lib/codex-lb/debug/response-create-dumps`. That path is correct inside the container image (where DEFAULT_HOME_DIR resolves to /var/lib/codex-lb), but on macOS `uv tool` / LaunchAgent installs the process has no writable access to /var/lib/codex-lb and the dump path silently fails when the proxy tries to write a guarded oversized payload (originally reported in Soju06#556). Resolve the dump dir from DEFAULT_HOME_DIR so the path tracks the deploy's data directory: - inside the container image: `/var/lib/codex-lb/debug/response-create-dumps` (unchanged) - macOS `uv tool` install: `~/.codex-lb/debug/response-create-dumps` This is the dump-path slice of the reverted Soju06#560 (Soju06#569). It does not include any of the history-slimming changes from Soju06#560 -- only the portable dump path, which has no transport-layer interaction and only fires when the proxy is *guarding* against an oversized request that already exceeds the upstream WebSocket frame budget. Verified against the dev container: DEFAULT_HOME_DIR resolves to `/var/lib/codex-lb`, dump_dir resolves to `/var/lib/codex-lb/debug/response-create-dumps`, smoke test on /v1/responses returns 'OK', and the existing test suite passes (1493 passed, 3 skipped, 4 warnings).
vitalNohj
pushed a commit
to vitalNohj/codex-lb
that referenced
this pull request
Jul 17, 2026
* chore(main): release 1.16.0 * docs(changelog): mark Soju06#560 reverted, fold Soju06#574 narrowing into Soju06#571 entry, add Soju06#569/Soju06#575
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#560(commite42af5e, reverted in#569/ commit9910e95) was reverted because of layering issues with its history-slimming behavior. But it also bundled an unrelated, correct fix for #556: the oversizedresponse.createpayload dump path was hardcoded to/var/lib/codex-lb/debug/response-create-dumps. That path is fine inside the container image (whereDEFAULT_HOME_DIRresolves to/var/lib/codex-lb), but the#556reporter's macOSuv tool/ LaunchAgent install has no writable access to/var/lib/codex-lb, so the proxy's guarded oversized-payload dump silently fails to write.When
#560was reverted, this portability fix was reverted with it, so#556is currently re-opened. This PR re-lands only that one hunk on top of currentmain, with no other change from#560.What changed
app/modules/proxy/service.py: importDEFAULT_HOME_DIRfromapp.core.config.settingsand resolve_OVERSIZED_RESPONSE_CREATE_DUMP_DIR = DEFAULT_HOME_DIR / "debug" / "response-create-dumps"instead of the hardcoded absolute path.app/modules/proxy/service.py: drop the now-unusedfrom pathlib import Pathimport (it was only used by the hardcodedPath("/var/lib/...")literal).That's the entire diff: +7 / -3, 1 file.
What this is not
#560. None of_slim_response_create_payload_for_upstream,_omit_historical_response_input_items_to_fit, or the omission notice items are touched._enforce_response_create_size_limit, which only runs when the proxy is guarding against an oversized request that already exceeds the upstream WebSocket frame budget. The dump is a debug artefact, not part of the request flow.Verification
Local on the fix branch:
Empirical verification on the rebuilt dev container:
The container image's resolved path matches the previous hardcoded literal, so existing operators see no behavior change. macOS
uv tooldeploys now write to~/.codex-lb/debug/response-create-dumps(or whereverDEFAULT_HOME_DIRresolves on that host) instead of failing.Out of scope
#560stays out (see#568/#569for the broader design discussion). This PR is intentionally minimal: only the dump-path portability slice.