Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

docs: the code-guidelines HashMap-order section cites line numbers and counts that no longer exist

Aperta Adatta ai principianti
#1,706 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
documentation

Direzione di ricerca

Inizia da docs/code-guidelines.md:195-197 e riesegui i grep documentati sull’attuale src/ tree. Verifica i riferimenti Rust in src/server/prompt_cache/store.rs e l’implementazione di BTreeSet in src/server/store_budget.rs, quindi aggiorna ogni file:riga e ogni conteggio e descrivi i due stores convertiti. Il lavoro è completato quando tutti i riferimenti corrispondono al tree e il paragrafo riflette le evidenze attuali.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

priority:low status:ready type:docs

Summary

The HashMap-iteration-order section of docs/code-guidelines.md, which is the written justification for not having a CI gate on this class of bug, cites line numbers, key types, and a file count that no longer match the tree.

Background

The section's argument rests on concrete evidence (specific eviction sites and their key types) that has since changed: two of the four historical sites were converted to explicit total orders, and the two stores it names now use a BTreeSet index. The stale references undercut an otherwise sound argument.

Proposed Solution

Re-run the documented greps, update the line refs and counts, and reword the paragraph so it reflects the conversions, which strengthen rather than weaken the no-CI-gate argument.

Implementation Notes

Claimed at docs/code-guidelines.md:195-197:

  • "run over all 1,248 .rs files under src/" - the actual count is 1551 (confirmed).
  • The four LRU eviction sites with std::time::Instant keys "and the tie is not reachable today".

Actual tree:

  • src/server/prompt_cache/store.rs now has its min_by_key/max_by_key sites keyed on (slot.entry.last_used(), *digest.as_bytes()), an explicit total order with a digest tie-break.
  • responses_store.rs and conversation_store.rs have zero such sites; both use a BTreeSet<LruKey> index over the shared LruKey in src/server/store_budget.rs:59-76.

Acceptance Criteria

  • Every file:line and count in the section matches the current tree.
  • The paragraph reflects the BTreeSet conversion of the two stores.

Original Suggestion

Title: docs: the code-guidelines HashMap-order section cites line numbers and counts that no longer exist

The HashMap-iteration-order section of docs/code-guidelines.md — the written justification for not having a CI gate on this class of bug — cites line numbers, key types, and a file count that no longer match the tree.

Evidence

Claimed at docs/code-guidelines.md:195-197:

  • "run over all 1,248 .rs files under src/" — actual count is 1551
  • "the LRU eviction sites at src/server/prompt_cache/store.rs:315 and :336, src/server/responses_store.rs:243, and src/server/conversation_store.rs:151 … all four keys are std::time::Instant … the tie is not reachable today"

Actual tree:

  • src/server/prompt_cache/store.rs:356 and :381 are the only remaining min_by_key/max_by_key sites in those files, and their key is (slot.entry.last_used(), *digest.as_bytes()) — an explicit total order with a digest tie-break (comments at :350-352, :375-377)
  • responses_store.rs and conversation_store.rs have zero such sites; both now use a BTreeSet<LruKey> index over the shared LruKey in src/server/store_budget.rs:59-76

Suggested fix

Re-run the documented greps, update the line refs and counts, and reword the paragraph: two of the four historical sites were since converted to explicit total orders, which strengthens (not weakens) the no-CI-gate argument.

Acceptance criteria

  • Every file:line and count in the section matches the current tree
  • The paragraph reflects the BTreeSet conversion of the two stores
Lingua principale
Rust
Stelle
471
Fork
55
Merge medio
9h 10m
PR unite (30g)
303

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lablup/mlxcel

Tutte le issue di lablup/mlxcel

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.