Skip to content

self-development: scope kelos-planner, kelos-reviewer, and kelos-api-reviewer with commentOn#1205

Open
kelos-bot[bot] wants to merge 1 commit into
mainfrom
kelos-task-1089
Open

self-development: scope kelos-planner, kelos-reviewer, and kelos-api-reviewer with commentOn#1205
kelos-bot[bot] wants to merge 1 commit into
mainfrom
kelos-task-1089

Conversation

@kelos-bot

@kelos-bot kelos-bot Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Adds the commentOn filter field (introduced in #1081) to the three remaining webhook-driven TaskSpawners that previously relied on prompt-side workarounds or no guard at all:

  • kelos-planner.yaml — adds commentOn: Issue to the issue_comment filter and deletes the now-redundant ### 0. Confirm the target is an issue prompt block. /kelos plan typed on a PR is now rejected at the webhook layer instead of spawning an Opus task that bails at step 0.
  • kelos-reviewer.yaml — adds commentOn: PullRequest to the issue_comment filter. /kelos review typed on a plain issue can no longer spawn a task whose prompt unconditionally calls gh pr view and git diff origin/main...HEAD. The pull_request_review filter entry is already PR-only by event type, so no change is needed there.
  • kelos-api-reviewer.yaml — splits the issue_comment filter into two entries with explicit commentOn: Issue and commentOn: PullRequest. This spawner is intentionally dual-mode (the prompt dispatches on gh pr view to handle both issues and PRs), so the filter cannot collapse to a single subject; two explicit filters make the dual-mode intent visible at the webhook layer instead of relying on commentOn being absent.

kelos-squash-commits.yaml already gained commentOn: PullRequest in 1a61816, so no further change is needed for that spawner.

After this change, every webhook-driven TaskSpawner declares its intended subject at the filter layer.

Which issue(s) this PR is related to:

Fixes #1089

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

@kelos-bot kelos-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Kelos Worker Agent @gjkim42

Review Summary

Verdict: COMMENT (cannot self-approve)
Overall correctness: patch is correct
Scope: Adds commentOn to the issue_comment filters of kelos-planner (Issue) and kelos-reviewer (PullRequest), and deletes the now-redundant step-0 PR-vs-issue guard from the planner prompt. Completes the cleanup deferred by #1081 / partially started in 1a61816.

Findings Overview

Priority Count File:Line Summary
P0 0 none
P1 0 none
P2 0 none
P3 0 none

Key takeaways

  • Both filter values (Issue, PullRequest) match the +kubebuilder:validation:Enum=Issue;PullRequest marker on WebhookFilter.CommentOn (api/v1alpha1/taskspawner_types.go:484).
  • Removing the ### 0. Confirm the target is an issue block from kelos-planner.yaml is safe — the filter now enforces the same constraint at the webhook layer, and no other prompt step depends on that guard.
  • kelos-reviewer.yaml's branch template already uses the safe {{with index . "Branch"}}{{.}}{{else}}main{{end}} fallback (line 82), so no additional change is needed there.
  • kelos-squash-commits.yaml is correctly out of scope — it already got commentOn: PullRequest in 1a61816 (verified at line 16).
  • /kind cleanup + release-note: NONE is the right classification for a self-development/-only change.

@gjkim42 gjkim42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let'a apply this to kelos api reviewer as well
/kelos pick-up

@kelos-bot

kelos-bot Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-pr-responder-pull-request-review-542771071540 has succeeded. ✅

@kelos-bot kelos-bot Bot changed the title self-development: scope kelos-planner and kelos-reviewer with commentOn self-development: scope kelos-planner, kelos-reviewer, and kelos-api-reviewer with commentOn May 24, 2026
@kelos-bot

kelos-bot Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Agent @gjkim42

All review feedback was addressed in commit ba5c0c6 (added commentOn filters to kelos-api-reviewer.yaml with the dual-mode pattern). PR title and body are updated; CI checks (build, verify, test, test-integration) are green. Ready for re-review.

@gjkim42 gjkim42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does kelos api reviewer work for an issue as well? (Based on the prompt?)

/kelos pick-up
then squash commits

@kelos-bot

kelos-bot Bot commented May 24, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-pr-responder-pull-request-review-b36ee724e682 has succeeded. ✅

Add the commentOn filter (introduced in #1081) to the three remaining
webhook-driven TaskSpawners so each declares its intended subject at
the filter layer instead of relying on prompt-side workarounds:

- kelos-planner: add commentOn: Issue and drop the now-redundant
  step-0 prompt block that exited if the target was a PR.
- kelos-reviewer: add commentOn: PullRequest to the issue_comment
  filter so /kelos review on a plain issue no longer spawns a task
  whose prompt unconditionally runs gh pr view and git diff.
- kelos-api-reviewer: split the issue_comment filter into two
  entries with explicit commentOn: Issue and commentOn: PullRequest.
  This spawner is intentionally dual-mode (the prompt dispatches on
  gh pr view to handle both subjects), so two explicit filters make
  the dual-mode intent visible at the webhook layer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant