|
| 1 | +# 000 — Overnight PR triage: nine PRs, four verdicts |
| 2 | + |
| 3 | +Nine pull requests arrived overnight while the #951–#955 stack was in review. |
| 4 | +The question for each: does it duplicate work already on the stack, is it a real |
| 5 | +independent defect, or does it belong somewhere else entirely. |
| 6 | + |
| 7 | +Measured 2026-08-04 against `origin/dev` and the stack head |
| 8 | +`codex/915-cooldown-recovery-probe` at `493329df0`. |
| 9 | + |
| 10 | +## Verdicts |
| 11 | + |
| 12 | +| PR | Author | Verdict | Action | |
| 13 | +|---|---|---|---| |
| 14 | +| #967 | @Yuxin-Qiao | **two real defects in OUR #955** | carry onto layer 6 | |
| 15 | +| #965 | @Yuxin-Qiao | correct fix for #962 | carry onto layer 6 | |
| 16 | +| #963 | @MarcTCruz | duplicate of #965, broader and weaker | close, name #965 | |
| 17 | +| #968 | @DevMello | real independent defect | carry onto layer 6 | |
| 18 | +| #964 | @Yuxin-Qiao | real independent defect (#956) | leave open, own review | |
| 19 | +| #966 | @Yuxin-Qiao | partial fix, fifth falsified design | leave open, request changes | |
| 20 | +| #970 | @stephen-drew | real, out of stack scope | leave open | |
| 21 | +| #961 | @Yuxin-Qiao | feature, not a bug | leave open | |
| 22 | +| #969 | @Wibias | CI governance policy | out of scope | |
| 23 | + |
| 24 | +## #967 — the one that matters most |
| 25 | + |
| 26 | +@Yuxin-Qiao reviewed #955 and found two defects **in my own code**. Both verify. |
| 27 | + |
| 28 | +**P1: monthly-classified snapshots were rejected.** My |
| 29 | +`isCompleteCodexQuotaRecoverySnapshot()` picked the required window from the |
| 30 | +plan NAME. The parser picks it from the window DURATION |
| 31 | +(`isExplicitMonthlyWindow()`, `src/codex/quota.ts:104-109`), and a Team response |
| 32 | +whose primary window is explicitly monthly parses to `monthlyPercent` only. So |
| 33 | +the probe rejected every successful fresh read for those accounts: |
| 34 | + |
| 35 | +```console |
| 36 | +$ bun run .tmp/probe_967.ts # on the stack head, BEFORE the fix |
| 37 | +parsed = {"monthlyPercent":12,"monthlyResetAt":1900000000} |
| 38 | +recoverable? = false <-- Team monthly account can never recover |
| 39 | +weekly parsed = {"weeklyPercent":12,"weeklyResetAt":1900000000} |
| 40 | +recoverable? = true |
| 41 | +``` |
| 42 | + |
| 43 | +That is the same "cooled forever" failure #915 exists to fix, reintroduced for |
| 44 | +monthly-window plans. It is also the *third* time this predicate has been wrong |
| 45 | +in the same direction — first the plan allowlist, then `prolite`, now the |
| 46 | +window-classification mismatch. The lesson has been consistent and I kept |
| 47 | +missing it: this predicate must read what the parser actually wrote, never |
| 48 | +re-derive the classification itself. |
| 49 | + |
| 50 | +**P2: the probe's own token refresh looked like a replacement.** |
| 51 | +`getValidCodexToken()` refreshes a near-expiry token inside the probe fetch and |
| 52 | +advances the credential generation by exactly one |
| 53 | +(`src/codex/account-store.ts:415-421`). My settle required the claim-time |
| 54 | +generation to match exactly, so a successful fresh read under the refreshed |
| 55 | +generation was thrown away and recovery waited another five minutes. |
| 56 | + |
| 57 | +The fix fences the +1 transition on `replacedAt`, which is the right |
| 58 | +discriminator: |
| 59 | +`saveCodexAccountCredentialIfGeneration()` **preserves** `replacedAt` |
| 60 | +(`:195-217`) while `saveCodexAccountCredential()` **stamps a fresh one** |
| 61 | +(`:131-146`). So a probe-owned refresh and an external replacement are |
| 62 | +distinguishable even though both bump the generation. |
| 63 | + |
| 64 | +Verified after the fix — every fail-closed guard still holds: |
| 65 | + |
| 66 | +```console |
| 67 | +credits-only -> false windowless {} -> false null -> false |
| 68 | +exhausted 100 -> false go+weeklyOnly -> false |
| 69 | +team monthly -> true team weekly -> true |
| 70 | +``` |
| 71 | + |
| 72 | +Red-green: ablating P1 fails 2 tests, ablating P2 fails 1 different test. |
| 73 | + |
| 74 | +## #963 vs #965 — the duplicate pair |
| 75 | + |
| 76 | +Both claim "Fixes #962", both edit `src/codex/catalog/provider-fetch.ts`. |
| 77 | +**#965 wins.** |
| 78 | + |
| 79 | +#962 is specifically about a custom row *replacing* a same-slug provider row. |
| 80 | +#965 models exactly that: it indexes the rows deduplication will replace and |
| 81 | +fills only undefined capability fields from the replaced row, so it also |
| 82 | +inherits live `/models` metadata such as normalized `capabilities`. |
| 83 | + |
| 84 | +#963 instead recomputes `catalogHintsFromProviderConfig()` for **every** custom |
| 85 | +row, including custom-only rows with no provider counterpart — broader than |
| 86 | +#962 requires. It cannot retain discovered metadata, since it rebuilds from |
| 87 | +config rather than inheriting. And it rewrites an existing regression contract |
| 88 | +to fit: `tests/catalog-vision-sidecar-modalities.test.ts` changes from "no |
| 89 | +registry reasoning metadata leaks onto an unmatched custom override" to |
| 90 | +expecting that leak, and drops three `fetch should not be called` guards. |
| 91 | + |
| 92 | +Changing a test that encodes a deliberate prior decision, in order to make a |
| 93 | +broader change pass, is the part that decides this. #965's ablation fails |
| 94 | +exactly one test — the #962 regression — which is what a focused fix looks like. |
| 95 | + |
| 96 | +## #966 — a fifth design, still falsified |
| 97 | + |
| 98 | +#966 targets #914, which four prior designs already failed at an audit gate |
| 99 | +(`devlog/_plan/260803_transport_attribution/000_plan.md`). It is a genuine |
| 100 | +advance: it uses the real Bun 1.3.14 error labels including both alternating |
| 101 | +ones, it does **not** repeat the hostname-resolution design, and it closes the |
| 102 | +redirect counterexample on the pool Responses and Compact paths with manual |
| 103 | +redirects. TLS/fake-IP codes correctly stay account-scoped. |
| 104 | + |
| 105 | +But two falsifications survive, both reproduced live: |
| 106 | + |
| 107 | +**Mixed 5xx → rejection still loses the attributable failure.** |
| 108 | +`fetchWithTransientRetry()` discards prior transient responses when a later |
| 109 | +attempt rejects (`src/lib/upstream-retry.ts:220-236`), so a genuine 503 followed |
| 110 | +by a connection refusal is recorded as account-neutral. That is precisely the |
| 111 | +hole the earlier audit documented. |
| 112 | + |
| 113 | +**Falsification 3 survives on five expanded surfaces.** Manual redirects were |
| 114 | +added only to Responses and Compact; the five sidecar paths #966 newly |
| 115 | +classifies still use default-follow fetch, so a credential-bearing sidecar that |
| 116 | +receives a 307 to a dead host is misclassified as neutral — after the origin |
| 117 | +already read the `Authorization` header: |
| 118 | + |
| 119 | +```text |
| 120 | +redirect:"follow" serverSawAuthorization:"Bearer credential-follow" resolved:false |
| 121 | +redirect:"manual" serverSawAuthorization:"Bearer credential-manual" resolved:true 307 |
| 122 | +``` |
| 123 | + |
| 124 | +So #966 is not mergeable as-is, and its sidecar expansion carries the unresolved |
| 125 | +hole *beyond* #914's original sites. It does supersede #922 (which misses one |
| 126 | +Bun label entirely, keeps default redirects, and bundles unrelated probe-lease |
| 127 | +work while sitting at `CHANGES_REQUESTED`). |
| 128 | + |
| 129 | +Neither lands on our stack. #914 remains open with a fifth design on record. |
| 130 | + |
| 131 | +## The rest |
| 132 | + |
| 133 | +**#968** (@DevMello) — the google adapter dropped `tool_choice` entirely: `none`, |
| 134 | +`required`, and a forced tool all produced a wire body identical to `auto`, with |
| 135 | +only a prose nudge in the system prompt. The wire compiler already validated |
| 136 | +`toolConfig.functionCallingConfig`; the adapter simply never built it. Carries |
| 137 | +cleanly onto the stack; same author as the already-carried #943. |
| 138 | + |
| 139 | +**#964** (@Yuxin-Qiao) — the `nvidia` registry entry lacks `noVisionModels`, so |
| 140 | +the vision sidecar never activates for NIM text-only models and raw image parts |
| 141 | +reach a text-only upstream. Real, but it is a registry/provider change with no |
| 142 | +relationship to this stack's theme; it deserves its own review rather than a |
| 143 | +ride on a bug stack. |
| 144 | + |
| 145 | +**#970** (@stephen-drew) — service re-registration during self-update. Real, but |
| 146 | +30 files across CLI, GUI, and five docs locales, touching a |
| 147 | +permission-sensitive install path. Out of scope here. |
| 148 | + |
| 149 | +**#961** — provider custom headers via PATCH. A feature, not a bug. |
| 150 | + |
| 151 | +**#969** (@Wibias, collaborator) — CI policy that auto-drafts contributor PRs |
| 152 | +until a checklist is complete. Out of scope: it is a workflow change requiring |
| 153 | +security review per `AGENTS.md`, and it encodes a contribution policy that is |
| 154 | +the maintainer's call, not a bug fix. Worth noting the history — the #900–#905 |
| 155 | +stack was closed on exactly this kind of policy question, not on its mechanics. |
| 156 | + |
| 157 | +## Layer 6 contents |
| 158 | + |
| 159 | +Carry, in order: #967 (fixes our own defects), #965 (catalog), #968 (google |
| 160 | +tool_choice). Everything else stays where it is, with a reason on record. |
0 commit comments