Skip to content

fix(codex): report operator-owned root routing truthfully - #4114

Merged
lidge-jun merged 1 commit into
devfrom
ingw/fix-4110-owned-root-guidance
Sep 9, 2026
Merged

fix(codex): report operator-owned root routing truthfully#4114
lidge-jun merged 1 commit into
devfrom
ingw/fix-4110-owned-root-guidance

Conversation

@Ingwannu

@Ingwannu Ingwannu commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #4110.

An operator-owned, unmarked root openai_base_url can already point at the OCX proxy. The client-compaction status output incorrectly asserted that existing threads were "not the proxy" and advised removing that line. Ownership is not destination.

  • Describe existing threads as following the configured root URL without guessing its destination.
  • Keep the new-thread compaction guidance accurate without advising deletion of operator configuration.
  • Add matching-target regression assertions and update the config/home structure contract.

This changes status text only: URL ownership, configuration writes, journal ownership, history handling, routing, and the managed-root positive control remain unchanged.

Verification

  • Base: b5c98333ff9a01c54172efd105516a34743bd9f3.
  • Head: 9c9207c11041d2c9ae1aeab45821ce7890e65d3e.
  • git diff --check: passed.
  • Source inspection: both differing and matching operator URLs are covered by assertions; matching-target test retains exactly one root line and null journal ownership.
  • Product tests, typecheck, and build: NOT RUN. The available local Bun is 1.3.14 versus the repository's 1.4.2; an attempted credential-free sandbox setup failed before Bun execution. No product test code ran, and no installed runtime or protected configuration was changed.
  • Exact-head hosted Cross-platform CI completed successfully: https://github.com/lidge-jun/opencodex/actions/runs/34347952320 at 9c9207c11041d2c9ae1aeab45821ce7890e65d3e. Enabled Linux/macOS product shards and gates passed; conditional skipped Windows shards are not claimed as passed tests. Local product tests remain NOT RUN as disclosed above.
  • Ready for independent review; @lidge-jun approval remains outstanding. No merge or release action has been performed.

@lidge-jun please independently review this narrow factual status correction. No merge or release action is requested before those checks.

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. No authentication, destination selection, or persistence behavior is changed.
  • Exact-head hosted product verification is complete for the enabled CI lanes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved client-compaction status messages to accurately distinguish user-owned root URLs from provider destinations.
    • No longer suggests removing a user-configured root URL when client-side compaction is enabled.
    • Correctly handles user-owned URLs that match the proxy URL without misidentifying them as externally configured destinations.
  • Documentation

    • Clarified client-compaction behavior and URL ownership in the configuration documentation.

@Ingwannu
Ingwannu requested a review from lidge-jun September 9, 2026 11:54
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 10e117e1-1bb4-40f9-9a01-214dae584c2d

📥 Commits

Reviewing files that changed from the base of the PR and between b5c9833 and 9c9207c.

📒 Files selected for processing (3)
  • src/codex/inject.ts
  • structure/02_config-and-codex-home.md
  • tests/codex-integration/codex-inject-integration.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

This change updates client-compaction status wording, documents ownership and destination handling, and adds regression coverage for a user-owned root URL that matches the proxy URL.

Changes

Client-compaction status

Layer / File(s) Summary
Update client-compaction status messages
src/codex/inject.ts
The messages now refer to the user's configured root URL, clarify that ownership does not identify the destination, and state that no root URL change is required for new client-compaction threads.
Document and test destination handling
structure/02_config-and-codex-home.md, tests/codex-integration/codex-inject-integration.test.ts
The documentation records the ownership and destination distinction. Tests verify neutral wording, preserved user configuration, provider-table injection, and a null injectedOpenaiBaseUrl journal value when the user URL matches the proxy.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 9c920

Client-compaction messaging now accurately describes operator-configured root URLs without assuming their destination or advising configuration removal. The relevant matching-target behavior is covered, with no routing or configuration-write behavior changed.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: correcting Codex status reporting for operator-owned root routing.
Linked Issues check ✅ Passed The PR satisfies issue #4110. It removes the unsupported “not the proxy” claim, stops advising deletion of operator configuration, preserves routing, ownership journaling, and history behavior, and ad…
Out of Scope Changes check ✅ Passed The changes remain within scope. They update status wording, related documentation, and regression tests. No unrelated routing, URL-write, ownership-detection, or history behavior changes are included…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ingw/fix-4110-owned-root-guidance

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 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

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

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 58 / 80

