Skip to content

fix(pool): report inert on the unified pool-settings read - #8825

Merged
lidge-jun merged 5 commits into
lidge-jun:devfrom
yazzang-homelab:fix/pool-settings-inert
Nov 18, 2026
Merged

lidge-jun merged 5 commits into
lidge-jun:devfrom
yazzang-homelab:fix/pool-settings-inert

Conversation

@yazzang-homelab

@yazzang-homelab yazzang-homelab commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

GET/PUT /api/pool/settings (and ocx account pool, which reads it) leave out inert. For a generic OAuth pool (google-antigravity, kiro, xai, ...) with pool.kernel off, strategy, stickyLimit and autoSwitchThreshold are stored but the selector does not consume them. The unified read gives no sign of that, so ocx account pool google-antigravity --strategy round-robin answers "Pool policy saved." for a setting that changes nothing.

The legacy per-pool read already reports it, and the CLI schema already accepts it:

  • genericPoolSettingsDto (behind /api/oauth/accounts/pool) sets inert: kernelEnabled !== true.
  • src/cli/account-policy-dto.ts parses inert: z.boolean().optional().
  • The module comment in pool-settings-capability.ts says "strategy and autoSwitchThreshold are consumed only when pool.kernel is on — that is what inert reports."

Only unifiedPoolSettingsDto drops it. Observed on a 2.100.3 hub, same pool, two reads:

  • /api/oauth/accounts/pool?provider=google-antigravity: "strategy":"round-robin", ... "inert":true
  • /api/pool/settings?provider=google-antigravity and ocx account pool google-antigravity --json: no inert key

Fix

unifiedPoolSettingsDto now carries inert for every kind, keeping the "every kind answers with the same keys" contract:

  • generic: config.pool?.kernel !== true, the same computation as the legacy DTO
  • codex and anthropic: false. pool.kernel gates only the generic selector (generic-account-failover.ts, generic-session-affinity.ts, request-transport.ts); the Codex and Anthropic selectors are not gated by it.

The field is typed as GenericPoolSettingsDto["inert"] and documented with the same scope as the existing marker: it never describes enabled.

Verification

