mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 05:12:33 +00:00
## 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>
scripts/review
Helpers for working through PRs on this repo. Runnable directly — no zshrc integration needed.
| Script | What it does |
|---|---|
sync.sh |
Fetch PR head, check out as pr/<num>, merge main, wire push/upstream. |
review.sh |
sync + hand off to the pr-reviewer agent to review, comment, and approve. |
fix.sh |
sync + pr-reviewer (apply fixes) + pr-manager-lite (commit & push). |
merge.sh |
LLM-summarized squash body + filtered Co-authored-by trailers + gh pr merge. |
LLM flags
review/fix:--executor-llm <tool>(defaultclaude). Picks the CLI that drives the agent prompt. An optional trailing positional<extra-prompt>is appended verbatim to the executor's prompt (e.g.yarn review fix 123 "focus on the retry logic").merge:--summary-llm <tool>(defaultgemini). The LLM that condenses the PR body + commit messages into a concise squash commit body. Use--summary-llm noneto skip summarization and keep the raw PR body.
Any tool that accepts -p "<prompt>" and prints its response to stdout works.
Usage
Via yarn (preferred):
yarn review sync 123
yarn review review 123
yarn review fix 123
yarn review merge 123 # --squash
yarn review merge 123 --rebase
yarn review --help
Or invoke the scripts directly:
scripts/review/sync.sh 123
scripts/review/review.sh 123
scripts/review/fix.sh 123
scripts/review/merge.sh 123
Config
- Repo is derived from the
upstreamremote (falls back toorigin). Override withREVIEW_REPO=owner/name. REVIEW_BANNED_COAUTHOR_REoverrides the substring regex used to dropCo-authored-by:entries (default filters copilot / codex / cursor / claude / anthropic / openai / chatgpt /[bot]/noreply@github/users.noreply.github.com; matched case-insensitively on name or email).- Requires
git,gh,jq.review/fixalso require the executor LLM CLI (defaultclaude);mergealso requires the summary LLM CLI (defaultgemini) unless--summary-llm none.