public API naming and shape decisions drift without a referenced style guide
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 86/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- rust
- Área
- documentation
Línea de trabajo
Abre CONTRIBUTING.md y confirma que solo se refiere al estilo de código y a los patrones existentes del repositorio. Añade una referencia a las Rust API Guidelines oficiales como base para los nombres y la forma de los tipos de la API pública, sin cambiar las APIs existentes. Se considera terminado cuando la documentación para contribuidores enlaza explícitamente la guía y sus checklists relevantes, mientras que la alineación de la API sigue fuera del alcance.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
While looking through the crate's public API, I noticed a few inconsistencies that suggest there's no referenced style-guide baseline behind naming/type-shape decisions:
- Some plain accessors use a
get_prefix while neighboring accessors in the same files don't, which reads as inconsistent with the Rust API Guidelines' C-GETTER convention. - Identifier fields (session/task/tool-use/client id) are represented as bare
String/Arc<str>rather than distinct types, so nothing stops one id kind being passed where another is expected.
No repo doc references a style guide, so it's unclear whether this is intentional or just drift. Simplest fix: state explicitly in contributor docs that code should be idiomatic and follow the official Rust API Guidelines (https://rust-lang.github.io/api-guidelines/) - its naming (C-*) and type-safety (C-NEWTYPE) checklists already cover both examples above, so this is a documentation change, not a new process to design. Bringing existing API (like the two examples above) in line with the referenced guide is a separate, breaking-change follow-up - worth tracking on its own once the guide itself is adopted, not part of this issue.
Reproduction Steps
rg -n "pub fn get_[a-z_]+\(" crates/rmcp/src- 8 matches, all plain field/derived-value accessors inconsistent with sibling accessors in the same files.- Compare
SessionId/EventId/StreamId/task_id/tool_use_id/client_idfield types acrossmodel.rs,task_manager.rs,transport/auth.rs- all bareString/Arc<str>/type aliases, no newtype. - Checked CONTRIBUTING.md and the repo for any reference to language-specific style guide - none found. CONTRIBUTING.md only says "follow existing code style" / "follow the repository's established patterns," with no concrete convention to check against.
Expected Behavior
Contributor docs cite an explicit style-guide baseline for public API naming/shape.
Actual Behavior
No such reference exists, so it's unclear whether naming inconsistencies like the above are intentional.
Logs / Evidence
- Lenguaje dominante
- Rust
- Estrellas
- 3.9k
- Forks
- 645
- Merge medio
- 4 d 22 h
- PR fusionados (30 d)
- 37
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelcontextprotocol/rust-sdk
-
streamable-http server: a supplied Mcp-Method contradicting an initialize body is silently accepted Abiertobug P1 ready for work T-transport
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/rust-sdk#1271 ·
-
bug P2 ready for work T-model
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
modelcontextprotocol/rust-sdk#1242 ·
-
bug P1 ready for work T-model T-service
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
modelcontextprotocol/rust-sdk#1283 · 1 comentario ·
-
bug P0 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1272 · 1 asignado ·
-
bug P1 ready for work T-security T-transport
modelcontextprotocol/rust-sdk#1268 · 1 reacción · 1 asignado ·
Todos los issues de modelcontextprotocol/rust-sdk
Issues similares
-
bug github_actions
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#1393 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
rocky-data/rocky#2181 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Abiertobot:ai-assisted component:indexer QA-roadmap status:untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
midnightntwrk/midnight-indexer#1557 ·