이 PR은 방금 dev에 올라온 클라이언트 컴팩션(#4092) 상태 문구를 고칩니다. 지금 HEAD(ad36c7be8, #4113 포함)에서도 src/codex/inject.ts의 클라이언트 컴팩션 분기는 그대로입니다. 운영자가 직접 적은 루트 openai_base_url이 이미 이 프록시를 가리켜도, 마커가 없으면 “내 줄”로만 취급됩니다. 소유권과 목적지는 다른 개념인데, 지금 상태 문구는 그 줄을 “프록시가 아니다”처럼 읽고 “그 줄을 지워라”고까지 말합니다. #4110이 바로 그 오해입니다.

PR이 하는 일은 좁습니다. 이력 안내 문장을 “설정한 루트 URL을 따른다”로 바꾸고, 새 스레드 컴팩션 안내에서는 URL 삭제 권고를 뺍니다. 테스트는 목적지가 프록시와 같은데도 소유만 사용자인 경우를 추가해, 루트 줄이 하나 남고 저널의 injectedOpenaiBaseUrl이 null인지까지 확인합니다. structure/02_config-and-codex-home.md에도 소유권≠목적지 설명을 한 단락 보탭니다. URL을 쓰거나 지우는 동작, 라우팅, 저널 소유권은 건드리지 않습니다. 상태 텍스트와 계약 문서만 고칩니다.

현재 dev 방향과도 맞습니다. #4092로 클라이언트 컴팩션이 들어갔고, 그 직후 상태 문구가 운영자를 헷갈리게 하면 바로 고쳐야 합니다. 파일 범위도 inject.ts + 구조 문서 + 통합 테스트 한곳이라 types/config 대형 분리 캠페인에 걸려 무효화될 성격이 아닙니다. Draft이고 작성자 환경에서 product 테스트는 돌리지 못했다고 밝혔습니다. 호스티드 CI, 특히 tests/codex-integration/codex-inject-integration.test.ts가 초록이어야 합니다. 베이스는 #4113 직전 SHA라 리베이스가 필요할 수 있지만, 충돌 가능성은 낮아 보입니다.

라인 1433 - 이력 문구가 “not the proxy”를 단정해서, 이미 프록시를 가리키는 운영자 URL까지 외부 목적지로 읽히게 만듭니다.
라인 1463 - “Remove that line…”이 운영자 설정을 지우라고 권고해, 컴팩션을 켜려다 루트 URL을 건드리게 만듭니다.
src/codex/inject.ts keepRootOverrideAlongsideTable 분기 - 소유권만 보고 목적지를 추측하는 상태 메시지가 #4110의 핵심입니다.
tests/codex-integration/codex-inject-integration.test.ts - 매칭 URL 회귀가 없으면 같은 문구가 다시 들어올 수 있습니다. PR이 그 테스트를 넣는 방향은 맞습니다.

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

너의 추천
exact-head CI(특히 codex-inject-integration)가 초록이면 머지하세요. 동작 변경이 없는 상태 문구 수정이고 #4110을 정확히 닫습니다. 로컬 Bun 버전 이슈는 호스티드 CI로 대체하면 됩니다. types/config 분리와 무관하니 닫지 말고 살려 두세요.

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

@Ingwannu
Ingwannu marked this pull request as ready for review September 9, 2026 14:00
@Ingwannu

Ingwannu commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

@lidge-jun Exact-head hosted CI 34347952320 is now successful for 9c9207c11041d2c9ae1aeab45821ce7890e65d3e; I updated the verification receipt and marked this ready for your independent review. Conditional skipped platform jobs are not counted as passed tests. No code changed after CI, no local runtime/config was changed, and this is not a self-approval or merge.

@lidge-jun lidge-jun left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintainer integration review. Exact-head CI green at 9c9207c; the cancelled enforce-target run was superseded by a successful re-run at the same SHA. Scope is the status text only, matching the request-changes finding on #4110.

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