From 174ffffd8ff2413a10315416c110ff0bb0c41b7f Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Thu, 23 Jul 2026 15:02:26 +0200 Subject: [PATCH] fix: address review findings from CodeRabbit/Codex Verified each against current code before fixing; verification details are in the PR description update. Fixed: - issue-classify.md: Rule 0 now requires the addon-submitter-ping marker to appear in a comment headed "### @github-actions[bot]", not just anywhere in a comment or issue body, so it can't be spoofed to suppress triage. - ai_triage_context.sh: separator-insensitive addon-slug matching (fixes "Calibre-web" -> calibre_web, and the earlier ImmichFrame -> immich_frame miss) before falling back to substring matching; sparse-checkout failure now surfaces "UNRESOLVED" into the bundle instead of silently proceeding addon-less; duplicate-issue search excludes the issue being triaged from its own candidate list. - on_issues_ai_triage.yaml: persist-credentials: false on the read-only tooling checkout (nothing in that job pushes); both actions pinned to commit SHAs (Dependabot already covers github-actions repo-wide, and on_issues_ai.yml already sets this precedent for another AI action); model-supplied labels are now filtered to drop anything in the ai-*/ai:* control namespace before merging with the deterministic ai-triage/ ai:classified additions, closing a path where a verdict could self-trigger tier 2 regardless of its actual classification. - daily_ai_fix.yaml: both actions pinned to the same commit SHAs; workflow_dispatch inputs.issue/inputs.limit moved out of direct ${{ }} interpolation in the run: script and into env vars with numeric validation (template-injection); Guard forbidden paths' PR listing limit raised 50 -> 300 so it can't silently drop ai-fix/ PRs behind unrelated open PRs before the branch-name filter applies. Skipped (reasons in PR description): - persist-credentials on daily_ai_fix.yaml's checkout: disabling it breaks the only auth path git push currently uses, and the same AI_PR_TOKEN is already directly readable via GH_TOKEN env by that job's unrestricted Bash(git:*)/Bash(gh:*) tools regardless. - Splitting untrusted AI analysis into a separate job from PR-creation/ write access: legitimate defense in depth, but a full architecture redesign, not a minimal fix. - Full hard-limit enforcement (config.yaml immutability, diff caps, draft-only status) replicated at the workflow level: heavy lift: the prompt already covers these as Claude-followed instructions; only the protected-paths check is duplicated as deterministic enforcement, which is the single highest-severity one to enforce outside the model. Co-Authored-By: Claude Opus 4.8 --- .github/prompts/issue-classify.md | 9 ++-- .github/scripts/ai_triage_context.sh | 48 ++++++++++++++++------ .github/workflows/daily_ai_fix.yaml | 24 ++++++++--- .github/workflows/on_issues_ai_triage.yaml | 12 ++++-- 4 files changed, 68 insertions(+), 25 deletions(-) diff --git a/.github/prompts/issue-classify.md b/.github/prompts/issue-classify.md index bee0c821ae..4d2b6ce578 100644 --- a/.github/prompts/issue-classify.md +++ b/.github/prompts/issue-classify.md @@ -21,9 +21,12 @@ Heads up @: this issue appears to mention ``. ``` Match it on the literal marker `