Skip to content

refactor: collapse the store cluster into one stores.py module#37

Merged
lesnik512 merged 1 commit into
mainfrom
refactor/collapse-store-cluster
Jul 12, 2026
Merged

refactor: collapse the store cluster into one stores.py module#37
lesnik512 merged 1 commit into
mainfrom
refactor/collapse-store-cluster

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Collapses the four-file store cluster (store.py, stores.py, configs.py, secrets.py) into a single stores.py that mirrors keys.py, hides the STORE_KINDS tuple behind the interface, and moves podman secret rm teardown emission out of emit.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.py are 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

  • One stores.py: StoreKind + SECRET/CONFIG + module-private _STORE_KINDS + machinery. Deletes the other three modules (and the compose2pod.secrets module that shadowed stdlib secrets).
  • Public interface drops the kinds param: all_flags/all_create_lines/all_teardown_names/all_referenced_variables/validate_allstores.flags/create_lines/teardown_line/referenced_variables/validate. Per-kind bodies are now private helpers.
  • The podman noun "secret" lives in stores.py alone; StoreKind gets no noun field (it does not vary per kind — configs are podman secrets). teardown_line returns the complete best-effort trap fragment; emit_script splices it.
  • test_store.py + test_configs.py merged into test_stores.py, driving the public interface.
  • architecture/glossary.md and architecture/supported-subset.md promoted in the same diff.

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.
@lesnik512 lesnik512 merged commit 4819546 into main Jul 12, 2026
6 checks passed
@lesnik512 lesnik512 deleted the refactor/collapse-store-cluster branch July 12, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant