Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions devlog/_plan/260906_lane_b_catalog_stack/030_ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Class: C3 cross-module catalog contract. One future PABCD cycle consumes this do

## Outcome and necessity

Configured canonical `opencode-go` efforts survive generation and retained sync without injected max/ultra. A nonblank bare catalog id in `modelPickerOrder` opts into complete-picker display ordering; exact ids outrank raw/encoded equivalents. Routed-only and empty configurations retain legacy behavior. Display sorting must leave the natural five-candidate subagent roster unchanged. Existing `applyReasoningLevels`, `slugEquivalenceKey`, `SPAWN_PRIORITY_FIELD`, and observed-state merge own these behaviors; reuse them, with no new catalog engine or provider roster.
Configured canonical `opencode-go` efforts survive generation and retained sync without injected max/ultra. A nonblank bare catalog id in `modelPickerOrder` opts into complete-picker display ordering; exact ids outrank raw/encoded equivalents. Routed-only and empty configurations retain legacy behavior. Display sorting must leave OpenCodex's natural-priority guidance candidates unchanged. Native Codex advertisements are a separate consumer and may follow the changed display order. Existing `applyReasoningLevels`, `slugEquivalenceKey`, `SPAWN_PRIORITY_FIELD`, and observed-state merge own these behaviors; reuse them, with no new catalog engine or provider roster.

## Current owners and amendment anchors

Expand Down Expand Up @@ -47,7 +47,7 @@ Repeat at retained sync. Complete ordering preserves `entry[SPAWN_PRIORITY_FIELD
| NEW `tests/codex-integration/catalog-full-picker-order.test.ts` | Bare native id + Go routed ids, then apply twice | Specified complete display order; unchanged stored natural ranks and byte-equivalent repeated result |
| Same | Empty, whitespace-only, routed-only, raw slash upstream id plus encoded id | Legacy behavior; no whitespace activation; exact rank wins equivalence and no suffix aliasing |
| Same | Start full order, switch to empty/routed-only during provider outage; change featured order, promote/demote; zero/two selectors and nonzero picker index | Healthy and degraded rows agree on both display and spawn rank; second merge is stable; input snapshot unmutated |
| Same plus existing `codex-v2-gate.test.ts` | Change picker only while retaining configured subagent roster; use v2 eligibility | Same five candidates and valid exact Go effort membership |
| Same plus existing `codex-v2-gate.test.ts` | Change picker only while retaining configured subagent roster; use v2 eligibility | Same five OpenCodex guidance candidates and valid exact Go effort membership |
| Existing `tests/codex-integration/codex-catalog.test.ts` | Existing normalization/recovery fixtures | Existing native Reserve/exact ladders and account rows retain their contracts; align assertions only for intentional Go tier change |
| Existing `tests/test-layout.test.ts`, `tests/test-layout-tooling.test.ts` | NEW file registration | Both explicit layout map and expected fixture contain both file names in codex-integration |

Expand Down Expand Up @@ -663,3 +663,17 @@ index 114c699eaf..8dba5cfb55 100644
"catalog-oauth-observation.test.ts": "codex-integration",

````

## Consuming P refresh

Parent preparation head is 29f98462c4a63cf217347c26668733169fd65736. Source #3571 remains OPEN at 0a935c5694229760c8c1cd5a62072107d8ae6696, and its full patch passes applicability on this parent. All four non-merge source commits identify voiys <matej2714@gmail.com>. The existing modelPickerOrder field survives config loading through the established root passthrough schema; no new persistence field is introduced. Preserve providerContextCapValues from 020.

The initial roadmap listed source English/French edits, but six other existing model-ordering guides also contain the legacy native-order contract. MODIFY docs-site/src/content/docs/{ja,ko,ru,tr,zh-cn,zh-tw}/guides/model-ordering.md with the same complete-order opt-in, exact/equivalent matching, unchanged spawn roster and existing-list migration warning. Do not create new locales or alter unrelated routing semantics. The runtime/template output remains separately verified from any native client capture; a synthetic rendering must never be described as an actual client capture.

Delegation: main carries the final source diff and owns SoT/commits; catalog worker supplies caller-level coverage and a captured generated-list comparison; docs worker owns the six translated guides; independent code reviewer checks priorities/retained paths; remote verifier uses isolated exact-head tests/docs plus a native client capture if the installed client can be run safely with synthetic state. No local test/build/typecheck and no real personal proxy/account calls. Final merge gates remain unchanged.

## C evidence-driven contract clarification

The independent native-consumer audit distinguishes three concepts: OpenCodex natural-priority guidance (must remain unchanged), native advertised five (can follow changed display priority), and exact-name override eligibility (not restricted to the advertised five). This preserves the already-recorded #1649 design while correcting the earlier unqualified wording. No wire rewriting or native-client patch is added. The source appendix above remains an immutable record of the original PR and is not a current universal native-advertisement guarantee.

Native source d2d5b702 (local upstream checkout, not claimed to match binary0.153.4) shows both V1/exposedV2 using native priority; current valid generated before/after data demonstrates the expected displacement. The actual0.153.4 capture proves picker/data consumption only until a separate toolspec capture is obtained. V1 has no OCX preferred-roster injection; V2 guidance is conditional on catalog state. New production-writer fixture failures remain blockers for the natural-guidance criterion and cannot be waived by this wording correction.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Ordering carry build

Replacement #3700 carries all four source #3571 commits through `0a935c5694229760c8c1cd5a62072107d8ae6696`, retaining voiys as author and coauthor. It preserves configured canonical OpenCode Go ladders in generation/retention and separates full-picker display order from natural spawn priority.

Production-writer tests cover both convergence and retained sync, healthy/outage equivalence, refreshed featured ranks, idempotence and the same five eligible candidates. Source review found that the new merge paths lacked the builder's runtime normalization for the existing passthrough modelPickerOrder field. All three boundaries now share the same nonarray/nonstring/blank filtering while preserving significant ID spelling. Malformed-input production-writer cases and remote causal checks verify that repair. English/French source documentation is synchronized with the six other existing ordering guides and the catalog SoT.

Parent #3695 was admin-merged on dev as `ab6762bdb35db24efbe1ceac77a1f9e5e6139616` after every actual CI producer succeeded. The aggregation-only ci job was still queued and explicitly recorded as an owner-authorized administrative exception; no actual test was bypassed. Independent reviews and remote backend/component/typecheck/docs/browser/red-green evidence passed. Source #3654 and issue #3651 were closed after dev ancestry proof, and #3700 was safely retargeted to dev.

Final ordering review and exact-head remote/hosted execution are pending at this checkpoint. No local repository tests, typechecks or builds were run.
11 changes: 11 additions & 0 deletions devlog/_plan/260906_lane_b_catalog_stack/032_ordering_repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ordering check repair

The first remote check of 1c2616bfd failed 14 new production-writer cases; no failing result was treated as a pass. Investigation separated fixture isolation from a production defect.

The fixture now provides a runnable deterministic Codex command through forced refresh, asserts runtime identity, uses the current featured-roster migration marker, and checks effort arrays without mutating metadata. Full catalog equality and the same five OpenCodex guidance candidates remain required.

Fresh row derivation could copy opencodex_spawn_priority from a previously ordered native template. Assigning a new featured priority did not replace that inherited private rank, so repeated healthy writes could change the guidance window. Fresh clones now clear that previous row's private marker; retained-row markers and reader behavior are unchanged. Direct dirty-template and repeated real-writer regressions cover the cause. Remote causal confirmation and reruns are required before closing this repair.

The native-consumer audit also corrected an overbroad explanation: OpenCodex natural-priority guidance and native Codex's advertised five are separate. Native advertisement may follow display priority on V1 and exposed V2; exact-name override eligibility is not limited to that advertisement. This clarification preserves the existing #1649 design and does not waive the failing natural-guidance assertions. Current code comments, configuration reference and eight ordering guides now make the distinction explicit; the original source-diff appendix remains historical evidence.

No local tests, builds or typechecks were run. Verification must use the repaired committed head and retain red/green, runtime identity and teardown evidence.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Matched retained-discovery control

After the template-rank correction, the direct regression and repeated production-writer guidance cases passed remotely. Ten malformed-order cases still compared a static healthy catalog (14 rows in that snapshot) against a live/degraded catalog (36 rows). Maintained Go metadata augmentation is skipped for liveModels:false and enabled for liveModels:true, so changing that setting admitted additional rows independently of picker-order validity.

The test now restores identical catalog/cache bytes before a valid-filtered retained control and a malformed retained run. Both use the same live/empty-model/failure settings; only picker order differs. It still compares complete model arrays, the full guidance roster and all original fixture models' exact effort ladders. Healthy valid-versus-malformed equality is retained. No registry model count is hardcoded and no production fallback behavior is changed.

Previous failed outputs remain evidence. The revised counterfactual requires an exact-head remote rerun before a success claim. No local tests were run.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Verification follow-up

The ordering CI run reported an unrelated Lab supervision test failure. A bounded verification prerequisite is reviewed separately from the catalog change. Detailed pre-publication analysis and the implementation plan remain in ignored scratch under the repository security-working-note policy. Product limits and existing assertions are not relaxed. The original ordering branch and failed outputs remain preserved; no success is claimed at this planning checkpoint.
48 changes: 42 additions & 6 deletions docs-site/src/content/docs/fr/guides/model-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ priorités `i * N + j`, où `j` est la position du sélecteur en base zéro ; un
sont déplacées hors de ces groupes de sélecteurs. Codex continue de n’annoncer que les cinq premières
lignes visibles dans le sélecteur.

Les priorités sans sélecteur pertinentes sont :
Sans ordre global du sélecteur, les priorités sans sélecteur pertinentes sont :

| Entrée du catalogue | Priorité | Source |
| --- | --- : | --- |
Expand Down Expand Up @@ -134,11 +134,47 @@ au-delà de ce bloc mis en avant :
Les lignes routées indiquées apparaissent dans l’ordre configuré. Une ligne absente du tableau conserve sa
priorité normale et reste donc devant la bande d’affichage de `modelPickerOrder` ; indiquez toutes les
lignes routées dont vous souhaitez contrôler l’ordre relatif. Une ligne également présente dans
`subagentModels` conserve sa priorité de mise en avant. `modelPickerOrder` ne réorganise ni les lignes
natives non qualifiées ni celles qualifiées par un compte ; utilisez `subagentModels` pour celles-ci.
`subagentModels` conserve sa priorité de mise en avant. Une liste contenant uniquement des identifiants
routés conserve la position normale des lignes natives.

`modelPickerOrder` ne modifie jamais l’ensemble des candidats de `spawn_agent`. Il change uniquement la
priorité visible par Codex dans le sélecteur, tandis qu’OpenCodex conserve la priorité naturelle de chaque
ligne déplacée pour la sélection des sous-agents. `disabledModels` et `selectedModels` de chaque fournisseur
Pour ordonner tout le sélecteur, incluez un identifiant natif non qualifié :

```json
{
"modelPickerOrder": ["gpt-5.6-sol", "opencode-go/glm-5.3"]
}
```

Les lignes indiquées apparaissent d’abord dans l’ordre du tableau, puis les lignes absentes
selon leur priorité naturelle. La correspondance est exacte : `gpt-5.6-sol` et
`openai/gpt-5.6-sol` désignent deux lignes distinctes. Pour une ligne qualifiée par un compte,
indiquez son identifiant complet, sélecteur inclus. Les formes brute et encodée du même
identifiant routé sont acceptées, avec priorité aux correspondances exactes. Les entrées
vides sont ignorées.

### Migration : identifiants natifs dans les listes existantes

Auparavant, les identifiants natifs dans `modelPickerOrder` étaient ignorés. Une liste
existante contenant un identifiant natif non qualifié ordonne désormais tout le sélecteur,
y compris les lignes mises en avant. Supprimez ces identifiants pour conserver l’ancien
comportement limité aux lignes routées. Les listes absentes, vides ou uniquement routées
conservent leur comportement ; le calcul des candidats pour les consignes d’OpenCodex selon les priorités naturelles reste inchangé.

`modelPickerOrder` préserve le calcul d’OpenCodex qui retient jusqu’à cinq candidats préférés
pour les consignes aux sous-agents, selon leur priorité naturelle. Chaque ligne déplacée conserve
cette priorité séparément de son `priority` natif ; changer uniquement l’ordre du sélecteur ne doit
pas modifier ce calcul. Cela ne restreint pas l’admissibilité d’un modèle désigné par son nom exact :
la liste annoncée n’est pas une liste d’autorisation. Les contraintes d’authentification, de modèle,
d’effort et de backend restent applicables.

Codex natif utilise le `priority` natif pour annoncer les cinq premiers modèles admissibles et
visibles dans le sélecteur via `spawn_agent`, en V1 et en V2 lorsque les substitutions de modèle
sont exposées. Ces cinq modèles peuvent donc changer avec l’ordre du sélecteur, même si les
candidats préférés d’OpenCodex restent identiques. La V1 ne reçoit aucune injection de liste
préférée d’OpenCodex. La V2 peut recevoir en plus des consignes fondées sur les priorités naturelles
si l’état du catalogue client le permet ; ces consignes ne réordonnent pas la liste annoncée par
l’outil natif.

`disabledModels` et `selectedModels` de chaque fournisseur
restent des champs de visibilité, pas des contrôles d’ordre. Il n’existe aucun paramètre distinct
`modelOrder`, `providerOrder` ou de carte de priorité.
43 changes: 37 additions & 6 deletions docs-site/src/content/docs/guides/model-ordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ priorities `i * N + j`, where `j` is the selector's zero-based position; a route
rows are moved outside those selector groups. Codex still advertises only the first five
picker-visible rows.

The relevant no-selector priorities are:
Without complete-picker ordering, the relevant no-selector priorities are:

| Catalog entry | Priority | Source |
| --- | ---: | --- |
Expand Down Expand Up @@ -133,10 +133,41 @@ featured block:
Listed routed rows appear in the configured order. A routed row omitted from the array keeps its
normal priority, so it remains ahead of the `modelPickerOrder` display band; list every routed row
whose relative position you want to control. A row also present in `subagentModels` keeps its
featured priority. Bare native and account-qualified native rows are not reordered by
`modelPickerOrder`; use `subagentModels` for those rows.
featured priority. With a routed-only list, native rows keep their normal positions.

`modelPickerOrder` never changes the `spawn_agent` candidate set. It changes only the
Codex-visible picker priority while opencodex retains each moved row's natural priority for
sub-agent selection. `disabledModels` and each provider's `selectedModels` remain visibility fields,
To order the complete picker, include a bare native id:

```json
{
"modelPickerOrder": ["gpt-5.6-sol", "opencode-go/glm-5.3"]
}
```

Listed rows appear first in array order, followed by unlisted rows in natural priority
order. Matching uses exact catalog ids: `gpt-5.6-sol` and `openai/gpt-5.6-sol` are separate
rows. Raw and encoded spellings of the same routed id are also accepted, with exact
matches taking precedence. Empty entries are ignored. Account-qualified rows need
their selector-qualified id in the list.

### Migration note: native ids in existing orders

Previously, native ids in `modelPickerOrder` were ignored. An existing list containing
a bare native id now activates complete-picker ordering, including featured rows.
Remove bare native ids to keep the previous routed-only behavior. Unset, empty and
routed-only lists retain their behavior; OpenCodex's natural-priority guidance candidate calculation is unchanged.

`modelPickerOrder` preserves OpenCodex's natural-priority calculation of up to five preferred
candidates for subagent guidance. Each moved row retains its natural priority separately from
its native `priority`; changing picker order alone must not change that OpenCodex calculation.
It does not restrict eligibility for an exact-name model override: the native advertised list
is not an allowlist, and existing authentication, model/effort and backend constraints still apply.

Native Codex uses native `priority` to select the first five eligible picker-visible models
advertised by `spawn_agent` on V1 and on V2 when model overrides are exposed. Those advertised
five may therefore change with picker order, even when OpenCodex's preferred candidates remain
unchanged. V1 receives no OpenCodex preferred-roster injection. V2 may additionally receive
OpenCodex's natural-priority guidance when the client catalog state permits; that guidance does
not reorder the native tool's advertised list.

`disabledModels` and each provider's `selectedModels` remain visibility fields,
not ordering controls. There is no separate `modelOrder`, `providerOrder`, or priority-map setting.
Loading
Loading