Exemplo
Prove once_cell fallible initialization retry semantics, non-poisoning error recovery, unsync reentrancy panic behavior, and cell lifecycle reset
sha256:e0afb4151238134f23cb7f9babe65162ab344625d8c386e357c4dafa43f92775
PUBLISHED
L3_CONTRACT_PASS
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ênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- rust
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- rust
- Linguagem
- rust
- Gerenciador de pacotes
- cargo
Ambientes das execuções de verificação
- Contexto de execução
- rust 1
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- rust 1
- Linguagem
- rust
- Gerenciador de pacotes
- cargo
- Execução
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17
Caso
- Objetivo
- Prove once_cell fallible initialization retry semantics, non-poisoning error recovery, unsync reentrancy panic behavior, and cell lifecycle reset HOW
- Pacotes
-
once_cell 1.21.4
- Ambiente
- rust
- Criado
- 2026-08-17T20:42:35Z
O que costuma-se supor
A common belief is that OnceCell initialization failure permanently poisons the cell preventing subsequent retry, or that unsync::OnceCell allows recursive initialization without panicking.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- get_or_try_init leaves the OnceCell uninitialized upon receiving Err, enabling subsequent initialization attempts to retry and succeed without cell poisoning
- sync::OnceCell coordinates concurrent fallible initializers such that a failing thread unblocks waiting threads to retry and initialize the value
- unsync::OnceCell safely returns None for get() during initialization but panics with reentrant init when get_or_init or set is called reentrantly
- unsync::OnceCell cleanly resets its state upon panic unwind, allowing subsequent get_or_init invocations to initialize the cell
- OnceCell structural equality evaluates uninitialized cells as equal and take resets an initialized cell back to empty state for re-initialization
Arquivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- rust 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9