Skip to content

Banish the dead state-dir word: flag, modules, defaults, docs — with a guard test - #39

Merged
rossry merged 1 commit into
mainfrom
claude/luminary-nostore-e512rh
Aug 28, 2026
Merged

rossry merged 1 commit into
mainfrom
claude/luminary-nostore-e512rh

Conversation

@rossry

@rossry rossry commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Why ~/luminary/store/audio

The final root cause of the invisible-audio saga: the CLI still accepted the deployment-era --store flag, and an explicit flag wins verbatim over every anchored default — so a service unit (or wrapper) still passing it pointed the whole runtime at a phantom tree beside the checkout. Patterns kept loading (the registry anchors by __file__), the queue silently persisted into the phantom, and only PR #37's resolved-dir surfacing finally printed the path. Every way of spelling that mistake is now gone:

  • --store → --state-dir (global and map-level, dest state_dir). A unit still passing the old flag refuses to start, loudly — no more running quietly beside the operator's files.
  • create_app had its own CWD-relative default (Path("var")), bypassing the anchored resolver — it now resolves through runtime_state_dir like every other entrypoint.
  • luminary/server/store.py → geometry_store.py (Store → GeometryStore); luminary/mapping/store.py → records.py (MappingStore keeps its compound name); every bare store variable renamed.
  • Help texts and docstrings say "geometry id"; docs/deploy.md teaches --state-dir and the migration; implementation-notes' runtime-layout section now describes var/ truthfully.
  • A guard test (test_the_word_store_never_returns) scans every Python source: the bare token, a module by that name, or the old flag fails the suite. Compounds (GeometryStore, MappingStore, argparse's action names) stay legal.

Box migration (once, after merging)

# the unit will refuse to start until the old flag is removed:
#   drop `--store …` from the ExecStart (the default now finds the checkout's var/)
mv ~/luminary/store/mapping ~/luminary/var/ 2>/dev/null   # the irreplaceable YAMLs, if any
mv ~/luminary/store/stage   ~/luminary/var/ 2>/dev/null   # the queue, if you want it
rm -rf ~/luminary/store
sudo systemctl restart luminary

Audio files are already in var/audio/ — after this, the stage finally reads them.

Full suite green (guard included); mypy clean on the 2.1 module list; black clean; luminary --help smoke-tested.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N97HVk3sAr5jRGYodXcDoC


Generated by Claude Code

The last root cause of the invisible-audio saga: a deployment-era CLI
flag pointed the whole runtime at a phantom directory next to the
checkout, silently — patterns kept loading (registry anchors by
__file__), the queue persisted into the phantom, and only the new
resolved-dir surfacing finally printed the path. The flag, the word,
and every way of spelling that mistake are now gone:

- --store -> --state-dir (global and map-level; dest state_dir). A
  unit still passing the old flag refuses to start — loudly — instead
  of quietly running beside the operator's files.
- create_app's own default was still a CWD-relative Path("var"): it
  now resolves through runtime_state_dir like every other entrypoint.
- luminary/server/store.py -> geometry_store.py (class Store ->
  GeometryStore); luminary/mapping/store.py -> records.py
  (MappingStore keeps its name; bare `store` variables are gone).
- Help texts and docstrings say "geometry id", never the dead word;
  deploy.md teaches --state-dir and the migration out of a phantom
  tree; implementation-notes' runtime-layout section now tells the
  truth (var/, not a gitignored tree by the old name).
- A guard test scans every python source: the bare token, a module by
  that name, or the old flag fail the suite. Compounds (GeometryStore,
  MappingStore, argparse's action names) stay legal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N97HVk3sAr5jRGYodXcDoC
@rossry
rossry merged commit 800ac63 into main Aug 28, 2026
1 check failed
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.

2 participants