mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 11:53:58 +00:00
Followup from commit dba8a2d's findings. ConfigMixin._save_knoe_cfg in
knoe/ui/screens/cfg.py reads Tk widget vars via `var.get()` and writes
the result to conf/<mode>.cfg. When a var is a MagicMock (interactive
./install.py run in a non-Tk context, partially-mocked widgets), the
save path serializes the mock's repr-string into the cfg, then the next
installer pass calls os.makedirs() on those values and produces
directories literally named `<MagicMock name='Canvas().tk.call().strip()'
id='4743999712'>/`.
The brief lays out a TDD approach for Junie:
1. Write failing test at tests/installer/test_cfg_save_refuses_mock_values.py
that passes MagicMock widget vars and asserts _save_knoe_cfg raises
TypeError naming the field.
2. Implement the minimal fix: a `_str_value(var, field=...)` helper in
cfg.py that validates widget reads and raises if non-str. Use it
in the .get()/.strip() chains across lines 103-155.
3. Verify the 750 existing installer tests still pass.
Brief includes file pointers (cfg.py:44 _save_knoe_cfg, line 102
globals_to_save assembly, line 277 cfg_path.write_text), the canonical
failing test stub, both fix-approach options (per-read validator vs
end-of-flow dict walk), and explicit commit-shape guidance.
Index updates:
docs/plans/junie/README.md — todo-1 row added under Active
docs/TODO.md §"In progress" — todo-1 promoted above Phase 3 (smaller
scope, easy to land first)
Naming convention: `todo-N-<slug>.md` for follow-up bugs, distinct from
the `NN-<slug>.md` pattern reserved for ranked queue items.
|
||
|---|---|---|
| .. | ||
| plans | ||
| build-system.md | ||
| config-environments.md | ||
| db-access.md | ||
| definition.txt | ||
| DOCKER-BUILD-FIX.md | ||
| EMBEDDED-RESOURCES.md | ||
| grafana-sso.md | ||
| IMAGE-RESOURCES.md | ||
| installer-config-persistence.md | ||
| intellij-refactor-prompt.md | ||
| k3d.md | ||
| knoe-auth-phase-2.md | ||
| knoe-db-documentation-mcp-architecture.md | ||
| knoe-system.md | ||
| layout.md | ||
| local-dev-knoe-auth.md | ||
| MERLIN-MARIADB-EXTERNAL-TEMP.md | ||
| mission.txt | ||
| ncurses-installer.md | ||
| oidc-path-b.md | ||
| oidc-setup.md | ||
| onboarding.md | ||
| patent-abstract.txt | ||
| patent.txt | ||
| pipeline-phases.md | ||
| prole_db.cht | ||
| PROLE-CFG-SECRETS.md | ||
| PROLE-HOME-DIRECTORY.md | ||
| prompt.txt | ||
| RELEASE-NOTES.md | ||
| TODO.md | ||
| typescript | ||