feat(planner): the planner reads the issues a pull request links to #32
No reviewers
Labels
No labels
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Beanstalk!32
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Beanstalk:feat/planner-issues"
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?
Why
The AI planner only read the pull request itself: its title, body, diff and comments. Most Longshot PRs say what they fix by linking an issue ("Fixes #40"), and the issue is where the bug is described: what goes wrong, where in the game, on which hardware, and how to make it happen. Without it, the planner guesses where to test.
What changed
Before it writes a plan, the planner looks up the issues the PR links to and gives the model what they say.
planner.issue_refs: finds the numbers named in the maintainer's instructions, the PR's title and body, and its comments, first named first. It picks up#12,MagicBeanDev/Longshot#12, and links to this repository's/issues/12or/pulls/12. It leaves out other repositories (MagicBeanDev/Beanstalk#21), HTML entities ((), URL anchors (page#5) and the PR's own number.planner.gather_issues: looks up at most 10 of those numbers and keeps at most 4 issues; a number that is a pull request, or nothing, is skipped. Each issue gives its title, state, text (at most 4 KB) and first comments, oldest first (at most 3 KB together, each at most 1.5 KB). The farm's own comments are left out. A lookup that fails is logged and skipped, so it never stops the planning.ISSUE_TITLE,ISSUE_BODY,ISSUE_COMMENT), with the same random word as the PR's own blocks. The system text now says that the people on linked issues wrote data too.forgejo.get_issue(GET /repos/{repo}/issues/{n}) and the fake Forgejo'sissues.docs/test-plan.md(what the model reads) anddocs/architecture.md.Testing
test_issue_refs(the forms it accepts and the ones it leaves out) andtest_gather_reads_the_linked_issues. The second covers an issue linked from the body and one from a comment, a number that is a PR, a missing number, the caps, the farm's comments being left out, and the prompt's blocks.test_each_untrusted_item_in_its_own_nonce_blocknow also checks that an issue's text can't close its block.@Beanstalkfor a PR that links an issue.Risks
The prompt grows by at most about 28 KB when a PR links 4 long issues. The text comes from anyone who can comment on an issue, so it is marked as data like the PR's comments. The model's answer passes the same checks as before, whatever it read.