Skip to content

[Feature]: Include main-pool selections in affinity decision diagnostics #7799

Closed

Description

@vibewriter-hand

Area

Authentication and account pool

What are you trying to accomplish?

Read the same affinity decision (kept, moved or released, with the reason) for main-pool selections as for stored-pool selections.

What prevents this today?

Request preparation copies the affinity decision into the log only when authCtx.kind is pool (src/server/responses/request-prepare.ts:1562). The pool auth context has an affinityDecision field (src/codex/auth-context.ts:311); the main-pool variant has none. So a main-pool request logs no move or reason. #4592 added these diagnostics for the stored pool (#4546). #6998 is about caller credential eligibility and is a different topic.

What should OpenCodex do?

Carry the existing selection decision through main-pool results and into the same log fields. Do not change binding eligibility or credential ownership. The diagnostics must not create a second binding owner.

Example usage or interface

A main-pool selection keeps or releases a binding. Its log line shows the existing affinity and affinityReason values, with no key material or account identifiers.

Alternatives or workarounds

Today an operator must infer moves from adjacent account labels. That can mistake a new-bind diagnostic for a stored binding.

Additional context

This is a reading of the published 2.92.0 source. We did not run a live request. On 2026-10-27 we searched open and closed issues and PRs for main account and pool affinity. We did not read every result page.

Related: #4546, #4592, #6998

This touches the authentication area. Would a maintainer sponsor a small change before we prepare a PR?

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. added
    enhancement
    account-pool
    on Oct 27, 2026
  2. Ingwannu commented on Oct 29, 2026

    @Ingwannu
    Owner

    Closing as completed on dev: #7883 merged as 8ed7b453d7f37f111f011bc2b5d4e89dc4816294, which I verified is an ancestor of current trusted dev 9b78a16f4fe0c300527e6b183052407269bb941d.

    The main-pool context now carries the existing selection affinity decision, and request logging copies it for both pool and main-pool contexts; selection and credential ownership are unchanged.

    I checked the implementation and the successful exact-head required CI for d6502a730d814de8be599b2cd98108d850b9f039. Existing author regression receipts remain author-run evidence; I did not rerun unchanged passing suites or reproduce this on a live account/native client. This closure records the landed scope, not validation of the reporter's installed version or a release claim. If the same failure occurs on a build containing this commit, provide a new bounded, redacted reproduction against that build.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolenhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions