Repository navigation
Description
Split out of #215, which mixes two independent defects. The routing half of #215 is covered by #253's waiting-policy redesign; this half is not, and must not close with it.
Problem (measured 2026-09-01, headless aforge do, shipped defaults, build a850bd8)
The shipped default is the floating alias ~deepseek/deepseek-v4-flash-latest. On the wire it is served as deepseek/deepseek-v4-flash-0731. The lane ledger keys by the served slug, so one model built beliefs under three identities in a single run:
| identity | facts held |
|---|---|
deepseek/deepseek-v4-flash |
full catalog sheet — Cloudflare/CoreWeave Tools:true, prices, context |
deepseek/deepseek-v4-flash-0731 |
none — Tools:false, Context:0, PriceIn:0, Status:0 |
~deepseek/deepseek-v4-flash-latest |
none, OpenInference only |
Consequences, both measured in the same run
- The shipped default routes with zero priors. It could not see that Relace serves this model at p50 1.8s while OpenInference takes p50 44s, and chose OpenInference 13 times. One
fanoutcall sat there 240s until the transport deadline, on a lane whose own belief wasRate.X ≈ −0.01(about 1 tok/s). - The hedge could not be solved.
verdict()returns nothing whenw.alt == "", andChoice.Altwas empty precisely because the-0731identity had no sheet prior to solve an alternative from. This is routing: a stream that trickles is only cut at the wall (2m30s) — no hedge goes out, and the shipped default's alias splits one model into three ledger identities #215's candidate 2, and it is caused here, not in the watch.
Every unknown lane also starts at the 5-minute no-history wall, so the split multiplies the cost of every first call.
Where it lives
catalog.Concrete / catalog.Identity — #186 made them level-blind. They should fold the alias, the concrete slug and the dated served slug onto one identity before the lane ledger sees them.
Acceptance
~vendor/model-latest,vendor/modeland the dated served slug (vendor/model-0731) resolve to ONE ledger identity carrying the catalog's facts. A test pins this for the shipped default specifically.- After a run on the shipped default,
v3/lanes.jsonholds one entry for the model, with catalog facts, not three. - A hedge verdict on the shipped default can solve an alternative —
Choice.Altis non-empty where the catalog knows a faster peer.
Replication
Run any headless task on the shipped default with no crew and no flags, then read AFORGE_HOME/v3/lanes.json: three keys for one model, two of them factless. Evidence from the original run is in #215.
Not in scope
The hedge budget, the drift bound and the commitment rule — those are #215 and #253. The test traffic polluting the call log seen in the same log is #286.
Correction (2026-09-01, after catalog verification)
The table above is misleading on one row: deepseek/deepseek-v4-flash (bare) is the 0423 snapshot — a different model — so its "full catalog sheet" holds beliefs about the wrong model, not a prior this run should have had. And the correct fold target for the floating alias is its alias_target (deepseek/deepseek-v4-flash-0731, the real servable id), NOT catalog.Identity's answer: Identity prefers canonical_slug and returns deepseek/deepseek-v4-flash-20260731, an id OpenRouter lists nowhere and publishes no /endpoints page for. A fix folding to Identity would make consequence 1 worse. See the comment below for the two key sites and the injection template.
The four doors (2026-09-01, from the line-level map)
A raw model spelling enters the lane ledger through FOUR doors, and the general fold must cover all of them or it will be attempted through two and declared done:
- The sheet beat —
internal/session/agent.golaneBeatModels→lanes.Beat→sheet.Refresh: keys the config spelling verbatim (~aliaskept). - The sighting side —
internal/provider/lanes.golaneModel = lanes.BareModel(normalizeModel(model)):normalizeModelstrips the~,BareModelkeeps it, so this door and door 1 disagree with each other before either agrees with the wire. - The settle overwrite —
internal/provider/hedge.go(~:1088):settlewritesresult.response.Modelinto the ledger RAW, bypassinglaneModelentirely — the served slug's own door. - The sheet request —
lanes.WantSheet, added by the waiting-policy PR (waiting: nobody waits long — one hazard controller, hierarchical beliefs, and the offer on a pinned lane #253): the picker hands a raw spelling straight in.
The quick-win PR (resolver at doors 1 and 2) narrows this to the default-alias case and does not close the issue; doors 3 and 4 and the merging of split rows already on disk are the general fold's territory.
Drafted with CodeAF · reviewed and owned by the author
Activity
santoshkumarradha commentedon Sep 2, 2026
Two facts anyone fixing this needs, verified against the real cached model catalog (2026-09-01): (1) the fold target must be the alias_target, not
catalog.Identity's answer — for~deepseek/deepseek-v4-flash-latestthe catalog's canonical_slug chain ends atdeepseek/deepseek-v4-flash-20260731, an id OpenRouter lists nowhere and publishes no /endpoints page for, while alias_target isdeepseek/deepseek-v4-flash-0731, the real servable id. Wiring Identity into the ledger would make the zero-prior default worse, not better. Note alsodeepseek/deepseek-v4-flashbare is the 0423 snapshot — a different model — so the 'full catalog sheet' row above holds beliefs about the wrong model. (2)catalog.Concreteandcatalog.Identityhave zero production callers — the fold was built (#186) and never wired; the working injection template isprofile.UseIdentity(Resolve)installed at launch. The two ledger key sites areinternal/provider/lanes.go laneModel(sighting side, keysdeepseek/…-latestafter normalizeModel strips the ~) andinternal/session/agent.go laneBeatModels→sheet.Refresh(sheet side, keys the ~alias verbatim) — one injected resolver at those two reads collapses the split.santoshkumarradha commentedon Sep 2, 2026
Quick win landed: PR #300 (dev 9779619) folds the two reader seams — sighting-side laneModel and the beat's laneBeatModels — through the injected catalog fold (catalog.Servable → lanes.LedgerModel, alias_target only, never the canonical slug). Shipped-defaults real-model smoke: ONE ledger identity (deepseek/deepseek-v4-flash-0731) where before there were three keys.
Still this issue's territory (the general fold):
Related but separate: #318 (headless do runs no beat), #319 (isOpenRouter raw read).
lanes: one model has one ledger identity, at every door and in what i…
lanes: one model has one ledger identity, at every door and in what i…