Skip to content

fix(codex): separate proxy V2 guidance from native policy - #3992

Merged
lidge-jun merged 6 commits into
devfrom
codex/bug6-01a07e9d-3-guidance
Sep 8, 2026
Merged

fix(codex): separate proxy V2 guidance from native policy#3992
lidge-jun merged 6 commits into
devfrom
codex/bug6-01a07e9d-3-guidance

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

OpenCodex's V2 routing guidance used the same wrapper as native Codex delegation policy. Give newly generated proxy guidance its own opencodex_subagent_guidance wrapper and keep the built-in text advisory. Replay deduplication compares the latest exact text separately for proxy and native tag families, preserving built-in → custom → built-in transitions.

Carries #3944 from 481edbbd8a853c4155db9c40f76e432f9001b2d2 and 6fb0fc6f1d34c77b98a74fe817e5bd90063a7d1a, including original regression coverage and five localized guides. V1, native/legacy history and custom body contents remain intact. Tags classify replay text; they do not authenticate historical authorship or revoke prior instructions.

Manual stack, layer 3 of 6, depends on #3991: Go compatibility → xAI child result → V2 guidance → server preset → canonical reset alias → cooldown recovery. Review this layer only; merge bottom-up through dev.

Verification

  • Local product tests, install, typecheck and build: NOT RUN, per owner instruction. Hooks disabled per Git invocation; push uses --no-verify.
  • Prepared nine-file source/security audit passed. Actual adoption interdiff and hosted head-specific CI are required; this draft makes no runtime-pass claim.
  • Regression coverage exercises separate tag families, A-B-A replay, custom body preservation, catalog gates and raw/parsed placement. Remote documentation validation will cover the resulting five localized guides.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Co-authored-by: luvs01 27862058+luvs01@users.noreply.github.com

Maintainer integration decision

The owner explicitly authorized bottom-up integration of this manual stack into dev. Acting as current maintainer lidge-jun, I choose the dev-only maintainer-integration path in MAINTAINERS.md; this is not self-approval. Independent technical/security review and contributor attribution remain required, and any maintainer objection must be resolved.

This PR's certified candidate head is 3ceef0121712b290c3d4443e9fc3f0a04cecead6 with PR CI34181398746. Cumulative integration head f80f39d20e8395901d3b62758d118ea3a559a9f4 contains current dev 402be7c1f88283eb8465c3aec8437ccecd2542ec; full lane=all run34193218874 is the required final matrix. PR CI34193213502 attempt2 passed after one investigated macOS job cancellation; the full dispatch reran only its failed macOS control after same-head shard evidence passed. Failed attempts remain recorded. These links identify the exact evidence to inspect; any pending, failed, cancelled or skipped required execution blocks landing. The actor, base, head, reviews and checks will be refreshed immediately before each merge.

Serial merge prediction is conflict-free and its final tree equals the cumulative candidate. Because merged branches are automatically deleted, the next owned child is retargeted to dev immediately before its parent lands. PRs remain ordinary/manual; no native stack registration is requested. Local product checks remain NOT RUN by owner instruction.

Final pre-landing verification: full run34193218874 attempt2 SUCCESS, all26 named jobs and mandatory execution steps verified at f80f39d20e8395901d3b62758d118ea3a559a9f4; PR run34193213502 attempt2 SUCCESS. The investigation allowed one retry of each failed/cancelled macOS job; prior failures remain historical, and previously passing jobs were not rerun. Current CI is accepted for this owner-authorized integration.

t and others added 6 commits September 8, 2026 11:36
Refs #3907. Enable exact string preservation through the existing agent-message normalizer only for non-forward xAI destinations. Keep array conversion and mixed-ciphertext fail-closed behavior unchanged.

Add adapter destination controls and mocked parent/child/result continuation coverage for SSE and JSON. This is an isolated WP2 preparation candidate; local product tests, typecheck, build, install and runtime probes were NOT RUN. Main owns phase adoption, independent audit and hosted CI.

(cherry picked from commit 339e42c1e388db1ca01cda9d960368ad9335d48c)
(cherry picked from commit 481edbb)
(cherry picked from commit 24977adf223210dbf68cfb5d626916f97b47ed9a)
(cherry picked from commit 6fb0fc6)
(cherry picked from commit 21757b71a6007d217ef1f383c739cfc6618fd8e9)
Document the carried v2 wrapper and replay contract while preserving native and legacy policy history.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
(cherry picked from commit 8000e2482fb06567ac3d3e3474c54c5a4468d92f)
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 2e70ddd9-7b9c-4b18-b449-9667551b1576

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 58 / 80

