Skip to content

feat(jev): per-target operator notes for JEV decisions - #6107

Closed
lidge-jun wants to merge 5 commits into
devfrom
codex/t4-clients-proxy-jev
Closed

lidge-jun wants to merge 5 commits into
devfrom
codex/t4-clients-proxy-jev

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

  • Adds an optional per-target note to JEV combos (targets[].modelProfile), carried from feat(jev): operator-authored per-target model profiles #5871 onto current dev. Operators can describe context the built-in profile cannot know, such as subscription allowances or context size.
  • A configured note is sent in the JEV decision state as operator_notes, keyed by target, and only for targets that are eligible for that decision. The built-in instructions.model_profiles stay unchanged, and the target set and effort bounds are not widened. JEV makes no additional model call. Combos without notes send the same payload as before.
  • Management validates notes at the input boundary: a non-empty string of at most 512 characters. Tab, line feed, and carriage return are allowed for multi-line notes; every other C0 control character and DEL is refused. The GUI applies the same rule. Notes persist sparsely and survive config reload.
  • The Combo editor adds an "Additional model notes for JEV" textarea for each target. It discloses that notes are sent to TypeSafe on each JEV decision, and all 10 UI locales include the new keys. docs-site guides/combos.md and structure/providers-and-adapters.md describe the field.
  • This carry drops the source PR's unrelated rewrites of the built-in profiles.

Supersedes #5871.

JEV combo with per-target notes

Target notes close-up

Screenshots come from an isolated local proxy with a synthetic provider and combo. HOME, OPENCODEX_HOME, and CODEX_HOME were all redirected to temp directories.

Verification

  • bun test tests/routing/combo-management-api.test.ts tests/gui/combo-workspace-data.test.ts tests/routing/jev-decision.test.ts: 105 pass, 0 fail. These capture the outbound decision JSON and cover absent notes, wrong-target notes, bounded choices, reload persistence, rejected \u0000/\u0007/\u007f, and an accepted multi-line note.
  • bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 pass. tests/test-layout.test.ts passes, and no new test files were added.
  • bun run typecheck, bun run structure:check, bun run privacy:scan, and bun run lint:gui all exit 0. At the implementation head, bun run build:gui, GUI i18n lint, the docs-site build, and tests/lab/core-lab-boundary.test.ts (inside a 130-test focused run) also exit 0.
  • bun run test:changed is not passing evidence. The implementer's run overlapped test runs from six other lane worktrees and exited 1 (26,183 pass / 55 fail, all in unrelated Claude, service, and CLI suites). Those failing files pass in isolation with a disposable HOME. I omitted the full local suite for the same resource-contention reason, so exact-head CI shards are the broad gate.
  • Independent read-only review: round 1 FAIL (control-character rule mismatch between docs and code), round 2 NEAR-PASS (error wording nit). Both are fixed in 7a83e943ca and 257ec7e995.

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. The note is operator text sent to the existing decision endpoint; the UI and guide disclose this, and the note is never logged.

Co-authored-by: NorD 6949669+nordz0r@users.noreply.github.com

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 27, 2026 16:14
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T16:18:36.993362Z 257ec7e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 47bf6915-aa37-42f1-ae62-5fcbd1847cdb

📥 Commits

Reviewing files that changed from the base of the PR and between 6d64ea2 and 186ed34.

📒 Files selected for processing (23)
  • docs-site/src/content/docs/guides/combos.md
  • gui/src/combo-workspace-data.ts
  • gui/src/components/combo-workspace-controls.tsx
  • gui/src/components/combo-workspace-detail-panel.tsx
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/fr.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/vi.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • src/combos/jev.ts
  • src/combos/types.ts
  • src/server/management/combo-routes.ts
  • src/server/responses/core-combo.ts
  • src/types/config.ts
  • structure/providers-and-adapters.md
  • tests/gui/combo-workspace-data.test.ts
  • tests/routing/combo-management-api.test.ts
  • tests/routing/jev-decision.test.ts

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 enhancement New feature or request label Sep 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

lidge-jun and others added 5 commits September 28, 2026 01:30
Co-authored-by: NorD <6949669+nordz0r@users.noreply.github.com>
Co-authored-by: NorD <6949669+nordz0r@users.noreply.github.com>
Co-authored-by: NorD <6949669+nordz0r@users.noreply.github.com>
…cter rule

The Combo editor is a textarea, so tab, line feed and carriage return stay
valid; every other C0 control and DEL is refused on both the management and
GUI boundaries. The guide and structure contract now say so, and tests pin it.

