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

nvx-rs: share one byte-level EXEC and MAPS decoder between the host and the guest

Aperta
#581 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

The duplicated logic sits in nvx::protocol: compare decode_exec_payload and decode_maps_payload with decode_guest_exec_payload and decode_guest_maps_payload to map the shared framing, flags, and length checks. Keep the host's inherit_default_env rule and the guest's separate rule explicit, and check the result against the C agent parity fixtures that #358 adds. Done means one structural parser feeding both decoders, with the host API, its diagnostics, and guest acceptance unchanged. The issue says to wait until #358 is finished, so do not start before then.

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

Descrizione

Summary

nvx::protocol decodes the NVXC EXEC and MAPS payloads twice. decode_exec_payload and decode_maps_payload produce the host's UTF-8 types, and decode_guest_exec_payload and decode_guest_maps_payload, which #531 adds, produce the guest's byte strings. Each pair repeats the framing, flags, lengths, and field validation, so a later format or validation change can update one decoder and leave the other behind.

Found in the #531 review. #531 keeps a faithful port of the C agent, so this waits until the #358 series is done.

Proposal

Share the byte-oriented structural parsing, and keep the host's UTF-8 types behind conversions:

  • Keep the public host API and its diagnostics, and keep accepting non-UTF-8 guest arguments, paths, and environment entries.
  • Make intentional host and guest differences explicit rather than substituting one type for the other. For example, the two inherit_default_env fields differ when no explicit environment is supplied: the host's is true (flags & EXEC_ENVIRONMENT_PRESENT == 0 || flags & EXEC_INHERIT_DEFAULT_ENV != 0), and the guest's follows EXEC_INHERIT_DEFAULT_ENV alone.

#537 and #545 can then build on one parsing implementation rather than another pair of codecs.

Tasks

  • Share the structural parsing of EXEC and MAPS between the host and guest decoders, with the host API, its diagnostics, and the guest's acceptance unchanged.
  • Check the shared decoder against the C agent's parity fixtures, which #358 checks in before it removes the C agent. Their expected outcomes must not come from the new decoder.
Lingua principale
Python
Stelle
408
Fork
28
Merge medio
13h 46m
PR unite (30g)
275

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 microsoft/nvx

Tutte le issue di microsoft/nvx

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.