Commit Graph
4 Commits
Author SHA1 Message Date
VectorJetandGitHub a96d9da3a4 chore: migrate from yarn to pnpm (#886) 2026-04-24 10:52:16 -07:00
Steven EnamakelandGitHub 3862b1bb1c fix(tests): run webview_apis mock bridge on a dedicated runtime (#893) 2026-04-24 10:33:42 -07:00
c59b4289f1 refactor(config): extract env lookup seam for testability (#792)
## Summary

- Introduce an `EnvLookup` seam in `src/openhuman/config/schema/load.rs`.
- Route env-overlay reads through `EnvLookup`/`ProcessEnv` while preserving existing precedence and runtime behavior.
- Add focused parallel-safe unit coverage for config env overlay behavior without mutating process env.

## Problem

- `Config::apply_env_overrides` mixed environment access, override logic, and global side effects.
- That made precedence and parsing behavior harder to unit test in isolation and forced reliance on process-env mutation.

## Solution

- Add `pub(crate) trait EnvLookup` with `get`, `contains`, and `get_any`, plus a production `ProcessEnv` implementation.
- Delegate overlay logic through `apply_env_overlay_with(&ProcessEnv)` and keep side effects in the small wrapper.
- Add focused tests covering precedence, parsing, defaults, and legacy-migration interactions with no global env mutation.

## Submission Checklist

- [x] **Unit tests** — Targeted Rust config tests added and broader related module suites passed
- [ ] **E2E / integration** — Not applicable; this refactor preserves existing behavior and improves unit-level testability
- [x] **N/A** — E2E is not applicable because no user-visible or cross-process flow changed
- [ ] **Doc comments** — Not applicable; internal refactor in existing module only
- [ ] **Inline comments** — Not applicable; logic remains local and test coverage documents behavior

## Impact

- No intended runtime behavior change; refactor keeps config precedence intact.
- Improves maintainability and makes future config/workspace resolution seams easier to test safely.

## Related

- Issue(s):
- Follow-up PR(s)/TODOs: thread `EnvLookup` through runtime config directory resolution helpers

Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
2026-04-23 13:42:02 -07:00
Steven EnamakelandGitHub 8851bfbe97 feat(scripts/review): yarn review CLI for sync/review/fix/merge with LLM-summarised squash bodies (#849) 2026-04-23 12:41:54 -07:00