이 PR은 bug6 수동 스택 3/6층입니다. base는 codex/bug6-01a07e9d-2-xai(아직 dev가 아님)이고, OpenCodex가 새로 만드는 V2 프록시 안내를 Codex 네이티브 <multi_agent_mode>와 같은 래퍼로 감싸던 것을 <opencodex_subagent_guidance>로 분리합니다. 지금 dev HEAD의 src/server/responses/collaboration.ts는 생성 안내를 여전히 native 태그로 감쌉니다. 그 결과 프록시 메타데이터 안내와 native 위임 정책이 replay dedup에서 한 가족으로 섞일 수 있습니다.

변경 핵심은 collaboration.ts의 open/close 태그 상수, generatedGuidanceFamily로 proxy/native 가족을 나누는 replay 비교, src/types/config.ts 주석, 5개 로케일 agents 가이드, structure 문서, multi-agent-compat.test.ts 회귀입니다. 내장 텍스트는 선호 모델·로스터·fallback을 알리기만 하고 위임/fork_turns를 지시하지 않는다고 문서에 못 박습니다. V1·native/legacy 히스토리·커스텀 본문 내용은 유지합니다. #3944 carry이며, 스택 순서상 #3991(Go) → xAI → 이 PR#3993(server preset) → reset alias → cooldown입니다.

CI는 대체로 녹색(test/gates/hygiene/enforce-target pass)입니다. draft이고 base가 dev가 아니라서, 단독으로 dev에 머지하면 안 됩니다. types.ts 주석 터치가 있지만 대분할 캠페인 무효화 수준은 아닙니다. 태그 변경은 “과거 메시지 저자를 증명하거나 옛 지시를 취소하지 않는다”는 한계를 본문이 스스로 인정합니다. 그 한계를 제품 문장으로 더 드러낼지는 메인테이너 선택입니다.

라인 src/server/responses/collaboration.ts OPENCODEX_SUBAGENT_GUIDANCE_* - 새 생성분은 proxy 전용 래퍼. native <multi_agent_mode>와 분리
경로 generatedGuidanceFamily / replay dedup - 가족별로 최신 exact text를 비교. built-in→custom→built-in 전이 보존이 목적
경로 src/types/config.ts 주석 - injection guidance 태그 설명을 새 이름으로 맞춤. 스키마 분할 대상 코드 변경은 아님
경로 docs agents.md (en/ja/ko/ru/zh-cn) - advisory vs native policy 경계를 같은 톤으로 맞춤
경로 base codex/bug6-01a07e9d-2-xai - dev 직행 머지 금지. 하단부터 올려야 함
경로 #3944 - 원본 carry. 이 레이어만 리뷰하고 중복 리베이스 논쟁은 피하라

메인테이너의 판단이 필요한 지점

  • bug6 스택을 이 순서 그대로 dev에 올릴지, 일부 층을 접을지
  • legacy <multi_agent_mode> 히스토리와의 전이 감지가 “보장되지 않음”을 사용자 문서에 더 쓸지
  • fix(codex): separate proxy v2 guidance from native mode #3944 원본은 이 스택 머지 후 landed-via-maintainer로 닫을지

너의 추천
스택 하단(#3991/xAI)이 dev에 안착한 뒤에만 이 레이어를 올리고, 그다음 #3993으로 이어가세요. 이 PR 자체 품질·CI는 괜찮아 보이니 “기다리며 유지”가 맞습니다. 지금 dev에 강제로 rebase/merge하지 마세요. #3944는 랜딩 후 leftover 정리 규칙대로 닫으면 됩니다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun marked this pull request as ready for review September 8, 2026 05:23
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 8, 2026 05:23
@lidge-jun
lidge-jun changed the base branch from codex/bug6-01a07e9d-2-xai to dev September 8, 2026 07:03
@lidge-jun
lidge-jun merged commit 74292a2 into dev Sep 8, 2026
43 of 44 checks passed
@lidge-jun
lidge-jun deleted the codex/bug6-01a07e9d-3-guidance branch September 8, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants