refactor: collapse the store cluster into one stores.py module#37
Merged
Conversation
Fold store.py, configs.py, secrets.py, and the old stores.py tuple into a single stores.py that mirrors keys.py (StoreKind + SECRET/CONFIG + a module-private _STORE_KINDS + machinery). The public interface hides the kinds tuple (flags/create_lines/teardown_line/referenced_variables/validate), and teardown emission moves into the module so emit no longer names the podman "secret" noun. Behavior-preserving: the emitted script is byte-identical. Tests drive the public interface at 100% coverage. See planning/changes/2026-07-12.02-collapse-store-cluster.md.
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.
Collapses the four-file store cluster (
store.py,stores.py,configs.py,secrets.py) into a singlestores.pythat mirrorskeys.py, hides theSTORE_KINDStuple behind the interface, and movespodman secret rmteardown emission out ofemit.py.Behavior-preserving: the emitted podman script is byte-identical (verified by a before/after golden diff on a secrets+configs compose). 100% line coverage;
stores.py,emit.py,parsing.pyare also 100% branch.Rationale, design forks, and revisit notes in the change file:
planning/changes/2026-07-12.02-collapse-store-cluster.md.What changed
stores.py:StoreKind+SECRET/CONFIG+ module-private_STORE_KINDS+ machinery. Deletes the other three modules (and thecompose2pod.secretsmodule that shadowed stdlibsecrets).kindsparam:all_flags/all_create_lines/all_teardown_names/all_referenced_variables/validate_all→stores.flags/create_lines/teardown_line/referenced_variables/validate. Per-kind bodies are now private helpers."secret"lives instores.pyalone;StoreKindgets no noun field (it does not vary per kind — configs are podman secrets).teardown_linereturns the complete best-effort trap fragment;emit_scriptsplices it.test_store.py+test_configs.pymerged intotest_stores.py, driving the public interface.architecture/glossary.mdandarchitecture/supported-subset.mdpromoted in the same diff.