Co-authored-by: NorD <6949669+nordz0r@users.noreply.github.com>
Co-authored-by: NorD <6949669+nordz0r@users.noreply.github.com>
@lidge-jun
lidge-jun force-pushed the codex/t4-clients-proxy-jev branch from 257ec7e to 186ed34 Compare September 27, 2026 16:30
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 40 / 80

이 PR은 콤보의 타깃마다 짧은 메모를 붙이게 해요. 베이스는 dev예요. #5871을 지금 dev 위로 다시 가져온 것이고, #5871은 아직 열려 있어요. 내장 프로필 문장을 바꾼 부분은 이번 가져오기에서 뺐어요.

JEV는 요청마다 TypeSafe에 어느 타깃과 노력 정도를 쓸지 물어요. 내장 instructions.model_profiles는 그대로 두어요. 메모가 있으면 결정 상태의 operator_notes에 타깃 이름으로 넣어요. 그 결정의 후보에 들어간 타깃만 넣어요. 빈 메모는 빼요. 앞뒤 공백은 저장할 때와 보낼 때 잘라요. 타깃 목록과 노력 정도 한계는 그대로예요. 메모가 없는 콤보는 예전과 같은 본문을 보내요.

메모는 비어 있지 않은 512자 이하여야 해요. 탭, 줄바꿈, 캐리지 리턴만 제어 문자로 받아요. 그 외 제어 문자와 DEL은 거절해요. 관리 API, 설정 검사, 화면이 같은 규칙이에요. 거절은 400이고, 이미 저장된 메모는 그대로 남아요. 512자를 넘기면 결정을 밖으로 보내기 전에 멈추고, 첫 후보로 돌아가요.

콤보 편집기는 JEV일 때만 메모 칸을 보여요. 모델을 바꾸면 그 타깃 메모는 지워요. 전략을 다른 것으로 바꿔도 메모는 설정 파일에 남아요. 그때는 칸이 안 보여요. 언어 10개의 문구가 들어 있어요. 가이드와 structure 문서도 적혀 있어요. 화면 힌트는 결정마다 TypeSafe로 보낸다고 말해요.

gui/src/i18n/ko.ts:2804 - 영어 en.ts:2866만 "줄바꿈과 탭만 허용"으로 고쳤어요. 한국어는 "제어 문자를 포함할 수 없습니다"예요. de.ts:2765, fr.ts:2784, ja.ts:2859, ru.ts:2931, tr.ts:2807, vi.ts:2797, zh.ts:2785, zh-TW.ts:2081도 같아요. 칸은 여러 줄이라 줄바꿈이 정상이에요. 저장이 거절되면 줄바꿈이 원인인 것처럼 읽혀요.

src/combos/jev.ts:438 - 보낼 때는 길이 512만 봐요. 제어 문자는 여기서 다시 안 봐요. 설정 검사(src/combos/types.ts의 comboConfigIssues)와 관리 API가 먼저 막아요. 그 검사를 건너뛰고 후보를 만들면 화면에 안 보이는 특수 문자가 operator_notes에 들어가요.

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

전략을 JEV가 아닌 것으로 바꾸면 칸이 사라지는데 메모는 파일에 남아요. 테스트가 그 동작을 고정해요. 숨은 채로 둘지, 전략을 바꿀 때 지울지 정해 주세요.

설정 키 이름은 modelProfile이에요. 보낼 때 키는 operator_notes예요. 내장 프로필을 만드는 함수 이름도 modelProfile이에요. 문서는 둘을 나눠 적었어요. 키를 지금 바꿀지, 이 이름으로 둘지 정해 주세요.

너의 추천

방향은 맞아요. 내장 프로필은 그대로 두고, 후보가 아닌 타깃 메모는 본문에 안 넣어요. 머지해도 돼요. 그 전에 영어 말고 나머지 9개 언어의 오류 문장을 en.ts처럼 고쳐 주세요. 탭, 줄바꿈, 캐리지 리턴만 된다고 쓰면 돼요.

#5871은 이 PR이 대체해요. 닫기 전에 이 PR 링크를 남기면 돼요. types.ts와 config.ts는 원래 나뉜 자리예요. 이 PR이 둘 다 건드리는 것은 그 자리를 따른 거예요. 같은 내용의 다른 PR은 #5871뿐이니 그걸 닫으면 돼요. 베이스는 dev로 두세요.

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

@lidge-jun

Copy link
Copy Markdown
Owner Author

Integration continues in #6124, which carries this PR's reviewed commits unchanged together with the other clients/proxy lane changes, so that only one branch has to chase the moving dev head through CI. This PR will be closed with a link once #6124 is merged.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Landed on dev through #6124 (merge commit 296f0ce), which carries this PR's reviewed commits unchanged. Closing as integrated.

@lidge-jun lidge-jun closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant