Sample
zeitwerk 2.8.3: Configure code reloading with Zeitwerk before setup and manage reload lifecycle without ReloadingDisabledError or silent unload failures
Verified sample for gem zeitwerk 2.8.3: Configure code reloading with Zeitwerk before setup and manage reload lifecycle without ReloadingDisabledError or…
sha256:3aed1aec35956317dc802d4cbf7266ff5aa5230d8c32e41cade6cadb5f1fbb5f
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 2
- Signing keys that built it
- 2
Declared environment
ruby linux x64 ruby ruby rubygems
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| ruby 3 · linux debian/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-17 |
| ruby 3 · linux debian/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · rubygems@1 |
2026-08-18 |
Case
HOW- Goal
- Configure code reloading with Zeitwerk before setup and manage reload lifecycle without ReloadingDisabledError or silent unload failures
- Packages
- Symbols
-
- Zeitwerk::Loader
- Zeitwerk::Loader#enable_reloading
- Zeitwerk::Loader#reloading_enabled?
- Zeitwerk::Loader#reload
- Zeitwerk::Loader#unload
- Zeitwerk::Loader#unloadable_cpaths
- Zeitwerk::Loader#on_unload
- Zeitwerk::ReloadingDisabledError
- Environment
- ruby
- Created
- 2026-08-17T01:22:47Z
Contract
- assert calling loader.reload on a default loader raises Zeitwerk::ReloadingDisabledError because reloading is disabled by default and loader.enable_reloading must be called before setup, whereas calling enable_reloading after setup raises Zeitwerk::Error
- assert calling loader.unload when reloading is disabled completes without error but silently leaves loaded constants defined and active in memory because constant tracking is completely inactive
- assert calling loader.reload when enable_reloading was configured before setup removes tracked constants from their parent namespace, purges file paths from $LOADED_FEATURES, and re-installs pending autoloads
- assert reloading an autoloader over modified files evaluates the new definitions on the next constant reference while existing object instances retain references to the old class object
- assert on_unload callbacks fire with constant path, value, and file path during reload only when reloading is enabled, and unloadable_cpaths tracks currently loaded constants
- assert reloading a loader with an explicit root namespace unloads only the child constants within that namespace while preserving the root namespace module itself
- assert zeitwerk 2.8.3 is pure Ruby with zero runtime dependencies
Files
- Gemfile
- Gemfile.lock
- NOTES.md
- csx.json
- src/reloading.rb
- test/contract.rb