Skip to content

Merge upstream v8.0.44 into the fork (HOUSE-79) - #13

Merged
ericlitman merged 390 commits into
mainfrom
claude/HOUSE-79-upstream-v8.0.44
Oct 27, 2026
Merged

ericlitman merged 390 commits into
mainfrom
claude/HOUSE-79-upstream-v8.0.44

Conversation

@ericlitman

@ericlitman ericlitman commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the fork from upstream v8.0.13 to v8.0.44 with a merge commit, so main keeps upstream ancestry and lands through the normal gates.

main (c265779f, v8.0.13 + our 51 commits)
└── 7f7d7a61  Merge upstream v8.0.44            # 387 upstream commits, 10 conflicted files
    ├── 27530907  fix(auth): keep reserve windows when restoring quota state
    └── c88d701f  docs: record the merge-based upstream sync

The diff against main is mostly upstream: 966 files, +134,827 / −9,753. To read only what this PR authored:

  • git show --remerge-diff 7f7d7a61 prints the conflict resolutions (1,154 lines, of which 717 are the deleted release.yaml and 49 are go.sum).
  • git diff v8.0.44 c88d701f prints our whole fork delta on the new base (83 files, +5,438 / −1,152).
  • git show 27530907 prints the one behaviour fix.

Conflict resolutions in production code:

 ValidateV8Config / commitConfigUpdate          # internal/config/config_v8.go, sdk/cliproxy/service_config.go
+  cfg.Models.Validate()                         # upstream: model-catalog check
   cfg.ValidateQuotaReserves()                   # ours: reserves check, both now run

 pickNextLegacy candidate filter                # sdk/cliproxy/auth/conductor_selection.go
   eligibility
   quotaReserveReached        -> skip            # ours, kept ahead of affinity
+  !authSupportsRouteModel    -> skip            # upstream
+  append affinity candidate                     # upstream (rebind-on=quota only)
   tried                      -> skip
   append candidate

 applyCodexHeadersWithSIWC                      # internal/runtime/executor/codex_executor_request.go
+  SIWC branch, early return                     # upstream, verbatim
   ordinary path -> applyCodexIdentityHeaders    # ours (usage reads share it)

 updateInternalLocked                           # sdk/cliproxy/auth/conductor_lifecycle.go
+  if isFileSnapshot: restore status and quota   # upstream d5816d5e
-  credChanged block                             # ours, replaced by upstream's
   else if Quota.ObservedAt zero: merge existing observation   # ours, for non-file replacements

Three test files take upstream's synchronization (xai_websockets_executor_test.go, gitstore_test.go, websocket_session_target_test.go). .github/workflows/release.yaml stays deleted, because upstream fires it on every tag, including our v8.0.44-mob.N tags. go.sum is regenerated, and go.mod already held the higher version of every dependency.

Behaviour fix outside the conflict markers. Upstream's two quota-restore points copy back ObservedAt and Signals only. Our QuotaState also has ReserveWindows (HOUSE-62), so a newer reserve window was dropped:

 auth.Quota = existing.Quota.Clone()
 auth.Quota.ObservedAt = observation.ObservedAt
 auth.Quota.Signals = observation.Signals
+auth.Quota.ReserveWindows = observation.ReserveWindows

How upstream's affinity rewrite (7a687f42) interacts with soonest-reset:

  • A bound session returns its cached credential before the fallback selector runs, so soonest-reset ranks only new or rebound sessions. That matches today's behaviour.
  • session-affinity-rebind-on is unset in our config and defaults to any.
  • The reserve filter runs before the affinity candidate list, so a reserve-blocked account is never offered as an affinity candidate.
  • Upstream's credential_quota cooldown (bbcd5734) now excludes an account before ranking. Soonest-reset's "all windows exhausted" fallback therefore cannot override a real account cooldown.

