Repository navigation
Commit 4bdc0f6
authored
fix(codex): restore GPT-5.6 for entitled accounts by raising the gated client-version floor (#3035)
* docs(devlog): plan the priority-70+ entitlement and spill train
Roadmap cycle for #3022, #3023, and #3011. Research lanes established three
things the issues did not:
- The repository already contains a live measurement (260817 unit) that
contradicts its own bundled snapshot: upstream returns gpt-5.6 only at
client_version >= 0.144.0, while the snapshot records 0.142.2. The tier-3
floor derives from that snapshot, so background sync asks a question upstream
answers with an empty gated set.
- An empty parsed roster produces a truthy Set, so it is recorded as a CONFIRMED
negative with the 5-minute success TTL rather than the 15-second failure TTL.
A size>0 guard does not cover the reported short roster, which contains
gpt-5.5 while every gated slug is absent.
- PR #3018 fixes the /healthz stall correctly but leaves a shutdown boundary:
flushResponseState never awaits responseSpillPublicationTail, and residents
over 2 MiB are excluded from the snapshot, so a continuation can be lost.
wp3 therefore lands a drain on top of that head instead of merging as-is.
Docs only; no production code in this commit.
* docs(devlog): amend the train after a FAIL plan audit
An adversarial sol-high plan auditor returned FAIL with four blockers, all
verified in-tree before acceptance:
- wp1's single account-wide flag would have applied model-scoped doubt as an
account-wide denial. confirmed is one bit for the whole roster and every
projection drops the account when it is false, so the draft would have hidden
gpt-5.5 and gpt-5.4 too, and denied gpt-daybreak-blue-latest, which is gated
but has no snapshot row and therefore no measured minimum. Split into an
account-scoped usable-answer test and a model-scoped absence-authority test;
positive evidence needs no version check.
- wp2's refresh rule missed forever when logged out: the main account is always
a candidate but is filtered out before any cache entry exists, so every poll
re-entered the resolver. Needs a bounded negative memo for absent credentials.
- wp3's drain was not actually bounded. The async icacls timer kills the child
and still awaits proc.exited, and the draft's snapshot fallback is impossible
because oversized residents are excluded from snapshots.
- wp2's diagnostic had no transport: /api/models is a bare array the GUI and
ocx export both depend on. Split to wp4 with /api/providers as the home.
Also corrected an over-claim: 372000 in the snapshot does not feed
NATIVE_GPT56_CONTEXT_WINDOW, which is independently 272000 and overrides it, so
leaving the snapshot stale is behaviourally safe.
Docs only.
* docs(devlog): collapse wp1 and bound wp3 after a second FAIL audit
Round 2 closed two blockers and kept two open. Both remaining ones were real.
wp1's model-scoped absence rule is not implementable inside a symptom fix.
The answering client_version is recorded on the cache entry but discarded when
the snapshot is built, and the three projections are positive-only: a third
boolean term either narrows redundantly or widens into granting a model upstream
never gave. Unknown has no slot to occupy. wp1 is now Change 1 plus the
account-scoped empty-roster fix only; the tri-state contract becomes wp5.
The round-1 draft also asserted that gpt-5.5 survives over-denial, but gpt-5.5
is not in ACCOUNT_GATED_NATIVE_OPENAI_MODELS, so it was never at risk and the
test was vacuous. Withdrawn with 2b.
wp3's cap-expiry fallback was outside its own cap: the synchronous writer
hardens directory and temp as separate calls and each resolves its own 30s
budget, documented at ~90s worst case. A 5s cap followed by a 60s fallback is
not a bound. wp3 now requires one end-to-end budget, remaining-budget plumbing,
and explicit supersession so a late writer cannot overwrite the fallback. Three
regressions the first list omitted are added, and the split condition is now
abandon-and-file rather than hang.
wp4 dropped an unreachable state: wp1 makes every empty roster unconfirmed, and
without a completeness marker the system cannot honestly claim an account owns
nothing.
Docs only.
* docs(devlog): clear wp1 and correct a wrong baseline in wp3
Round 3 closed blocker 1 and positively traced the reduced wp1 to a fix for
#3022: with tier 3 raised to the measured 0.144.0, a fresh install with no
runtime file and no inbound version queries upstream under a version that
returns the gated rows, and catalog projection retains them.
Two corrections.
wp3 had two requirements that cancel: entering the fallback at cap expiry while
also giving the fallback the remaining budget leaves it zero time when the drain
spends the deadline. The budget is now split up front with a reserved fallback
slice sized for two separate harden calls.
More seriously, wp3 claimed abandoning an outstanding job equals today's
behaviour. It does not. On dev, oversized candidates are published synchronously
before the request returns, so dev has no shutdown-loss window for that case.
Abandonment matches PR #3018's head instead, which is the state that introduced
the loss. Measuring a regression against an unmerged PR rather than dev is how a
regression gets waved through. The split condition is withdrawn: wp3 lands the
bounded fallback or #3018 stays unmerged, since dev is correct on durability and
only slow on Windows.
wp4 gained a prerequisite: parsed-empty and network failure produce the identical
cache entry today, so the diagnostic cannot honestly name them separately until
failure provenance is recorded.
Docs only.
* docs(devlog): record the wp0 roadmap receipt and what the audits changed
Verification ran on lidge, not locally: privacy scan and typecheck exit 0, and
repo-hygiene passes 12/12. That file is the focused check that actually covers a
devlog change, so it is the right narrow gate for a docs-only phase.
Also records the diff between the first draft and the landed roadmap, which is
the real output of this phase: wp1 shrank after the audit showed it would apply
model-scoped doubt as account-wide denial, wp3 inverted from review-and-merge to
land-a-drain-then-merge, two work phases were born from blockers, and three
vacuous or impossible test plans were caught before any code was written.
* fix(codex): restore GPT-5.6 for entitled accounts by raising the gated client-version floor (#3022)
2.36.0 removed gpt-5.6 sol/terra/luna from ChatGPT Plus accounts that own them;
2.35.0 shows them. Two independent defects, both in src/codex/model-entitlements.ts.
The client-version floor used for background discovery is derived from the bundled
snapshot, which records 0.142.2 for the gated rows. Upstream answers 0.142.2 with
200 and five models, none of them gpt-5.6; 0.144.0 and above return them. So the
question we asked had an honest answer of "no gpt-5.6", and the fail-closed gate
read that absence as a confirmed denial. The floor is now the highest of the
derived value, an independently measured minimum of 0.144.0, and the existing
fallback. Composed rather than hardcoded so a future snapshot recording a newer
requirement takes over and the constant goes inert.
Separately, an empty roster was treated as a confirmation. `models` is a Set and an
empty Set is truthy, so `{"models":[]}` earned confirmed:true and the five-minute
success TTL. That is absence of evidence recorded as evidence of absence, held for
twenty times longer than a failure. A roster with no usable rows is now unconfirmed
on the 15s failure TTL. Non-empty rosters are unchanged.
The 15s TTL is demand-driven, not timer-driven: refetch happens only through
/v1/models, Direct gated authorization, catalog sync and convergence, requests for
one account and version coalesce onto a single flight, and distinct versions are
capped at four concurrent per account. Dashboard polling does not reach this path
today.
Verification: eight regressions, each driven red against the unfixed source and
green after. One existing assertion intentionally flips —
tests/codex-model-entitlements.test.ts previously asserted an all-filtered roster
was confirmed. The existing no-inbound test mocked upstream at minor >= 142, which
is precisely why the suite never caught this; its threshold moves to >= 144.
Refs #3022 #2886
---------
Co-authored-by: lidge-jun <[email protected]>1 parent 7666f7d commit 4bdc0f6
17 files changed
Lines changed: 1849 additions & 12 deletions
File tree
- devlog/_plan/260831_prio70_entitlement_and_spill_train
- src/codex
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
0 commit comments