Skip to content

Add centralized config module#20

Open
dtran320 wants to merge 2 commits intomainfrom
feature/config-module
Open

Add centralized config module#20
dtran320 wants to merge 2 commits intomainfrom
feature/config-module

Conversation

@dtran320
Copy link
Copy Markdown
Member

@dtran320 dtran320 commented Mar 5, 2026

Summary

  • New vibereps_config.py with load_config/save_config, secure file permissions (0o600), env var overrides for remote settings, and pause state management
  • Refactored vibereps.py to use the config module (replaces 3 ad-hoc config.json reads)
  • Graceful fallback if config module not found (try/except ImportError)

Based on ideas from #14 (now closed). Only the config module portion — server-dependent features deferred until deployment.

Test plan

  • vibereps --status still works
  • vibereps --pause / vibereps --resume / vibereps --toggle still work
  • Config file gets 0o600 permissions after save
  • Env vars still override config file values for API URL/key
  • Removing vibereps_config.py falls back to inline behavior

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

dtran320 and others added 2 commits March 5, 2026 13:11
New vibereps_config.py provides load_config/save_config with secure
file permissions (0o600), env var overrides for remote settings, and
pause state management. Replaces 3 ad-hoc config.json reads in
vibereps.py with a clean import (graceful fallback if module missing).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ack chmod

- Fallback path now reads config.json for remote_sync credentials
- Added AttributeError to is_paused() except clause for corrupted config
- Fallback set_pause() now applies 0o600 permissions like the config module

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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