Reopen an encrypted signer record with the seal it was written under - #10
Closed
Parad0x-Labs wants to merge 2 commits into
Closed
Parad0x-Labs wants to merge 2 commits into
Parad0x-Labs wants to merge 2 commits into
Conversation
added 2 commits
September 21, 2026 07:42
The loader tried VOOL_KEY_PASSPHRASE first against any encrypted-seed record, so an account-file-sealed record (written by an unattended boot) hit InvalidTag on the next boot that carried an operator passphrase — observed as the CI pollution-matrix child session failing all 96 default-home signer reads. The record's protection stamp now decides which seal reopens it, and a user-passphrase record never falls back to the account-file secret. key_storage_class() reuses the same reader.
network.signer freezes its record paths at first import, so a whole pytest process shared ONE keys directory -- resolved against the default home whenever no test had set VOOL_HOME yet. Any test that overrides the passphrase in-process re-seals that shared record, and the next suite-passphrase reader dies with InvalidTag: measured on CI as the demand-ownership '(InvalidTag:)' demand failures and the pollution-matrix child session, both surviving the loader-side seal fix alone. The keychain pin fixture now repoints the signer paths into a per-test directory and resets the cached keypair, so each test seals its own record with whatever passphrase it uses and the default home is never written by the suite again.
Owner
Author
|
Added a second, deeper half after watching this PR's CI run: the loader fix alone did not clear the CI InvalidTag clusters, because |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause
The CI pollution-matrix child session (
tests/gauntlet/test_hermetic_boundary.py::test_pollution_matrix_targets_stay_green_around_children, both iterations) failed withcryptography.exceptions.InvalidTagatnetwork/signer.py_load_encrypted_seed, taking all 96tests/test_public_hive_bridge.pyreads with it (those 96 are the child session's own echoed summary — one real failure).Mechanism, reproduced locally: an unattended boot (no
VOOL_KEY_PASSPHRASE) seals the node-signing seed under the account-file fallback (protection: account_file). The loader then triedVOOL_KEY_PASSPHRASEFIRST on any encrypted record, so the next boot carrying an operator passphrase tried the wrong key against the fallback's ciphertext and raised InvalidTag — bricking every default-home signer read in that process. The module's own comment states the intended contract ("a record sealed by our unattended fallback reopens without any operator env — otherwise the second boot would hard-fail"); the implementation just checked the env first and defeated it.Repair (at the owner)
network/signer.py: the encrypted-record branch now reads the record'sprotectionstamp —account_filerecords reopen with the account-file secret (missing secret file raises a clean, actionable RuntimeError instead of crypto garbage),user_passphraserecords demandVOOL_KEY_PASSPHRASEand never silently fall back to an unrelated account-file secret.key_storage_class()reuses the same_record_protectionreader instead of its inline copy.Evidence
test_machine_protected_record_reopens_even_with_a_passphrase_env(the CI shape) andtest_passphrase_record_never_falls_back_to_the_account_file(the mirror).tests/test_signer_key_storage.py16 passed; victim + matrixtests/test_public_hive_bridge.py tests/test_must_keep_is_a_guarantee_not_a_sort_key.py tests/gauntlet/test_hermetic_boundary.py81 passed; neighbortests/test_tiered_context_loader.py32 passed; ruff clean.Contributed by sls_0x.