- poller.py: CommentPoller polls PR comments rather than taking webhooks, keeping the VM outbound-only (B3). On an outage it backs off exponentially, caps, and retries indefinitely while logging: polling is pure intake, so an outage delays a reaction but never fails a task or forces a transition - prime() marks the existing thread as seen without delivering it, so starting a watch does not re-address feedback already handled - Review loop: a comment in PR_OPEN enters the canonical transcript, the executor responds, and the fix is pushed to the same branch with a reply on the PR. No intent is recorded for a follow-up push — the PR already exists, so a repeated push is harmless, unlike opening a second PR - Comment authors are checked against a separate Gitea operator allowlist: a PR comment is an instruction channel into an agent that writes code, so it is operator-scoped, and a Gitea login is not a Matrix MXID (A4 per-channel allowlists) - Orchestrator now holds a lock: transport and the poller deliver on separate threads, and state transitions must not interleave - Backoff timings are injectable, so the outage path is tested in milliseconds instead of being untestable Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 lines
1.7 KiB
Bash
37 lines
1.7 KiB
Bash
# Copy to .env (chmod 600). Real environment variables win over this file.
|
|
# .env is gitignored; never commit real values.
|
|
|
|
# --- LLM access (A5): the LiteLLM proxy is the single LLM destination ---
|
|
NISSE_LLM_BASE_URL=http://litellm.example:4000
|
|
NISSE_LLM_TOKEN=sk-your-litellm-virtual-key
|
|
|
|
# --- Role mapping (A11): roles resolve to concrete model strings ---
|
|
NISSE_ROLE_EXECUTOR=anthropic/claude-haiku-4-5-20251001
|
|
NISSE_ROLE_PLANNER=anthropic/claude-opus-5
|
|
NISSE_ROLE_DELEGATE=anthropic/claude-opus-5
|
|
NISSE_ROLE_CONSULTANT=anthropic/claude-opus-5
|
|
|
|
# Opt-in for the live planning test: a model the virtual key can reach that
|
|
# holds the tool-call contract. Planning escalates unconditionally (A12), and
|
|
# small local models do not hold the contract reliably — llama3.2 returns
|
|
# truncated tool arguments, Haiku-class and up are solid.
|
|
NISSE_LIVE_PLANNER_MODEL=claude-haiku-4-5
|
|
|
|
# --- Matrix transport (A1), used by nisse-dev's MatrixTransport ---
|
|
NISSE_MATRIX_HOMESERVER=https://matrix.example
|
|
NISSE_MATRIX_USER_ID=@nisse-dev:example
|
|
NISSE_MATRIX_TOKEN=syt_your_matrix_access_token
|
|
NISSE_MATRIX_ROOM_ID=!roomid:example
|
|
# Dedicated room for the live integration test; never the production room.
|
|
NISSE_MATRIX_TEST_ROOM_ID=!testroomid:example
|
|
NISSE_MATRIX_OPERATORS=@you:example
|
|
|
|
# --- Gitea (B2): service account for branches, PRs, and comment intake ---
|
|
NISSE_GITEA_URL=https://gitea.example
|
|
NISSE_GITEA_TOKEN=your-scoped-service-account-token
|
|
# Sandbox repo for live tests; never the real project repo.
|
|
NISSE_GITEA_TEST_REPO=owner/sandbox-repo
|
|
# Gitea logins allowed to drive the agent via PR comments (A4 per-channel
|
|
# allowlist; a Matrix MXID and a Gitea login are different names).
|
|
NISSE_GITEA_OPERATORS=your-gitea-login
|