Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

feat(api)!: split UpdateConfig into typed policy and settings mutations

Abierto
#3,049 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

Comienza con el UpdateConfigRequest actual en proto/openshell.proto, luego usa la auditoría de código fuente vinculada e inspecciona el issue #1988 para conocer las restricciones de políticas respaldadas por proveedores. Mapea la CLI, la TUI, el SDK, el protobuf binding, el handler, la documentation y los migration consumers antes de elegir entre RPCs separados y un mutation oneof. Se considera terminado cuando los contratos tipados, el comportamiento de autorización y concurrencia, las pruebas y las integraciones indicadas se hayan actualizado de forma coherente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

help wanted

User Story

As an API client and operator, I want policy changes and setting changes represented as distinct typed operations, so that each request has unambiguous validation, authorization, and concurrency semantics.

Problem Statement

UpdateConfigRequest combines full policy replacement, incremental policy merge operations, setting upsert, setting deletion, sandbox/global scope, annotations, and optimistic-concurrency fields. Optional fields and action booleans encode mutually exclusive operations only through prose and handler validation. The field named global is also awkward or invalid for normal attribute access in some generated languages.

Impact / Why This Matters

Callers can construct contradictory requests, SDK wrappers must invent their own validation, and the most privileged configuration mutation surface is also the least type-constrained. Policy and settings have different authorization, deletion, versioning, and lifecycle behavior, making one generic response difficult to evolve safely.

Proposed Design

Expose distinct typed operations for policy and setting mutations, with request and response types that carry only fields meaningful to that operation. At minimum, the public contract must separately express:

  • sandbox policy replacement or merge;
  • global policy mutation, if retained;
  • setting upsert; and
  • setting deletion.

Use typed scope selectors rather than global and action booleans. Define optimistic concurrency, annotations, authorization, and returned state for each operation. Internal handlers may share implementation.

Acceptance Criteria

  • No public mutation request relies on unrelated optional fields or action booleans to select the operation.
  • Policy replacement/merge and setting upsert/delete have typed request and response contracts.
  • Sandbox and global scopes are explicit and cannot be combined incorrectly.
  • Authorization requirements are documented and enforced per operation.
  • Optimistic-concurrency behavior and ABORTED responses are consistent and tested.
  • Policy is no longer represented as a magic entry in the settings map.
  • CLI, TUI, all SDKs, protobuf bindings, docs, and migration notes are updated.
  • Old fields and RPCs are removed or deprecated with reserved names/tags as appropriate.

Alternatives Considered

Keep one RPC but replace its fields with a mutation oneof. This would make invalid combinations unrepresentable and may be acceptable if common authorization and response semantics are retained. Separate RPCs are preferred when operations have materially different permissions, concurrency, or results.

Agent Investigation

The current request in proto/openshell.proto contains policy, setting, delete, global-scope, merge-operation, concurrency, annotation, and workspace fields. Provider-backed policy composition in #1988 must remain coherent with the new boundary.

Related: #2565, #1988. Source audit: https://gist.github.com/mrunalp/e80942c1544a0225ee588796a41ab30b.

Lenguaje dominante
Rust
Estrellas
8.7k
Forks
1.3k
Merge medio
2 d 6 h
PR fusionados (30 d)
297

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NVIDIA/OpenShell

Todos los issues de NVIDIA/OpenShell

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.