CodeSampleX

Ejemplo

serialize and deserialize data using flatbuffers.Builder

sha256:c857c6fce22159b271ccb77bceb842640241232ef609e20d92675087533a9b20

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
1
Claves de firma que lo compilaron
1
Entorno declarado python 3.12 linux 24 · ubuntu · glibc 2.39 x64 python 3.12 python uv

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
python 3.12 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1python:3.12-alpine@sha256:d09d15e60962…
2026-08-25

Caso

HOW
Objetivo
serialize and deserialize data using flatbuffers.Builder
Paquetes
Símbolos
  • flatbuffers.Builder
Entorno
python 3.12
Creado
2026-08-25T20:11:39Z

Contrato

  1. flatbuffers.Builder initializes with specified buffer capacity and tracks buffer offsets
  2. flatbuffers.Builder.CreateString serializes null-terminated UTF-8 strings into the buffer and returns valid offset
  3. flatbuffers.Builder.CreateByteVector serializes raw byte arrays and returns vector offset
  4. flatbuffers.Builder.CreateSharedString deduplicates repeated strings by reusing previously serialized offsets
  5. flatbuffers.Builder table serialization with StartObject, PrependInt32Slot, PrependFloat64Slot, and EndObject encodes vtables correctly
  6. flatbuffers.Builder.Finish sets the root table offset at index 0 allowing Table deserialization
  7. flatbuffers.Builder.FinishSizePrefixed prefixes the output buffer with the total buffer payload size
  8. flatbuffers.Builder.Clear resets buffer offsets allowing the builder instance to be reused
  9. flatbuffers.Builder enforces nesting rules by raising IsNestedError on nested StartObject calls
  10. flatbuffers.Builder raises BuilderNotFinishedError when Output is called before Finish
  11. flatbuffers.Builder raises IsNotNestedError when EndObject is called without an active StartObject

Archivos

  • PROMPT.md
  • csx.json
  • pyproject.toml
  • requirements.txt
  • spec.json
  • test/contract.py
  • uv.lock

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

anónimo