Skip to content
This repository was archived by the owner on Sep 13, 2026. It is now read-only.

sync: upstream v2.52.0 (4d37c351) into dev - #336

Draft
cursor[bot] wants to merge 792 commits into
devfrom
sync/upstream-v2.52.0-4d37c35155fe-785424295fc5
Draft

cursor[bot] wants to merge 792 commits into
devfrom
sync/upstream-v2.52.0-4d37c35155fe-785424295fc5

Conversation

@cursor

@cursor cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Summary

Daily-merge sync of upstream v2.52.0 (vendor/main @ 4d37c35155fe283722566d32892b8753c1230be7) onto origin/dev @ 785424295fc5d8ef0a66fb8ce94a55fe3b054471.

Stages 3–7 (coordinator handoff): merged vendor/main, resolved 88 textual conflicts per docs/fork/OWNED.md, re-applied fork preservation commits (config/types, usage, registry, WS default-off, GUI delegation, hotspot core.ts), and pushed branch sync/upstream-v2.52.0-4d37c35155fe-785424295fc5 (HEAD c5d9fe401).

Do not squash/rebase. Human merge commit only.

Upstream pin

Field SHA
Tag v2.52.0
vendor/main 4d37c35155fe283722566d32892b8753c1230be7
Base origin/dev 785424295fc5d8ef0a66fb8ce94a55fe3b054471
Published HEAD c5d9fe4013e70fa57c4a5082a89e99d7f7d26ed9
  1. Merge vendor/main v2.52.0 / 4d37c35done
  2. Resolve shared hotspot src/server/responses/core.ts per OWNED.md — done (manual merge + preservation oracle updated)
  3. Rebase onto origin/devpending CI (gh pr view --json mergeable)
  4. CI ci / enforce-target / hygienelocal hygiene pass; full CI pending

Conflict decision table (88 files)

