diff --git a/.github/issue-investigation/AUTOMATION.md b/.github/issue-investigation/AUTOMATION.md index 743ac6d8f..d723b8b50 100644 --- a/.github/issue-investigation/AUTOMATION.md +++ b/.github/issue-investigation/AUTOMATION.md @@ -8,12 +8,12 @@ This workflow investigates newly opened **VotingPlugin** issues and, when the ag 2. Confirm the selected Environment provides `OPENAI_API_KEY` and, if needed, `OPENAI_PROJECT_ID`. An Environment requiring reviewer approval will delay automatic investigations until approved. 3. After merging this PR, open a non-sensitive test issue and verify the investigation and separate post-report job. GitHub only triggers issue-opened workflows from the default branch. -Without the repository variable, automatic investigations **skip before calling OpenAI**. Manual runs still use the Environment selected in their form. +Without the repository variable, automatic investigations **skip before calling OpenAI**. The preflight also checks that the named GitHub Environment exists; a missing Environment skips and a failed lookup stops automatic work rather than creating an unprotected environment. The existing `OPENAI_API_KEY` secret is not read or changed by this check. Manual runs still use the Environment selected in their form. ## Automatic behavior and cost safeguards - Only `issues.opened` triggers automatic runs. Pull requests, bot-authored issues, edits, and other events are ineligible. -- Before opening a paid session, a read-only preflight checks the Actions workflow run count for the current UTC day. It permits at most the first **five** issue-triggered runs per day. Missing or invalid counts fail closed; skipped issues may be investigated manually. +- Before opening a paid session, a read-only preflight verifies the Environment by GitHub's read-only Environment API (using the job's `actions: read` permission), then checks the Actions workflow run count for the current UTC day. It permits at most the first **five** issue-triggered runs per day. Missing or invalid counts fail closed; skipped issues may be investigated manually. - Automatic sessions have a 10-minute agent timeout; manual runs retain the selected 5–30-minute timeout. This is **not** a dollar spending cap. - Automatic input is capped at 300 title characters, 14,000 body characters, and five comments of 2,000 characters each. Truncation is disclosed to the model; the issue URL is retained. - The agent uses **gpt-6-luna** with medium reasoning and no live web search. The investigation stays read-only in an isolated OpenAI-hosted sandbox. Usage, diagnostics, and reports are recorded as workflow artifacts.