Evidence

  • Before: with the reserve-window line removed, TestUpdateKeepsNewerIncomingReserveWindow fails. It fails in the file-snapshot case or the credential_quota case, whichever line is removed. The test registers an auth with a weekly reserve window at 10% used, updates it with a newer window at 90% used, and reads back the old window.
    After: both cases pass. The stored auth keeps the newer window.
  • Live config on the new code (studio2, before merge):
    • I built the branch binary (c88d701f) and started it on studio2 with a copy of the live config. The copy pointed at port 18317 and an empty auth folder, so no live credential was touched.
    • It started with no warnings and served GET /v1/models with 200.
    • config.LoadConfig on the same copy read: strategy="soonest-reset" session-affinity=true ttl="4h", 2 quota reserves at 20% (reserves valid), request-retry=1 max-retry-credentials=1 max-retry-interval=10 save-cooldown-status=true transient-error-cooldown-seconds=5 ws-auth=true.
    • Those last five come from legacy top-level keys, so they still map to their v8 paths.
  • Hermetic e2e on c88d701f: 6 files, 15 tests passed. That covers models, chat completions, messages, failover, responses, and 6 soonest-reset selector scenarios.

Merge Danger

Door: one-way for history, two-way for the running proxy.

Merging brings 387 upstream commits into main. Reverting the merge commit restores the old tree, but the next upstream sync would then have to revert that revert. On studio2, the deploy after merge is a symlink switch, so going back to v8.0.13-mob.6 takes one command and a launchd restart.

Blast Radius: studio2-proxy

Every client of the studio2 proxy (Claude Code, Codex CLI, the factory host and agy) rides on this after deploy. The risk is upstream behaviour changes in routing, translators and executors that our tests don't cover. The deploy keeps a config and binary-path backup.

Acceptance criteria (HOUSE-79)

Criterion Verification Result
"main contains upstream v8.0.44 and all of our behaviour listed above." git merge-base --is-ancestor v8.0.44 c88d701f exits 0. Mergify lands with a merge commit, which keeps it. Met on the branch. Re-checked on main after merge.
"Our tree carries only our workflows … No upstream tag is pushed to the fork." git ls-tree --name-only c88d701f .github/workflows/ lists ci.yml only. The branch was pushed alone; push.followTags is unset and upstream tags are lightweight. Met.
"The soonest-reset selector, usage reads and quota reserves still pass their unit tests, and the hermetic e2e suite passes in CI." go test ./... on c88d701f: 102 packages ok, no failures. Hermetic e2e: 15 of 15 locally. CI result on this head appears in the checks. Met locally. CI pending.
"The selector rewrite in 7a687f42 and our soonest-reset changes are reconciled by reading both … The PR names how the two interact." The "How upstream's affinity rewrite interacts" section above. Met.
"The Terra workaround … is kept only if upstream v8.0.44 still lacks gpt-6.1-terra." git grep -l gpt-6.1-terra v8.0.44 -- internal/registry finds 0 files. Kept.
"go.mod keeps the higher of our MOB-1499 versions and upstream's … go build ./... and go test ./... pass." go.mod is unchanged by the merge resolution; klauspost/compress v1.18.7 stays above upstream. Build and test exit 0. Met.
"MOBILYZE.md names the new base, the landing method used, and why." git show c88d701f -- MOBILYZE.md Met.
"Release tag v8.0.44-mob.1 is cut from the merged head." Cut after merge. Not yet.
"studio2 runs v8.0.44-mob.1 …" plus the ticket's live verification list Deployed and proved through the front door after merge. The results go on HOUSE-79. Not yet.

Gate results on c88d701f

Check Exit
go build ./... 0
go vet ./sdk/cliproxy/... ./internal/config/... ./internal/runtime/... 0
go test ./... (102 packages ok) 0
pnpm --dir e2e run fmt:check / lint 0 / 0
pnpm --dir e2e exec e2e run --target hermetic (15 passed) 0
gofmt -l on files this PR authored clean

gofmt -l flags three files that are byte-identical to upstream v8.0.44. Go 1.27.3 flags internal/pluginhost/host.go, and Go 1.26.10 flags two test files. The two gofmt versions disagree on those files. They are left as upstream ships them, and CI doesn't run gofmt.

Not verified

  • The front-door requests on studio2 (Claude Messages, Codex Responses, chat completions), the affinity hits after restart, and reserve enforcement. These run against the deployed release after merge, because a second instance on the live auth files could rotate OAuth refresh tokens out from under the running proxy.
  • Upstream behaviour we don't exercise: translators, providers we don't use (Gemini, xAI, Vertex, Meta, Devin), and the plugin host. These carry upstream's own tests only.

Linear: HOUSE-79

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

luispater and others added 30 commits October 12, 2026 20:51
…improved state management

- Add support for handling multiple auth records from a single file.
- Preserve plugin-disabled states and prioritize existing auth states when updating.
- Unregister stale auths and associated models to maintain consistency.
- Introduce dynamic auth ID assignment and file-based deduplication for better reliability.
- Improve metadata normalization, priority handling, and file path matching.

Closes: #6551
test(claude): pin executor clock in tool_search disabled golden
- Add `send-keepalive-before-ft` configuration to allow sending SSE heartbeats before the first token arrives.
- Support pre-first-token keep-alives and handle early failure events when SSE headers are already committed.

Closes: #6554
docs: add sub2api to "Who is with us?"
…cp-name

fix(claude): restore passthrough MCP tools wrapped with their full mcp__ name
…eferred tool

Anthropic keeps the prompt cache when deferred tools are added, but not when a request goes from no deferred tool to one. Codex hides deferred tools until a search returns them, so the request after the first discovery always missed the cache. Native tool search now declares one constant deferred anchor tool ahead of discovered tools, so discoveries only append to tools[].
…-anchor

fix(claude): keep prompt cache when tool_search discovers the first deferred tool
…eloads

- Access configuration safely via getters across server routes, middleware, and service routines.
- Clone configuration snapshots for runtime and synchronize access in management handlers.
- Guard configuration YAML snapshots with mutex locks during reloads.

Closes: #6559
…anitization

- Retain multi-branch `anyOf` and `oneOf` unions instead of flattening them into a single branch.
- Normalize `oneOf` to `anyOf` on native Gemini/Antigravity schema carriers while preserving `oneOf` when standard constraints are allowed.
- Materialize required-only union branches using parent object properties.
- Strip null and boolean `false` branches from unions, applying `nullable: true` and description hints where appropriate.

Closes: #3662
… translator

- Normalize replayed `tool_search_call` and `tool_search_output` items into Gemini function call and output pairs.
- Map discovered tool names and namespaces appropriately during tool search history serialization.
- Emit `tool_search_call` output items with proper lifecycle statuses and arguments in response translation.

Closes: #5588
- Add `claude-haiku-5-5` model definition to registry.
- Remove `gemini-3.7-flash`, `gemini-3.6-flash-high`, `gemini-3.7-flash-high`, `gemini-pro-agent`, and `gemini-3.1-pro-low` models.
- Introduce `sdk/httptransport` package with `Decorator`, `WithDecorator`, `WithoutDecorator`, `InheritDecorator`, and `Decorate` functions.
- Propagate transport decorators from incoming HTTP request contexts in `BaseAPIHandler.GetContextWithCancel`.
- Apply transport decoration after client transport selection across proxy-aware, Devin, uTLS, and Antigravity HTTP clients.

Closes: #5616
…ailability

docs(readme): update Claude, Gemini and Meta model availability
…ecycle drops

- Recognize `http2: client connection force closed` and `http2: client conn is closed` errors as connection lifecycle and transient transport issues.
- Prevent credential cooldown and enable automatic request retries for closed HTTP/2 client connections.

Closes: #6580
…eloads

- Access configuration safely via getters across server routes, middleware, and service routines.
- Clone configuration snapshots for runtime and synchronize access in management handlers.
- Guard configuration YAML snapshots with mutex locks during reloads.

Closes: #6583
… responses stream

- Introduce `ItemIDPrefix` using UUID in `interactionsToResponsesStreamState`.
- Update `interactionsFallbackItemID` to include the unique prefix when generating fallback item IDs.

Closes: #6588
…eloads

- Access configuration safely via getters across server routes, middleware, and service routines.
- Clone configuration snapshots for runtime and synchronize access in management handlers.
- Guard configuration YAML snapshots with mutex locks during reloads.

Closes: #6592
… in OpenAI chat completions

- Introduce `defaultClaudeChatMaxTokensForModel` to determine default max tokens based on model metadata and fallback rules.
- Update `ConvertOpenAIRequestToClaude` to apply model-specific default max tokens and handle null `max_tokens` or `max_completion_tokens`.
- Implement `stripTranslatedDefaultMaxTokens` in Claude executor to allow payload default rules to override synthesized max tokens when omitted by the caller.

Closes: #6601
luispater and others added 10 commits October 26, 2026 20:36
- Fall back to schema prompts for Antigravity Claude 5.5 while preserving unrelated request settings.
- Normalize unsupported forced tool choices before thinking preparation in direct Claude execution and token-count paths.
- Add regression coverage for schema integrity, model boundaries, retries, and final payload rule precedence.

Closes: #7000
- Route bare text and media blocks in a top-level interactions input array through the existing user content converter so images and files are no longer dropped on the Antigravity path.
- Keep envelope and explicit-role items on the step dispatch so step-form requests, native parts, and system/developer turn accounting stay unchanged.

Closes: #7008
Validate draft TXT values and RFC 3986 paths without legacy schema mixing; preserve first-key-wins and legacy base-path compatibility. Validate RFC 6335 names, filter unusable addresses, and display scoped IPv6 and WebSocket URLs.

Replace the single-packet browser with per-interface RR caching, source validation, TTL and cache-flush handling, PTR maintenance and known-answer suppression. Add deterministic split-order, capacity, expiry, scope and schema regression tests.
…wn and failover

- Tag locally synthesized missing-finishReason failures as stream-truncated in the Gemini and Vertex executors, and carry that classification through the auth manager so it skips credential cooldown and stops cross-credential replay while the public 502 and partial usage are preserved.
- Carry the truncation classification through usage reporting and the Home queue payload so Home-side schedulers also skip the spurious cooldown, and add regression coverage for both the manager and usage paths.

Closes: #7005
feat(discovery): align LAN discovery with IETF AI gateway draft
- Remove APIMart sponsor entries from README.md, README_CN.md, and README_JA.md.
- Delete associated sponsor image assets for APIMart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-advanced-security github-advanced-security AI 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.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@unfret unfret 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.

⚠️ Review incomplete

  • incomplete review: no reviewer completed
  • primary native-openai/openai/gpt-5.6-sol stream
  • fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • primary native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • primary native-openai/openai/gpt-6.1-sol stream
  • fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • primary native-openai/openai/gpt-6.1-sol stream
  • largest inputs: internal/registry/models/codex_client_models.json (712116 bytes), internal/runtime/executor/claude_executor_test.go (309112 bytes), internal/translator/gemini/openai/responses/gemini_openai-responses_request_test.go (177551 bytes), internal/translator/antigravity/claude/antigravity_claude_request_test.go (176847 bytes), internal/translator/claude/openai/responses/claude_openai-responses_request_test.go (172268 bytes), internal/discovery/zeroconf.go (156813 bytes), internal/util/gemini_schema_test.go (155086 bytes), internal/translator/openai/openai/responses/openai_openai-responses_request_test.go (141103 bytes), internal/translator/claude/openai/responses/testdata/tool_search_disabled/dev_golden.json (138950 bytes), internal/runtime/executor/claude_executor_cloaking.go (131188 bytes)