Branch head 2e00b6678 on dev c36793a93 (0 behind). On top of the reviewed src/ (30cc83d29) are the maintainer's dev merge ed1856c29, the maintainer's docs commit 8dbc507bb, and 2e00b6678. 2e00b6678 adds the same inert note to the Korean and Russian /api/pool/settings rows, which have been kept in step with the English row since 1053138. src/ is unchanged since the security review.

  • Full suite at 2e00b6678: OCX_TEST_MAIN_TIMEOUT_MS=3600000 bun run test on a fresh clone (Linux x64, 4 vCPU, non-root user, Bun 1.4.4). 69823 pass, 138 fail.
  • Clean dev c36793a93 on the same machine with the same command: 69473 pass, 139 fail. Both runs fail the same 137 test names. The compiled ocx-child e2e file reports one unnamed failure in one run and two named failures in the other. These failures are environmental and do not reach the pool-settings path:
    • That machine's /data/tmp fails the private-directory ownership and mode checks (unsafe cache directory, Private Codex home must be owned by the current user…, installation_prefix_unsupported).
    • rustup has no default toolchain for the compiled ocx-child builds.
  • The first full run, at ed1856c29, caught one real failure. docs-spanish-localization ("keeps executable examples and frontmatter…") reported inert, pool.kernel, strategy and stickyLimit missing from the Spanish management-api.md. 8dbc507bb fixes it, and the test passes in the run at 2e00b6678.
  • bun test tests/server/account-pool-management-api.test.ts: 48 pass, 0 fail.
  • The new test inert follows pool.kernel for a generic pool and stays false for Codex and Anthropic and the updated key-set test fail on dev without the source change (0 pass / 2 fail) and pass with it. The new test also checks three things: the unified and legacy generic reads agree with the kernel unset and on; an explicit kernel: false reads the same as unset; a PUT answers with the same marker.
  • bun run typecheck: no type errors. bun run privacy:scan, bun scripts/file-size-ratchet.ts and bun run structure:check passed.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (The /api/pool/settings row in English, Spanish, Korean and Russian reference/management-api.md, and structure/gui-and-management-api.md.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (Read-only settings projection; no auth or credential path touched.)

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features
    • Pool settings now include an inert indicator. It is true for generic pools when the kernel is off and saved pool settings are not applied; it is always false for Codex and Anthropic pools. The indicator does not represent whether a pool is enabled.
  • Documentation
    • Updated the management API reference to describe the indicator and when it applies.

Readiness boxes ticked by maintainer @lidge-jun at integration (2026-11-18) after the exact-head review and CI described in the PR comments.

/api/pool/settings 응답과 ocx account pool 출력에 inert를 넣는다. 일반 OAuth 풀은 pool.kernel이 꺼져 있으면 strategy·stickyLimit·autoSwitchThreshold를 저장만 하고 적용하지 않는데, 공통 응답에는 이 표시가 빠져 있었다. 옛 /api/oauth/accounts/pool 응답과 CLI 스키마(account-policy-dto)는 이미 inert를 다룬다. Codex·Anthropic 선택기는 kernel과 무관하게 설정을 쓰므로 false로 답한다.
@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ 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: src/oauth/pool-settings-capability.ts.

@github-actions github-actions Bot added the bug Something isn't working label Nov 16, 2026
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The unified pool settings DTO now includes inert. The projection returns false for Codex and Anthropic pools. For generic pools, it returns true unless pool.kernel is exactly true. Tests and API documentation cover this behavior.

Changes: Pool Settings Inert Flag

Layer / File(s) Summary
DTO, projection, and contract validation
src/oauth/pool-settings-capability.ts, tests/server/account-pool-management-api.test.ts, docs-site/src/content/docs/reference/management-api.md, docs-site/src/content/docs/es/reference/management-api.md, docs-site/src/content/docs/ko/reference/management-api.md, docs-site/src/content/docs/ru/reference/management-api.md, structure/gui-and-management-api.md
The DTO adds inert. Codex and Anthropic projections return false; the generic projection returns true unless pool.kernel is exactly true. Tests check these values and the generic write response. The documentation describes which generic settings the flag covers and states that it does not describe enabled.

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

Change: Bug fix

Merge Risk: Minimal · up to 2e00b

The unified pool-settings response now includes an inert field that tells callers whether stored selector settings are applied. The change is additive and covered by tests and documentation, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(pool): report inert on the unified pool-settings read" matches the main change. The changeset adds an inert field to the unified pool-settings DTO (src/oauth/pool-settings-capability.…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "fix(pool): report inert on the unified pool-settings read" matches the main change. The changeset adds an inert field to the unified pool-settings DTO (src/oauth/pool-settings-capability.ts), sets it in the projection for generic, Codex, and Anthropic pools, and adds tests and docs for it. The title is specific, uses a conventional-commit prefix, and is 8 words long. It does not cover the documentation updates, but the task does not require that.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 30cc83d and 2e00b66.

Files selected for processing: 4

  • docs-site/src/content/docs/es/reference/management-api.md
  • docs-site/src/content/docs/ko/reference/management-api.md
  • docs-site/src/content/docs/ru/reference/management-api.md
  • structure/gui-and-management-api.md

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

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ⬜ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked.

Hygiene

✅ Deterministic PR hygiene checks passed.

@github-actions
github-actions Bot marked this pull request as draft November 16, 2026 10:45

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

Initial source review at Draft head 30cc83d291075afa763cc9f0e275aa180d5eb9db: the full three-file diff reuses the legacy generic marker in the unified projection and leaves selection/persistence unchanged. The same-key contract, kernel unset/false/true, Codex/Anthropic false and the PUT reply are covered in the new API assertions; inert is correctly distinguished from enabled.

The author-reported focused results are not hosted CI evidence. The current hygiene gate still requires an explicit review decision for src/oauth/; I am not adding a label merely from the path or declaring full readiness from this initial pass. Keep the Draft while that boundary review and required current-head CI/readiness are completed. No live pool setting was changed.

@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer security review (lane L3, gpt-6.2-sol review at ed1856c): SECURITY APPROVE. unifiedPoolSettingsDto (src/oauth/pool-settings-capability.ts:183,200,220) only projects a boolean derived from pool.kernel for each pool kind. It adds no credential, account identifier, upstream body, persistence or selection change. The changed tests fail without the source change. Focused tests (82 pass), typecheck, structure:check and privacy:scan are green.

I pushed 8dbc507 on top. It documents the same inert scope in the Spanish management-API reference and in structure/gui-and-management-api.md. This is docs only, and src/ is unchanged from the reviewed head. Applying maintainer-sponsored for the src/oauth path.

@lidge-jun lidge-jun added the maintainer-sponsored Maintainer sponsors this change to an auth, workflow, release, or dependency surface label Nov 18, 2026
@github-actions github-actions Bot removed the intake: hygiene-blocked Deterministic PR hygiene checks failed label Nov 18, 2026
영어 management-api.md의 /api/pool/settings 행에 넣은 inert 설명을, 같은 행을 영어와 함께 고쳐 온 ko·ru 번역본에도 넣는다(105313877과 같은 범위). es는 8dbc507bb에서 반영됐다.
@yazzang-homelab

Copy link
Copy Markdown
Contributor Author

Thanks for the review and for 8dbc507bb. I had hit the same docs-spanish-localization failure in a full run at ed1856c29, and your fix passes there now.

On top of it, 2e00b6678 adds the same inert note to the Korean and Russian /api/pool/settings rows. Those locales have been updated together with the English row since 1053138. The commit is docs only, and src/ is unchanged from the reviewed head. Verification in the description is refreshed for the new head.

@lidge-jun

Copy link
Copy Markdown
Owner

Thanks for the ko/ru mirror (2e00b66). It is docs only, and the reviewed src/ is unchanged. CI on this head is green and maintainer-sponsored is applied. The last push reset the readiness checklist, so the PR is back in draft. Please tick the four boxes in the description on this head, and it will be integrated.

@github-actions
github-actions Bot marked this pull request as ready for review November 18, 2026 11:15
@github-actions
github-actions Bot marked this pull request as draft November 18, 2026 13:02
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration into dev by @lidge-jun (MAINTAINERS.md 2026-09-06 policy) at exact head 725380c:

  • Review: gpt-6.2-sol code and security review APPROVE (maintainer-sponsored applied). Since then the branch has only gained docs (es/ko/ru/structure) and dev merges.
  • CI: every check on this head passed.
  • Union check: I merged current dev locally and reran typecheck, structure:check, the file-size ratchet, the test-layout guards and tests/server/account-pool-management-api.test.ts (48/0).
  • Review gate: scripts/ci/assert-mergeable-review.sh --maintainer-integration 8825 returned OK.

@lidge-jun
lidge-jun marked this pull request as ready for review November 18, 2026 14:09
@lidge-jun
lidge-jun merged commit 55dd7b1 into lidge-jun:dev Nov 18, 2026
53 of 57 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T14:13:59.387334Z 725380c Draft marked ready
ℹ️ 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.

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

Labels

bug Something isn't working maintainer-sponsored Maintainer sponsors this change to an auth, workflow, release, or dependency surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants