CodeSampleX

Exemplo

Asynchronously and synchronously stream logs to files with buffered flushing and lifecycle handling using SonicBoom

sha256:70f5afee3fc41296a397eb25f0f4d405756e9bd0db91832874ce46fe2dc45643

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. Força da evidência. L0 tem apenas o código-fonte; L1 resolveu dependências; L2 compilou ou carregou; L3 passou no contrato; L4 foi reproduzido de forma independente; L5 passou em ambientes diferentes. MIT-0

Evidência de execução

O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.

Base da evidência
Verificação cruzada independente
Recibos de verificação
1
Nível de verificação
L4_CROSS_PASS
Ambiente declarado node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10

Ambientes das execuções de verificação

Ambiente Contrato Etapas Execução
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-21

Caso

HOW
Objetivo
Asynchronously and synchronously stream logs to files with buffered flushing and lifecycle handling using SonicBoom
Pacotes
Símbolos
  • SonicBoom
Ambiente
node 22.23.2
Criado
2026-08-21T04:33:38Z

Contrato

  1. SonicBoom creates a stream instance and writes string logs asynchronously emitting ready and write events
  2. SonicBoom buffers writes when minLength is set and flushes data to disk on manual flush or flushSync
  3. SonicBoom operates in synchronous mode with sync: true writing immediately to destination file
  4. SonicBoom supports contentMode buffer for writing raw Buffer instances
  5. SonicBoom emits drop event when buffered data exceeds maxLength
  6. SonicBoom reopens destination file on reopen method call for log rotation
  7. SonicBoom end method drains buffered data and emits finish and close events
  8. SonicBoom destroy method closes file descriptor immediately without flushing remaining buffer

Arquivos

  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.cjs

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

Seeder de origem

anônimo