@unfret

unfret Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

⚠️ Review incomplete

incomplete review: no reviewer completed; primary native-openai/openai/gpt-5.6-sol stream; fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow; primary native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow; fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow; primary native-openai/openai/gpt-6.1-sol stream; fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow; primary native-openai/openai/gpt-6.1-sol stream; largest inputs: internal/registry/models/codex_client_models.json (712116 bytes), internal/runtime/executor/claude_executor_test.go (309112 bytes), internal/translator/gemini/openai/responses/gemini_openai-responses_request_test.go (177551 bytes), internal/translator/antigravity/claude/antigravity_claude_request_test.go (176847 bytes), internal/translator/claude/openai/responses/claude_openai-responses_request_test.go (172268 bytes), internal/discovery/zeroconf.go (156813 bytes), internal/util/gemini_schema_test.go (155086 bytes), internal/translator/openai/openai/responses/openai_openai-responses_request_test.go (141103 bytes), internal/translator/claude/openai/responses/testdata/tool_search_disabled/dev_golden.json (138950 bytes), internal/runtime/executor/claude_executor_cloaking.go (131188 bytes)

Details

Commit c88d701.
Run: GET /unfret/run/panel:c88d701f7bc0894cde517ca7f931f5c05749cd74:PJslitgAqAg:V5FyNrFdEMY.

@unfret review · @unfret status · @unfret help

@unfret unfret 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.

⚠️ Review incomplete

  • incomplete review: no reviewer completed
  • primary native-openai/openai/gpt-5.6-sol stream
  • fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • primary native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • primary native-openai/openai/gpt-6.1-sol stream
  • fallback native-anthropic/anthropic/claude-opus-5-5 provider 400 context_overflow
  • primary native-openai/openai/gpt-6.1-sol stream
  • largest inputs: internal/registry/models/codex_client_models.json (712116 bytes), internal/runtime/executor/claude_executor_test.go (309112 bytes), internal/translator/gemini/openai/responses/gemini_openai-responses_request_test.go (177551 bytes), internal/translator/antigravity/claude/antigravity_claude_request_test.go (176847 bytes), internal/translator/claude/openai/responses/claude_openai-responses_request_test.go (172268 bytes), internal/discovery/zeroconf.go (156813 bytes), internal/util/gemini_schema_test.go (155086 bytes), internal/translator/openai/openai/responses/openai_openai-responses_request_test.go (141103 bytes), internal/translator/claude/openai/responses/testdata/tool_search_disabled/dev_golden.json (138950 bytes), internal/runtime/executor/claude_executor_cloaking.go (131188 bytes)

@ericlitman

Copy link
Copy Markdown
Contributor Author

@unfret review

@ericlitman

Copy link
Copy Markdown
Contributor Author

Admin merge, approved by Eric on 2026-10-27 in the HOUSE-79 session, after the review of our changes.

  • Unfret could not review this PR: its diff is upstream's 966 files, and every lane overflowed context.
  • Eric scoped the review to our changes. PR Review only: HOUSE-79 our fork's changes on upstream v8.0.44 #26 reviewed them on a tree identical to this head (c588b886, head c88d701f).
  • PR Review only: HOUSE-79 our fork's changes on upstream v8.0.44 #26's verdict had 10 medium findings, all in our quota and reserve code. None is material for our deployment: 8 are in files this sync did not change against deployed main, and every trigger needs a setup studio2 does not run. Each has a babysit-pr dispose record; the adjudication is in the HOUSE-79 records.
  • go, e2e-hermetic and the three CodeQL Analyze jobs pass on c88d701f.

Merged with a merge commit to keep upstream's history.

@ericlitman
ericlitman merged commit 81ed1aa into main Oct 27, 2026
7 of 11 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.