Skip to content

docs: sync index-key definitions with the LoRA adapter partition#163

Open
EdHasNoLife wants to merge 1 commit into
mainfrom
sunxuedward/cac-245-doc-sync
Open

docs: sync index-key definitions with the LoRA adapter partition#163
EdHasNoLife wants to merge 1 commit into
mainfrom
sunxuedward/cac-245-doc-sync

Conversation

@EdHasNoLife

Copy link
Copy Markdown
Collaborator

Linear: CAC-245

What

#159 added adapter to the index content key(tenant, model, hash_scheme, adapter, prefix_hash), and the chain/block key likewise ("" = base-model / non-LoRA). That PR's own touched docs (grpc-contract.md, kvevent-subscriber-wiring.md) describe it, but several design/ops/reference docs it did not touch still showed the pre-adapter 4-tuple. This syncs them.

Changes (docs only)

  • docs/design/lookuproute-ranking.md — exact-key defs + the chain/block-hash key; a one-paragraph note that adapter partitions content (not the fingerprint) and that the serving scope stays adapter-blind.
  • docs/design/cachebackend-api.md — the KV-event-subscriber section's index-key sentence.
  • docs/operations/index-sizing.md — sizing/quota key + a LoRA note: adapters multiply distinct-key cardinality, so capacity guidance must account for the fan-out.
  • docs/concepts/cachetenant-identity-and-quota.md — quota unit + entry key; note that identical content under N adapters = N distinct quota keys.
  • docs/reference/metrics.md — the inferencecache_index_entries distinct-entry unit.
  • docs/reference/reason-codes.mdPREFIX_MATCH content identity is now adapter-scoped; TENANT_HOT's exact-match key gains adapter while its (tenant, model, hash_scheme) serving-scope check stays adapter-blind.

What is deliberately NOT changed

The (tenant, model, hash_scheme) serving scopeservingByScope / TENANT_HOT / AFFINITY_HINT / the UNKNOWN_HASH_SCHEME classifier — stays adapter-blind by design (it answers replica-membership, not content residency; those surfaces ship matched_tokens=0). Only the content/prefix key gains adapter. No 3-tuple scope mention was touched.

Follow-up to CAC-181 / #159. Code is unchanged and already correct — this is documentation consistency. make verify-naming + verify-no-internal-refs pass.

The content/prefix key gained `adapter` in #159 — (tenant, model, hash_scheme,
adapter, prefix_hash), and the chain/block key likewise — but several
design/ops/reference docs still showed the pre-adapter 4-tuple. Update
lookuproute-ranking, cachebackend-api, index-sizing, cachetenant-identity-and-quota,
metrics, and reason-codes; add brief cardinality/quota notes where adapters
multiply distinct keys.

The (tenant, model, hash_scheme) serving SCOPE stays deliberately adapter-blind
(TENANT_HOT / AFFINITY_HINT / diagnostics) — only the content key gains adapter.
Docs only; no code change.
@linear-code

linear-code Bot commented Jul 24, 2026

Copy link
Copy Markdown

CAC-245

@github-actions

Copy link
Copy Markdown

Codex review

Files reviewed

docs/concepts/

  • cachetenant-identity-and-quota.md [reviewed]

docs/design/

  • cachebackend-api.md [reviewed]
  • lookuproute-ranking.md [reviewed]

docs/operations/

  • index-sizing.md [reviewed]

docs/reference/

  • metrics.md [reviewed]
  • reason-codes.md [reviewed]

Findings

Blocking

None.

Should-fix

  • docs/reference/metrics.md:51 — The “Moves when” text still identifies entries as (scheme, hash) twice. Reports for another adapter with the same scheme and hash create a distinct entry and increase the gauge, so these shorthands should include adapter to avoid contradicting the corrected metric definition.

Nit

None.

Per-category coverage

  1. Vendor-neutral naming: Clean
  2. Contract & spec / docs sync: findings above at: docs/reference/metrics.md:51
  3. gRPC fail-open semantics: Clean
  4. Quality (tests / error wrapping / package placement / generated drift): Clean

Verdict

changes-requested

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant