Use labels in triage: a label-listing tool and a labeling triage turn #260
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!260
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-232-label-tools"
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?
Closes: #232
What changed
forgejo_list_labels(new, read-only, no parameters). Lists the repository's labels plus the owning organisation's, with their descriptions. Org labels are marked[org]; labels that steer the repository's automation are marked[automation], followed by a line explaining that setting those is refused in unattended sessions. When.omp/forgejo.yamlcannot be read the marks fall back toStatus/Blocked+ theagent/namespace and the output says so. An agent no longer has to learn the vocabulary from a failing update call, and can see what is off-limits before being denied.To carry this,
fetchAvailableLabelsstops narrowing every label to{ id, name }and keepsdescriptionplus where the label came from; its error handling and de-duplication are unchanged, and theLabelRef-taking helpers are unaffected.One definition of "automation label". The protected-name derivation moved out of
protectedLabelDenialintorepo-config.tsasautomationLabelNames/isAutomationLabel, so the tool's marks and the policy's denials read the same list. The existing denial message forforgejo_update_issue_labelsis byte-identical.forgejo_create_issueis covered by the rule. Both the conversation and the pull-request policy ran it through an unconditional allow, so an automation label could reach the repository on a new issue. It now goes through the same check, denied with…; create the issue without it. The pull-request policy'sdecidebecame async for this.Default triage labels. Without an
issue_handler.promptthe seed told the agent "Do not change labels or anything else", contradicting the same session's system context. It now says to list the labels and apply the ones that fit. The custom-prompt branch is untouched.The pull-request policy stops advertising a tool it always refused.
forgejo_update_issue_labelswas spread in fromCONVERSATION_TOOL_NAMESbut had no rule indecide, so every call fell through to an unattended deny. It is filtered out of that policy's tool list.No new config keys, no protocol or web changes (the generic Forgejo tool view already renders a parameterless read tool).
Verification
Rebased onto
mainat1f40644(which brought theswapLabelsfix and the comment edit/delete tools; the conflicts were the changelog, the trigger-tools doc bullet and the tool-count assertions, now 27).bun run typecheck— clean.bun test— 1649 pass, 0 fail.New tests:
formatLabelList(marks, org/description rendering, the unreadable-config fallback line, the empty case) and policy tests for theforgejo_create_issuelabel check and the three tool lists. The existing protected-label expectations are left unchanged as the regression check on the refactor.omp-deck failed to handle this event: the agent's turn failed.
Details are in omp-deck under webhook delivery
33f48ebe-02d3-4fd4-acc8-c4d23aec44d8(session01a1ca07-3706-7000-9b1f-cee63e67ac21).Try again
7cca040ad8toba81bb7b7a