File / hunk Upstream intent Fork / overlay intent Class Disposition Tests
86 upstream-owned paths (docs, readme locales, gui components except preservation re-fit, src/* except hotspots, upstream tests, bun.lock, scripts/test.ts, layout) Adopt v2.52.0 release tree Re-apply only where preservation commits follow upstream-owned --theirs, then preservation commits 7b11378e3, 9f1619775, 208fb3681 Domain tests per layout
package.json Upstream deps/scripts Keep @yansigit/opencodex, non-decreasing version recipe mergePackageJson()2.52.0 bun run audit:high
src/server/responses/core.ts (hotspot) v2.52 routing, continuation, passthrough web-search bridge, credential rewrite v2 delegation bridge, google provider options, media/CCA grounding, shadow intercept, passive quota ordering shared-hotspot Upstream control flow + re-fit fork blocks bun test tests/responses/core-fork-preservation.test.ts, bun test tests/responses/
Post-merge preservation (no textual conflict) Upstream config/GUI/WS Fork TLS gate, cursor pool, subagent roles, WS default-off, owner-only service tokens, fiveHour quota alias preserve Commits 7b11378e3, 9f1619775, 208fb3681, c5d9fe401 bun run typecheck, bun run build:gui, focused responses tests
Full upstream-owned conflict list (86)

bin/ocx.mjs, bun.lock, docs-site claude-code / management-api / installation / providers / server locales, gui AddProviderModal, ProviderCatalog, ProviderOverview, Models, Subagents, use-dashboard-data, gui tests, readme locales, scripts/test-layout/layout.json, scripts/test.ts, skills/ocx/references/01_management_surface.md, src/claude/*, src/cli/status.ts, src/codex/inject.ts, src/codex/quota.ts, src/config.ts, src/lab/subject/behavior-fingerprint.ts, src/oauth/*, src/providers/registry.ts, src/server/claude-messages.ts, src/server/index.ts, management routes, collaboration.ts, compact.ts, fetch-helpers.ts, ws-upstream.ts, src/types/config.ts, src/update/*, src/usage/log.ts, structure/ops/docs-and-release.md, and listed upstream tests under tests/.

Hotspot notes (core.ts)

  • Kept upstream continuation routing (hasUnexpandedPreviousResponse) before fork v2 delegation bridge.
  • Merged both google provider-options route error + OpenCodeZen enrichment imports.
  • Combined passthrough SSE body rewrite with upstream commitReasoningReplayServingRoute.
  • Shadow intercept sets both credentialDomainWasRewritten and shadowIntercepted.

Verification

Commands run locally on HEAD c5d9fe401:

bun run typecheck          # pass
bun run build:gui          # pass
bun run check:hygiene      # pass
bun test tests/responses/core-fork-preservation.test.ts   # 6 pass
bun test tests/codex-integration/codex-routing.test.ts -t "short-only snapshot"  # pass
bun test tests/cli/cli-status-json.test.ts -t "token state"  # pass
bun test tests/server/server-images.test.ts -t "images routes require API auth"  # pass
bun test tests/responses/ws-upstream.test.ts  # 127 pass (prior run)

Known blockers for human follow-up (not green for full responses shard):

  • tests/responses/ws-failure-stage.test.ts — 4 failures (fallback must not run after open; likely interaction between fork WS default-off and upstream failure-stage reporting).
  • tests/responses/responses-fetch-helpers-boundary.test.ts — import boundary expects fewer runtime imports than preservation-added edges.
  • Additional fork runtime tests under tests/responses/ (v2 native parent override, reasoning allocation admission, V2 routed delegation bridge) — need reconciliation with upstream v2.52 control flow.

Full bun run test not claimed green; CI required before human merge.

Checklist

  • Scope stays focused on upstream v2.52.0 sync and fork preservation.
  • Added/updated tests where merge changed oracles (core-fork-preservation, hub token file mode, hygiene comment wording).
  • Docs/release notes — upstream docs taken via --theirs; no separate fork doc change.
  • Security-sensitive fork preservation reviewed (owner-only service token files, TLS/plaintext test seam, no secret logging).

Review readiness (contributor): leave draft until CI green; then tick local CI / latest dev / review findings / ready-for-review per enforce-target.

Open in Web View Automation 

lidge-jun and others added 30 commits September 11, 2026 23:15
…helper

The audit named readPaths, previousWorkspaceUris and the fileStates keys as fields a later extension could leak. Record that in the code rather than only in the review thread.
…point-shape

feat(cursor): report decoded checkpoint shape so coverage is answerable from logs
* docs(devlog): open the account pool unification unit

* docs(devlog): fold two audit rounds into the account pool unification plan

* docs(devlog): write the five phase documents for the account pool unit

---------

Co-authored-by: Codex <codex@users.noreply.github.com>
The audit drove the first version of these tests red on the parent branch: all three passed with the production change reverted, because they only re-asserted what resetCodexRoutingForManualSelection and the deliberately exempt failover promote already did.

Three defects fall out of that. Deletion reaches routing through clearCodexUpstreamHealthForAccount, which did not revoke the preference, so a preference could outlive its account and suppress every later write. The generation sweep had the same hole. The model-detour promote wrote over the operator's selection while preemption next to it yielded. The independent-scope preference entries were written and consumed but never read by any guard.

Co-authored-by: Heisenberg <audit@localhost>
Guarding it failed 8 cases in codex-routing.test.ts. A model detour runs because the operator account cannot serve the model at all, and under a rotating strategy the promote moves only the process-local cursor, never the persisted selection.
reconcileCodexRoutingHealth had no test at all, so the preference sweep added for the delete-path blocker was verified by reading rather than by running. Both halves are covered now: an account the generation no longer lists loses its preference, and one that is still listed keeps it. Red control: removing the four sweep lines makes the first case read undefined.
…ards

clearCodexUpstreamHealth dropped every health map but kept lastReconciledGeneration and liveHealthAccountIds, so after a full reset recordCodexUpstreamOutcome would still discard a writer whose generation predated the watermark for any account missing from the equally stale live set. Found because the watermark leaked between test files: the new generation-sweep coverage failed two unrelated cases in codex-routing.test.ts when both files ran in one process.
feat(providers): pick a warm API key before the first attempt
refactor(oauth): move the pool rotation kernel out of the Codex namespace
…-followup

docs(structure): close the review findings on the SSOT gate
…it-boundary

codex-ws: settle post-send failures as honest gateway statuses and replace the fixed prelude deadline with liveness
…on-wins

fix(codex): let an operator account selection outrank the pool cursor
lidge-jun and others added 26 commits September 12, 2026 21:18
…sions

Issue distinct tokens for one proven user so refresh and rotation cases exercise a changed fingerprint, keep the root-mismatch regression on an authenticated admission, and assert the superseded caller bearer stops matching.
The deadline now starts before credential selection, so a client that leaves during that wait must be reported as a hangup with nothing dispatched and the admitted turn released.
…dex key

Security review found the relay unreachable in its only supported configuration: the default bind is loopback, admission there never reads a token, and the injector only rewrites the base URL for loopback hosts, so every history call returned 403 even with a valid key. The relay now asks the identity question separately from admission - a context request presenting a real opencodex key owns its sessions, one presenting none is still refused - and a regression exercises the real resolver instead of a hand-built admission.
…wnership

Security re-audit found the previous fix one-sided: the relay could name a loopback caller but the model turn still recorded ownership from admission alone, so a correctly named caller found no entry and got 409. Both paths now use resolveContextPrincipal. The guides and structure doc now state what actually works - a remote bind with a configured key, or a client that sends x-opencodex-api-key - because the built-in loopback injection cannot carry that header, and whether a loopback bind should identify callers is left as a maintainer decision rather than a relaxed refusal.
…ental opt-in

The opt-in only guarded the injected base URL, so the ten endpoints and the ownership registry stayed live for any caller able to reach the data plane, including one posting the paths directly. contextRelayActivated reads Codex own config and now guards the relay handler and the recording path as well; absent, unreadable or malformed config is not an opt-in, and the decision is cached against config identity so turning it off applies without a restart. Regressions assert 404 on both prefixes, no owner recorded and zero upstream calls while it is off.
Resolve the Codex home inside the try rather than in a default parameter, since those evaluate before the body and this gate now runs during model turns, where an unreadable CODEX_HOME would abort a turn upstream already served. Gate the route match as well so a disabled feature takes no turn lease. Pin cache invalidation without the reset seam and the unreadable-home refusal, and restore the Korean disable paragraph.
Add the lidge-jun#3433 transport matrix with actual Chat handler and captured canonical Responses request. Preserve key and original header spellings; no identity synthesis. Synthetic fixtures do not establish Hermes emission or cache-hit improvement. Local suites NOT RUN; hosted CI pending.
…cache-hermes

test(chat): verify native outbound conversation identity (lidge-jun#3433)
The fallback-port fixture records a port from allocateFreePort, which reports the
port it has already released. On a four-shard runner every other test binding an
ephemeral port is a candidate to take it, and when that happens status finds a
listener on the recorded port, reports the record as live, and the assertion
fails against something the test never set up. It failed exactly that way on the
preview promotion run while the same commit passed on dev.

Confirm the recorded port refuses immediately before and immediately after the
status probe, and re-allocate when something took it in between. The assertion
is unchanged and no weaker: a run only counts when the endpoint demonstrably
refused across the whole probe, and exhausting the attempts fails with that
reason rather than silently passing.
…relay

feat(codex): relay experimental context history under a least-privilege owner
…53.0

chore(release): open dev at 2.53.0 before releasing 2.52.0
…port-flake

test(cli): stop judging a stale record on a port another test can take
Product tree is dev at 7bfb2ad. Only package.json differs, carrying the
stable channel version 2.52.0.

This promotion follows a CI repair and a regression sweep: dev had drifted 79
commits past its last finished run and the one run allowed to complete had
failed. lidge-jun#4390 fixed an integration test that never denied anything and had been
red on dev since lidge-jun#4342; lidge-jun#4396/lidge-jun#4397/lidge-jun#4398 closed four gaps in the quota
avoidance contract lidge-jun#4368 introduced; lidge-jun#4403 made a port fixture deterministic.
release: promote verified 2.52.0 product tree to main
Resolve 88 conflicts per docs/fork/OWNED.md:
- upstream-owned: take vendor/main
- package.json: fork recipe (name @yansigit/opencodex, version 2.52.0)
- shared-hotspot core.ts: upstream control flow + fork v2 bridge,
  passthrough web-search bridge, and google provider options

Co-authored-by: SB Yoon <yansigit@users.noreply.github.com>
…v2.52.0 sync

Re-apply fork invariants dropped by upstream-owned merges:
- Restore fork config/types with upstream v2.52 fields (privacy, pool, codexPool, etc.)
- Merge vendor config.ts and re-export fork helpers
- Restore cursor recovery kinds and agentKind in usage log
- Add UpstreamRedirectError, ai-studio-web googleMode, requestPacing registry seed

Co-authored-by: SB Yoon <yansigit@users.noreply.github.com>
Co-authored-by: SB Yoon <yansigit@users.noreply.github.com>
Re-apply fork SubagentDelegationSection, Subagents, and dashboard hooks
after upstream-owned merges, including upstream ultra-mode recommendation
handling and codexClientCompaction.

Restore upstream computeCodexUsageScore refinement when long windows are
known while keeping fiveHour alias normalization. Wire the plaintext-remote
test seam into assertServerAuthConfig. Harden hub status tests for
owner-only service token files and reword comments that tripped hygiene.

Co-authored-by: SB Yoon <yansigit@users.noreply.github.com>
Co-authored-by: SB Yoon <yansigit@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

⚠️ Deterministic hygiene checks failed.

  • unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: .github/workflows/cleanup-orphaned-workflows.yml, bun.lock, package.json, scripts/release-notes.ts, src/cli/account-auth.ts, src/codex/auth-api.ts, src/codex/auth-collision.ts, src/codex/auth-context.ts, src/lib/service-secrets.ts, src/oauth/account-quota-rank.ts, src/oauth/callback-server.ts, src/oauth/chatgpt.ts, src/oauth/devin-cli.ts, src/oauth/devin.ts, src/oauth/devin/api-base.ts, src/oauth/devin/login.ts, src/oauth/devin/register-user.ts, src/oauth/devin/types.ts, src/oauth/generic-account-failover.ts, src/oauth/health.ts, src/oauth/index.ts, src/oauth/login-cli.ts, src/oauth/pool-kernel.ts, src/oauth/pool-settings-capability.ts, src/oauth/store.ts, src/oauth/token-guardian.ts, src/oauth/xai.ts, src/server/auth-cors.ts, src/server/management-api.ts, src/server/management/oauth-account-routes.ts.

@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Sep 12, 2026
@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

PR automation (bot-owned)

  • Class: draft (draft)
  • Base: 785424295fc5d8ef0a66fb8ce94a55fe3b054471
  • Head: c5d9fe4013e70fa57c4a5082a89e99d7f7d26ed9
  • Action: observed
  • Exact-head gate: BLOCKED (not-mergeable, check-not-success)
  • Sensitive paths: .github/workflows/cleanup-orphaned-workflows.yml, bun.lock, package.json, scripts/release-notes.ts, src/adapters/anthropic.ts, src/adapters/cline-pass-deepseek-v4-tool-replay.ts, src/adapters/codebuddy/adapter.ts, src/adapters/codebuddy/pro
  • Maintainer auto-merge approval: NO
  • Bot merge evidence: NO
  • Next action: human review required

@github-actions

Copy link
Copy Markdown

⏳ DRAFT

  • hygiene: unsponsored_surface. sync_baseline

What to do

  • Wait for successful exact-head ci, enforce-target, and hygiene checks.
  • Fix unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: .github/workflows/cleanup-orphaned-workflows.yml, bun.lock, package.json, scripts/release-notes.ts, src/cli/account-auth.ts, src/codex/auth-api.ts, src/codex/auth-collision.ts, src/codex/auth-context.ts, src/lib/service-secrets.ts, src/oauth/account-quota-rank.ts, src/oauth/callback-server.ts, src/oauth/chatgpt.ts, src/oauth/devin-cli.ts, src/oauth/devin.ts, src/oauth/devin/api-base.ts, src/oauth/devin/login.ts, src/oauth/devin/register-user.ts, src/oauth/devin/types.ts, src/oauth/generic-account-failover.ts, src/oauth/health.ts, src/oauth/index.ts, src/oauth/login-cli.ts, src/oauth/pool-kernel.ts, src/oauth/pool-settings-capability.ts, src/oauth/store.ts, src/oauth/token-guardian.ts, src/oauth/xai.ts, src/server/auth-cors.ts, src/server/management-api.ts, src/server/management/oauth-account-routes.ts.

This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

intake: hygiene-blocked Deterministic PR hygiene checks failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants