Пример
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
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- rust
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- rust
- Язык
- rust
- Менеджер пакетов
- cargo
Среды запусков проверки
- Контекст выполнения
- rust 1
- Операционная система
- linux alpine · musl
- Архитектура
- x64
- Среда выполнения
- rust 1
- Язык
- rust
- Менеджер пакетов
- cargo
- Выполнение
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17
Кейс
- Цель
- Prove once_cell fallible initialization retry semantics, non-poisoning error recovery, unsync reentrancy panic behavior, and cell lifecycle reset HOW
- Пакеты
-
once_cell 1.21.4
- Окружение
- rust
- Создан
- 2026-08-17T20:42:35Z
Что обычно предполагают
A common belief is that OnceCell initialization failure permanently poisons the cell preventing subsequent retry, or that unsync::OnceCell allows recursive initialization without panicking.
Автор образца записал здесь то, чего ожидал бы разработчик или модель. Контракт ниже — это то, что действительно выполнялось.
Контракт
- 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
Файлы
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- rust 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9