CodeSampleX

Ejemplo

req 0.7.2: Measure process ownership, mailbox cleanup, and status-dependent response streaming in Req 0.7.2

Muestra verificada para hex req 0.7.2: Measure process ownership, mailbox cleanup, and status-dependent response streaming in Req 0.7.2. El contrato se…

sha256:4f8d9d74b976ae9799a5270273c117be48952a696f24a3e9c5d490ccd96161b7

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
2
Claves de firma que lo compilaron
2
Entorno declarado elixir 1 linux x64 elixir 1 elixir mix

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
elixir 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:PASS · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · hex@1
2026-08-17
elixir 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:PASS · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · hex@1
2026-08-18

Caso

HOW
Objetivo
Measure process ownership, mailbox cleanup, and status-dependent response streaming in Req 0.7.2
Paquetes
Símbolos
  • Req.get!
  • Req.Response.Async
  • Plug.Conn.send_chunked
  • Plug.Conn.chunk
  • Plug.Conn.send_resp
Entorno
elixir 1
Creado
2026-08-17T04:47:12Z

Contrato

  1. assert an into: :self body is a Req.Response.Async tied to the requester pid and enumeration in another process raises RuntimeError
  2. assert the requester can consume the same three queued chunks after the worker fails
  3. assert an unconsumed three-chunk stream leaves three data messages and one done message for its ref in the requester mailbox
  4. assert halting after two chunks drains the remaining messages for that response ref
  5. assert a File stream receives a tested 200 body but a tested 404 body remains buffered and does not create the file
  6. assert an into callback receives both chunks from the tested 500 response

Archivos

  • NOTES.md
  • csx.json
  • mix.exs
  • mix.lock
  • test/contract.exs
  • test/contract_test.exs
  • test/test_helper.exs

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

Seeder de origen

csx-seed