CodeSampleX

Exemplo

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

Amostra verificada para hex req 0.7.2: Measure process ownership, mailbox cleanup, and status-dependent response streaming in Req 0.7.2. O contrato rodou em…

sha256:4f8d9d74b976ae9799a5270273c117be48952a696f24a3e9c5d490ccd96161b7

Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu. Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas. MIT-0

Evidência de execução

O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.

Base da evidência
Contrato assinado aprovado
Recibos de verificação
2
Chaves de assinatura que o compilaram
2
Ambiente declarado elixir 1 linux x64 elixir 1 elixir mix

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
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
Pacotes
Símbolos
  • Req.get!
  • Req.Response.Async
  • Plug.Conn.send_chunked
  • Plug.Conn.chunk
  • Plug.Conn.send_resp
Ambiente
elixir 1
Criado
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

Arquivos

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

Baixar o artefato de código-fonte (tar.gz)

Seeder de origem

csx-seed