Commit graph

3 commits

Author SHA1 Message Date
LLLin000
906b3cafc0 fixup: headless via SetupPlan only, ConfigWriter always schema_version 2
- Removed headless_setup call from CLI dispatch entirely. --headless,
  --modular, and bare all construct the same SetupPlan with identical
  _cfg/zotero_path/agent_type/skip_checks. Only the deprecation notice
  differs per entry point.
- Added skip_checks parameter to SetupPlan (forwarded to CLI arg).
- ConfigWriter always writes schema_version '2' unconditionally (never
  preserves a v1 value from existing config).

RED commands:
  python -m pytest tests/test_setup_plan_v2.py::TestConfigWriterSchemaVersion -v
  python -m pytest tests/test_setup_plan_v2.py::TestCliHeadlessViaSetupPlan -v

GREEN commands (same, after fixes): 61/61 passed.
2026-07-15 02:23:46 +08:00
LLLin000
7b7474237a fixup: address #75 review — headless canonical, zotero forwarding, visible deprecation, all legacy path keys
- --headless now delegates to SetupPlan for canonical config, then runs
  headless_setup for full deployment; canonical ConfigWriter pass ensures
  v2 vault_config format.
- --zotero-data is forwarded through SetupPlan.zotero_path for both
  --modular and bare paths.
- Deprecation warnings use print(stderr) instead of filtered
  DeprecationWarning so users always see them.
- ConfigWriter.PATH_KEYS extended to converge all seven legacy path keys
  (system_dir, resources_dir, literature_dir, control_dir, base_dir,
   skill_dir, command_dir) into vault_config, preserving non-path metadata.
- Added CLI-level tests: deprecation on stderr, config canonicalization,
  --literature-dir forwarding, --zotero-data plumbing.
2026-07-15 02:17:04 +08:00
LLLin000
af84969972 feat: canonicalize setup and configuration migration (closes #75)
ConfigWriter now writes v2 canonical format (nested vault_config with
schema_version). On rerun it merges with existing config rather than
overwriting, making repeated runs idempotent.

load_vault_config reverses the v1 precedence: vault_config block now
wins over legacy top-level path keys, which are treated as a read-only
fallback with a UserWarning. This is the N+1 transition — old v1
configs remain readable with a warning; all writes produce v2 only.

Bare and --headless setup now delegate to the canonical SetupPlan engine
(the --modular path) with a DeprecationWarning.

Closes #75.
2026-07-15 02:07:13 +08:00