feat(labels): gitea_labels list hides numeric ids, so action:set cannot use its own output #7
Labels
No labels
area/dsh
area/forgejo
experiment
priority/later
priority/next
priority/now
type/bug
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-gitea#7
Loading…
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?
Symptom
gitea_labels {action: "list"}prints only names:gitea_labels {action: "set"}accepts only numeric label ids (names are silently ignored — #6), so the tool's own list output cannot be used to perform the set. The DSH Bootcamp tells agents to "action: "list"first if you do not know them", which is currently impossible: the ids must be fetched from the REST API.Observed 2026-10-23 on
dsh-plugins/dsh-resend-mcpwhile adopting the label-at-creation policy. After creatingtype/bug,priority/now,area/forgejo:gitea_labels {action:"list"}→ names only, no ids.GET /api/v1/repos/dsh-plugins/dsh-resend-mcp/labels?limit=100→ ids 39, 40, 41.gitea_labels {action:"set", labels:[39,40,41]}→ works.This is the gap between #5 (bare
OK) and #6 (no labels at creation): the one tool meant to provide ids for the workaround hides them.Root cause
lib/handlers/formatters.js:205— the generic array formatter has no labels branch:A label object is
{id, name, color, description, ...}; onlynamesurvives. The sameslice(0, 20)also silently drops labels past row 20 (same defect class as #2).Fix
type/bug (id: 39, #e11d48) — Defect: wrong, missing or misleading behaviour.create(ties into #5):Label "type/bug" created (id 39).action: "set"by resolving them server-side/case-insensitively, which would remove the need for ids in the common case (overlaps #6).Acceptance
gitea_labels {action:"list"}shows each label's numeric id.setusing an id copied from the list output succeeds.createreports the new label's id.Fixed in
4d77e9f(fix(tools): render complete lists and never print a bare OK), merged tomaster(#11).gitea_labels {action:"list"}now printstype/bug (id: 13, #e11d48) — Defect: …;createechoesLabel "…" created (id N).; >100 labels get the visible footer;slimRecordkeepscolor/descriptionfor label-shaped records.Live checks on this repo:
action:"set"on #8 with ids copied from that output succeeded and returned the labels rendered with ids.#6 (labels/assignee/milestone at creation) stays separate, as scoped.