fix(daemon): productionize core repo operations lane#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b4f9b8f10
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # the loop's GH token for `gh`, and any model/provider keys. It must NOT | ||
| # contain production Vault tokens or fleet SSH material — the backend env | ||
| # is scrubbed, but keep the surface minimal. | ||
| Environment=HYRULE_MODEL_POLICY_FILE=/opt/engineering-loop/configs/loop/model-policy.production.yml |
There was a problem hiding this comment.
Make Pi auth visible to the production unit
When this unit selects the production policy, every backend tier resolves to pi, but the backend subprocess gets a scrubbed environment, so provider API-key env vars are not available to Pi and it falls back to its login store. The Pi quickstart documents /login storing API-key auth in ~/.pi/agent/auth.json, while systemd.exec says ProtectHome=yes makes /home, /root, and /run/user inaccessible; in this service context pi --print cannot read the loop user's completed Pi auth, so approved runs will fail at backend startup unless HOME/auth storage is moved under /var/lib/engineering-loop or the unit binds/relaxes home access.
Useful? React with 👍 / 👎.
Summary
network-operations->hyrule-infra,noc-agent->hyrule-noc-agent)engineering-loop,hyrule-infra, and optionalnetwork-operationscheckoutsSafety / rollout
model-policy.ymlremains mock-backed for offline tests; production policy lives atconfigs/loop/model-policy.production.ymland is selected by the loop VM systemd unit.Validation
uv run --group dev python -m pytest -q— 158 passeduv run --group dev mypy --strict src— passeduvx ruff check src tests— passeduv run hyrule-engineering-loop models validate --model-policy configs/loop/model-policy.production.yml --json— ok (warnings only for absent local API keys)