Automate bounded native Kilo PR review and remediation #5
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/model-intelligence#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Current Owner Decision and Selected Scope
Adrian selected Phase A: preserve the useful native Kilo review/remediation automation independently of the failed issue #3 / PR #4 temporal experiment. Reuse the workflow-only delta from
ef0aa62a22on a new ordinary issue #5 branch from freshly fetched canonical develop. No domain implementation from PR #4 is included or patched. PR #4 remains open/unmerged at STOP_REVISE, with history preserved.Model Intelligence uses ONE normal checkout and ordinary branches. No git worktree for implementation, remediation, review, /finish-pr or /review-pr unless Adrian explicitly re-enables it. No alternate checkout-management mechanism. Never stash/reset unrelated changes automatically; stop if unrelated changes prevent safe switching. Review exact frozen Git objects/current clean PR branch read-only in the same checkout.
Workflow Requirements
Keep /finish-pr as the owner-time-saving native task loop and /review-pr as its standalone review counterpart. pr-reviewer is a newly spawned isolated read-only foreground subagent, verified openai/gpt-6.1-sol / high, denied edits/writes, Git/Forgejo mutation and delegation. Review complete exact current HEAD/base; stable JSON reviewed_head/reviewed_base/verdict/findings/limitations/checks_run is direct handoff. No owner message-copying or required Forgejo publication.
Parent remediates accepted-scope findings, adds regression coverage, runs focused checks and make check, inspects status/full base delta, commits normally as Adrian and pushes the same PR branch. At most three remediation rounds after initial review; each changed HEAD gets a NEW whole-PR reviewer. Terminal outcomes: READY_TO_MERGE only on current APPROVE; STOP_REVISE at the bound; genuine OWNER_DECISION_NEEDED; precise finite BLOCKED. Never merge, release, deploy, promote main, rewrite published history or introduce external orchestration.
Audit AGENTS.md, applicable .kilo/rules, implement-issue, review-pr, finish-pr and reviewer agent. Replace obsolete worktree requirements, remove coupling to PR #4 domain semantics, keep rules concise and reuse the existing bounded automation rather than a new protocol/state machine.
Validation and Delivery
Validate native Kilo command/agent discovery, frontmatter parsing and resolved reviewer permissions. Run repository-owned make check and git diff --check. Create/update ONE independent issue #5 PR to develop with Refs #5. Exercise the native automated finish-pr loop on this workflow PR itself without owner relaying. Report exact base/final HEAD, review/remediation rounds, executed checks and terminal status. Keep issue/PR open; do not merge.
If Phase A becomes READY_TO_MERGE, stop this invocation at the merge-ready workflow PR. M0-01R must not be created or started until this workflow is actually integrated into canonical develop by the human merge authority.
Historical Context
The earlier issue #5 implementation was temporarily embedded in PR #4 at
ef0aa62; the native loop successfully removed manual reviewer handoff, but PR #4 reached STOP_REVISE on domain semantics. Previous comments retain that history. This updated Phase A scope supersedes the earlier instruction to continue patching PR #4.Implemented under the owner's explicit authorization in existing PR #4, not a replacement PR: #4
Workflow commit
ef0aa62a22adds .kilo/agents/pr-reviewer.md and /finish-pr; updates /review-pr, AGENTS and task/authority/validation rules. Native task results are direct handoff, newly spawned reviewers inspect the entire frozen PR, remediation is bounded to three rounds and no merge is allowed. Verified installed Kilo 7.8.3 identifies openai/gpt-6.1-sol/high, parses/discovers commands and reviewer, and resolves edit/Git/Forgejo-write/context-sharing denial with inspected safe checks allowed. No external orchestration requirement or new dependencies.Current combined HEAD
d86e9cdfd4, basea1c3b8b12c. Both issue #3 review defects reproduced before repair; focused tests 59 passed and UV_OFFLINE=1 make check 61 passed. Commits/push verified under Adrian identity, worktree clean. This active workspace's develop context does not dynamically load the new agent; invoking the same repository /review-pr command via bundled CLI from the development worktree successfully spawned a foreground native pr-reviewer task. Review result is being consumed automatically, not relayed by the owner. Issue stays open; no merge or final approval claimed here.Workflow delivery is incorporated in PR #4 under explicit owner authorization; no separate/replacement PR. Exact workflow commit
ef0aa62a22changes AGENTS.md, .kilo/agents/pr-reviewer.md, .kilo/command/finish-pr.md, .kilo/command/review-pr.md, .kilo/rules/10-task-system.md, .kilo/rules/20-forgejo-mcp.md and .kilo/rules/validation.md.Native Kilo 7.8.3 config parsing/discovery and resolved permissions validated; openai/gpt-6.1-sol/high confirmed by installed model listing, schema and actual reviewer task metadata. Effective reviewer edits/Git mutations/Forgejo writes/parent recall/board/delegation denial validated. Native /review-pr and /finish-pr were exercised, automatically consuming newly spawned foreground reviewers' stable JSON and continuing scoped remediation without owner relaying. One non-interactive external-directory rejection was diagnosed and corrected using git check-ignore rather than blanket auto-approval. No external orchestration requirement remains.
The live bounded operation reached its intended architectural escape hatch: after exactly three remediation rounds and a final fresh whole-PR REQUEST_CHANGES, terminal STOP_REVISE was returned, with no fourth fix. Final HEAD
303f5fe118, basea1c3b8b12c. Full make check passes 66 tests and all other gates; final native reviewer JSON exact fields/SHAs validated. The remaining multi-source correction defect was subsequently confirmed by a network-free read-only primary probe. Task results, not comments, controlled the loop; these comments only record delivery. PR/issue stay open, no merge/release/deploy/main promotion or formal review publication.Phase A is required by actual canonical Git evidence: develop remains
a1c3b8b12cand lacks native reviewer/finish command paths/history. Independent workflow PR created: #6Initial HEAD
0406bd5ef5on ordinary issue-5-native-review branch in the original normal checkout. Reused onlyef0aa62workflow delta, then replaced all worktree/alternate-checkout requirements with one clean PR branch and frozen-object read-only review. Source/domain tests/README/packaging/dependencies remain identical to develop; PR #4 remains untouched and STOP_REVISE.Installed native Kilo 7.8.3 discovery/frontmatter/model and resolved reviewer permission assertions pass; UV_OFFLINE=1 make check passes all gates and 2 unchanged bootstrap tests; complete base diff/status/whitespace inspected. Normal Adrian commit/push and exact canonical refs confirmed. Native /finish-pr is being invoked on PR #6 with foreground isolated Sol High whole-PR reviewers and direct JSON handoff, <=3 remediation rounds, no owner relaying or merge. Phase B/M0-01R is not started or created before human integration.
Phase A terminal result: READY_TO_MERGE / APPROVE for independent workflow PR #6. No merge performed; Phase B not started or created.
Exact final HEAD
9def2da405; base/merge-basea1c3b8b12c. All three complete frozen reviews used newly spawned foreground native pr-reviewer tasks, openai/gpt-6.1-sol/high, the SAME normal checkout and direct JSON task handoff:0406bd5ef5: COMMENT with actionable P1 native glob-normalization defect.18acc3d59d: REQUEST_CHANGES for unrestricted Git transport/helper execution.9def2da405: APPROVE, empty findings. Final native task ses_efbd71ed4ffeJtriPGiPdpiW66 returned matching validated JSON; no reviewer was resumed.Normal Adrian commits/pushes:
0406bd5extraction/single-checkout workflow,18acc3dnormalized-glob repair,9def2dacanonical HTTPS-only head queries and denied option/helper/alternate transports. No arbitrary helper was executed; regressions inspect resolved rules using documented normalization, then actual native reviewer performed the allowed canonical Git query.Native frontmatter/discovery/model/permission checks PASS. UV_OFFLINE=1 make check PASS (2 unchanged bootstrap tests, locked sync, Ruff lint/format, basedpyright zero errors/warnings, staged/unstaged whitespace). Final reviewer independently ran full gate and whole-range whitespace. Final MCP/Git currentness matches, checkout clean. Exactly ten workflow Markdown files differ; no domain source/tests/README/packaging/dependency changes, no Git worktree operations or alternate checkout management, no external orchestration/global permission changes/--auto/formal review publication.
Non-interactive helper protected-config edits were auto-rejected, so the explicitly authorized workspace primary used its normal edit/commit tools; native reviewer tasks and automatic result consumption continued without owner relaying. The existing workspace API caches its old agent registry; fresh bundled CLI correctly discovers/invokes the custom native agent. The workflow PR is now ready for human integration. Canonical develop remains unchanged; PR #4 stays open/unmerged at STOP_REVISE with its history preserved.
kilo referenced this issue2026-10-04 22:37:23 +00:00