-
Notifications
You must be signed in to change notification settings - Fork 0
03 configuration and environments
github-actions[bot] edited this page Feb 28, 2026
·
3 revisions
PushPals intentionally uses a layered config model:
- TOML for stable, typed runtime behavior.
-
.envfor deployment wiring and secrets. - A single shared config loader (
packages/shared/src/config.ts) to normalize both.
This is the main abstraction boundary that prevents downstream code churn when config keys move between TOML and env.
-
configs/default.toml- baseline defaults for all services.
-
configs/<profile>.toml- profile-specific overrides (via
PUSHPALS_PROFILE).
- profile-specific overrides (via
-
configs/local.toml- machine-local, gitignored overrides.
-
.env- URLs, tokens, API keys, deployment wiring.
- CLI flags
- final runtime overrides for service entrypoints.
Use TOML for:
- non-secret runtime behavior,
- policy and timeout knobs,
- stable defaults that should be versioned.
Use .env for:
- secrets and tokens,
- deployment-specific endpoints,
- CI/runtime wiring that should not be committed.
The loader in packages/shared/src/config.ts centralizes:
- type coercion,
- defaults,
- alias normalization (
openai_compatible->lmstudio, etc.), - env/TOML precedence,
- path resolution to project root.
Downstream services consume one typed PushPalsConfig shape instead of manually reading env values.
When moving a setting between env and TOML:
- Update
packages/shared/src/config.tsfirst. - Keep backward-compatible fallback reads during migration window.
- Update
.env.exampleandconfigs/local.example.tomlguidance. - Remove old read paths only after all callers use the unified typed field.
- Server:
- host/port, stale-claim recovery windows.
- RemoteBuddy:
- poll intervals, worker spawn policy, execution/finalization budgets.
- RemoteBuddy memory:
remotebuddy.memory.enabledremotebuddy.memory.include_cross_sessionremotebuddy.memory.max_recall_itemsremotebuddy.memory.max_recall_charsremotebuddy.memory.max_summary_charsremotebuddy.memory.retention_days
- RemoteBuddy autonomy:
- tick interval, candidate limits, confidence gates, dispatch quotas, cooldown windows.
- WorkerPals:
- backend selection, runtime timeouts, Docker warm/jitter policy.
- SourceControlManager:
- integration branch/base branch, merge strategy, PR behavior.
- SourceControlManager ReviewAgent:
source_control_manager.review_agent.enabledsource_control_manager.review_agent.poll_interval_mssource_control_manager.review_agent.pass_thresholdsource_control_manager.review_agent.merge_methodsource_control_manager.review_agent.reviewer_md_pathsource_control_manager.review_agent.codex_*
- Startup:
- preflight behavior, image rebuild policy, LLM startup behavior.
Examples of high-impact env overrides supported by the shared config loader:
REMOTEBUDDY_MEMORY_ENABLEDREMOTEBUDDY_MEMORY_INCLUDE_CROSS_SESSIONREMOTEBUDDY_MEMORY_MAX_RECALL_ITEMSREMOTEBUDDY_MEMORY_MAX_RECALL_CHARSREMOTEBUDDY_MEMORY_MAX_SUMMARY_CHARSREMOTEBUDDY_MEMORY_RETENTION_DAYSSOURCE_CONTROL_MANAGER_REVIEW_AGENT_PASS_THRESHOLDSOURCE_CONTROL_MANAGER_REVIEW_AGENT_POLL_INTERVAL_MS
Keep secrets out of TOML and in .env or secret stores:
- API keys (
OPENAI_API_KEY, per-service keys), - auth tokens,
- git/github tokens.
The repository templates (.env.example, configs/local.example.toml) are intentionally non-secret.
- Wrong LLM backend/endpoint:
- services boot but generation fails at runtime.
- Missing
configs/local.tomlor.env:- startup preflight fails.
- Branch/base mismatch in integration config:
- SourceControlManager push/merge behavior appears inconsistent.
Pros:
- explicit and reviewable config state,
- fewer "hidden env var" bugs,
- easier reproducibility across machines.
Cons:
- larger config surface area,
- needs disciplined naming and deprecation handling,
- requires good docs to stay approachable.
- Add generated config reference docs directly from the typed config interface.
- Add startup-time "unused config key" warnings to catch stale entries.
- Add schema validation for TOML with line-numbered diagnostics.